diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 16989262..d36a630d 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,282 +1,282 @@ # Bilingual editorial review -25 of 390 lessons reviewed. 365 remain. +390 of 390 lessons reviewed. 0 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. Scope: every lesson, including summaries, parameter labels, examples, exercises, explanations, formulas, derivation notes, and applications. -## aerodynamics (0/15) - -- [ ] [bernoulli](aerodynamics/bernoulli/en.md) · [Arabic](aerodynamics/bernoulli/ar.md) -- [ ] [boundary-layer](aerodynamics/boundary-layer/en.md) · [Arabic](aerodynamics/boundary-layer/ar.md) -- [ ] [drag-equation](aerodynamics/drag-equation/en.md) · [Arabic](aerodynamics/drag-equation/ar.md) -- [ ] [four-forces-of-flight](aerodynamics/four-forces-of-flight/en.md) · [Arabic](aerodynamics/four-forces-of-flight/ar.md) -- [ ] [gliding-and-glide-ratio](aerodynamics/gliding-and-glide-ratio/en.md) · [Arabic](aerodynamics/gliding-and-glide-ratio/ar.md) -- [ ] [helicopters-and-rotors](aerodynamics/helicopters-and-rotors/en.md) · [Arabic](aerodynamics/helicopters-and-rotors/ar.md) -- [ ] [how-wings-really-lift](aerodynamics/how-wings-really-lift/en.md) · [Arabic](aerodynamics/how-wings-really-lift/ar.md) -- [ ] [lift](aerodynamics/lift/en.md) · [Arabic](aerodynamics/lift/ar.md) -- [ ] [lift-to-drag](aerodynamics/lift-to-drag/en.md) · [Arabic](aerodynamics/lift-to-drag/ar.md) -- [ ] [mach-number](aerodynamics/mach-number/en.md) · [Arabic](aerodynamics/mach-number/ar.md) -- [ ] [propellers-and-jets](aerodynamics/propellers-and-jets/en.md) · [Arabic](aerodynamics/propellers-and-jets/ar.md) -- [ ] [reynolds-number](aerodynamics/reynolds-number/en.md) · [Arabic](aerodynamics/reynolds-number/ar.md) -- [ ] [stall-and-angle-of-attack](aerodynamics/stall-and-angle-of-attack/en.md) · [Arabic](aerodynamics/stall-and-angle-of-attack/ar.md) -- [ ] [terminal-velocity](aerodynamics/terminal-velocity/en.md) · [Arabic](aerodynamics/terminal-velocity/ar.md) -- [ ] [wingtip-vortices-and-induced-drag](aerodynamics/wingtip-vortices-and-induced-drag/en.md) · [Arabic](aerodynamics/wingtip-vortices-and-induced-drag/ar.md) - -## ai (0/17) - -- [ ] [activation-functions](ai/activation-functions/en.md) · [Arabic](ai/activation-functions/ar.md) -- [ ] [ai-agents](ai/ai-agents/en.md) · [Arabic](ai/ai-agents/ar.md) -- [ ] [attention](ai/attention/en.md) · [Arabic](ai/attention/ar.md) -- [ ] [convolution](ai/convolution/en.md) · [Arabic](ai/convolution/ar.md) -- [ ] [diffusion](ai/diffusion/en.md) · [Arabic](ai/diffusion/ar.md) -- [ ] [linear-regression](ai/linear-regression/en.md) · [Arabic](ai/linear-regression/ar.md) -- [ ] [logistic-regression](ai/logistic-regression/en.md) · [Arabic](ai/logistic-regression/ar.md) -- [ ] [loss-landscape](ai/loss-landscape/en.md) · [Arabic](ai/loss-landscape/ar.md) -- [ ] [neural-network](ai/neural-network/en.md) · [Arabic](ai/neural-network/ar.md) -- [ ] [next-word-prediction](ai/next-word-prediction/en.md) · [Arabic](ai/next-word-prediction/ar.md) -- [ ] [overfitting](ai/overfitting/en.md) · [Arabic](ai/overfitting/ar.md) -- [ ] [rlhf](ai/rlhf/en.md) · [Arabic](ai/rlhf/ar.md) -- [ ] [scaling-laws](ai/scaling-laws/en.md) · [Arabic](ai/scaling-laws/ar.md) -- [ ] [temperature-and-softmax](ai/temperature-and-softmax/en.md) · [Arabic](ai/temperature-and-softmax/ar.md) -- [ ] [tokenization](ai/tokenization/en.md) · [Arabic](ai/tokenization/ar.md) -- [ ] [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) - -## biology (0/13) - -- [ ] [action-potential](biology/action-potential/en.md) · [Arabic](biology/action-potential/ar.md) -- [ ] [bacterial-growth](biology/bacterial-growth/en.md) · [Arabic](biology/bacterial-growth/ar.md) -- [ ] [cell-size-and-surface-area](biology/cell-size-and-surface-area/en.md) · [Arabic](biology/cell-size-and-surface-area/ar.md) -- [ ] [diffusion-and-osmosis](biology/diffusion-and-osmosis/en.md) · [Arabic](biology/diffusion-and-osmosis/ar.md) -- [ ] [dna-and-mutation-rates](biology/dna-and-mutation-rates/en.md) · [Arabic](biology/dna-and-mutation-rates/ar.md) -- [ ] [enzyme-kinetics](biology/enzyme-kinetics/en.md) · [Arabic](biology/enzyme-kinetics/ar.md) -- [ ] [hardy-weinberg](biology/hardy-weinberg/en.md) · [Arabic](biology/hardy-weinberg/ar.md) -- [ ] [heart-rate-and-blood-flow](biology/heart-rate-and-blood-flow/en.md) · [Arabic](biology/heart-rate-and-blood-flow/ar.md) -- [ ] [logistic-population](biology/logistic-population/en.md) · [Arabic](biology/logistic-population/ar.md) -- [ ] [natural-selection](biology/natural-selection/en.md) · [Arabic](biology/natural-selection/ar.md) -- [ ] [photosynthesis-and-light](biology/photosynthesis-and-light/en.md) · [Arabic](biology/photosynthesis-and-light/ar.md) -- [ ] [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) - -- [ ] [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) +## aerodynamics (15/15) + +- [x] [bernoulli](aerodynamics/bernoulli/en.md) · [Arabic](aerodynamics/bernoulli/ar.md) +- [x] [boundary-layer](aerodynamics/boundary-layer/en.md) · [Arabic](aerodynamics/boundary-layer/ar.md) +- [x] [drag-equation](aerodynamics/drag-equation/en.md) · [Arabic](aerodynamics/drag-equation/ar.md) +- [x] [four-forces-of-flight](aerodynamics/four-forces-of-flight/en.md) · [Arabic](aerodynamics/four-forces-of-flight/ar.md) +- [x] [gliding-and-glide-ratio](aerodynamics/gliding-and-glide-ratio/en.md) · [Arabic](aerodynamics/gliding-and-glide-ratio/ar.md) +- [x] [helicopters-and-rotors](aerodynamics/helicopters-and-rotors/en.md) · [Arabic](aerodynamics/helicopters-and-rotors/ar.md) +- [x] [how-wings-really-lift](aerodynamics/how-wings-really-lift/en.md) · [Arabic](aerodynamics/how-wings-really-lift/ar.md) +- [x] [lift](aerodynamics/lift/en.md) · [Arabic](aerodynamics/lift/ar.md) +- [x] [lift-to-drag](aerodynamics/lift-to-drag/en.md) · [Arabic](aerodynamics/lift-to-drag/ar.md) +- [x] [mach-number](aerodynamics/mach-number/en.md) · [Arabic](aerodynamics/mach-number/ar.md) +- [x] [propellers-and-jets](aerodynamics/propellers-and-jets/en.md) · [Arabic](aerodynamics/propellers-and-jets/ar.md) +- [x] [reynolds-number](aerodynamics/reynolds-number/en.md) · [Arabic](aerodynamics/reynolds-number/ar.md) +- [x] [stall-and-angle-of-attack](aerodynamics/stall-and-angle-of-attack/en.md) · [Arabic](aerodynamics/stall-and-angle-of-attack/ar.md) +- [x] [terminal-velocity](aerodynamics/terminal-velocity/en.md) · [Arabic](aerodynamics/terminal-velocity/ar.md) +- [x] [wingtip-vortices-and-induced-drag](aerodynamics/wingtip-vortices-and-induced-drag/en.md) · [Arabic](aerodynamics/wingtip-vortices-and-induced-drag/ar.md) + +## ai (17/17) + +- [x] [activation-functions](ai/activation-functions/en.md) · [Arabic](ai/activation-functions/ar.md) +- [x] [ai-agents](ai/ai-agents/en.md) · [Arabic](ai/ai-agents/ar.md) +- [x] [attention](ai/attention/en.md) · [Arabic](ai/attention/ar.md) +- [x] [convolution](ai/convolution/en.md) · [Arabic](ai/convolution/ar.md) +- [x] [diffusion](ai/diffusion/en.md) · [Arabic](ai/diffusion/ar.md) +- [x] [linear-regression](ai/linear-regression/en.md) · [Arabic](ai/linear-regression/ar.md) +- [x] [logistic-regression](ai/logistic-regression/en.md) · [Arabic](ai/logistic-regression/ar.md) +- [x] [loss-landscape](ai/loss-landscape/en.md) · [Arabic](ai/loss-landscape/ar.md) +- [x] [neural-network](ai/neural-network/en.md) · [Arabic](ai/neural-network/ar.md) +- [x] [next-word-prediction](ai/next-word-prediction/en.md) · [Arabic](ai/next-word-prediction/ar.md) +- [x] [overfitting](ai/overfitting/en.md) · [Arabic](ai/overfitting/ar.md) +- [x] [rlhf](ai/rlhf/en.md) · [Arabic](ai/rlhf/ar.md) +- [x] [scaling-laws](ai/scaling-laws/en.md) · [Arabic](ai/scaling-laws/ar.md) +- [x] [temperature-and-softmax](ai/temperature-and-softmax/en.md) · [Arabic](ai/temperature-and-softmax/ar.md) +- [x] [tokenization](ai/tokenization/en.md) · [Arabic](ai/tokenization/ar.md) +- [x] [what-is-machine-learning](ai/what-is-machine-learning/en.md) · [Arabic](ai/what-is-machine-learning/ar.md) +- [x] [word-embeddings](ai/word-embeddings/en.md) · [Arabic](ai/word-embeddings/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 (13/13) + +- [x] [action-potential](biology/action-potential/en.md) · [Arabic](biology/action-potential/ar.md) +- [x] [bacterial-growth](biology/bacterial-growth/en.md) · [Arabic](biology/bacterial-growth/ar.md) +- [x] [cell-size-and-surface-area](biology/cell-size-and-surface-area/en.md) · [Arabic](biology/cell-size-and-surface-area/ar.md) +- [x] [diffusion-and-osmosis](biology/diffusion-and-osmosis/en.md) · [Arabic](biology/diffusion-and-osmosis/ar.md) +- [x] [dna-and-mutation-rates](biology/dna-and-mutation-rates/en.md) · [Arabic](biology/dna-and-mutation-rates/ar.md) +- [x] [enzyme-kinetics](biology/enzyme-kinetics/en.md) · [Arabic](biology/enzyme-kinetics/ar.md) +- [x] [hardy-weinberg](biology/hardy-weinberg/en.md) · [Arabic](biology/hardy-weinberg/ar.md) +- [x] [heart-rate-and-blood-flow](biology/heart-rate-and-blood-flow/en.md) · [Arabic](biology/heart-rate-and-blood-flow/ar.md) +- [x] [logistic-population](biology/logistic-population/en.md) · [Arabic](biology/logistic-population/ar.md) +- [x] [natural-selection](biology/natural-selection/en.md) · [Arabic](biology/natural-selection/ar.md) +- [x] [photosynthesis-and-light](biology/photosynthesis-and-light/en.md) · [Arabic](biology/photosynthesis-and-light/ar.md) +- [x] [predator-prey](biology/predator-prey/en.md) · [Arabic](biology/predator-prey/ar.md) +- [x] [sir-epidemic](biology/sir-epidemic/en.md) · [Arabic](biology/sir-epidemic/ar.md) + +## calculus (17/17) + +- [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) - -## chemistry (0/13) - -- [ ] [atomic-structure](chemistry/atomic-structure/en.md) · [Arabic](chemistry/atomic-structure/ar.md) -- [ ] [chemical-equilibrium](chemistry/chemical-equilibrium/en.md) · [Arabic](chemistry/chemical-equilibrium/ar.md) -- [ ] [chemical-reaction](chemistry/chemical-reaction/en.md) · [Arabic](chemistry/chemical-reaction/ar.md) -- [ ] [dilution-molarity](chemistry/dilution-molarity/en.md) · [Arabic](chemistry/dilution-molarity/ar.md) -- [ ] [electrochemistry-cells](chemistry/electrochemistry-cells/en.md) · [Arabic](chemistry/electrochemistry-cells/ar.md) -- [ ] [ideal-gas-law](chemistry/ideal-gas-law/en.md) · [Arabic](chemistry/ideal-gas-law/ar.md) -- [ ] [ionic-and-covalent-bonding](chemistry/ionic-and-covalent-bonding/en.md) · [Arabic](chemistry/ionic-and-covalent-bonding/ar.md) -- [ ] [moles-and-molar-mass](chemistry/moles-and-molar-mass/en.md) · [Arabic](chemistry/moles-and-molar-mass/ar.md) -- [ ] [periodic-table](chemistry/periodic-table/en.md) · [Arabic](chemistry/periodic-table/ar.md) -- [ ] [periodic-trends](chemistry/periodic-trends/en.md) · [Arabic](chemistry/periodic-trends/ar.md) -- [ ] [ph-scale](chemistry/ph-scale/en.md) · [Arabic](chemistry/ph-scale/ar.md) -- [ ] [reaction-rate](chemistry/reaction-rate/en.md) · [Arabic](chemistry/reaction-rate/ar.md) -- [ ] [titration-curve](chemistry/titration-curve/en.md) · [Arabic](chemistry/titration-curve/ar.md) - -## computer-science (0/12) - -- [ ] [algorithms-and-complexity](computer-science/algorithms-and-complexity/en.md) · [Arabic](computer-science/algorithms-and-complexity/ar.md) -- [ ] [binary-numbers](computer-science/binary-numbers/en.md) · [Arabic](computer-science/binary-numbers/ar.md) -- [ ] [breadth-first-search](computer-science/breadth-first-search/en.md) · [Arabic](computer-science/breadth-first-search/ar.md) -- [ ] [bubble-sort](computer-science/bubble-sort/en.md) · [Arabic](computer-science/bubble-sort/ar.md) -- [ ] [depth-first-search](computer-science/depth-first-search/en.md) · [Arabic](computer-science/depth-first-search/ar.md) -- [ ] [dijkstra](computer-science/dijkstra/en.md) · [Arabic](computer-science/dijkstra/ar.md) -- [ ] [exponential-vs-polynomial](computer-science/exponential-vs-polynomial/en.md) · [Arabic](computer-science/exponential-vs-polynomial/ar.md) -- [ ] [half-adder](computer-science/half-adder/en.md) · [Arabic](computer-science/half-adder/ar.md) -- [ ] [logic-gates](computer-science/logic-gates/en.md) · [Arabic](computer-science/logic-gates/ar.md) -- [ ] [merge-sort](computer-science/merge-sort/en.md) · [Arabic](computer-science/merge-sort/ar.md) -- [ ] [quicksort](computer-science/quicksort/en.md) · [Arabic](computer-science/quicksort/ar.md) -- [ ] [sorting-in-the-real-world](computer-science/sorting-in-the-real-world/en.md) · [Arabic](computer-science/sorting-in-the-real-world/ar.md) - -## cosmos (0/12) - -- [ ] [cosmic-microwave-background](cosmos/cosmic-microwave-background/en.md) · [Arabic](cosmos/cosmic-microwave-background/ar.md) -- [ ] [dark-energy](cosmos/dark-energy/en.md) · [Arabic](cosmos/dark-energy/ar.md) -- [ ] [dark-matter-rotation-curves](cosmos/dark-matter-rotation-curves/en.md) · [Arabic](cosmos/dark-matter-rotation-curves/ar.md) -- [ ] [exoplanet-transits](cosmos/exoplanet-transits/en.md) · [Arabic](cosmos/exoplanet-transits/ar.md) -- [ ] [expanding-universe-hubble-law](cosmos/expanding-universe-hubble-law/en.md) · [Arabic](cosmos/expanding-universe-hubble-law/ar.md) -- [ ] [gravitational-lensing](cosmos/gravitational-lensing/en.md) · [Arabic](cosmos/gravitational-lensing/ar.md) -- [ ] [life-of-a-star](cosmos/life-of-a-star/en.md) · [Arabic](cosmos/life-of-a-star/ar.md) -- [ ] [parallax-and-distances](cosmos/parallax-and-distances/en.md) · [Arabic](cosmos/parallax-and-distances/ar.md) -- [ ] [quark-confinement](cosmos/quark-confinement/en.md) · [Arabic](cosmos/quark-confinement/ar.md) -- [ ] [quarks-and-protons](cosmos/quarks-and-protons/en.md) · [Arabic](cosmos/quarks-and-protons/ar.md) -- [ ] [quasars](cosmos/quasars/en.md) · [Arabic](cosmos/quasars/ar.md) -- [ ] [the-scale-of-the-universe](cosmos/the-scale-of-the-universe/en.md) · [Arabic](cosmos/the-scale-of-the-universe/ar.md) - -## cryptography (0/20) - -- [ ] [block-ciphers-and-aes](cryptography/block-ciphers-and-aes/en.md) · [Arabic](cryptography/block-ciphers-and-aes/ar.md) -- [ ] [caesar-cipher](cryptography/caesar-cipher/en.md) · [Arabic](cryptography/caesar-cipher/ar.md) -- [ ] [confusion-and-diffusion](cryptography/confusion-and-diffusion/en.md) · [Arabic](cryptography/confusion-and-diffusion/ar.md) -- [ ] [diffie-hellman](cryptography/diffie-hellman/en.md) · [Arabic](cryptography/diffie-hellman/ar.md) -- [ ] [digital-signatures](cryptography/digital-signatures/en.md) · [Arabic](cryptography/digital-signatures/ar.md) -- [ ] [elliptic-curve-cryptography](cryptography/elliptic-curve-cryptography/en.md) · [Arabic](cryptography/elliptic-curve-cryptography/ar.md) -- [ ] [enigma-machine](cryptography/enigma-machine/en.md) · [Arabic](cryptography/enigma-machine/ar.md) -- [ ] [frequency-analysis](cryptography/frequency-analysis/en.md) · [Arabic](cryptography/frequency-analysis/ar.md) -- [ ] [hash-functions](cryptography/hash-functions/en.md) · [Arabic](cryptography/hash-functions/ar.md) -- [ ] [lattice-cryptography](cryptography/lattice-cryptography/en.md) · [Arabic](cryptography/lattice-cryptography/ar.md) -- [ ] [modular-arithmetic](cryptography/modular-arithmetic/en.md) · [Arabic](cryptography/modular-arithmetic/ar.md) -- [ ] [one-way-functions](cryptography/one-way-functions/en.md) · [Arabic](cryptography/one-way-functions/ar.md) -- [ ] [password-salting](cryptography/password-salting/en.md) · [Arabic](cryptography/password-salting/ar.md) -- [ ] [rsa-encryption](cryptography/rsa-encryption/en.md) · [Arabic](cryptography/rsa-encryption/ar.md) -- [ ] [secret-sharing](cryptography/secret-sharing/en.md) · [Arabic](cryptography/secret-sharing/ar.md) -- [ ] [stream-ciphers](cryptography/stream-ciphers/en.md) · [Arabic](cryptography/stream-ciphers/ar.md) -- [ ] [transposition-ciphers](cryptography/transposition-ciphers/en.md) · [Arabic](cryptography/transposition-ciphers/ar.md) -- [ ] [vigenere-cipher](cryptography/vigenere-cipher/en.md) · [Arabic](cryptography/vigenere-cipher/ar.md) -- [ ] [xor-and-one-time-pad](cryptography/xor-and-one-time-pad/en.md) · [Arabic](cryptography/xor-and-one-time-pad/ar.md) -- [ ] [zero-knowledge-proofs](cryptography/zero-knowledge-proofs/en.md) · [Arabic](cryptography/zero-knowledge-proofs/ar.md) - -## data (0/12) - -- [ ] [bits-bytes-and-data-sizes](data/bits-bytes-and-data-sizes/en.md) · [Arabic](data/bits-bytes-and-data-sizes/ar.md) -- [ ] [column-storage-and-bigquery](data/column-storage-and-bigquery/en.md) · [Arabic](data/column-storage-and-bigquery/ar.md) -- [ ] [compression-and-entropy](data/compression-and-entropy/en.md) · [Arabic](data/compression-and-entropy/ar.md) -- [ ] [data-visualisation-honestly](data/data-visualisation-honestly/en.md) · [Arabic](data/data-visualisation-honestly/ar.md) -- [ ] [grouping-and-totals](data/grouping-and-totals/en.md) · [Arabic](data/grouping-and-totals/ar.md) -- [ ] [hashing-and-checksums](data/hashing-and-checksums/en.md) · [Arabic](data/hashing-and-checksums/ar.md) -- [ ] [indexes-and-fast-search](data/indexes-and-fast-search/en.md) · [Arabic](data/indexes-and-fast-search/ar.md) -- [ ] [joins-between-tables](data/joins-between-tables/en.md) · [Arabic](data/joins-between-tables/ar.md) -- [ ] [mapreduce](data/mapreduce/en.md) · [Arabic](data/mapreduce/ar.md) -- [ ] [parallel-computing](data/parallel-computing/en.md) · [Arabic](data/parallel-computing/ar.md) -- [ ] [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) - -## earth-space (0/19) - -- [ ] [day-length-and-latitude](earth-space/day-length-and-latitude/en.md) · [Arabic](earth-space/day-length-and-latitude/ar.md) -- [ ] [earth-size](earth-space/earth-size/en.md) · [Arabic](earth-space/earth-size/ar.md) -- [ ] [earthquake-magnitude](earth-space/earthquake-magnitude/en.md) · [Arabic](earth-space/earthquake-magnitude/ar.md) -- [ ] [eclipses](earth-space/eclipses/en.md) · [Arabic](earth-space/eclipses/ar.md) -- [ ] [escape-velocity](earth-space/escape-velocity/en.md) · [Arabic](earth-space/escape-velocity/ar.md) -- [ ] [greenhouse-effect](earth-space/greenhouse-effect/en.md) · [Arabic](earth-space/greenhouse-effect/ar.md) -- [ ] [kepler-orbits](earth-space/kepler-orbits/en.md) · [Arabic](earth-space/kepler-orbits/ar.md) -- [ ] [moon-distance](earth-space/moon-distance/en.md) · [Arabic](earth-space/moon-distance/ar.md) -- [ ] [moon-phases](earth-space/moon-phases/en.md) · [Arabic](earth-space/moon-phases/ar.md) -- [ ] [moon-size](earth-space/moon-size/en.md) · [Arabic](earth-space/moon-size/ar.md) -- [ ] [planet-distances](earth-space/planet-distances/en.md) · [Arabic](earth-space/planet-distances/ar.md) -- [ ] [plate-tectonics](earth-space/plate-tectonics/en.md) · [Arabic](earth-space/plate-tectonics/ar.md) -- [ ] [radioactive-dating](earth-space/radioactive-dating/en.md) · [Arabic](earth-space/radioactive-dating/ar.md) -- [ ] [seasons](earth-space/seasons/en.md) · [Arabic](earth-space/seasons/ar.md) -- [ ] [sun-distance](earth-space/sun-distance/en.md) · [Arabic](earth-space/sun-distance/ar.md) -- [ ] [sun-size](earth-space/sun-size/en.md) · [Arabic](earth-space/sun-size/ar.md) -- [ ] [the-water-cycle-and-clouds](earth-space/the-water-cycle-and-clouds/en.md) · [Arabic](earth-space/the-water-cycle-and-clouds/ar.md) -- [ ] [tides](earth-space/tides/en.md) · [Arabic](earth-space/tides/ar.md) -- [ ] [transit-of-venus](earth-space/transit-of-venus/en.md) · [Arabic](earth-space/transit-of-venus/ar.md) - -## economics (0/12) - -- [ ] [budgeting-and-saving](economics/budgeting-and-saving/en.md) · [Arabic](economics/budgeting-and-saving/ar.md) -- [ ] [compound-interest](economics/compound-interest/en.md) · [Arabic](economics/compound-interest/ar.md) -- [ ] [elasticity](economics/elasticity/en.md) · [Arabic](economics/elasticity/ar.md) -- [ ] [exchange-rates](economics/exchange-rates/en.md) · [Arabic](economics/exchange-rates/ar.md) -- [ ] [gdp-and-growth](economics/gdp-and-growth/en.md) · [Arabic](economics/gdp-and-growth/ar.md) -- [ ] [inflation](economics/inflation/en.md) · [Arabic](economics/inflation/ar.md) -- [ ] [loan-amortization](economics/loan-amortization/en.md) · [Arabic](economics/loan-amortization/ar.md) -- [ ] [present-value](economics/present-value/en.md) · [Arabic](economics/present-value/ar.md) -- [ ] [price-controls](economics/price-controls/en.md) · [Arabic](economics/price-controls/ar.md) -- [ ] [risk-and-diversification](economics/risk-and-diversification/en.md) · [Arabic](economics/risk-and-diversification/ar.md) -- [ ] [supply-and-demand](economics/supply-and-demand/en.md) · [Arabic](economics/supply-and-demand/ar.md) -- [ ] [taxes-and-brackets](economics/taxes-and-brackets/en.md) · [Arabic](economics/taxes-and-brackets/ar.md) - -## electricity (0/14) - -- [ ] [ac-power](electricity/ac-power/en.md) · [Arabic](electricity/ac-power/ar.md) -- [ ] [batteries-and-internal-resistance](electricity/batteries-and-internal-resistance/en.md) · [Arabic](electricity/batteries-and-internal-resistance/ar.md) -- [ ] [capacitors](electricity/capacitors/en.md) · [Arabic](electricity/capacitors/ar.md) -- [ ] [charge-and-current](electricity/charge-and-current/en.md) · [Arabic](electricity/charge-and-current/ar.md) -- [ ] [electric-power-and-energy-bills](electricity/electric-power-and-energy-bills/en.md) · [Arabic](electricity/electric-power-and-energy-bills/ar.md) -- [ ] [electrical-safety](electricity/electrical-safety/en.md) · [Arabic](electricity/electrical-safety/ar.md) -- [ ] [kirchhoffs-laws](electricity/kirchhoffs-laws/en.md) · [Arabic](electricity/kirchhoffs-laws/ar.md) -- [ ] [ohms-law](electricity/ohms-law/en.md) · [Arabic](electricity/ohms-law/ar.md) -- [ ] [rc-circuit](electricity/rc-circuit/en.md) · [Arabic](electricity/rc-circuit/ar.md) -- [ ] [resistance-and-resistivity](electricity/resistance-and-resistivity/en.md) · [Arabic](electricity/resistance-and-resistivity/ar.md) -- [ ] [rlc-resonance](electricity/rlc-resonance/en.md) · [Arabic](electricity/rlc-resonance/ar.md) -- [ ] [series-parallel](electricity/series-parallel/en.md) · [Arabic](electricity/series-parallel/ar.md) -- [ ] [smith-chart](electricity/smith-chart/en.md) · [Arabic](electricity/smith-chart/ar.md) -- [ ] [voltage-and-energy](electricity/voltage-and-energy/en.md) · [Arabic](electricity/voltage-and-energy/ar.md) - -## electromagnetism (0/12) - -- [ ] [amperes-law-and-solenoid](electromagnetism/amperes-law-and-solenoid/en.md) · [Arabic](electromagnetism/amperes-law-and-solenoid/ar.md) -- [ ] [coulombs-law](electromagnetism/coulombs-law/en.md) · [Arabic](electromagnetism/coulombs-law/ar.md) -- [ ] [electric-motors](electromagnetism/electric-motors/en.md) · [Arabic](electromagnetism/electric-motors/ar.md) -- [ ] [electric-potential](electromagnetism/electric-potential/en.md) · [Arabic](electromagnetism/electric-potential/ar.md) -- [ ] [electromagnetic-induction-in-daily-life](electromagnetism/electromagnetic-induction-in-daily-life/en.md) · [Arabic](electromagnetism/electromagnetic-induction-in-daily-life/ar.md) -- [ ] [electromagnetic-waves-and-the-spectrum](electromagnetism/electromagnetic-waves-and-the-spectrum/en.md) · [Arabic](electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md) -- [ ] [faradays-law](electromagnetism/faradays-law/en.md) · [Arabic](electromagnetism/faradays-law/ar.md) -- [ ] [gauss-law](electromagnetism/gauss-law/en.md) · [Arabic](electromagnetism/gauss-law/ar.md) -- [ ] [generators-and-ac](electromagnetism/generators-and-ac/en.md) · [Arabic](electromagnetism/generators-and-ac/ar.md) -- [ ] [lorentz-force](electromagnetism/lorentz-force/en.md) · [Arabic](electromagnetism/lorentz-force/ar.md) -- [ ] [magnets-and-field-lines](electromagnetism/magnets-and-field-lines/en.md) · [Arabic](electromagnetism/magnets-and-field-lines/ar.md) -- [ ] [transformers](electromagnetism/transformers/en.md) · [Arabic](electromagnetism/transformers/ar.md) - -## engineering (0/12) - -- [ ] [beam-bending](engineering/beam-bending/en.md) · [Arabic](engineering/beam-bending/ar.md) -- [ ] [bridges-and-trusses](engineering/bridges-and-trusses/en.md) · [Arabic](engineering/bridges-and-trusses/ar.md) -- [ ] [decibels](engineering/decibels/en.md) · [Arabic](engineering/decibels/ar.md) -- [ ] [feedback-and-stability](engineering/feedback-and-stability/en.md) · [Arabic](engineering/feedback-and-stability/ar.md) -- [ ] [fourier-series](engineering/fourier-series/en.md) · [Arabic](engineering/fourier-series/ar.md) -- [ ] [gears-and-gear-ratios](engineering/gears-and-gear-ratios/en.md) · [Arabic](engineering/gears-and-gear-ratios/ar.md) -- [ ] [levers-pulleys-and-mechanical-advantage](engineering/levers-pulleys-and-mechanical-advantage/en.md) · [Arabic](engineering/levers-pulleys-and-mechanical-advantage/ar.md) -- [ ] [low-pass-filter](engineering/low-pass-filter/en.md) · [Arabic](engineering/low-pass-filter/ar.md) -- [ ] [pid-control](engineering/pid-control/en.md) · [Arabic](engineering/pid-control/ar.md) -- [ ] [sampling-and-aliasing](engineering/sampling-and-aliasing/en.md) · [Arabic](engineering/sampling-and-aliasing/ar.md) -- [ ] [signals-and-noise](engineering/signals-and-noise/en.md) · [Arabic](engineering/signals-and-noise/ar.md) -- [ ] [stress-strain-and-materials](engineering/stress-strain-and-materials/en.md) · [Arabic](engineering/stress-strain-and-materials/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 (13/13) + +- [x] [atomic-structure](chemistry/atomic-structure/en.md) · [Arabic](chemistry/atomic-structure/ar.md) +- [x] [chemical-equilibrium](chemistry/chemical-equilibrium/en.md) · [Arabic](chemistry/chemical-equilibrium/ar.md) +- [x] [chemical-reaction](chemistry/chemical-reaction/en.md) · [Arabic](chemistry/chemical-reaction/ar.md) +- [x] [dilution-molarity](chemistry/dilution-molarity/en.md) · [Arabic](chemistry/dilution-molarity/ar.md) +- [x] [electrochemistry-cells](chemistry/electrochemistry-cells/en.md) · [Arabic](chemistry/electrochemistry-cells/ar.md) +- [x] [ideal-gas-law](chemistry/ideal-gas-law/en.md) · [Arabic](chemistry/ideal-gas-law/ar.md) +- [x] [ionic-and-covalent-bonding](chemistry/ionic-and-covalent-bonding/en.md) · [Arabic](chemistry/ionic-and-covalent-bonding/ar.md) +- [x] [moles-and-molar-mass](chemistry/moles-and-molar-mass/en.md) · [Arabic](chemistry/moles-and-molar-mass/ar.md) +- [x] [periodic-table](chemistry/periodic-table/en.md) · [Arabic](chemistry/periodic-table/ar.md) +- [x] [periodic-trends](chemistry/periodic-trends/en.md) · [Arabic](chemistry/periodic-trends/ar.md) +- [x] [ph-scale](chemistry/ph-scale/en.md) · [Arabic](chemistry/ph-scale/ar.md) +- [x] [reaction-rate](chemistry/reaction-rate/en.md) · [Arabic](chemistry/reaction-rate/ar.md) +- [x] [titration-curve](chemistry/titration-curve/en.md) · [Arabic](chemistry/titration-curve/ar.md) + +## computer-science (12/12) + +- [x] [algorithms-and-complexity](computer-science/algorithms-and-complexity/en.md) · [Arabic](computer-science/algorithms-and-complexity/ar.md) +- [x] [binary-numbers](computer-science/binary-numbers/en.md) · [Arabic](computer-science/binary-numbers/ar.md) +- [x] [breadth-first-search](computer-science/breadth-first-search/en.md) · [Arabic](computer-science/breadth-first-search/ar.md) +- [x] [bubble-sort](computer-science/bubble-sort/en.md) · [Arabic](computer-science/bubble-sort/ar.md) +- [x] [depth-first-search](computer-science/depth-first-search/en.md) · [Arabic](computer-science/depth-first-search/ar.md) +- [x] [dijkstra](computer-science/dijkstra/en.md) · [Arabic](computer-science/dijkstra/ar.md) +- [x] [exponential-vs-polynomial](computer-science/exponential-vs-polynomial/en.md) · [Arabic](computer-science/exponential-vs-polynomial/ar.md) +- [x] [half-adder](computer-science/half-adder/en.md) · [Arabic](computer-science/half-adder/ar.md) +- [x] [logic-gates](computer-science/logic-gates/en.md) · [Arabic](computer-science/logic-gates/ar.md) +- [x] [merge-sort](computer-science/merge-sort/en.md) · [Arabic](computer-science/merge-sort/ar.md) +- [x] [quicksort](computer-science/quicksort/en.md) · [Arabic](computer-science/quicksort/ar.md) +- [x] [sorting-in-the-real-world](computer-science/sorting-in-the-real-world/en.md) · [Arabic](computer-science/sorting-in-the-real-world/ar.md) + +## cosmos (12/12) + +- [x] [cosmic-microwave-background](cosmos/cosmic-microwave-background/en.md) · [Arabic](cosmos/cosmic-microwave-background/ar.md) +- [x] [dark-energy](cosmos/dark-energy/en.md) · [Arabic](cosmos/dark-energy/ar.md) +- [x] [dark-matter-rotation-curves](cosmos/dark-matter-rotation-curves/en.md) · [Arabic](cosmos/dark-matter-rotation-curves/ar.md) +- [x] [exoplanet-transits](cosmos/exoplanet-transits/en.md) · [Arabic](cosmos/exoplanet-transits/ar.md) +- [x] [expanding-universe-hubble-law](cosmos/expanding-universe-hubble-law/en.md) · [Arabic](cosmos/expanding-universe-hubble-law/ar.md) +- [x] [gravitational-lensing](cosmos/gravitational-lensing/en.md) · [Arabic](cosmos/gravitational-lensing/ar.md) +- [x] [life-of-a-star](cosmos/life-of-a-star/en.md) · [Arabic](cosmos/life-of-a-star/ar.md) +- [x] [parallax-and-distances](cosmos/parallax-and-distances/en.md) · [Arabic](cosmos/parallax-and-distances/ar.md) +- [x] [quark-confinement](cosmos/quark-confinement/en.md) · [Arabic](cosmos/quark-confinement/ar.md) +- [x] [quarks-and-protons](cosmos/quarks-and-protons/en.md) · [Arabic](cosmos/quarks-and-protons/ar.md) +- [x] [quasars](cosmos/quasars/en.md) · [Arabic](cosmos/quasars/ar.md) +- [x] [the-scale-of-the-universe](cosmos/the-scale-of-the-universe/en.md) · [Arabic](cosmos/the-scale-of-the-universe/ar.md) + +## cryptography (20/20) + +- [x] [block-ciphers-and-aes](cryptography/block-ciphers-and-aes/en.md) · [Arabic](cryptography/block-ciphers-and-aes/ar.md) +- [x] [caesar-cipher](cryptography/caesar-cipher/en.md) · [Arabic](cryptography/caesar-cipher/ar.md) +- [x] [confusion-and-diffusion](cryptography/confusion-and-diffusion/en.md) · [Arabic](cryptography/confusion-and-diffusion/ar.md) +- [x] [diffie-hellman](cryptography/diffie-hellman/en.md) · [Arabic](cryptography/diffie-hellman/ar.md) +- [x] [digital-signatures](cryptography/digital-signatures/en.md) · [Arabic](cryptography/digital-signatures/ar.md) +- [x] [elliptic-curve-cryptography](cryptography/elliptic-curve-cryptography/en.md) · [Arabic](cryptography/elliptic-curve-cryptography/ar.md) +- [x] [enigma-machine](cryptography/enigma-machine/en.md) · [Arabic](cryptography/enigma-machine/ar.md) +- [x] [frequency-analysis](cryptography/frequency-analysis/en.md) · [Arabic](cryptography/frequency-analysis/ar.md) +- [x] [hash-functions](cryptography/hash-functions/en.md) · [Arabic](cryptography/hash-functions/ar.md) +- [x] [lattice-cryptography](cryptography/lattice-cryptography/en.md) · [Arabic](cryptography/lattice-cryptography/ar.md) +- [x] [modular-arithmetic](cryptography/modular-arithmetic/en.md) · [Arabic](cryptography/modular-arithmetic/ar.md) +- [x] [one-way-functions](cryptography/one-way-functions/en.md) · [Arabic](cryptography/one-way-functions/ar.md) +- [x] [password-salting](cryptography/password-salting/en.md) · [Arabic](cryptography/password-salting/ar.md) +- [x] [rsa-encryption](cryptography/rsa-encryption/en.md) · [Arabic](cryptography/rsa-encryption/ar.md) +- [x] [secret-sharing](cryptography/secret-sharing/en.md) · [Arabic](cryptography/secret-sharing/ar.md) +- [x] [stream-ciphers](cryptography/stream-ciphers/en.md) · [Arabic](cryptography/stream-ciphers/ar.md) +- [x] [transposition-ciphers](cryptography/transposition-ciphers/en.md) · [Arabic](cryptography/transposition-ciphers/ar.md) +- [x] [vigenere-cipher](cryptography/vigenere-cipher/en.md) · [Arabic](cryptography/vigenere-cipher/ar.md) +- [x] [xor-and-one-time-pad](cryptography/xor-and-one-time-pad/en.md) · [Arabic](cryptography/xor-and-one-time-pad/ar.md) +- [x] [zero-knowledge-proofs](cryptography/zero-knowledge-proofs/en.md) · [Arabic](cryptography/zero-knowledge-proofs/ar.md) + +## data (12/12) + +- [x] [bits-bytes-and-data-sizes](data/bits-bytes-and-data-sizes/en.md) · [Arabic](data/bits-bytes-and-data-sizes/ar.md) +- [x] [column-storage-and-bigquery](data/column-storage-and-bigquery/en.md) · [Arabic](data/column-storage-and-bigquery/ar.md) +- [x] [compression-and-entropy](data/compression-and-entropy/en.md) · [Arabic](data/compression-and-entropy/ar.md) +- [x] [data-visualisation-honestly](data/data-visualisation-honestly/en.md) · [Arabic](data/data-visualisation-honestly/ar.md) +- [x] [grouping-and-totals](data/grouping-and-totals/en.md) · [Arabic](data/grouping-and-totals/ar.md) +- [x] [hashing-and-checksums](data/hashing-and-checksums/en.md) · [Arabic](data/hashing-and-checksums/ar.md) +- [x] [indexes-and-fast-search](data/indexes-and-fast-search/en.md) · [Arabic](data/indexes-and-fast-search/ar.md) +- [x] [joins-between-tables](data/joins-between-tables/en.md) · [Arabic](data/joins-between-tables/ar.md) +- [x] [mapreduce](data/mapreduce/en.md) · [Arabic](data/mapreduce/ar.md) +- [x] [parallel-computing](data/parallel-computing/en.md) · [Arabic](data/parallel-computing/ar.md) +- [x] [sampling-big-data](data/sampling-big-data/en.md) · [Arabic](data/sampling-big-data/ar.md) +- [x] [tables-and-filtering](data/tables-and-filtering/en.md) · [Arabic](data/tables-and-filtering/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 (19/19) + +- [x] [day-length-and-latitude](earth-space/day-length-and-latitude/en.md) · [Arabic](earth-space/day-length-and-latitude/ar.md) +- [x] [earth-size](earth-space/earth-size/en.md) · [Arabic](earth-space/earth-size/ar.md) +- [x] [earthquake-magnitude](earth-space/earthquake-magnitude/en.md) · [Arabic](earth-space/earthquake-magnitude/ar.md) +- [x] [eclipses](earth-space/eclipses/en.md) · [Arabic](earth-space/eclipses/ar.md) +- [x] [escape-velocity](earth-space/escape-velocity/en.md) · [Arabic](earth-space/escape-velocity/ar.md) +- [x] [greenhouse-effect](earth-space/greenhouse-effect/en.md) · [Arabic](earth-space/greenhouse-effect/ar.md) +- [x] [kepler-orbits](earth-space/kepler-orbits/en.md) · [Arabic](earth-space/kepler-orbits/ar.md) +- [x] [moon-distance](earth-space/moon-distance/en.md) · [Arabic](earth-space/moon-distance/ar.md) +- [x] [moon-phases](earth-space/moon-phases/en.md) · [Arabic](earth-space/moon-phases/ar.md) +- [x] [moon-size](earth-space/moon-size/en.md) · [Arabic](earth-space/moon-size/ar.md) +- [x] [planet-distances](earth-space/planet-distances/en.md) · [Arabic](earth-space/planet-distances/ar.md) +- [x] [plate-tectonics](earth-space/plate-tectonics/en.md) · [Arabic](earth-space/plate-tectonics/ar.md) +- [x] [radioactive-dating](earth-space/radioactive-dating/en.md) · [Arabic](earth-space/radioactive-dating/ar.md) +- [x] [seasons](earth-space/seasons/en.md) · [Arabic](earth-space/seasons/ar.md) +- [x] [sun-distance](earth-space/sun-distance/en.md) · [Arabic](earth-space/sun-distance/ar.md) +- [x] [sun-size](earth-space/sun-size/en.md) · [Arabic](earth-space/sun-size/ar.md) +- [x] [the-water-cycle-and-clouds](earth-space/the-water-cycle-and-clouds/en.md) · [Arabic](earth-space/the-water-cycle-and-clouds/ar.md) +- [x] [tides](earth-space/tides/en.md) · [Arabic](earth-space/tides/ar.md) +- [x] [transit-of-venus](earth-space/transit-of-venus/en.md) · [Arabic](earth-space/transit-of-venus/ar.md) + +## economics (12/12) + +- [x] [budgeting-and-saving](economics/budgeting-and-saving/en.md) · [Arabic](economics/budgeting-and-saving/ar.md) +- [x] [compound-interest](economics/compound-interest/en.md) · [Arabic](economics/compound-interest/ar.md) +- [x] [elasticity](economics/elasticity/en.md) · [Arabic](economics/elasticity/ar.md) +- [x] [exchange-rates](economics/exchange-rates/en.md) · [Arabic](economics/exchange-rates/ar.md) +- [x] [gdp-and-growth](economics/gdp-and-growth/en.md) · [Arabic](economics/gdp-and-growth/ar.md) +- [x] [inflation](economics/inflation/en.md) · [Arabic](economics/inflation/ar.md) +- [x] [loan-amortization](economics/loan-amortization/en.md) · [Arabic](economics/loan-amortization/ar.md) +- [x] [present-value](economics/present-value/en.md) · [Arabic](economics/present-value/ar.md) +- [x] [price-controls](economics/price-controls/en.md) · [Arabic](economics/price-controls/ar.md) +- [x] [risk-and-diversification](economics/risk-and-diversification/en.md) · [Arabic](economics/risk-and-diversification/ar.md) +- [x] [supply-and-demand](economics/supply-and-demand/en.md) · [Arabic](economics/supply-and-demand/ar.md) +- [x] [taxes-and-brackets](economics/taxes-and-brackets/en.md) · [Arabic](economics/taxes-and-brackets/ar.md) + +## electricity (14/14) + +- [x] [ac-power](electricity/ac-power/en.md) · [Arabic](electricity/ac-power/ar.md) +- [x] [batteries-and-internal-resistance](electricity/batteries-and-internal-resistance/en.md) · [Arabic](electricity/batteries-and-internal-resistance/ar.md) +- [x] [capacitors](electricity/capacitors/en.md) · [Arabic](electricity/capacitors/ar.md) +- [x] [charge-and-current](electricity/charge-and-current/en.md) · [Arabic](electricity/charge-and-current/ar.md) +- [x] [electric-power-and-energy-bills](electricity/electric-power-and-energy-bills/en.md) · [Arabic](electricity/electric-power-and-energy-bills/ar.md) +- [x] [electrical-safety](electricity/electrical-safety/en.md) · [Arabic](electricity/electrical-safety/ar.md) +- [x] [kirchhoffs-laws](electricity/kirchhoffs-laws/en.md) · [Arabic](electricity/kirchhoffs-laws/ar.md) +- [x] [ohms-law](electricity/ohms-law/en.md) · [Arabic](electricity/ohms-law/ar.md) +- [x] [rc-circuit](electricity/rc-circuit/en.md) · [Arabic](electricity/rc-circuit/ar.md) +- [x] [resistance-and-resistivity](electricity/resistance-and-resistivity/en.md) · [Arabic](electricity/resistance-and-resistivity/ar.md) +- [x] [rlc-resonance](electricity/rlc-resonance/en.md) · [Arabic](electricity/rlc-resonance/ar.md) +- [x] [series-parallel](electricity/series-parallel/en.md) · [Arabic](electricity/series-parallel/ar.md) +- [x] [smith-chart](electricity/smith-chart/en.md) · [Arabic](electricity/smith-chart/ar.md) +- [x] [voltage-and-energy](electricity/voltage-and-energy/en.md) · [Arabic](electricity/voltage-and-energy/ar.md) + +## electromagnetism (12/12) + +- [x] [amperes-law-and-solenoid](electromagnetism/amperes-law-and-solenoid/en.md) · [Arabic](electromagnetism/amperes-law-and-solenoid/ar.md) +- [x] [coulombs-law](electromagnetism/coulombs-law/en.md) · [Arabic](electromagnetism/coulombs-law/ar.md) +- [x] [electric-motors](electromagnetism/electric-motors/en.md) · [Arabic](electromagnetism/electric-motors/ar.md) +- [x] [electric-potential](electromagnetism/electric-potential/en.md) · [Arabic](electromagnetism/electric-potential/ar.md) +- [x] [electromagnetic-induction-in-daily-life](electromagnetism/electromagnetic-induction-in-daily-life/en.md) · [Arabic](electromagnetism/electromagnetic-induction-in-daily-life/ar.md) +- [x] [electromagnetic-waves-and-the-spectrum](electromagnetism/electromagnetic-waves-and-the-spectrum/en.md) · [Arabic](electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md) +- [x] [faradays-law](electromagnetism/faradays-law/en.md) · [Arabic](electromagnetism/faradays-law/ar.md) +- [x] [gauss-law](electromagnetism/gauss-law/en.md) · [Arabic](electromagnetism/gauss-law/ar.md) +- [x] [generators-and-ac](electromagnetism/generators-and-ac/en.md) · [Arabic](electromagnetism/generators-and-ac/ar.md) +- [x] [lorentz-force](electromagnetism/lorentz-force/en.md) · [Arabic](electromagnetism/lorentz-force/ar.md) +- [x] [magnets-and-field-lines](electromagnetism/magnets-and-field-lines/en.md) · [Arabic](electromagnetism/magnets-and-field-lines/ar.md) +- [x] [transformers](electromagnetism/transformers/en.md) · [Arabic](electromagnetism/transformers/ar.md) + +## engineering (12/12) + +- [x] [beam-bending](engineering/beam-bending/en.md) · [Arabic](engineering/beam-bending/ar.md) +- [x] [bridges-and-trusses](engineering/bridges-and-trusses/en.md) · [Arabic](engineering/bridges-and-trusses/ar.md) +- [x] [decibels](engineering/decibels/en.md) · [Arabic](engineering/decibels/ar.md) +- [x] [feedback-and-stability](engineering/feedback-and-stability/en.md) · [Arabic](engineering/feedback-and-stability/ar.md) +- [x] [fourier-series](engineering/fourier-series/en.md) · [Arabic](engineering/fourier-series/ar.md) +- [x] [gears-and-gear-ratios](engineering/gears-and-gear-ratios/en.md) · [Arabic](engineering/gears-and-gear-ratios/ar.md) +- [x] [levers-pulleys-and-mechanical-advantage](engineering/levers-pulleys-and-mechanical-advantage/en.md) · [Arabic](engineering/levers-pulleys-and-mechanical-advantage/ar.md) +- [x] [low-pass-filter](engineering/low-pass-filter/en.md) · [Arabic](engineering/low-pass-filter/ar.md) +- [x] [pid-control](engineering/pid-control/en.md) · [Arabic](engineering/pid-control/ar.md) +- [x] [sampling-and-aliasing](engineering/sampling-and-aliasing/en.md) · [Arabic](engineering/sampling-and-aliasing/ar.md) +- [x] [signals-and-noise](engineering/signals-and-noise/en.md) · [Arabic](engineering/signals-and-noise/ar.md) +- [x] [stress-strain-and-materials](engineering/stress-strain-and-materials/en.md) · [Arabic](engineering/stress-strain-and-materials/ar.md) ## functions (12/12) @@ -293,64 +293,64 @@ 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) - -- [ ] [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) -- [ ] [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) -- [ ] [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) -- [ ] [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) -- [ ] [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) -- [ ] [what-is-a-dimension](geometry/what-is-a-dimension/en.md) · [Arabic](geometry/what-is-a-dimension/ar.md) - -## networking (0/15) - -- [ ] [bluetooth](networking/bluetooth/en.md) · [Arabic](networking/bluetooth/ar.md) -- [ ] [cdn](networking/cdn/en.md) · [Arabic](networking/cdn/ar.md) -- [ ] [cell-towers](networking/cell-towers/en.md) · [Arabic](networking/cell-towers/ar.md) -- [ ] [cloud-vpc](networking/cloud-vpc/en.md) · [Arabic](networking/cloud-vpc/ar.md) -- [ ] [dialer-codes](networking/dialer-codes/en.md) · [Arabic](networking/dialer-codes/ar.md) -- [ ] [dns](networking/dns/en.md) · [Arabic](networking/dns/ar.md) -- [ ] [firewall](networking/firewall/en.md) · [Arabic](networking/firewall/ar.md) -- [ ] [latency-and-bandwidth](networking/latency-and-bandwidth/en.md) · [Arabic](networking/latency-and-bandwidth/ar.md) -- [ ] [nas-and-raid](networking/nas-and-raid/en.md) · [Arabic](networking/nas-and-raid/ar.md) -- [ ] [packet-switching](networking/packet-switching/en.md) · [Arabic](networking/packet-switching/ar.md) -- [ ] [routers](networking/routers/en.md) · [Arabic](networking/routers/ar.md) -- [ ] [ss7](networking/ss7/en.md) · [Arabic](networking/ss7/ar.md) -- [ ] [tcp](networking/tcp/en.md) · [Arabic](networking/tcp/ar.md) -- [ ] [vpn](networking/vpn/en.md) · [Arabic](networking/vpn/ar.md) -- [ ] [wifi](networking/wifi/en.md) · [Arabic](networking/wifi/ar.md) - -## nuclear (0/16) - -- [ ] [alpha-beta-gamma](nuclear/alpha-beta-gamma/en.md) · [Arabic](nuclear/alpha-beta-gamma/ar.md) -- [ ] [binding-energy](nuclear/binding-energy/en.md) · [Arabic](nuclear/binding-energy/ar.md) -- [ ] [chain-reaction](nuclear/chain-reaction/en.md) · [Arabic](nuclear/chain-reaction/ar.md) -- [ ] [chart-of-nuclides](nuclear/chart-of-nuclides/en.md) · [Arabic](nuclear/chart-of-nuclides/ar.md) -- [ ] [decay-chains](nuclear/decay-chains/en.md) · [Arabic](nuclear/decay-chains/ar.md) -- [ ] [fusion-in-stars](nuclear/fusion-in-stars/en.md) · [Arabic](nuclear/fusion-in-stars/ar.md) -- [ ] [fusion-reactors](nuclear/fusion-reactors/en.md) · [Arabic](nuclear/fusion-reactors/ar.md) -- [ ] [mass-defect](nuclear/mass-defect/en.md) · [Arabic](nuclear/mass-defect/ar.md) -- [ ] [medical-isotopes](nuclear/medical-isotopes/en.md) · [Arabic](nuclear/medical-isotopes/ar.md) -- [ ] [nuclear-fission](nuclear/nuclear-fission/en.md) · [Arabic](nuclear/nuclear-fission/ar.md) -- [ ] [nuclear-fusion](nuclear/nuclear-fusion/en.md) · [Arabic](nuclear/nuclear-fusion/ar.md) -- [ ] [nuclear-reactor](nuclear/nuclear-reactor/en.md) · [Arabic](nuclear/nuclear-reactor/ar.md) -- [ ] [radiation-dose](nuclear/radiation-dose/en.md) · [Arabic](nuclear/radiation-dose/ar.md) -- [ ] [radioactive-decay](nuclear/radioactive-decay/en.md) · [Arabic](nuclear/radioactive-decay/ar.md) -- [ ] [size-of-the-nucleus](nuclear/size-of-the-nucleus/en.md) · [Arabic](nuclear/size-of-the-nucleus/ar.md) -- [ ] [the-nucleus](nuclear/the-nucleus/en.md) · [Arabic](nuclear/the-nucleus/ar.md) +## 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) +- [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) +- [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) +- [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) +- [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) +- [x] [what-is-a-dimension](geometry/what-is-a-dimension/en.md) · [Arabic](geometry/what-is-a-dimension/ar.md) + +## networking (15/15) + +- [x] [bluetooth](networking/bluetooth/en.md) · [Arabic](networking/bluetooth/ar.md) +- [x] [cdn](networking/cdn/en.md) · [Arabic](networking/cdn/ar.md) +- [x] [cell-towers](networking/cell-towers/en.md) · [Arabic](networking/cell-towers/ar.md) +- [x] [cloud-vpc](networking/cloud-vpc/en.md) · [Arabic](networking/cloud-vpc/ar.md) +- [x] [dialer-codes](networking/dialer-codes/en.md) · [Arabic](networking/dialer-codes/ar.md) +- [x] [dns](networking/dns/en.md) · [Arabic](networking/dns/ar.md) +- [x] [firewall](networking/firewall/en.md) · [Arabic](networking/firewall/ar.md) +- [x] [latency-and-bandwidth](networking/latency-and-bandwidth/en.md) · [Arabic](networking/latency-and-bandwidth/ar.md) +- [x] [nas-and-raid](networking/nas-and-raid/en.md) · [Arabic](networking/nas-and-raid/ar.md) +- [x] [packet-switching](networking/packet-switching/en.md) · [Arabic](networking/packet-switching/ar.md) +- [x] [routers](networking/routers/en.md) · [Arabic](networking/routers/ar.md) +- [x] [ss7](networking/ss7/en.md) · [Arabic](networking/ss7/ar.md) +- [x] [tcp](networking/tcp/en.md) · [Arabic](networking/tcp/ar.md) +- [x] [vpn](networking/vpn/en.md) · [Arabic](networking/vpn/ar.md) +- [x] [wifi](networking/wifi/en.md) · [Arabic](networking/wifi/ar.md) + +## nuclear (16/16) + +- [x] [alpha-beta-gamma](nuclear/alpha-beta-gamma/en.md) · [Arabic](nuclear/alpha-beta-gamma/ar.md) +- [x] [binding-energy](nuclear/binding-energy/en.md) · [Arabic](nuclear/binding-energy/ar.md) +- [x] [chain-reaction](nuclear/chain-reaction/en.md) · [Arabic](nuclear/chain-reaction/ar.md) +- [x] [chart-of-nuclides](nuclear/chart-of-nuclides/en.md) · [Arabic](nuclear/chart-of-nuclides/ar.md) +- [x] [decay-chains](nuclear/decay-chains/en.md) · [Arabic](nuclear/decay-chains/ar.md) +- [x] [fusion-in-stars](nuclear/fusion-in-stars/en.md) · [Arabic](nuclear/fusion-in-stars/ar.md) +- [x] [fusion-reactors](nuclear/fusion-reactors/en.md) · [Arabic](nuclear/fusion-reactors/ar.md) +- [x] [mass-defect](nuclear/mass-defect/en.md) · [Arabic](nuclear/mass-defect/ar.md) +- [x] [medical-isotopes](nuclear/medical-isotopes/en.md) · [Arabic](nuclear/medical-isotopes/ar.md) +- [x] [nuclear-fission](nuclear/nuclear-fission/en.md) · [Arabic](nuclear/nuclear-fission/ar.md) +- [x] [nuclear-fusion](nuclear/nuclear-fusion/en.md) · [Arabic](nuclear/nuclear-fusion/ar.md) +- [x] [nuclear-reactor](nuclear/nuclear-reactor/en.md) · [Arabic](nuclear/nuclear-reactor/ar.md) +- [x] [radiation-dose](nuclear/radiation-dose/en.md) · [Arabic](nuclear/radiation-dose/ar.md) +- [x] [radioactive-decay](nuclear/radioactive-decay/en.md) · [Arabic](nuclear/radioactive-decay/ar.md) +- [x] [size-of-the-nucleus](nuclear/size-of-the-nucleus/en.md) · [Arabic](nuclear/size-of-the-nucleus/ar.md) +- [x] [the-nucleus](nuclear/the-nucleus/en.md) · [Arabic](nuclear/the-nucleus/ar.md) ## numbers (12/12) @@ -367,115 +367,115 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [x] [prime-numbers](numbers/prime-numbers/en.md) · [Arabic](numbers/prime-numbers/ar.md) - [x] [scientific-notation](numbers/scientific-notation/en.md) · [Arabic](numbers/scientific-notation/ar.md) -## physics (0/15) - -- [ ] [bernoulli-and-flow-rate](physics/bernoulli-and-flow-rate/en.md) · [Arabic](physics/bernoulli-and-flow-rate/ar.md) -- [ ] [buoyancy-archimedes](physics/buoyancy-archimedes/en.md) · [Arabic](physics/buoyancy-archimedes/ar.md) -- [ ] [circular-motion](physics/circular-motion/en.md) · [Arabic](physics/circular-motion/ar.md) -- [ ] [friction-inclined-plane](physics/friction-inclined-plane/en.md) · [Arabic](physics/friction-inclined-plane/ar.md) -- [ ] [kinematics-constant-acceleration](physics/kinematics-constant-acceleration/en.md) · [Arabic](physics/kinematics-constant-acceleration/ar.md) -- [ ] [kinetic-and-potential-energy](physics/kinetic-and-potential-energy/en.md) · [Arabic](physics/kinetic-and-potential-energy/ar.md) -- [ ] [momentum-and-impulse](physics/momentum-and-impulse/en.md) · [Arabic](physics/momentum-and-impulse/ar.md) -- [ ] [newtons-second-law](physics/newtons-second-law/en.md) · [Arabic](physics/newtons-second-law/ar.md) -- [ ] [pressure-in-fluids](physics/pressure-in-fluids/en.md) · [Arabic](physics/pressure-in-fluids/ar.md) -- [ ] [projectile-motion](physics/projectile-motion/en.md) · [Arabic](physics/projectile-motion/ar.md) -- [ ] [simple-harmonic-motion](physics/simple-harmonic-motion/en.md) · [Arabic](physics/simple-harmonic-motion/ar.md) -- [ ] [torque-and-levers](physics/torque-and-levers/en.md) · [Arabic](physics/torque-and-levers/ar.md) -- [ ] [universal-gravitation](physics/universal-gravitation/en.md) · [Arabic](physics/universal-gravitation/ar.md) -- [ ] [velocity-time-area](physics/velocity-time-area/en.md) · [Arabic](physics/velocity-time-area/ar.md) -- [ ] [work-and-energy](physics/work-and-energy/en.md) · [Arabic](physics/work-and-energy/ar.md) - -## quantum (0/13) - -- [ ] [de-broglie-waves](quantum/de-broglie-waves/en.md) · [Arabic](quantum/de-broglie-waves/ar.md) -- [ ] [double-slit-experiment](quantum/double-slit-experiment/en.md) · [Arabic](quantum/double-slit-experiment/ar.md) -- [ ] [entanglement](quantum/entanglement/en.md) · [Arabic](quantum/entanglement/ar.md) -- [ ] [hydrogen-spectrum](quantum/hydrogen-spectrum/en.md) · [Arabic](quantum/hydrogen-spectrum/ar.md) -- [ ] [lasers-and-stimulated-emission](quantum/lasers-and-stimulated-emission/en.md) · [Arabic](quantum/lasers-and-stimulated-emission/ar.md) -- [ ] [photoelectric-effect](quantum/photoelectric-effect/en.md) · [Arabic](quantum/photoelectric-effect/ar.md) -- [ ] [photons-and-plancks-constant](quantum/photons-and-plancks-constant/en.md) · [Arabic](quantum/photons-and-plancks-constant/ar.md) -- [ ] [quantum-gates-and-a-tiny-computer](quantum/quantum-gates-and-a-tiny-computer/en.md) · [Arabic](quantum/quantum-gates-and-a-tiny-computer/ar.md) -- [ ] [quantum-tunnelling](quantum/quantum-tunnelling/en.md) · [Arabic](quantum/quantum-tunnelling/ar.md) -- [ ] [schrodinger-equation-particle-in-a-box](quantum/schrodinger-equation-particle-in-a-box/en.md) · [Arabic](quantum/schrodinger-equation-particle-in-a-box/ar.md) -- [ ] [schrodingers-cat-and-qubits](quantum/schrodingers-cat-and-qubits/en.md) · [Arabic](quantum/schrodingers-cat-and-qubits/ar.md) -- [ ] [spin-and-the-stern-gerlach-experiment](quantum/spin-and-the-stern-gerlach-experiment/en.md) · [Arabic](quantum/spin-and-the-stern-gerlach-experiment/ar.md) -- [ ] [uncertainty-principle](quantum/uncertainty-principle/en.md) · [Arabic](quantum/uncertainty-principle/ar.md) - -## relativity (0/12) - -- [ ] [adding-velocities](relativity/adding-velocities/en.md) · [Arabic](relativity/adding-velocities/ar.md) -- [ ] [black-holes](relativity/black-holes/en.md) · [Arabic](relativity/black-holes/ar.md) -- [ ] [galileo-falling-objects](relativity/galileo-falling-objects/en.md) · [Arabic](relativity/galileo-falling-objects/ar.md) -- [ ] [gps-and-time](relativity/gps-and-time/en.md) · [Arabic](relativity/gps-and-time/ar.md) -- [ ] [gravitational-waves](relativity/gravitational-waves/en.md) · [Arabic](relativity/gravitational-waves/ar.md) -- [ ] [gravity-as-curved-spacetime](relativity/gravity-as-curved-spacetime/en.md) · [Arabic](relativity/gravity-as-curved-spacetime/ar.md) -- [ ] [length-contraction](relativity/length-contraction/en.md) · [Arabic](relativity/length-contraction/ar.md) -- [ ] [mass-energy-equivalence](relativity/mass-energy-equivalence/en.md) · [Arabic](relativity/mass-energy-equivalence/ar.md) -- [ ] [special-relativity-time-dilation](relativity/special-relativity-time-dilation/en.md) · [Arabic](relativity/special-relativity-time-dilation/ar.md) -- [ ] [the-equivalence-principle](relativity/the-equivalence-principle/en.md) · [Arabic](relativity/the-equivalence-principle/ar.md) -- [ ] [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) - -## thermodynamics (0/11) - -- [ ] [entropy-and-heat-engines](thermodynamics/entropy-and-heat-engines/en.md) · [Arabic](thermodynamics/entropy-and-heat-engines/ar.md) -- [ ] [first-law-thermodynamics](thermodynamics/first-law-thermodynamics/en.md) · [Arabic](thermodynamics/first-law-thermodynamics/ar.md) -- [ ] [gas-laws](thermodynamics/gas-laws/en.md) · [Arabic](thermodynamics/gas-laws/ar.md) -- [ ] [heat-transfer-conduction-convection-radiation](thermodynamics/heat-transfer-conduction-convection-radiation/en.md) · [Arabic](thermodynamics/heat-transfer-conduction-convection-radiation/ar.md) -- [ ] [phase-changes-and-latent-heat](thermodynamics/phase-changes-and-latent-heat/en.md) · [Arabic](thermodynamics/phase-changes-and-latent-heat/ar.md) -- [ ] [refrigerators-and-heat-pumps](thermodynamics/refrigerators-and-heat-pumps/en.md) · [Arabic](thermodynamics/refrigerators-and-heat-pumps/ar.md) -- [ ] [specific-heat](thermodynamics/specific-heat/en.md) · [Arabic](thermodynamics/specific-heat/ar.md) -- [ ] [temperature-and-kinetic-energy](thermodynamics/temperature-and-kinetic-energy/en.md) · [Arabic](thermodynamics/temperature-and-kinetic-energy/ar.md) -- [ ] [the-second-law](thermodynamics/the-second-law/en.md) · [Arabic](thermodynamics/the-second-law/ar.md) -- [ ] [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) - -## 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) +## physics (15/15) + +- [x] [bernoulli-and-flow-rate](physics/bernoulli-and-flow-rate/en.md) · [Arabic](physics/bernoulli-and-flow-rate/ar.md) +- [x] [buoyancy-archimedes](physics/buoyancy-archimedes/en.md) · [Arabic](physics/buoyancy-archimedes/ar.md) +- [x] [circular-motion](physics/circular-motion/en.md) · [Arabic](physics/circular-motion/ar.md) +- [x] [friction-inclined-plane](physics/friction-inclined-plane/en.md) · [Arabic](physics/friction-inclined-plane/ar.md) +- [x] [kinematics-constant-acceleration](physics/kinematics-constant-acceleration/en.md) · [Arabic](physics/kinematics-constant-acceleration/ar.md) +- [x] [kinetic-and-potential-energy](physics/kinetic-and-potential-energy/en.md) · [Arabic](physics/kinetic-and-potential-energy/ar.md) +- [x] [momentum-and-impulse](physics/momentum-and-impulse/en.md) · [Arabic](physics/momentum-and-impulse/ar.md) +- [x] [newtons-second-law](physics/newtons-second-law/en.md) · [Arabic](physics/newtons-second-law/ar.md) +- [x] [pressure-in-fluids](physics/pressure-in-fluids/en.md) · [Arabic](physics/pressure-in-fluids/ar.md) +- [x] [projectile-motion](physics/projectile-motion/en.md) · [Arabic](physics/projectile-motion/ar.md) +- [x] [simple-harmonic-motion](physics/simple-harmonic-motion/en.md) · [Arabic](physics/simple-harmonic-motion/ar.md) +- [x] [torque-and-levers](physics/torque-and-levers/en.md) · [Arabic](physics/torque-and-levers/ar.md) +- [x] [universal-gravitation](physics/universal-gravitation/en.md) · [Arabic](physics/universal-gravitation/ar.md) +- [x] [velocity-time-area](physics/velocity-time-area/en.md) · [Arabic](physics/velocity-time-area/ar.md) +- [x] [work-and-energy](physics/work-and-energy/en.md) · [Arabic](physics/work-and-energy/ar.md) + +## quantum (13/13) + +- [x] [de-broglie-waves](quantum/de-broglie-waves/en.md) · [Arabic](quantum/de-broglie-waves/ar.md) +- [x] [double-slit-experiment](quantum/double-slit-experiment/en.md) · [Arabic](quantum/double-slit-experiment/ar.md) +- [x] [entanglement](quantum/entanglement/en.md) · [Arabic](quantum/entanglement/ar.md) +- [x] [hydrogen-spectrum](quantum/hydrogen-spectrum/en.md) · [Arabic](quantum/hydrogen-spectrum/ar.md) +- [x] [lasers-and-stimulated-emission](quantum/lasers-and-stimulated-emission/en.md) · [Arabic](quantum/lasers-and-stimulated-emission/ar.md) +- [x] [photoelectric-effect](quantum/photoelectric-effect/en.md) · [Arabic](quantum/photoelectric-effect/ar.md) +- [x] [photons-and-plancks-constant](quantum/photons-and-plancks-constant/en.md) · [Arabic](quantum/photons-and-plancks-constant/ar.md) +- [x] [quantum-gates-and-a-tiny-computer](quantum/quantum-gates-and-a-tiny-computer/en.md) · [Arabic](quantum/quantum-gates-and-a-tiny-computer/ar.md) +- [x] [quantum-tunnelling](quantum/quantum-tunnelling/en.md) · [Arabic](quantum/quantum-tunnelling/ar.md) +- [x] [schrodinger-equation-particle-in-a-box](quantum/schrodinger-equation-particle-in-a-box/en.md) · [Arabic](quantum/schrodinger-equation-particle-in-a-box/ar.md) +- [x] [schrodingers-cat-and-qubits](quantum/schrodingers-cat-and-qubits/en.md) · [Arabic](quantum/schrodingers-cat-and-qubits/ar.md) +- [x] [spin-and-the-stern-gerlach-experiment](quantum/spin-and-the-stern-gerlach-experiment/en.md) · [Arabic](quantum/spin-and-the-stern-gerlach-experiment/ar.md) +- [x] [uncertainty-principle](quantum/uncertainty-principle/en.md) · [Arabic](quantum/uncertainty-principle/ar.md) + +## relativity (12/12) + +- [x] [adding-velocities](relativity/adding-velocities/en.md) · [Arabic](relativity/adding-velocities/ar.md) +- [x] [black-holes](relativity/black-holes/en.md) · [Arabic](relativity/black-holes/ar.md) +- [x] [galileo-falling-objects](relativity/galileo-falling-objects/en.md) · [Arabic](relativity/galileo-falling-objects/ar.md) +- [x] [gps-and-time](relativity/gps-and-time/en.md) · [Arabic](relativity/gps-and-time/ar.md) +- [x] [gravitational-waves](relativity/gravitational-waves/en.md) · [Arabic](relativity/gravitational-waves/ar.md) +- [x] [gravity-as-curved-spacetime](relativity/gravity-as-curved-spacetime/en.md) · [Arabic](relativity/gravity-as-curved-spacetime/ar.md) +- [x] [length-contraction](relativity/length-contraction/en.md) · [Arabic](relativity/length-contraction/ar.md) +- [x] [mass-energy-equivalence](relativity/mass-energy-equivalence/en.md) · [Arabic](relativity/mass-energy-equivalence/ar.md) +- [x] [special-relativity-time-dilation](relativity/special-relativity-time-dilation/en.md) · [Arabic](relativity/special-relativity-time-dilation/ar.md) +- [x] [the-equivalence-principle](relativity/the-equivalence-principle/en.md) · [Arabic](relativity/the-equivalence-principle/ar.md) +- [x] [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) +- [x] [the-twin-paradox](relativity/the-twin-paradox/en.md) · [Arabic](relativity/the-twin-paradox/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 (11/11) + +- [x] [entropy-and-heat-engines](thermodynamics/entropy-and-heat-engines/en.md) · [Arabic](thermodynamics/entropy-and-heat-engines/ar.md) +- [x] [first-law-thermodynamics](thermodynamics/first-law-thermodynamics/en.md) · [Arabic](thermodynamics/first-law-thermodynamics/ar.md) +- [x] [gas-laws](thermodynamics/gas-laws/en.md) · [Arabic](thermodynamics/gas-laws/ar.md) +- [x] [heat-transfer-conduction-convection-radiation](thermodynamics/heat-transfer-conduction-convection-radiation/en.md) · [Arabic](thermodynamics/heat-transfer-conduction-convection-radiation/ar.md) +- [x] [phase-changes-and-latent-heat](thermodynamics/phase-changes-and-latent-heat/en.md) · [Arabic](thermodynamics/phase-changes-and-latent-heat/ar.md) +- [x] [refrigerators-and-heat-pumps](thermodynamics/refrigerators-and-heat-pumps/en.md) · [Arabic](thermodynamics/refrigerators-and-heat-pumps/ar.md) +- [x] [specific-heat](thermodynamics/specific-heat/en.md) · [Arabic](thermodynamics/specific-heat/ar.md) +- [x] [temperature-and-kinetic-energy](thermodynamics/temperature-and-kinetic-energy/en.md) · [Arabic](thermodynamics/temperature-and-kinetic-energy/ar.md) +- [x] [the-second-law](thermodynamics/the-second-law/en.md) · [Arabic](thermodynamics/the-second-law/ar.md) +- [x] [thermal-conductivity-and-insulation](thermodynamics/thermal-conductivity-and-insulation/en.md) · [Arabic](thermodynamics/thermal-conductivity-and-insulation/ar.md) +- [x] [thermal-expansion](thermodynamics/thermal-expansion/en.md) · [Arabic](thermodynamics/thermal-expansion/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 (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 15f60582..e490ca77 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. Every section has 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. diff --git a/content/lessons/aerodynamics/bernoulli/ar.md b/content/lessons/aerodynamics/bernoulli/ar.md index b84c8b48..9a4f1372 100644 --- a/content/lessons/aerodynamics/bernoulli/ar.md +++ b/content/lessons/aerodynamics/bernoulli/ar.md @@ -14,21 +14,21 @@ variables: ## Try it -1. تخيّل هواءً يدخل أنبوبًا بسرعة 5 m/s، أي مثل نفَس هادئ عبر ماصة. -2. صغّر منزلق «نسبة مساحة العنق إلى المدخل» بالمقبض. يتسارع الهواء ليعبر، تمامًا كما تتكدّس السيارات وتتسارع عند إغلاق أحد المسارات. -3. راقب أنابيب المانومتر الثلاثة. مستوى السائل عند العنق الضيق أدنى، وهناك انخفض الضغط. +1. ابدأ و«سرعة المدخل v₁» تساوي 5 m/s، أي مثل نفَس هادئ عبر ماصة، و«نسبة مساحة العنق إلى المدخل» تساوي 0.5. تظهر القراءة v₂ = 10 m/s عند العنق. +2. صغّر «نسبة مساحة العنق إلى المدخل» إلى 0.25 بالمنزلق أو بسحب المقبض. يتسارع الهواء ليعبر، تمامًا كما تتكدّس السيارات وتتسارع عند إغلاق أحد المسارات: تصبح القراءة v₂ = 20 m/s. +3. راقب أنابيب المانومتر الثلاثة. مستوى السائل عند العنق الضيق أدنى، وهناك انخفض الضغط. تظهر القراءة Δp = 225 Pa. ## Real-life examples -1. **نفَس هادئ عبر ماصة.** يدخل الهواء بسرعة 5 m/s، فإذا ضغطته إلى 30% من عرضه الأصلي تسارع إلى نحو 17 m/s عند أضيق نقطة. -2. **رياح تنضغط بين مبنيين.** يدخل نسيم شارع بسرعة 10 m/s فجوة نصف عرضه، فيتسارع إلى 20 m/s. لهذا تشعر برياح قوية في الممرات بين الأبراج. -3. **هواء يندفع عبر عنق مكربن.** ينضغط هواء السحب بسرعة 25 m/s إلى ربع عرضه، فيصل إلى 100 m/s عند أضيق نقطة. +1. **نفَس هادئ عبر ماصة.** يدخل الهواء بسرعة 5 m/s، فإذا ضاق الممر إلى 30% من عرضه الأصلي تسارع إلى نحو 17 m/s عند أضيق نقطة. +2. **رياح تمر بين مبنيين.** يدخل نسيم شارع بسرعة 10 m/s فجوة نصف عرضه، فيتسارع إلى 20 m/s. لهذا تشعر برياح قوية في الممرات بين الأبراج. +3. **هواء يندفع عبر عنق مكربن.** يدخل الهواء بسرعة 25 m/s ويضيق مجراه إلى ربع عرضه، فيصل إلى 100 m/s عند أضيق نقطة. ## Test yourself -1. اضغط الأنبوب حتى يبلغ الهواء عند العنق نحو 20 m/s. +1. ضيّق الأنبوب حتى يبلغ الهواء عند العنق نحو 20 m/s. 2. أحدِث انخفاض ضغط قدره نحو 500 Pa عند العنق. -3. جد ضغطًا لطيفًا، أي سرعة عنق أقل من 15 m/s، ما زال يخفض الضغط بأكثر من 100 Pa. +3. جد تضييقًا خفيفًا، تبقى معه سرعة العنق أقل من 15 m/s، لكنه يخفض الضغط بأكثر من 100 Pa. ## Intuition @@ -55,13 +55,17 @@ variables: ## Real world ### المكربنات وأجهزة الرذاذ + ينخفض ضغط الهواء المتسارع عبر عنق فنتوري بما يكفي لسحب الوقود أو العطر عبر أنبوب جانبي. ### مقاييس التدفق + قياس انخفاض الضغط عبر تضييق معلوم (مثل فنتوري أو فوهة قياس) يعطي معدل التدفق مباشرة. ### تمدد الأوعية الدموية + ينخفض الضغط الموضعي عندما يتسارع الدم عبر شريان متضيّق. الفيزياء نفسها، لكن بعواقب فسيولوجية حقيقية. ### الرياح حول المباني + يتسارع الهواء المضغوط بين المباني الشاهقة وينخفض ضغطه، وهذا سبب شعورنا برياح أقوى بكثير في الممرات بين الأبراج. diff --git a/content/lessons/aerodynamics/bernoulli/en.md b/content/lessons/aerodynamics/bernoulli/en.md index 0a8f28fb..d8292d02 100644 --- a/content/lessons/aerodynamics/bernoulli/en.md +++ b/content/lessons/aerodynamics/bernoulli/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Picture air entering a pipe at 5 m/s, about a gentle breath through a straw. -2. Shrink «throat / inlet area» with the drag handle. The air must speed up to squeeze through, just like cars bunching up and accelerating through a lane closure. -3. Watch the three manometer tubes. The liquid sits lower at the narrow throat — that's where the pressure has dropped. +1. Start with «inlet speed v₁» at 5 m/s, about a gentle breath through a straw, and «throat / inlet area» at 0.5. The readout shows v₂ = 10 m/s at the throat. +2. Shrink «throat / inlet area» to 0.25 with the slider or the drag handle. The air must speed up to squeeze through, just like cars bunching up and accelerating through a lane closure: v₂ now reads 20 m/s. +3. Watch the three manometer tubes. The liquid sits lower at the narrow throat — that's where the pressure has dropped. The readout shows Δp = 225 Pa. ## Real-life examples @@ -56,13 +56,17 @@ Bernoulli’s equation is the steady-flow, along-a-streamline statement of energ ## Real world ### Carburettors and atomisers + Air accelerated through a venturi throat drops in pressure enough to draw fuel or perfume up a side tube. ### Flow meters + Measuring the pressure drop through a known constriction (a venturi or orifice meter) gives the flow rate directly. ### Aneurysms + Blood speeding up through a narrowed artery drops in local pressure — the same physics, with real physiological consequences. ### Wind around buildings + Air squeezed between tall buildings speeds up and its pressure drops, which is why gaps between towers feel so much windier. diff --git a/content/lessons/aerodynamics/bernoulli/lesson.yaml b/content/lessons/aerodynamics/bernoulli/lesson.yaml index 53d59344..55ccb08c 100644 --- a/content/lessons/aerodynamics/bernoulli/lesson.yaml +++ b/content/lessons/aerodynamics/bernoulli/lesson.yaml @@ -23,7 +23,7 @@ parameters: min: 2 max: 30 step: 0.5 - value: 10 + value: 5 unit: m/s ratio: min: 0.2 @@ -42,17 +42,17 @@ derivation: charts: [] primary: ratio presets: -- v1: 5 - ratio: 0.3 -- v1: 10 - ratio: 0.5 -- v1: 25 - ratio: 0.25 + - v1: 5 + ratio: 0.3 + - v1: 10 + ratio: 0.5 + - v1: 25 + ratio: 0.25 challenges: -- check: 'v1/ratio' - target: 20 - tol: 2 -- check: '0.6125*v1^2*(1/ratio^2-1)' - target: 500 - tol: 50 -- check: 'v1/ratio < 15 and 0.6125*v1^2*(1/ratio^2-1) > 100' + - check: 'v1/ratio' + target: 20 + tol: 2 + - check: '0.6125*v1^2*(1/ratio^2-1)' + target: 500 + tol: 50 + - check: 'v1/ratio < 15 and 0.6125*v1^2*(1/ratio^2-1) > 100' diff --git a/content/lessons/aerodynamics/boundary-layer/ar.md b/content/lessons/aerodynamics/boundary-layer/ar.md index 8828b11c..db933ba8 100644 --- a/content/lessons/aerodynamics/boundary-layer/ar.md +++ b/content/lessons/aerodynamics/boundary-layer/ar.md @@ -5,7 +5,7 @@ summary: >- parameters: v: السرعة v d: القطر d - roughness: النقر (الدمبلات) + roughness: النُّقَر variables: - سُمك الطبقة الحدّية - المسافة المقطوعة على طول السطح @@ -14,27 +14,27 @@ variables: ## Try it -1. تخيّل كرة غولف قطرها 4.3 سم تغادر المضرب بسرعة 70 m/s. نقرها تؤدي مهمتها. -2. اقرأ قوة السحب. لاحظ كيف يلتصق الانسياب بالكرة معظم الطريق حولها قبل أن ينفصل. -3. أطفئ «النقر». الكرة نفسها، والسرعة نفسها. راقب الأثر يتضخم وقوة السحب تقفز. +1. أبقِ «القطر d» عند 0.043 m، وهو قطر كرة الغولف. اضبط «السرعة v» على 70 m/s وشغّل «النُّقَر» (القيمة 1)، أي الحفر الصغيرة على سطح الكرة. هذه ضربة قوية تغادر بها الكرة المضرب. تقول قراءة «الطبقة» إنها مضطربة. +2. اقرأ قوة السحب: 0.87 N. زاوية الانفصال 120°: يبقى الهواء ملتصقًا بالكرة مسافة طويلة حولها قبل أن ينفصل. +3. أطفئ «النُّقَر» (القيمة 0). الكرة نفسها، والسرعة نفسها. تنزل زاوية الانفصال إلى 82°، ويتضخم الأثر خلف الكرة، وتقفز قوة السحب إلى 2.18 N. ## Real-life examples -1. **كرة غولف منقورة تغادر المضرب.** عند 70 m/s، تُعجّل النقر الطبقة الحدّية نحو الاضطراب مبكرًا. تلتصق بالكرة مسافة أطول قبل أن تنفصل، وتنتج قوة سحب أقل بكثير من 1 N. -2. **الكرة نفسها متخيَّلة ملساء.** القطر 4.3 سم والسرعة 70 m/s نفسها، لكن دون نقر تبقى الطبقة طبقية وتنفصل مبكرًا. يترك ذلك أثرًا كبيرًا خلفها، وتزيد قوة السحب إلى أكثر من الضعف. +1. **كرة غولف منقورة تغادر المضرب.** عند 70 m/s، تُعجّل النقر الطبقة الحدّية نحو الاضطراب مبكرًا. تلتصق بالكرة مسافة أطول قبل أن تنفصل، وتكون قوة السحب نحو 0.87 N. +2. **الكرة نفسها متخيَّلة ملساء.** القطر 4.3 سم والسرعة 70 m/s نفسها، لكن دون نقر تبقى الطبقة طبقية وتنفصل مبكرًا. يترك ذلك أثرًا كبيرًا خلفها، وتزيد قوة السحب إلى أكثر من الضعف، نحو 2.18 N. 3. **سطح كرة قدم المخيط أثناء الطيران.** كرة قطرها 22 سم بسرعة 25 m/s. الخياطة، كالنقر، تدفع الطبقة نحو الاضطراب أيضًا، فتبقي الانسياب ملتصقًا مدة أطول مما تفعله كرة ملساء حقًا. ## Test yourself 1. أدخل الكرة نظام الاضطراب قليل السحب باستعمال النقر. -2. أدخل كرة *ملساء* نظام الاضطراب أيضًا. يتطلب ذلك عدد رينولدز أعلى بكثير دون مساعدة النقر. +2. أدخل كرة _ملساء_ نظام الاضطراب أيضًا. يتطلب ذلك عدد رينولدز أعلى بكثير دون مساعدة النقر. 3. بلغ عدد رينولدز نحو 200000، وهي ضربة مضرب نموذجية. ## Intuition -عند أي سطح صلب مباشرة، لا ينزلق الهواء بحرية. يلتصق به بسبب شرط اللاانزلاق، ويجب أن يتسارع من الصفر إلى سرعة التيار الحر عبر غشاء رقيق يُسمى الطبقة الحدّية. أطفئ «النقر» وراقب تلك الطبقة الرقيقة تبقى ناعمة، أي طبقية، طوال مقدمة الكرة. إنها ناعمة لكن هشّة: لا تملك الطبقة الطبقية طاقة إضافية تُذكر لتواصل اتباع سطح منحنٍ حين يبدأ السطح بالابتعاد عن اتجاه الانسياب. تنفصل مبكرًا، تاركة أثرًا مضطربًا كبيرًا خلف الكرة. الأثر الكبير يعني منطقة ضغط منخفض كبيرة تسحب الكرة إلى الخلف، وهذا معظم سحب كرة الغولف. +عند أي سطح صلب مباشرة، لا ينزلق الهواء بحرية. يلتصق به بسبب شرط اللاانزلاق، ويجب أن يتسارع من الصفر إلى سرعة التيار الحر عبر غشاء رقيق يُسمى الطبقة الحدّية. أطفئ «النُّقَر» وراقب تلك الطبقة الرقيقة تبقى ناعمة، أي طبقية، طوال مقدمة الكرة. إنها ناعمة لكن هشّة: لا تملك الطبقة الطبقية طاقة إضافية تُذكر لتواصل اتباع سطح منحنٍ حين يبدأ السطح بالابتعاد عن اتجاه الانسياب. تنفصل مبكرًا، تاركة أثرًا مضطربًا كبيرًا خلف الكرة. الأثر الكبير يعني منطقة ضغط منخفض كبيرة تسحب الكرة إلى الخلف، وهذا معظم سحب كرة الغولف. -شغّل «النقر» من جديد. تدفع الحفر الصغيرة الطبقة الحدّية نحو الاضطراب عمدًا ومبكرًا. تخلط الطبقة المضطربة الهواء الخارجي السريع نحو الداخل، فتمنحها طاقة إضافية تكفي لمواصلة التصاقها بالسطح المنحني مسافة أبعد قبل أن تنفصل أخيرًا. أثر أصغر يعني سحبًا أقل، رغم أن الطبقة المضطربة نفسها أكثر احتكاكًا قليلًا عند السطح مباشرة. حرّك «السرعة v» صعودًا وهبوطًا، وراقب قراءة عدد رينولدز تتجاوز نقطة انتقال النقر قبل نقطة انتقال السطح الأملس بوقت طويل. النقر ليست زخرفة، بل تبادل قليل من احتكاك السطح بتوفير أكبر بكثير في سحب الأثر. +شغّل «النُّقَر» من جديد. تدفع الحفر الصغيرة الطبقة الحدّية نحو الاضطراب عمدًا ومبكرًا. تخلط الطبقة المضطربة الهواء الخارجي السريع نحو الداخل، فتمنحها طاقة إضافية تكفي لمواصلة التصاقها بالسطح المنحني مسافة أبعد قبل أن تنفصل أخيرًا. أثر أصغر يعني سحبًا أقل، رغم أن الطبقة المضطربة نفسها أكثر احتكاكًا قليلًا عند السطح مباشرة. حرّك «السرعة v» صعودًا وهبوطًا، وراقب قراءة عدد رينولدز تتجاوز نقطة انتقال النقر قبل نقطة انتقال السطح الأملس بوقت طويل. النقر ليست زخرفة، بل تبادل قليل من احتكاك السطح بتوفير أكبر بكثير في سحب الأثر. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### نقر كرة الغولف + كرة غولف ملساء، لو اختُبرت بسرعات الضرب نفسها، تقطع مسافة نحو نصف ما تقطعه كرة منقورة. النقر من أقدم الاستعمالات المتعمدة لدفع طبقة حدودية نحو الاضطراب عمدًا. ### مولدات الدوامات على أجنحة الطائرات + تدفع زعانف صغيرة على السطح العلوي للجناح الطبقة الحدّية نحو الاضطراب عمدًا، لتأخير الانفصال قرب حافة الجناح الخلفية وأسطح الذيل. تشتري بذلك تحكمًا إضافيًا عند السرعة المنخفضة. ### ملابس السباحة بنقوش جلد القرش والطلاءات + تدير النتوءات الدقيقة التي تحاكي جلد القرش بنية الطبقة الحدّية المضطربة بلطف، لتقليل احتكاك السطح. هذا هدف معاكس تمامًا لهدف كرة الغولف، لأن جسم السباح كله تجاوز الانتقال أصلًا. ### تجمّد الطائرات + حتى طبقة رقيقة خشنة من الجليد على جناح قد تعطّل الطبقة الحدّية أو تُخلّ بها في المكان والزمان الخطأين. تقدّم بذلك نقطة الانفصال وتقلّل الرفع، وهذا سبب رئيسي لإزالة الجليد عن الأجنحة قبل الإقلاع. diff --git a/content/lessons/aerodynamics/boundary-layer/en.md b/content/lessons/aerodynamics/boundary-layer/en.md index 9789f0cf..ea0c2442 100644 --- a/content/lessons/aerodynamics/boundary-layer/en.md +++ b/content/lessons/aerodynamics/boundary-layer/en.md @@ -17,20 +17,20 @@ variables: ## Try it -1. Picture a golf ball, 4.3 cm across, leaving the tee at 70 m/s, with its dimples doing their job. -2. Read the drag force, and note how the flow clings to the ball almost all the way round before separating. -3. Turn «dimples» off, same ball, same speed. Watch the wake balloon and the drag force jump. +1. Keep «diameter d» at 0.043 m, a golf ball. Set «speed v» to 70 m/s and turn «dimples» on (1): a drive leaving the tee with its dimples doing their job. The layer readout says turbulent. +2. Read the drag force: 0.87 N. The separation angle reads 120°: the flow clings to the ball far around before separating. +3. Turn «dimples» off (0), same ball, same speed. The separation angle falls to 82°, the wake balloons and the drag force jumps to 2.18 N. ## Real-life examples -1. **A dimpled golf ball off the tee.** At 70 m/s, the dimples trip the boundary layer turbulent early, it clings to the ball far around before separating, and the drag comes out to well under 1 N. -2. **The same ball, imagined smooth.** Same 4.3 cm, same 70 m/s, but with no dimples the layer stays laminar and separates early, leaving a big wake — the drag more than doubles. +1. **A dimpled golf ball off the tee.** At 70 m/s, the dimples trip the boundary layer turbulent early, it clings to the ball far around before separating, and the drag comes out to about 0.87 N. +2. **The same ball, imagined smooth.** Same 4.3 cm, same 70 m/s, but with no dimples the layer stays laminar and separates early, leaving a big wake — the drag more than doubles, to about 2.18 N. 3. **A soccer ball's stitched surface in flight.** A 22 cm ball at 25 m/s: the stitching, like dimples, trips the layer turbulent too, keeping the flow attached longer than a truly smooth ball would manage. ## Test yourself 1. Get the ball into the low-drag turbulent regime using dimples. -2. Get a *smooth* ball into the turbulent regime too — it takes a much higher Reynolds number to manage without dimples' help. +2. Get a _smooth_ ball into the turbulent regime too — it takes a much higher Reynolds number to manage without dimples' help. 3. Reach a Reynolds number of about 200,000, a typical driver shot. ## Intuition @@ -47,7 +47,7 @@ Past a transition Reynolds number, the layer turns turbulent and grows faster, r ## Advanced -A smooth sphere's drag coefficient famously *drops* from about 0.5 to about 0.1 once the flow trips turbulent — the so-called drag crisis — because delaying separation shrinks the low-pressure wake far more than turbulent skin friction costs. Golf ball dimples exploit exactly this crisis, deliberately triggering it at a much lower speed (and Reynolds number) than a smooth ball would ever reach on its own. +A smooth sphere's drag coefficient famously _drops_ from about 0.5 to about 0.1 once the flow trips turbulent — the so-called drag crisis — because delaying separation shrinks the low-pressure wake far more than turbulent skin friction costs. Golf ball dimples exploit exactly this crisis, deliberately triggering it at a much lower speed (and Reynolds number) than a smooth ball would ever reach on its own. ## Derivation @@ -58,13 +58,17 @@ A smooth sphere's drag coefficient famously *drops* from about 0.5 to about 0.1 ## Real world ### Golf ball dimples + A smooth golf ball, tested at driving speeds, travels roughly half as far as a dimpled one — dimples are one of the oldest deliberate uses of tripping a boundary layer turbulent on purpose. ### Vortex generators on aircraft wings + Small fins on a wing's upper surface deliberately trip the boundary layer turbulent to delay separation near the wing's trailing edge and tail surfaces, buying extra control authority at low speed. ### Shark-skin swimsuits and hull coatings + Riblets that mimic shark skin subtly manage the turbulent boundary layer's structure to cut skin-friction drag, the opposite goal from a golf ball, since a swimmer's whole body is already past transition. ### Aircraft icing + Even a thin, rough layer of ice on a wing can trip or disturb the boundary layer in the wrong place at the wrong time, moving separation forward and cutting lift — a major reason wings are de-iced before flight. diff --git a/content/lessons/aerodynamics/boundary-layer/lesson.yaml b/content/lessons/aerodynamics/boundary-layer/lesson.yaml index cc35b6a5..e8f53e46 100644 --- a/content/lessons/aerodynamics/boundary-layer/lesson.yaml +++ b/content/lessons/aerodynamics/boundary-layer/lesson.yaml @@ -3,15 +3,15 @@ subject: aerodynamics difficulty: university equation: \delta \approx \dfrac{5x}{\sqrt{\mathrm{Re}}} concepts: -- boundary-layer -- laminar-flow -- turbulence -- flow-separation + - boundary-layer + - laminar-flow + - turbulence + - flow-separation prerequisites: -- reynolds-number + - reynolds-number related: -- drag-equation -- wingtip-vortices-and-induced-drag + - drag-equation + - wingtip-vortices-and-induced-drag visualization: type: boundary-layer options: {} @@ -26,7 +26,7 @@ parameters: d: min: 0.02 max: 0.7 - step: 0.01 + step: 0.001 value: 0.043 unit: m roughness: @@ -36,27 +36,27 @@ parameters: value: 0 unit: '' variables: -- \delta -- x -- \mathrm{Re} + - \delta + - x + - \mathrm{Re} derivation: -- \delta^2/\nu \sim x/v -- \delta \propto \sqrt{\nu x / v} -- \delta \approx \dfrac{5x}{\sqrt{\mathrm{Re}_x}} + - \delta^2/\nu \sim x/v + - \delta \propto \sqrt{\nu x / v} + - \delta \approx \dfrac{5x}{\sqrt{\mathrm{Re}_x}} charts: [] presets: -- v: 70 - d: 0.043 - roughness: 1 -- v: 70 - d: 0.043 - roughness: 0 -- v: 25 - d: 0.22 - roughness: 1 + - v: 70 + d: 0.043 + roughness: 1 + - v: 70 + d: 0.043 + roughness: 0 + - v: 25 + d: 0.22 + roughness: 1 challenges: -- check: 'roughness>0.5 and 1.225*v*d/1.81e-5 > 40000' -- check: 'roughness<0.5 and 1.225*v*d/1.81e-5 > 300000' -- check: '1.225*v*d/1.81e-5' - target: 200000 - tol: 20000 + - check: 'roughness>0.5 and 1.225*v*d/1.81e-5 > 40000' + - check: 'roughness<0.5 and 1.225*v*d/1.81e-5 > 300000' + - check: '1.225*v*d/1.81e-5' + target: 200000 + tol: 20000 diff --git a/content/lessons/aerodynamics/drag-equation/ar.md b/content/lessons/aerodynamics/drag-equation/ar.md index 010d1010..b230dbe8 100644 --- a/content/lessons/aerodynamics/drag-equation/ar.md +++ b/content/lessons/aerodynamics/drag-equation/ar.md @@ -23,15 +23,15 @@ charts: ## Try it -1. تخيّل دراجًا يركب منتصبًا بسرعة 8 m/s (نحو 29 كم/س) في وجه ريح معاكسة. -2. اسحب النقطة «السرعة v» نحو اليمين، باتجاه سرعة الطريق السريع. ينحدر الخط المماس أكثر فأكثر، وهو القوة الإضافية اللازمة لكل m/s زائدة. -3. صغّر الآن منزلق «المساحة الأمامية A»، كأن الدراج انحنى منخفضًا. ينخفض المنحنى كله حتى عند السرعة نفسها. +1. اضبط «معامل السحب C_D» على 0.9، و«المساحة الأمامية A» على 0.5 m²، و«السرعة v» على 8 m/s: راكب دراجة يجلس معتدلًا ويسير بنحو 29 كم/س. تظهر القراءة f(x) = 17.64، وهي قوة السحب بالنيوتن. +2. اسحب نقطة «السرعة v» نحو اليمين إلى 16 m/s. ضاعفتَ السرعة فصار السحب أربعة أضعاف: 70.56 N. ويزداد الخط المماس ميلًا أيضًا، وهو القوة الإضافية اللازمة لكل m/s زائدة: يتضاعف ميله من 4.41 إلى 8.82. +3. اخفض الآن «معامل السحب C_D» إلى 0.45، كأن الراكب انحنى فوق المقود. ينخفض المنحنى كله: عند السرعة نفسها 16 m/s يصير السحب 35.28 N. ## Real-life examples -1. **دراج منتصب يذهب إلى عمله.** يتحرك بسرعة 8 m/s بمساحة أمامية 0.5 m² ومعامل سحب 0.9. يدفع ضد نحو 18 N من السحب، وهذا معظم مجهود الدراج عند هذه السرعة. -2. **سيارة عائلية تسير على الطريق السريع.** تسير بسرعة 30 m/s (108 كم/س)، ومعامل سحبها الانسيابي 0.3، ومساحتها الأمامية 2.2 m². تصارع السيارة نحو 364 N من السحب. -3. **قافز حر أثناء سقوطه.** يسقط ببطنه نحو الأسفل بسرعة 50 m/s، ومعامل سحبه قريب من 1.0، ومساحته الأمامية 0.7 m². يدفع ضد أكثر من 1000 N، وهذا يقارب وزن جسمه. +1. **راكب دراجة يجلس معتدلًا في طريقه إلى عمله.** يتحرك بسرعة 8 m/s بمساحة أمامية 0.5 m² ومعامل سحب 0.9. تقاومه قوة سحب تبلغ نحو 18 N، وهذا معظم مجهود الراكب عند هذه السرعة. +2. **سيارة عائلية تسير على الطريق السريع.** تسير بسرعة 30 m/s (108 كم/س)، ومعامل سحبها الانسيابي 0.3، ومساحتها الأمامية 2.2 m². تقاوم السيارةَ قوةُ سحب تبلغ نحو 364 N. +3. **قافز حر أثناء سقوطه.** يسقط ببطنه نحو الأسفل بسرعة 50 m/s، ومعامل سحبه قريب من 1.0، ومساحته الأمامية 0.7 m². تقاومه قوة سحب تزيد على 1000 N، وهذا يقارب وزن قافز ثقيل مع كامل معداته. ## Test yourself @@ -41,9 +41,9 @@ charts: ## Intuition -تخيّل دراجًا يركب منتصبًا بسرعة 8 m/s في وجه ريح معاكسة. اسحب منزلق «السرعة v» نحو اليمين، باتجاه سرعة الطريق السريع. راقب الخط المماس على المنحنى، فهو القوة الإضافية اللازمة لكل m/s زائدة، ويزداد انحدارًا كلما تحركت يمينًا. يكاد المماس يكون أفقيًا عند السرعات المنخفضة جدًا. لكن عند سرعة الطريق السريع تحتاج أي زيادة صغيرة إلى دفع كبير، وهذا بالضبط سبب انخفاض كفاءة استهلاك الوقود بشدة هناك. +تخيّل راكب دراجة يجلس معتدلًا ويسير بسرعة 8 m/s في وجه ريح معاكسة. اسحب منزلق «السرعة v» نحو اليمين، باتجاه سرعة الطريق السريع. راقب الخط المماس على المنحنى، فهو القوة الإضافية اللازمة لكل m/s زائدة، ويزداد انحدارًا كلما تحركت يمينًا. يكاد المماس يكون أفقيًا عند السرعات المنخفضة جدًا. لكن عند سرعة الطريق السريع تحتاج أي زيادة صغيرة إلى دفع كبير، وهذا بالضبط سبب انخفاض كفاءة استهلاك الوقود بشدة هناك. -صغّر الآن منزلق «معامل السحب Cd» أو «المساحة الأمامية A»، كأن الدراج انحنى منخفضًا. ينخفض المنحنى كله لكنه يحافظ على شكل القطع المكافئ، لأن كلا العاملين يعمل كمضاعِف بسيط على حدّ السرعة. الدراج المنحني يُصغّر المساحة، وهيكل السيارة الانسيابي يُصغّر معامل السحب. كلاهما يقلل ذلك المضاعِف بدل أن يغيّر نمو مربع السرعة نفسه. +صغّر الآن «معامل السحب C_D» أو «المساحة الأمامية A»، كأن الراكب انحنى فوق المقود. ينخفض المنحنى كله لكنه يحافظ على شكل القطع المكافئ، لأن كلًّا منهما عدد يُضرب في مربع السرعة. الراكب المنحني يُصغّر المساحة، وهيكل السيارة الانسيابي يُصغّر معامل السحب. كلاهما يصغّر العدد المضروب، ولا يغيّر نمو السحب مع مربع السرعة. ## Formal @@ -64,13 +64,17 @@ charts: ## Real world ### ركوب الدراجة والجري + يهيمن سحب الهواء على مجهود الإنسان فوق سرعة الركض الخفيف. لهذا تسعى مقابض السباق وبدلات الجسم الملاصقة لتقليل $C_D A$ ولو بمقدار صغير، لأن الفائدة تتضاعف مع $v^2$. ### كفاءة استهلاك وقود المركبات + يرتفع استهلاك الوقود أثناء السير الثابت تقريبًا مع $v^3$، بمجرد أن يهيمن السحب على مقاومة التدحرج. هذا سبب انخفاض كفاءة الوقود بشدة على الطريق السريع فوق نحو 100 كم/س. ### القفز الحر + يتخذ القافز الحر وضعية البطن للأسفل ليكبر قيمتي $A$ و $C_D$. هذا يقلل سرعته النهائية ويجعل سقوطه أكثر أمانًا وقابلية للتحكم. ### أحمال الرياح على المنشآت + يحدّد المهندسون أبعاد دعامات الرياح لمبنى أو جسر بقانون $v^2$ هذا بالذات، مراعين رياحًا بسرعة الأعاصير. diff --git a/content/lessons/aerodynamics/drag-equation/en.md b/content/lessons/aerodynamics/drag-equation/en.md index 6fcd4455..7bd986d9 100644 --- a/content/lessons/aerodynamics/drag-equation/en.md +++ b/content/lessons/aerodynamics/drag-equation/en.md @@ -25,15 +25,15 @@ charts: ## Try it -1. Picture a cyclist riding upright at 8 m/s (about 29 km/h) into a headwind. -2. Drag the speed point «speed v» to the right, toward highway speed. The tangent line — the extra force needed for one more m/s — gets steeper and steeper. -3. Now shrink «frontal area A», as if the cyclist tucked down low. The whole curve drops, even at the same speed. +1. Set «drag coefficient C_D» to 0.9, «frontal area A» to 0.5 m² and «speed v» to 8 m/s: a cyclist riding upright at about 29 km/h. The readout shows f(x) = 17.64, the drag in newtons. +2. Drag the speed point «speed v» to the right, to 16 m/s. Twice the speed gives four times the drag: 70.56 N. The tangent line — the extra force needed for one more m/s — gets steeper too: its slope doubles from 4.41 to 8.82. +3. Now lower «drag coefficient C_D» to 0.45, as if the cyclist tucked down low. The whole curve drops: at the same 16 m/s the drag is 35.28 N. ## Real-life examples 1. **An upright cyclist commuting.** Moving at 8 m/s with a frontal area of 0.5 m² and a drag coefficient of 0.9, they push against about 18 N of drag — most of a cyclist's effort at that speed. 2. **A family car cruising on the motorway.** At 30 m/s (108 km/h) with a smooth 0.3 drag coefficient and a 2.2 m² frontal area, the car fights about 364 N of drag. -3. **A skydiver in free fall.** Falling belly-down at 50 m/s with a drag coefficient near 1.0 and a 0.7 m² frontal area, they push against over 1000 N — nearly their own body weight. +3. **A skydiver in free fall.** Falling belly-down at 50 m/s with a drag coefficient near 1.0 and a 0.7 m² frontal area, they push against over 1000 N — about the weight of a heavy skydiver with all their gear. ## Test yourself @@ -45,7 +45,7 @@ charts: Picture a cyclist riding upright at 8 m/s into a headwind. Drag «speed v» to the right, toward highway speed, and watch the tangent line on the curve: it is the extra force needed for one more m/s, and it gets steeper and steeper as you move right. Near very low speed the tangent is almost flat, but at highway speed a small further increase costs a large extra push — exactly why fuel economy falls off a cliff on the motorway. -Now shrink «drag coefficient Cd» or «frontal area A», as if the cyclist tucked down low: the whole curve drops but keeps its parabola shape, because both act as a plain multiplier on the speed term. A cyclist tucking in shrinks the area; a streamlined car body shrinks the drag coefficient — both attack that multiplier rather than fighting the speed-squared growth itself. +Now shrink «drag coefficient C_D» or «frontal area A», as if the cyclist tucked down low: the whole curve drops but keeps its parabola shape, because both act as a plain multiplier on the speed term. A cyclist tucking in shrinks the area; a streamlined car body shrinks the drag coefficient — both attack that multiplier rather than fighting the speed-squared growth itself. ## Formal @@ -66,13 +66,17 @@ Total drag splits into parasitic drag (skin friction + form drag, both $\propto ## Real world ### Cycling and running + Above a jog, air drag dominates human effort; aero bars and skin suits chase small $C_D A$ reductions because the payoff compounds with $v^2$. ### Vehicle fuel economy + Cruising fuel consumption rises roughly with $v^3$ once drag dominates rolling resistance — the reason motorway mpg drops sharply above about 100 km/h. ### Skydiving + A skydiver’s belly-down posture maximises $A$ and $C_D$ to slow their terminal velocity for a safer, more controllable fall. ### Wind loads on structures + Engineers size a building or bridge’s wind bracing using exactly this $v^2$ law, with hurricane-speed winds in mind. diff --git a/content/lessons/aerodynamics/drag-equation/lesson.yaml b/content/lessons/aerodynamics/drag-equation/lesson.yaml index 6fced570..7c0f6910 100644 --- a/content/lessons/aerodynamics/drag-equation/lesson.yaml +++ b/content/lessons/aerodynamics/drag-equation/lesson.yaml @@ -71,23 +71,23 @@ charts: - 0.5*rho*Cd*A*x^3/1000 primary: x presets: -- rho: 1.225 - Cd: 0.9 - A: 0.5 - x: 8 -- rho: 1.225 - Cd: 0.3 - A: 2.2 - x: 30 -- rho: 1.225 - Cd: 1.0 - A: 0.7 - x: 50 + - rho: 1.225 + Cd: 0.9 + A: 0.5 + x: 8 + - rho: 1.225 + Cd: 0.3 + A: 2.2 + x: 30 + - rho: 1.225 + Cd: 1.0 + A: 0.7 + x: 50 challenges: -- check: '0.5*rho*x^2*Cd*A' - target: 300 - tol: 30 -- check: '0.5*rho*x^3*Cd*A/1000' - target: 10 - tol: 1 -- check: 'x >= 20 and Cd <= 0.2 and A <= 1 and 0.5*rho*x^2*Cd*A < 50' + - check: '0.5*rho*x^2*Cd*A' + target: 300 + tol: 30 + - check: '0.5*rho*x^3*Cd*A/1000' + target: 10 + tol: 1 + - check: 'x >= 20 and Cd <= 0.2 and A <= 1 and 0.5*rho*x^2*Cd*A < 50' diff --git a/content/lessons/aerodynamics/four-forces-of-flight/ar.md b/content/lessons/aerodynamics/four-forces-of-flight/ar.md index 50f0ffcc..b53c0333 100644 --- a/content/lessons/aerodynamics/four-forces-of-flight/ar.md +++ b/content/lessons/aerodynamics/four-forces-of-flight/ar.md @@ -14,13 +14,13 @@ variables: ## Try it -1. تخيّل طائرة إقليمية كتلتها 8000 كجم تصعد بسرعة 100 m/s وقدرة محرك 80%. -2. اقرأ زاوية الصعود γ ومعدل الصعود. يجب أن تكون الطائرة تصعد بقوة. -3. اخفض «قدرة المحرك» نحو 30%. راقب زاوية مسار الطيران تصبح سالبة، والطائرة تبدأ الهبوط بدل الصعود. الأسهم الأربعة نفسها، لكن الفائز اختلف. +1. ابدأ و«قدرة المحرك» عند 80% و«سرعة الطيران v» عند 100 m/s: طائرة ركاب إقليمية كتلتها 8000 كجم تصعد بعد الإقلاع. تظهر القراءات T = 48000 N و D = 36750 N. +2. اقرأ زاوية الصعود γ ومعدل الصعود: γ = 8.3° ونحو 2825 ft/min، أي أن الطائرة تصعد بقوة. +3. اخفض «قدرة المحرك» إلى 30%. ينزل الدفع إلى 18000 N، وتصير γ = −13.8°، ويقرأ معدل الصعود نحو −4708 ft/min: الطائرة تهبط بدل أن تصعد. الأسهم الأربعة نفسها، لكن الفائز اختلف. ## Real-life examples -1. **الصعود بعد الإقلاع.** عند قدرة محرك 80% وسرعة 100 m/s، يتفوق الدفع 48000 N على السحب البالغ نحو 36750 N. الفائض 11250 N يشتري صعودًا بزاوية نحو 8°، أي نحو 2800 قدم في الدقيقة. +1. **الصعود بعد الإقلاع.** عند قدرة محرك 80% وسرعة 100 m/s، يتفوق الدفع 48000 N على السحب البالغ نحو 36750 N. الفائض 11250 N يكفي لصعود بزاوية نحو 8°، أي نحو 2800 قدم في الدقيقة. 2. **الطيران الأفقي المستقر.** ضبط قدرة المحرك عند 61% وسرعة 100 m/s يجعل الدفع والسحب متعادلين تقريبًا. تبقى زاوية مسار الطيران قرب 0°، وتحافظ الطائرة على ارتفاعها. 3. **الهبوط بقدرة محرك منخفضة.** عند قدرة 30% فقط والسرعة نفسها 100 m/s، يتفوق السحب على الدفع بفارق كبير. تهبط الطائرة بزاوية حادة، ولو فعل طيار هذا حقًا لخفّض السرعة أيضًا ليجعل الهبوط ألطف. @@ -32,15 +32,15 @@ variables: ## Intuition -تخيّل الطائرة الإقليمية من جانبها. أربعة أسهم مثبتة عليها: الدفع يدفعها للأمام على طول مسار الطيران، والسحب يدفعها للخلف على المسار نفسه، والوزن يسحبها إلى الأسفل مباشرة، والرفع يدفعها إلى الأعلى عموديًا على المسار. ارفع «قدرة المحرك» حتى يتفوق الدفع على السحب في عراك الحبل. لن تستطيع الطائرة عندها الاستمرار في طيران أفقي مستقيم. يميل مسار طيرانها كله إلى الأعلى، حتى يكبر سحب الجاذبية على طول المسار المائل الجديد بما يكفي لإعادة التوازن. هذا الميل هو زاوية الصعود γ، والعلاقة $T - D = W\sin\gamma$ تخبرك بالضبط كم من الدفع الفائض يشتري كم من الصعود. +تخيّل طائرة الركاب الإقليمية من جانبها. أربعة أسهم مثبتة عليها: الدفع يدفعها للأمام على طول مسار الطيران، والسحب يدفعها للخلف على المسار نفسه، والوزن يسحبها إلى الأسفل مباشرة، والرفع يدفعها إلى الأعلى عموديًا على المسار. ارفع «قدرة المحرك» حتى يتفوق الدفع على السحب في لعبة شد الحبل. لن تستطيع الطائرة عندها الاستمرار في طيران أفقي مستقيم. يميل مسار طيرانها كله إلى الأعلى، حتى يكبر سحب الجاذبية على طول المسار المائل الجديد بما يكفي لإعادة التوازن. هذا الميل هو زاوية الصعود γ، والعلاقة $T - D = W\sin\gamma$ تخبرك بالضبط بمقدار الصعود الذي يعطيه الدفع الفائض. -اخفض الآن «قدرة المحرك» بدلًا من ذلك. حين لا يعود الدفع كافيًا لمجاراة السحب، يعمل التوازن نفسه بالاتجاه المعاكس. يميل مسار الطيران إلى الأسفل، ويضيف مركّب الجاذبية على المسار الجديد إلى الدفع، فيعوّض النقص أمام السحب. هذا هو الهبوط، وطائرة محركاتها في وضع الخمول لا تخالف الفيزياء، بل تبادل الارتفاع بالدفعة الأمامية التي لم تعد تحصل عليها من المحركات. وعموديًا على أي مسار استقرت عليه الطائرة، يواصل الرفع مهمته المنفصلة: يحمل مركّب الوزن في ذلك الاتجاه، $L = W\cos\gamma$. لهذا تحتاج طائرة صاعدة أو هابطة رفعًا أقل قليلًا فقط من رفع الطيران الأفقي. +اخفض الآن «قدرة المحرك» بدلًا من ذلك. حين لا يعود الدفع كافيًا لمجاراة السحب، يعمل التوازن نفسه بالاتجاه المعاكس. يميل مسار الطيران إلى الأسفل، وتُضاف مركّبة الجاذبية على المسار الجديد إلى الدفع، فتعوّض النقص أمام السحب. هذا هو الهبوط. والطائرة التي تدور محركاتها بأقل قدرة لا تخالف الفيزياء، بل تخسر من ارتفاعها لتعوّض الدفع الذي لم تعد تحصل عليه من المحركات. وعموديًا على أي مسار استقرت عليه الطائرة، يواصل الرفع مهمته المنفصلة: يحمل مركّبة الوزن في ذلك الاتجاه، $L = W\cos\gamma$. لهذا تحتاج طائرة صاعدة أو هابطة رفعًا أقل قليلًا فقط من رفع الطيران الأفقي. ## Formal في مسار طيران مستقر بلا تسارع، مائل بزاوية $\gamma$ عن الأفق، يعطي تحليل القوى على طول المسار وعموديًا عليه توازنين. على طول المسار: $T - D = W\sin\gamma$. وعموديًا عليه: $L = W\cos\gamma$. الطيران الأفقي هو الحالة الخاصة $\gamma = 0$، حيث $T = D$ و$L = W$. -السحب نفسه يعتمد على السرعة والشكل: $D = \tfrac12\rho v^2 C_D A$. طرف «السحب يفوز» في عراك الحبل يكبر بسرعة مع ازدياد سرعة الطيران. هذا جزء من سبب امتلاك كل طائرة سرعةً قصوى لا تتجاوزها، وسرعةً دنيا لا تطير تحتها. +السحب نفسه يعتمد على السرعة والشكل: $D = \tfrac12\rho v^2 C_D A$. طرف السحب في لعبة شد الحبل يكبر بسرعة مع ازدياد سرعة الطيران. هذا جزء من سبب امتلاك كل طائرة سرعةً قصوى لا تتجاوزها، وسرعةً دنيا لا تطير تحتها. ## Advanced @@ -49,19 +49,23 @@ variables: ## Derivation 1. السحب الناتج عن مقاومة الهواء لحركة الطائرة هو $D = \tfrac12\rho v^2 C_D A$، ويكبر مع مربع سرعة الطيران. -2. على طول مسار الطيران، يتطلب قانون نيوتن الثاني عند انعدام التسارع أن يوازن الدفع الأمامي السحبَ زائدًا مركّب الجاذبية على طول ذلك المسار: $T - D = W\sin\gamma$. -3. عموديًا على مسار الطيران، يوازن الرفع وحده ما تبقى من مركّب الوزن: $L = W\cos\gamma$. هذان التوازنان معًا هما كل صورة «القوى الأربع». +2. على طول مسار الطيران، يتطلب قانون نيوتن الثاني عند انعدام التسارع أن يوازن الدفع الأمامي السحبَ زائدًا مركّبة الجاذبية على طول ذلك المسار: $T - D = W\sin\gamma$. +3. عموديًا على مسار الطيران، يوازن الرفع وحده مركّبة الوزن المتبقية: $L = W\cos\gamma$. هذان التوازنان معًا هما كل صورة «القوى الأربع». ## Real world ### جداول أداء الإقلاع + يحسب الطيارون ميل الصعود المطلوب بعد عطل محرك من هذا التوازن مباشرة. كمية الدفع المتبقية بعد فقدان محرك تقرر إن كانت الطائرة تستطيع تجاوز العوائق. ### طائرات جر الشراعيات -تحتاج طائرة تجر شراعية إلى دفع فائض يكفي لرفع مركّب وزن الطائرتين معًا على طول مسار صاعد. كلما ثقلت الشراعية، صار صعود الجر أكثر استواءً. + +تحتاج طائرة تجر شراعية إلى دفع فائض يكفي لحمل مركّبة وزن الطائرتين معًا على طول مسار صاعد. كلما ثقلت الشراعية، صار صعود الجر أكثر استواءً. ### الطيران الأفقي الموفر للوقود + تحلّق شركات الطيران قرب السرعة التي يكون عندها $D$ أصغر ما يمكن بالنسبة لوزن الطائرة. عند هذه السرعة يكفي أقل دفع، وأقل وقود، لتحقيق $T = D$ في الطيران الأفقي. ### تخطيط الهبوط بعد عطل محرك + حين يتعطل محرك، غالبًا لا يعود الدفع المتبقي كافيًا لمجاراة السحب أصلًا، فتصبح $\gamma < 0$. يخطط الطيارون لهبوط متحكم به، باختيار السرعة التي تعطي أقل معدل هبوط ممكن. diff --git a/content/lessons/aerodynamics/four-forces-of-flight/en.md b/content/lessons/aerodynamics/four-forces-of-flight/en.md index bc1e47ed..f7669b59 100644 --- a/content/lessons/aerodynamics/four-forces-of-flight/en.md +++ b/content/lessons/aerodynamics/four-forces-of-flight/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. Picture an 8,000 kg regional jet climbing out at 100 m/s, throttle at 80%. -2. Read the climb angle γ and the rate-of-climb readout: it should be climbing steeply. -3. Pull «throttle» down toward 30%. Watch the nose-down flight path angle grow and the aircraft start to sink instead of climb — the same four arrows, a different winner. +1. Start with «throttle» at 80% and «airspeed v» at 100 m/s: an 8,000 kg regional jet climbing out. The readouts show T = 48000 N and D = 36750 N. +2. Read the climb angle γ and the rate-of-climb readout: γ = 8.3° and about 2825 ft/min, a steep climb. +3. Pull «throttle» down to 30%. Thrust falls to 18000 N, γ becomes −13.8° and the rate of climb reads about −4708 ft/min: the aircraft sinks instead of climbing — the same four arrows, a different winner. ## Real-life examples @@ -57,13 +57,17 @@ Rearranging the along-path balance gives $\gamma \approx (T-D)/W$ for small angl ## Real world ### Takeoff performance charts + Pilots calculate a required climb gradient after engine failure straight from this balance: how much spare thrust is left once one engine is gone decides whether the aircraft can clear obstacles. ### Glider tow planes + A tow plane hauling a glider aloft needs enough spare thrust to lift both aircraft's combined weight component along a climbing flight path — heavier gliders mean shallower tow climbs. ### Fuel-efficient cruise + Airlines fly close to the speed where $D$ is smallest for the aircraft's weight, since that is where the smallest thrust — and the least fuel — is needed to hold $T = D$ in level flight. ### Engine-out descent planning + When an engine fails, the remaining thrust often cannot match drag at all, forcing $\gamma < 0$: pilots plan a controlled descent, choosing the speed that gives the shallowest possible sink rate. diff --git a/content/lessons/aerodynamics/four-forces-of-flight/lesson.yaml b/content/lessons/aerodynamics/four-forces-of-flight/lesson.yaml index 35cf4274..6f748a68 100644 --- a/content/lessons/aerodynamics/four-forces-of-flight/lesson.yaml +++ b/content/lessons/aerodynamics/four-forces-of-flight/lesson.yaml @@ -3,16 +3,16 @@ subject: aerodynamics difficulty: high-school equation: T - D = W\sin\gamma concepts: -- lift -- weight -- thrust -- drag -- climb-angle + - lift + - weight + - thrust + - drag + - climb-angle prerequisites: [] related: -- lift -- drag-equation -- gliding-and-glide-ratio + - lift + - drag-equation + - gliding-and-glide-ratio visualization: type: four-forces-of-flight options: {} @@ -22,7 +22,7 @@ parameters: min: 0 max: 100 step: 1 - value: 61 + value: 80 unit: '%' v: min: 40 @@ -31,25 +31,25 @@ parameters: value: 100 unit: m/s variables: -- T -- D -- W -- \gamma + - T + - D + - W + - \gamma derivation: -- D = \tfrac12\rho v^2 C_D A -- T - D = W\sin\gamma -- L = W\cos\gamma + - D = \tfrac12\rho v^2 C_D A + - T - D = W\sin\gamma + - L = W\cos\gamma charts: [] presets: -- throttle: 80 - v: 100 -- throttle: 61 - v: 100 -- throttle: 30 - v: 100 + - throttle: 80 + v: 100 + - throttle: 61 + v: 100 + - throttle: 30 + v: 100 challenges: -- check: 'v*asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))' - target: 10 - tol: 1.5 -- check: 'abs(asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))*180/pi) < 0.5' -- check: 'asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))*180/pi < -10' + - check: 'v*asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))' + target: 10 + tol: 1.5 + - check: 'abs(asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))*180/pi) < 0.5' + - check: 'asin(min(1,max(-1,(throttle/100*60000-3.675*v^2)/78400)))*180/pi < -10' diff --git a/content/lessons/aerodynamics/gliding-and-glide-ratio/ar.md b/content/lessons/aerodynamics/gliding-and-glide-ratio/ar.md index 998ee702..54652dbc 100644 --- a/content/lessons/aerodynamics/gliding-and-glide-ratio/ar.md +++ b/content/lessons/aerodynamics/gliding-and-glide-ratio/ar.md @@ -13,25 +13,25 @@ variables: ## Try it -1. تخيّل طائرة ورقية أُطلقت من مكتب ارتفاعه 1.5 m. نسبة انزلاقها نحو 4. -2. اقرأ مسافة الانزلاق: بضعة أمتار فقط، وزاوية الانزلاق حادة. -3. اسحب «نسبة الرفع إلى السحب L/D» نحو 30، قيمة شراعية حقيقية. راقب الارتفاع نفسه يشتري فجأة مسافة هائلة بدلًا من ذلك. +1. اضبط «الارتفاع الابتدائي h» على 2 m و«نسبة الرفع إلى السحب L/D» على 4: طائرة من الورق رُميت من ارتفاع الرأس. +2. اقرأ مسافة الانزلاق: 8 m فقط، وزاوية الانزلاق شديدة الانحدار، γ = 14.04°. +3. ارفع «نسبة الرفع إلى السحب L/D» إلى 30، وهي قيمة طائرة شراعية حقيقية. الارتفاع نفسه 2 m يعطي الآن 60 m، وتنزل γ إلى 1.91°. ## Real-life examples -1. **طائرة ورقية من مكتب.** أُطلقت من ارتفاع 1.5 m بنسبة انزلاق نحو 4. تقطع نحو 6 أمتار قبل أن تلامس الأرض، انزلاق حاد وقصير. -2. **شراعية أُطلقت من ارتفاع 1000 m.** بنسبة انزلاق نحو 30، تستطيع قطع نحو 30 كم قبل الهبوط. يعتمد التحليق الشراعي عبر المسافات على هذا الرقم بالضبط. -3. **طائرة عريضة الجسم فقدت محركيها من ارتفاع 12500 m.** بنسبة انزلاق نظيفة نحو 15، تستطيع نظريًا قطع 187 كم في خط مستقيم. حالات انزلاق حقيقية مشهورة بعد فقدان المحرك قطعت مسافة أقل قليلًا، لأن الطاقم اضطر أيضًا للمناورة والتخلص من ارتفاع زائد قبل الهبوط. +1. **طائرة من الورق تُرمى من فوق مكتب.** أُطلقت من ارتفاع 1.5 m بنسبة انزلاق نحو 4. تقطع نحو 6 أمتار قبل أن تلامس الأرض: انزلاق قصير شديد الانحدار. +2. **طائرة شراعية أُطلقت من ارتفاع 1000 m.** بنسبة انزلاق نحو 30، تستطيع قطع نحو 30 كم قبل الهبوط. يعتمد التحليق الشراعي عبر المسافات على هذا الرقم بالضبط. +3. **طائرة عريضة الجسم فقدت محركيها من ارتفاع 12500 m.** بنسبة انزلاق نحو 15، تستطيع نظريًا قطع 187 كم في خط مستقيم. حالات انزلاق حقيقية مشهورة بعد فقدان المحرك قطعت مسافة أقل قليلًا، لأن الطاقم اضطر أيضًا للمناورة والتخلص من ارتفاع زائد قبل الهبوط. ## Test yourself -1. بلغ مسافة انزلاق نحو 30 كم بدءًا من ارتفاع 1000 m، منطقة الشراعيات. -2. ادفع نسبة الانزلاق فوق 40، شراعية تنافسية من الطراز الأول. -3. بدءًا من ارتفاع مكتب واقعي (2 m أو أقل)، اقطع أكثر من 8 أمتار انزلاقًا رغم ذلك. +1. ابلغ مسافة انزلاق نحو 30 كم بدءًا من ارتفاع 1000 m، كما تفعل الطائرات الشراعية. +2. ارفع نسبة الانزلاق فوق 40، كأفضل شراعيات السباقات. +3. ابدأ من ارتفاع مكتب واقعي (2 m أو أقل)، واقطع مع ذلك أكثر من 8 أمتار. ## Intuition -بلا محرك، يبقى لدى الطائرة مصدر حركة أمامي واحد بالضبط: الجاذبية. تسحبها على مسار هابط لطيف، بدل السحب المستقيم نحو الأسفل. اسحب «الارتفاع الابتدائي h» صعودًا وهبوطًا، وراقب مسافة الانزلاق تتبعه مباشرة. ارتفاع أكبر مُدَّخر يعني مسافة أكبر مشتراة، بسعر صرف ثابت يحدده شكل الطائرة. سعر الصرف هذا هو نسبة الانزلاق. اسحب «نسبة الرفع إلى السحب L/D» صعودًا، فيشتري الارتفاع الابتدائي نفسه مسافة أكبر بكثير فجأة. الشكل الأكفأ يحتاج زاوية انزلاق أقل انحدارًا ليوازن السحب بسحب الجاذبية على طول المسار. +بلا محرك، يبقى لدى الطائرة مصدر حركة أمامي واحد بالضبط: الجاذبية. تشدّها على مسار هابط قليل الميل، بدل أن تسقط مباشرة نحو الأسفل. حرّك «الارتفاع الابتدائي h» صعودًا وهبوطًا، وراقب مسافة الانزلاق تتبعه مباشرة. كل متر من الارتفاع يتحول إلى عدد ثابت من أمتار التقدّم، وهذا العدد يحدده شكل الطائرة. نسمّيه نسبة الانزلاق. ارفع «نسبة الرفع إلى السحب L/D»، فيعطي الارتفاع الابتدائي نفسه مسافة أكبر بكثير. الشكل الأكفأ يحتاج زاوية انزلاق أقل انحدارًا ليوازن السحبَ بشدّ الجاذبية على طول المسار. هنا الجزء الجدير بالتوقف عنده: لا تهتم نسبة الانزلاق بوزن الطائرة إطلاقًا. شراعية محمّلة وأخرى فارغة، أُطلقتا من الارتفاع نفسه بنسبة L/D نفسها، تقطعان المسافة نفسها. الأثقل فقط عليها أن تطير أسرع قليلًا لتفعل ذلك، لأن الرفع والسحب يتناسبان مع الوزن بالنسبة نفسها تمامًا. الوزن يقرر السرعة، لا المسافة. الشكل يقرر المسافة. @@ -43,24 +43,28 @@ variables: ## Advanced -بما أن نسبة الانزلاق تعتمد على $L/D$ فقط، ويتناسب الرفع والسحب معًا مع مربع سرعة الطيران عند زاوية هجوم ثابتة، تملك الطائرة سرعة انزلاق *مثلى* تبلغ عندها $L/D$ ذروتها. الطيران أسرع أو أبطأ من تلك السرعة، حتى لو ظل الانزلاق مستقرًا، يفرّط في بعض المسافة المتاحة. لهذا يطير طيارو الشراعيات بسرعة «أفضل انزلاق» محددة، لا بما يشعرون معه بالراحة فحسب. +بما أن نسبة الانزلاق تعتمد على $L/D$ فقط، ويتناسب الرفع والسحب معًا مع مربع سرعة الطيران عند زاوية هجوم ثابتة، تملك الطائرة سرعة انزلاق _مثلى_ تبلغ عندها $L/D$ ذروتها. الطيران أسرع أو أبطأ من تلك السرعة، حتى لو ظل الانزلاق مستقرًا، يفرّط في بعض المسافة المتاحة. لهذا يطير طيارو الشراعيات بسرعة «أفضل انزلاق» محددة، لا بما يشعرون معه بالراحة فحسب. ## Derivation -1. في انزلاق مستقر بلا دفع، الجاذبية هي المحرك الوحيد. يوازن مركّب الوزن على طول مسار الطيران السحبَ، ويوازن المركّب العمودي عليه الرفعَ: $W\sin\gamma = D, \quad W\cos\gamma = L$. +1. في انزلاق مستقر بلا دفع، الجاذبية هي المحرك الوحيد. توازن مركّبة الوزن على طول مسار الطيران السحبَ، وتوازن المركّبة العمودية عليه الرفعَ: $W\sin\gamma = D, \quad W\cos\gamma = L$. 2. اقسم إحدى المعادلتين على الأخرى، فيُلغى الوزن تمامًا: $\dfrac{L}{D} = \dfrac{\cos\gamma}{\sin\gamma} = \dfrac{1}{\tan\gamma}$. تعتمد نسبة الانزلاق فقط على كفاءة الشكل في الطيران، لا على وزنه أبدًا. 3. عند الانزلاق اللطيف، $\tan\gamma \approx \gamma$ بالراديان. المسافة الأفقية المقطوعة أثناء فقدان ارتفاع $h$ هي $\text{distance} \approx h \cdot (L/D)$. ## Real world ### الشراعيات التنافسية -تبلغ أفضل الشراعيات الحديثة نسب انزلاق فوق 60. كيلومتر واحد من الارتفاع يشتري، في هواء ساكن تمامًا، أكثر من 60 كم من المسافة المستقيمة. + +تبلغ أفضل الشراعيات الحديثة نسب انزلاق فوق 60. كيلومتر واحد من الارتفاع يعطي، في هواء ساكن تمامًا، أكثر من 60 كم من المسافة المستقيمة. ### عودة المكوك الفضائي إلى الغلاف الجوي -انزلق مكوك الفضاء نحو الهبوط بنسبة انزلاق لا تتجاوز 4.5 تقريبًا، أقرب إلى طوب من شراعية. لهذا كان اقترابه النهائي أشد انحدارًا بكثير من اقتراب طائرة ركاب. + +انزلق مكوك الفضاء نحو الهبوط بنسبة انزلاق لا تتجاوز 4.5 تقريبًا، فكان أقرب إلى حجر يسقط منه إلى طائرة شراعية. لهذا كان اقترابه النهائي أشد انحدارًا بكثير من اقتراب طائرة ركاب. ### قوائم طوارئ فقدان المحرك + تتضمن إجراءات الطوارئ في كل طائرة ركاب سرعة «أفضل انزلاق» معروفة ونسبة انزلاق مقدّرة. يستطيع طاقم فقد كل محركاته تقدير المسافة التي يستطيع بلوغها فورًا. -### الطائرات الشراعية المعلقة والباراشوت الشراعي -نسب الانزلاق الترفيهية من 8 إلى 12 للطائرات المعلقة، وحتى 10 أو أكثر للباراشوت الشراعي الحديث، هي بالضبط ما يستعمله الطيارون، قبل الإقلاع، للحكم إن كان مهبط بعيد قابلًا للبلوغ أصلًا. +### الطائرات الشراعية المعلقة والمظلات الشراعية + +نسبة الانزلاق من 8 إلى 12 للطائرات الشراعية المعلقة، و10 أو أكثر للمظلات الشراعية الحديثة. بهذه الأرقام يحكم الطيار قبل الإقلاع: هل يستطيع بلوغ مهبط بعيد أم لا؟ diff --git a/content/lessons/aerodynamics/gliding-and-glide-ratio/en.md b/content/lessons/aerodynamics/gliding-and-glide-ratio/en.md index dd6dbeb5..a5277a3c 100644 --- a/content/lessons/aerodynamics/gliding-and-glide-ratio/en.md +++ b/content/lessons/aerodynamics/gliding-and-glide-ratio/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Picture a paper aeroplane released from a 1.5 m desk, glide ratio about 4. -2. Read the glide distance: only a few metres, and the glide angle is steep. -3. Drag «lift-to-drag ratio L/D» up toward a real glider's 30, and watch the same starting height suddenly buy a huge distance instead. +1. Set «starting height h» to 2 m and «lift-to-drag ratio L/D» to 4: a paper aeroplane thrown from head height. +2. Read the glide distance: only 8 m, and the glide angle is steep, γ = 14.04°. +3. Drag «lift-to-drag ratio L/D» up to a real glider's 30. The same 2 m of height now buys 60 m, and γ falls to 1.91°. ## Real-life examples @@ -45,7 +45,7 @@ For small angles, $\tan\gamma \approx \gamma$ in radians, and the horizontal dis ## Advanced -Because glide ratio depends only on $L/D$, and both lift and drag scale with the square of airspeed at a fixed angle of attack, an aircraft has a *best* glide speed where $L/D$ peaks; flying faster or slower than that speed (even though still gliding stably) trades away some of the available distance, which is why glider pilots fly a specific "best glide" speed rather than whatever feels comfortable. +Because glide ratio depends only on $L/D$, and both lift and drag scale with the square of airspeed at a fixed angle of attack, an aircraft has a _best_ glide speed where $L/D$ peaks; flying faster or slower than that speed (even though still gliding stably) trades away some of the available distance, which is why glider pilots fly a specific "best glide" speed rather than whatever feels comfortable. ## Derivation @@ -56,13 +56,17 @@ Because glide ratio depends only on $L/D$, and both lift and drag scale with the ## Real world ### Competition sailplanes + The best modern sailplanes reach glide ratios above 60, meaning a single kilometre of altitude can, in perfectly still air, buy more than 60 km of straight-line distance. ### Space Shuttle re-entry + The Shuttle orbiter glided to landing with a glide ratio of only about 4.5 — closer to a brick than a sailplane — which is why its final approach was flown far steeper than an airliner's. ### Engine-out emergency checklists + Every airliner's emergency procedures include a known best-glide speed and an estimated glide ratio, so a crew who loses all engines can immediately estimate how far they can reach. ### Hang gliders and paragliders + Recreational glide ratios of 8 to 12 (hang gliders) up to 10 or more (modern paragliders) are exactly what pilots use, before launching, to judge whether a distant landing field is even reachable. diff --git a/content/lessons/aerodynamics/gliding-and-glide-ratio/lesson.yaml b/content/lessons/aerodynamics/gliding-and-glide-ratio/lesson.yaml index f70217d8..f3b70571 100644 --- a/content/lessons/aerodynamics/gliding-and-glide-ratio/lesson.yaml +++ b/content/lessons/aerodynamics/gliding-and-glide-ratio/lesson.yaml @@ -3,14 +3,14 @@ subject: aerodynamics difficulty: high-school equation: \dfrac{L}{D} = \dfrac{1}{\tan\gamma} concepts: -- glide-ratio -- lift-to-drag -- flight-path-angle + - glide-ratio + - lift-to-drag + - flight-path-angle prerequisites: -- lift-to-drag + - lift-to-drag related: -- four-forces-of-flight -- terminal-velocity + - four-forces-of-flight + - terminal-velocity visualization: type: gliding-and-glide-ratio options: {} @@ -29,24 +29,24 @@ parameters: value: 3000 unit: m variables: -- L -- D -- \gamma + - L + - D + - \gamma derivation: -- W\sin\gamma = D, \quad W\cos\gamma = L -- \dfrac{L}{D} = \dfrac{\cos\gamma}{\sin\gamma} = \dfrac{1}{\tan\gamma} -- \tan\gamma \approx \gamma \;\Rightarrow\; \text{distance} \approx h \cdot (L/D) + - W\sin\gamma = D, \quad W\cos\gamma = L + - \dfrac{L}{D} = \dfrac{\cos\gamma}{\sin\gamma} = \dfrac{1}{\tan\gamma} + - \tan\gamma \approx \gamma \;\Rightarrow\; \text{distance} \approx h \cdot (L/D) charts: [] presets: -- LD: 4 - h: 1.5 -- LD: 30 - h: 1000 -- LD: 15 - h: 12500 + - LD: 4 + h: 1.5 + - LD: 30 + h: 1000 + - LD: 15 + h: 12500 challenges: -- check: 'h*LD' - target: 30000 - tol: 3000 -- check: 'LD > 40' -- check: 'h<=2 and h*LD>8' + - check: 'h*LD' + target: 30000 + tol: 3000 + - check: 'LD > 40' + - check: 'h<=2 and h*LD>8' diff --git a/content/lessons/aerodynamics/helicopters-and-rotors/ar.md b/content/lessons/aerodynamics/helicopters-and-rotors/ar.md index 7343e5da..1bd794db 100644 --- a/content/lessons/aerodynamics/helicopters-and-rotors/ar.md +++ b/content/lessons/aerodynamics/helicopters-and-rotors/ar.md @@ -7,7 +7,7 @@ parameters: W: وزن الطائرة W tilt: ميل الدوّار variables: - - السرعة الحثية (الغسل الهابط) عند قرص الدوّار + - السرعة الحثية (تيار الهواء الهابط) عند قرص الدوّار - قوة الدفع - كثافة الهواء - مساحة قرص الدوّار @@ -15,33 +15,33 @@ variables: ## Try it -1. تخيّل هليكوبتر خفيفة، نصف قطر دوّارها 3.84 m ووزنها 6076 N. تحلّق ثابتة والدوّار أفقي. -2. اقرأ سرعة الغسل الهابط وقدرة التحليق الثابت. كلاهما تقدير، لكنه واقعي. -3. اسحب «ميل الدوّار» إلى الأمام بضع درجات. راقب الدفع الكلي يصعد قليلًا. القرص كله، لا جسم الطائرة، يميل ليدفع الطائرة إلى الأمام. +1. ابدأ بالقيم الظاهرة: هليكوبتر خفيفة، «نصف قطر الدوّار R» يساوي 3.84 m و«وزن الطائرة W» يساوي 6076 N. تحلّق ثابتة و«ميل الدوّار» عند 0°. +2. اقرأ سرعة تيار الهواء الهابط v_i = 7.32 m/s وقدرة التحليق الثابت P = 44.5 kW. كلاهما تقدير، لكنه واقعي. +3. اسحب «ميل الدوّار» إلى الأمام حتى 12°. يصعد الدفع الكلي T من 6076 N إلى 6212 N. القرص كله، لا جسم الطائرة، يميل ليدفع الطائرة إلى الأمام. ## Real-life examples 1. **هليكوبتر خفيفة تحلّق ثابتة.** دوّار نصف قطره 3.84 m يرفع 6076 N. يدفع الهواء إلى الأسفل بنحو 7.3 m/s، ويحتاج نحو 44 kW من القدرة المثالية للتحليق الثابت. محرك هليكوبتر حقيقية يغطي أيضًا خسائر يتجاهلها هذا التقدير. -2. **هليكوبتر رفع ثقيل تحلّق ثابتة.** دوّار نصف قطره 16 m يرفع نحو 550000 N. ما زال يدفع الهواء بنحو 16.7 m/s فقط، أكثر بقليل من ضعف الغسل الهابط للهليكوبتر الخفيفة، رغم أنها ترفع وزنًا يقارب 100 ضعف، لأن قرصها أكبر بكثير. -3. **الهليكوبتر الخفيفة مائلة للأمام للطواف.** أمِل الدوّار نفسه 12° للأمام. ليستمر بحمل الوزن نفسه، يجب أن يرتفع الدفع الكلي بنحو 2%، تكلفة إضافية صغيرة لكنها حقيقية للطيران بسرعة. +2. **هليكوبتر رفع ثقيل تحلّق ثابتة.** دوّار نصف قطره 16 m يرفع نحو 550000 N. ما زال يدفع الهواء بنحو 16.7 m/s فقط، أكثر بقليل من ضعف تيار الهواء الهابط للهليكوبتر الخفيفة، رغم أنها ترفع وزنًا يقارب 100 ضعف، لأن قرصها أكبر بكثير. +3. **الهليكوبتر الخفيفة تميل للأمام لتطير بسرعة.** أمِل الدوّار نفسه 12° للأمام. ليستمر بحمل الوزن نفسه، يجب أن يرتفع الدفع الكلي بنحو 2%، تكلفة إضافية صغيرة لكنها حقيقية للطيران بسرعة. ## Test yourself -1. اخفض سرعة الغسل الهابط عند التحليق الثابت إلى نحو 8 m/s، باختيار دوّار كبير بما يكفي لطائرة خفيفة. -2. ادفع حمل القرص (الدفع على مساحة القرص) فوق 400 N/m²، دوّار مدمج نهم للطاقة. +1. اخفض سرعة تيار الهواء الهابط عند التحليق الثابت إلى نحو 5 m/s، باختيار دوّار كبير بما يكفي لطائرة خفيفة. +2. ارفع حمل القرص (الدفع مقسومًا على مساحة القرص) فوق 400 N/m²، أي دوّار صغير يستهلك قدرة كبيرة. 3. أمِل الدوّار للأمام أكثر من 10°، وراقب الدفع الكلي يصعد أكثر من 1% فوق وزن الطائرة. ## Intuition -ريشة دوّار الهليكوبتر جناح، لا أكثر ولا أقل. لها مقطع جناحي وزاوية هجوم، وتصنع الرفع بالطريقة نفسها التي يصنعها أي جناح. الفرق أنها تفعل ذلك بالدوران في دائرة، بدل الحركة في خط مستقيم. لتحلّق ثابتة، يجب على ذلك الجناح الدوّار أن يدفع عمودًا عريضًا من الهواء إلى الأسفل، بقوة تكفي لحمل وزن الطائرة كله. اسحب «نصف قطر الدوّار R» صعودًا، وراقب قراءة سرعة الغسل الهابط تنخفض رغم أن وزن الطائرة لم يتغيّر. يوزّع القرص الأكبر الدفعة الهابطة نفسها على هواء أكثر بكثير، فيحتاج كل كيلوغرام من الهواء دفعة لطيفة فقط. هذه هي الفكرة نفسها التي تجعل مروحة عريضة أكفأ من نفاث ضيق. +ريشة دوّار الهليكوبتر جناح، لا أكثر ولا أقل. لها مقطع جناحي وزاوية هجوم، وتصنع الرفع بالطريقة نفسها التي يصنعها أي جناح. الفرق أنها تفعل ذلك بالدوران في دائرة، بدل الحركة في خط مستقيم. لتحلّق ثابتة، يجب على ذلك الجناح الدوّار أن يدفع عمودًا عريضًا من الهواء إلى الأسفل، بقوة تكفي لحمل وزن الطائرة كله. اسحب «نصف قطر الدوّار R» صعودًا، وراقب قراءة سرعة تيار الهواء الهابط تنخفض رغم أن وزن الطائرة لم يتغيّر. يوزّع القرص الأكبر الدفعة الهابطة نفسها على هواء أكثر بكثير، فيحتاج كل كيلوغرام من الهواء دفعة لطيفة فقط. هذه هي الفكرة نفسها التي تجعل مروحة عريضة أكفأ من نفاث ضيق. -جرّب الآن «ميل الدوّار». لا تُميل هليكوبتر حقيقية جسمها كله للطيران إلى الأمام كما تفعل طائرة عادية. بدل ذلك، تُميل آلية تُسمى الصفيحة المتأرجحة (swashplate) قرص الدوّار الدائر نفسه. تغيّر هذه الآلية زاوية ميل كل ريشة عند نقطة مختلفة من دورانها الخاص، بحيث يميل القرص كله جهة واحدة بينما يبقى جسم الطائرة أفقيًا مريحًا تحته. أمِل القرص للأمام، فيكتسب متجه الدفع، الذي يشير دائمًا عبر القرص مباشرة، مركّبًا أماميًا صغيرًا يدفع الهليكوبتر إلى الأمام. ما زال على المركّب الرأسي أن يحمل الوزن نفسه، ولهذا يجب أن يرتفع الدفع الكلي قليلًا كلما مال القرص. +جرّب الآن «ميل الدوّار». لا تُميل هليكوبتر حقيقية جسمها كله للطيران إلى الأمام كما تفعل طائرة عادية. بدل ذلك، تُميل آلية تُسمى الصفيحة المتأرجحة (swashplate) قرص الدوّار الدائر نفسه. تغيّر هذه الآلية زاوية ميل كل ريشة عند نقطة مختلفة من دورانها الخاص، بحيث يميل القرص كله جهة واحدة بينما يبقى جسم الطائرة أفقيًا تحته. أمِل القرص للأمام، فيكتسب متجه الدفع، وهو دائمًا عمودي على القرص، مركّبة أمامية صغيرة تدفع الهليكوبتر إلى الأمام. ما زال على المركّبة الرأسية أن تحمل الوزن نفسه، ولهذا يجب أن يرتفع الدفع الكلي قليلًا كلما مال القرص. ## Formal بحسب نظرية الزخم، يدفع دوّار يحلّق ثابتًا بدفع $T$ فوق قرص مساحته $A$ في هواء كثافته $\rho$ الهواءَ إلى الأسفل بسرعة حثية $v_i = \sqrt{\dfrac{T}{2\rho A}}$. القدرة المثالية اللازمة للتحليق الثابت هي $P = T\,v_i$. -يُسمى الدفع مقسومًا على مساحة القرص، $T/A$، حمل القرص. حمل قرص منخفض، أي دوّار كبير بالنسبة لوزن الطائرة، يعني سرعة غسل هابط منخفضة وقدرة مثالية منخفضة. لهذا بالضبط تحمل هليكوبترات الرفع الثقيل دوّارات ضخمة، لا دوّارات صغيرة صاخبة. +يُسمى الدفع مقسومًا على مساحة القرص، $T/A$، حمل القرص. حمل قرص منخفض، أي دوّار كبير بالنسبة لوزن الطائرة، يعني تيار هواء هابطًا بطيئًا وقدرة مثالية منخفضة. لهذا بالضبط تحمل هليكوبترات الرفع الثقيل دوّارات ضخمة، لا دوّارات صغيرة صاخبة. ## Advanced @@ -49,20 +49,24 @@ variables: ## Derivation -1. في التحليق الثابت المستقر، يدفع الدوّار عمودًا من الهواء بمقطع عرضي يقارب مقطع القرص نفسه إلى الأسفل، مكتسبًا سرعة غسل هابط $w$: $L \approx \dot m\, w, \quad \dot m = \rho A v_i$. +1. في التحليق الثابت المستقر، يدفع الدوّار عمودًا من الهواء بمقطع عرضي يقارب مقطع القرص نفسه إلى الأسفل، فيكتسب الهواء سرعة هبوط $w$: $L \approx \dot m\, w, \quad \dot m = \rho A v_i$. 2. حل المعادلة للسرعة الحثية يعطي $v_i = \sqrt{T/(2\rho A)}$. يظهر عامل 2 لأن الهواء يواصل التسارع تحت القرص، فلا يحدث عند الدوّار نفسه سوى نصف تغيّر سرعته النهائي. 3. القدرة المثالية اللازمة هي القوة مضروبة في السرعة، $P = T\, v_i$. كلاهما ينخفض مع نمو مساحة القرص $A$، لأن القرص الأكبر يحتاج $v_i$ أصغر ليحمل الدفع نفسه. ## Real world ### لماذا تملك هليكوبترات الرفع الثقيل دوّارات ضخمة + تحمل ميل مي-26، من أثقل الهليكوبترات التي بُنيت على الإطلاق، دوّارًا هائلًا قطره 32 m. تحمله تحديدًا لإبقاء حمل القرص، وقدرة التحليق الثابت، منخفضين بقدر ما تسمح به هذه الفيزياء. ### تأثير الأرض -عند التحليق قريبًا من الأرض، لا يستطيع الغسل الهابط أن يتشكل كاملًا. يرتفع ضغط الهواء فعليًا تحت الدوّار، وتنخفض القدرة اللازمة للتحليق الثابت. يستغل الطيارون هذا عمدًا لإقلاع أثقل وأكفأ. + +عند التحليق قريبًا من الأرض، لا يستطيع تيار الهواء الهابط أن يتشكل كاملًا. يرتفع ضغط الهواء فعليًا تحت الدوّار، وتنخفض القدرة اللازمة للتحليق الثابت. يستغل الطيارون هذا عمدًا لإقلاع أثقل وأكفأ. ### هليكوبترات الدوّار الترادفي والمحوري -تستعمل طائرات مثل شينوك (ترادفي) أو كاموف كا-52 (محوري) دوّارين. تتفادى بذلك جزئيًا تكلفة قدرة الدوّار الذيلي، وتلائم جزئيًا مساحة قرص إجمالية أكبر، وبالتالي حمل قرص أقل، داخل هيكل مدمج. + +تستعمل طائرات مثل شينوك (ترادفي) أو كاموف كا-52 (محوري) دوّارين. تستغني بذلك عن الدوّار الذيلي والقدرة التي يستهلكها، وتحصل أيضًا على مساحة قرص إجمالية أكبر، أي حمل قرص أقل، في هيكل صغير. ### الدوران الذاتي (autorotation) + إذا تعطّل المحرك، يواصل دوّار الهليكوبتر الدوران، مدفوعًا بتدفق الهواء الصاعد خلاله أثناء هبوط متحكم به. ينتج رفعًا كافيًا لهبوط آمن دون أي قدرة محرك إطلاقًا. diff --git a/content/lessons/aerodynamics/helicopters-and-rotors/en.md b/content/lessons/aerodynamics/helicopters-and-rotors/en.md index 5968dd75..9c31d921 100644 --- a/content/lessons/aerodynamics/helicopters-and-rotors/en.md +++ b/content/lessons/aerodynamics/helicopters-and-rotors/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Picture a small helicopter, rotor radius 3.84 m, weighing 6,076 N, hovering with the rotor level. -2. Read the downwash speed and the hover power — both are estimates, but realistic ones. -3. Drag «rotor tilt» forward a few degrees. Watch total thrust climb slightly and the whole disc — not the fuselage — lean to push the aircraft ahead. +1. Start with the values on screen: a small helicopter, «rotor radius R» 3.84 m, «aircraft weight W» 6,076 N, hovering with «rotor tilt» at 0°. +2. Read the downwash speed v_i = 7.32 m/s and the hover power P = 44.5 kW — both are estimates, but realistic ones. +3. Drag «rotor tilt» forward to 12°. Total thrust T climbs from 6076 N to 6212 N, and the whole disc — not the fuselage — leans to push the aircraft ahead. ## Real-life examples @@ -29,7 +29,7 @@ variables: ## Test yourself -1. Get the hover downwash velocity down to about 8 m/s by choosing a big enough rotor for a light aircraft. +1. Get the hover downwash velocity down to about 5 m/s by choosing a big enough rotor for a light aircraft. 2. Push disc loading (thrust over disc area) above 400 N/m² — a compact, power-hungry rotor. 3. Tilt the rotor forward past 10° and see total thrust climb more than 1% above the aircraft's weight. @@ -58,13 +58,17 @@ Real hover power exceeds this ideal (induced) power because of blade profile dra ## Real world ### Why heavy-lift helicopters have huge rotors + The Mil Mi-26, one of the heaviest helicopters ever built, carries an enormous 32 m rotor precisely to keep disc loading — and hover power — as low as this physics allows. ### Ground effect + Hovering close to the ground, the downwash can't fully develop, effectively raising the air pressure under the rotor and cutting the power needed to hover — pilots use this deliberately for a heavier, more efficient takeoff. ### Tandem and coaxial rotor helicopters + Aircraft like the Chinook (tandem) or Kamov Ka-52 (coaxial) use two rotors partly to avoid the tail-rotor power penalty, and partly to fit more total disc area — and so lower disc loading — into a compact airframe. ### Autorotation + If the engine fails, a helicopter's rotor keeps spinning driven by the upward flow of air through it during a controlled descent, still generating enough lift for a safe landing without any engine power at all. diff --git a/content/lessons/aerodynamics/helicopters-and-rotors/lesson.yaml b/content/lessons/aerodynamics/helicopters-and-rotors/lesson.yaml index c756b05e..5cbfd4ad 100644 --- a/content/lessons/aerodynamics/helicopters-and-rotors/lesson.yaml +++ b/content/lessons/aerodynamics/helicopters-and-rotors/lesson.yaml @@ -3,14 +3,14 @@ subject: aerodynamics difficulty: university equation: v_i = \sqrt{\dfrac{T}{2\rho A}} concepts: -- rotor -- hover -- disc-loading -- swashplate + - rotor + - hover + - disc-loading + - swashplate prerequisites: [] related: -- propellers-and-jets -- how-wings-really-lift + - propellers-and-jets + - how-wings-really-lift visualization: type: helicopters-and-rotors options: {} @@ -38,28 +38,28 @@ parameters: value: 0 unit: ° variables: -- v_i -- T -- \rho -- A + - v_i + - T + - \rho + - A derivation: -- L \approx \dot m\, w, \quad \dot m = \rho A v_i -- v_i = \sqrt{T/(2\rho A)} -- P = T\, v_i + - L \approx \dot m\, w, \quad \dot m = \rho A v_i + - v_i = \sqrt{T/(2\rho A)} + - P = T\, v_i charts: [] presets: -- R: 3.84 - W: 6076 - tilt: 0 -- R: 16 - W: 548800 - tilt: 0 -- R: 3.84 - W: 6076 - tilt: 12 + - R: 3.84 + W: 6076 + tilt: 0 + - R: 16 + W: 548800 + tilt: 0 + - R: 3.84 + W: 6076 + tilt: 12 challenges: -- check: 'sqrt((W/cos(tilt*pi/180))/(2*1.225*pi*R^2))' - target: 8 - tol: 1 -- check: '(W/cos(tilt*pi/180))/(pi*R^2) > 400' -- check: 'tilt>10 and (W/cos(tilt*pi/180))/W > 1.01' + - check: 'sqrt((W/cos(tilt*pi/180))/(2*1.225*pi*R^2))' + target: 5 + tol: 0.5 + - check: '(W/cos(tilt*pi/180))/(pi*R^2) > 400' + - check: 'tilt>10 and (W/cos(tilt*pi/180))/W > 1.01' diff --git a/content/lessons/aerodynamics/how-wings-really-lift/ar.md b/content/lessons/aerodynamics/how-wings-really-lift/ar.md index a6f5af3f..ceea3a5f 100644 --- a/content/lessons/aerodynamics/how-wings-really-lift/ar.md +++ b/content/lessons/aerodynamics/how-wings-really-lift/ar.md @@ -13,37 +13,37 @@ variables: ## Try it -1. تخيّل طائرة خفيفة تصعد بعد الإقلاع، مائلة 5° بسرعة 50 m/s. -2. ارفع منزلق «زاوية الهجوم α» ببطء. راقب الظل الأزرق، أي منطقة الضغط المنخفض، فوق الجناح يزداد سمكًا. النقطة البرتقالية العلوية تنهي دورتها فوق الجناح قبل النقطة السفلية بوقت واضح. -3. اقرأ الزمنين أسفل الرسم. لا يتساويان أبدًا، وهذه هي النقطة المهمة. +1. ابدأ و«زاوية الهجوم α» عند 5° و«سرعة الطيران v» عند 50 m/s: طائرة خفيفة تصعد بعد الإقلاع. تظهر القراءات Δp = 839 Pa و L = 13417 N. +2. ارفع «زاوية الهجوم α» ببطء إلى 10°. يزداد الشريط الأزرق فوق الجناح سمكًا، وهو منطقة الضغط المنخفض، ويرتفع Δp إلى 1671 Pa. النقطة الزرقاء فوق الجناح تصل إلى نهايته قبل النقطة البرتقالية تحته بوقت واضح. +3. اقرأ زمنَي العبور في القراءات: 20 ms فوق الجناح و41 ms تحته. لا يتساويان أبدًا، وهذا هو المهم. ## Real-life examples 1. **طائرة خفيفة تصعد بعد الإقلاع.** مائلة 5° بسرعة 50 m/s، يعبر الهواء فوق الجناح أسرع بوضوح من الهواء تحته. فرق الضغط قوي بما يكفي لرفع الطائرة. -2. **الطائرة نفسها في اقتراب نهائي بطيء.** مائلة حتى 12° بسرعة 30 m/s فقط. يتعب فرق الضغط في كل وحدة سرعة، فتتولى الزاوية معظم مهمة الرفع. -3. **جناح تجاوز فقدان الرفع بكثير.** مائل حتى 18° بسرعة 40 m/s. تفكك الشفط الناعم فوق السطح إلى دوامات، فانهار فرق الضغط رغم أن الميل هنا هو الأكبر. +2. **الطائرة نفسها في اقتراب نهائي بطيء.** مائلة حتى 12° بسرعة 30 m/s فقط. السرعة قليلة، فلا يكفي فرق الضغط إلا بزاوية أكبر: الزاوية هي التي تتولى معظم مهمة الرفع الآن. +3. **جناح تجاوز زاوية فقدان الرفع بكثير.** مائل حتى 18° بسرعة 40 m/s. تحوّل الانسياب المنتظم فوق السطح إلى دوامات، فانهار فرق الضغط رغم أن الميل هنا هو الأكبر. ## Test yourself -1. بلغ رفعًا نحو 15000 N، وابقَ عند زاوية هجوم 15° أو أقل، وهي زاوية فقدان الرفع. -2. ادفع زاوية الهجوم إلى ما بعد 15°، وأبقِ معامل الرفع فوق 1.0 رغم ذلك. -3. دون تجاوز 15°، اجعل فرق الضغط بين السطحين 600 Pa على الأقل. +1. ابلغ رفعًا نحو 15000 N، وابقَ عند زاوية هجوم 15° أو أقل، وهي زاوية فقدان الرفع. +2. ارفع زاوية الهجوم إلى ما بعد 15°، وأبقِ معامل الرفع فوق 1.0 رغم ذلك. +3. دون تجاوز 15°، اجعل فرق الضغط بين السطحين 2000 Pa على الأقل. ## Intuition -انسَ القصة الشائعة عن الرفع. تقول القصة إن جزيئي هواء ينفصلان عند مقدمة الجناح، ثم يجب أن يلتقيا عند نهايته معًا. المسار العلوي أطول فوق الجناح المنحني، فتزعم القصة أن هذا يجبر الهواء فوقه على الإسراع. هذه القصة خاطئة، وترى فشلها بنفسك هنا: حرّك منزلق «زاوية الهجوم α» إلى الأعلى وراقب نقطتي التوقيت. تنهي النقطة العلوية دورتها حول الجناح قبل النقطة السفلية في كل مرة. مسارها أطول قليلًا لا أكثر، فهذا الفارق الصغير لا يفسر سرعتها. تساوي زمن العبور إذن ليس السبب الحقيقي. +انسَ القصة الشائعة عن الرفع. تقول القصة إن جزيئي هواء ينفصلان عند مقدمة الجناح، ثم يجب أن يلتقيا عند نهايته معًا. المسار العلوي أطول فوق الجناح المنحني، فتزعم القصة أن هذا يجبر الهواء فوقه على الإسراع. هذه القصة خاطئة، وترى فشلها بنفسك هنا: حرّك منزلق «زاوية الهجوم α» إلى الأعلى وراقب نقطتي التوقيت. تصل النقطة العلوية إلى نهاية الجناح قبل النقطة السفلية في كل مرة. مسارها أطول قليلًا لا أكثر، فهذا الفارق الصغير لا يفسر سرعتها. تساوي زمن العبور إذن ليس السبب الحقيقي. -السبب الحقيقي أن الجناح يحني حقل الانسياب كله حوله. أشد الانحناء يحدث فوق سطحه المنحني والمائل مباشرة، وهذا ما يفعله أي سائل حقيقي حين يلتف حول شكل دون أن يترك فراغًا خلفه. الهواء الأسرع فوق الجناح يعني ضغطًا أقل هناك. حرّك منزلق «سرعة الطيران v» وراقب الظل الأزرق يقوى مع ازدياد السرعة. الهواء الأبطأ المضغوط تحت الجناح يعني ضغطًا أعلى هناك. اضرب فرق الضغط هذا في مساحة الجناح فتحصل على قوة الرفع. هذا الرقم نفسه بالضبط تحصل عليه لو سألت: كم يدفع الجناح الهواء إلى الأسفل؟ ثم طبّقت قانون نيوتن الثالث. إنه حدث واحد، وطريقتان صادقتان لحسابه. +السبب الحقيقي أن الجناح يحني مجرى الهواء كله حوله. أشد الانحناء يحدث فوق سطحه المنحني والمائل مباشرة، وهذا ما يفعله أي مائع حقيقي حين يلتف حول جسم دون أن يترك فراغًا خلفه. الهواء الأسرع فوق الجناح يعني ضغطًا أقل هناك. ارفع «سرعة الطيران v» وراقب قراءة Δp تكبر مع ازدياد السرعة. الهواء الأبطأ المضغوط تحت الجناح يعني ضغطًا أعلى هناك. اضرب فرق الضغط هذا في مساحة الجناح فتحصل على قوة الرفع. هذا الرقم نفسه بالضبط تحصل عليه لو سألت: كم يدفع الجناح الهواء إلى الأسفل؟ ثم طبّقت قانون نيوتن الثالث. إنه حدث واحد، وطريقتان صحيحتان لحسابه. ## Formal قوة الرفع هي القوة الصافية الناتجة عن فرق الضغط بين السطحين السفلي والعلوي، مجموعة على مساحة الجناح كلها: $L = \Delta p\, S$. هنا $\Delta p = p_{\text{lower}} - p_{\text{upper}}$، ويتحدد بمقدار اختلاف سرعة الانسياب المحلية فوق الجناح وتحته. هذا الاختلاف تصفه علاقة برنولي $p + \tfrac12\rho v^2 = \text{const}$ على طول أي خط انسياب. -بطريقة أخرى، يحرف الجناح الهواء القادم نحو الأسفل. كل ثانية يغيّر زخم معدل تدفق كتلي $\dot m$ بمقدار رأسي $\Delta v_y$، وهذا هو الغسل الهابط. بحسب قانون نيوتن الثالث يدفع رد الفعل الجناحَ إلى الأعلى بقوة $L = \dot m\, \Delta v_y$. حساب برنولي بالضغط وحساب نيوتن بالزخم يصفان عملية فيزيائية واحدة، ويتفقان دائمًا. +بطريقة أخرى، يحرف الجناح الهواء القادم نحو الأسفل. كل ثانية يغيّر زخم معدل تدفق كتلي $\dot m$ بمقدار رأسي $\Delta v_y$، وهذا هو تيار الهواء الهابط خلف الجناح. بحسب قانون نيوتن الثالث يدفع رد الفعل الجناحَ إلى الأعلى بقوة $L = \dot m\, \Delta v_y$. حساب برنولي بالضغط وحساب نيوتن بالزخم يصفان عملية فيزيائية واحدة، ويتفقان دائمًا. ## Advanced -السبب الصحيح فعلًا لسرعة الانسياب فوق السطح العلوي هو الدورانية (circulation). أي سائل حقيقي لزج يغادر حافة خلفية حادة يجب أن يغادرها بسلاسة، لا أن يلتف حولها، وهذا شرط كوتا. يحدّد هذا الشرط دورانية وحيدة $\Gamma$ حول الجناح. هذه الدورانية، مضافة إلى الانسياب القادم، هي ما يسرّع الهواء فوق الجناح ويبطئه تحته. تساوي زمن العبور لم يكن جزءًا من الحجة أصلًا. +السبب الصحيح فعلًا لسرعة الانسياب فوق السطح العلوي هو الدورانية (circulation). أي مائع حقيقي لزج يغادر حافة خلفية حادة يجب أن يغادرها بسلاسة، لا أن يلتف حولها، وهذا شرط كوتا. يحدّد هذا الشرط دورانية وحيدة $\Gamma$ حول الجناح. هذه الدورانية، مضافة إلى الانسياب القادم، هي ما يسرّع الهواء فوق الجناح ويبطئه تحته. تساوي زمن العبور لم يكن جزءًا من الحجة أصلًا. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### أنفاق الرياح وحساسات الضغط + يقيس المهندسون الذين يختبرون شكل جناح جديد الضغط على سطحه مباشرة، بصفوف من حساسات دقيقة. يبنون خريطة $\Delta p$ الحقيقية على السطح كله، بدل تخمينها من شكل خطوط الانسياب. ### تصوير الدخان والصبغة + خطوط الانسياب المنحنية الجميلة التي تراها في صور نفق الدخان تُظهر الهواء المنحرف نحو الأسفل مباشرة. أما فرق الضغط فيجب قياسه بأداة منفصلة، لأنه غير مرئي في الدخان. ### لماذا تعمل أجنحة سيارات السباق مقلوبة + يدفع الجناح المقلوب الهواء إلى الأعلى بدل الأسفل. بالمنطق نفسه، يضغط الجناح على السيارة نحو المضمار: الفيزياء نفسها بإشارة معاكسة. ### كتب لا تزال تكرر الأسطورة + تفسير تساوي زمن العبور ما زال يتكرر في بعض الكتب الشعبية لأنه يبدو أنيقًا. كتب الديناميكا الهوائية المتخصصة لم تعتمده منذ عقود. diff --git a/content/lessons/aerodynamics/how-wings-really-lift/en.md b/content/lessons/aerodynamics/how-wings-really-lift/en.md index 0357e270..91830d70 100644 --- a/content/lessons/aerodynamics/how-wings-really-lift/en.md +++ b/content/lessons/aerodynamics/how-wings-really-lift/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. Picture a small aircraft climbing away after takeoff, tilted 5° into the air at 50 m/s. -2. Raise «angle of attack α» slowly. Watch the blue (low pressure) shading over the top thicken and the orange dot finish its lap of the top surface well before the orange dot on the bottom. -3. Read the two crossing times at the bottom of the picture. They are never equal — that is the point. +1. Start with «angle of attack α» at 5° and «airspeed v» at 50 m/s: a small aircraft climbing away after takeoff. The readouts show Δp = 839 Pa and L = 13417 N. +2. Raise «angle of attack α» slowly to 10°. The blue (low pressure) band over the top thickens, Δp rises to 1671 Pa, and the blue dot finishes its run along the top surface well before the orange dot on the bottom. +3. Read the two crossing times in the readouts: 20 ms over the top, 41 ms underneath. They are never equal — that is the point. ## Real-life examples @@ -30,13 +30,13 @@ variables: 1. Reach about 15,000 N of lift while staying at or below the 15° stall angle. 2. Push the angle of attack past 15° and keep the lift coefficient above 1.0 anyway. -3. Without exceeding 15°, get the pressure difference between the two surfaces to at least 600 Pa. +3. Without exceeding 15°, get the pressure difference between the two surfaces to at least 2000 Pa. ## Intuition Forget the story you may have heard: that the air splitting at the leading edge must meet its partner again at the trailing edge, so the top path — being longer over a curved wing — forces the air above to speed up. That story is false, and you can see it fail here: drag «angle of attack α» up and watch the two timer dots. The top dot finishes its lap of the wing well ahead of the bottom dot, every time, even though the top path is barely longer than the bottom one. Equal transit time is not what makes the top air fast. -What actually makes the top air fast is that the wing bends the whole flow field around it, and the bending is strongest just above the curved, tilted surface — that is what a real fluid does when it has to flow past a shape without leaving a gap behind it. Faster air over the top means lower pressure there (drag «airspeed v» and watch the blue shading strengthen at higher speed); slower, squeezed air underneath means higher pressure. That pressure difference, multiplied by the wing's area, is the lift force — and it is exactly the same number you would get by asking how hard the wing throws air downward and invoking Newton's third law. One event, two honest ways to add it up. +What actually makes the top air fast is that the wing bends the whole flow field around it, and the bending is strongest just above the curved, tilted surface — that is what a real fluid does when it has to flow past a shape without leaving a gap behind it. Faster air over the top means lower pressure there (drag «airspeed v» up and watch the Δp readout grow at higher speed); slower, squeezed air underneath means higher pressure. That pressure difference, multiplied by the wing's area, is the lift force — and it is exactly the same number you would get by asking how hard the wing throws air downward and invoking Newton's third law. One event, two honest ways to add it up. ## Formal @@ -57,13 +57,17 @@ The genuinely correct reason the top-surface flow is faster is circulation: a re ## Real world ### Wind tunnels and pressure taps + Engineers testing a new wing shape often measure surface pressure directly with rows of tiny taps, reconstructing $\Delta p$ across the whole surface rather than guessing it from streamline shapes. ### Smoke and dye visualisations + The elegant curved streamlines you see in smoke-tunnel photos show the deflected flow (Newton's picture) directly; the pressure difference (Bernoulli's picture) has to be measured separately, because it is invisible to smoke. ### Why race-car wings work upside down + An inverted wing pushes air upward instead of down, so by the same reasoning it presses the car downward onto the track — same physics, opposite sign. ### Textbooks that still repeat the myth + The equal-transit-time explanation persists in some popular science because it sounds tidy; professional aerodynamics texts have not used it as the explanation for decades. diff --git a/content/lessons/aerodynamics/how-wings-really-lift/lesson.yaml b/content/lessons/aerodynamics/how-wings-really-lift/lesson.yaml index ff92c7ea..0470d037 100644 --- a/content/lessons/aerodynamics/how-wings-really-lift/lesson.yaml +++ b/content/lessons/aerodynamics/how-wings-really-lift/lesson.yaml @@ -3,15 +3,15 @@ subject: aerodynamics difficulty: university equation: L = \Delta p\, S concepts: -- lift -- pressure -- newtons-third-law -- circulation + - lift + - pressure + - newtons-third-law + - circulation prerequisites: [] related: -- lift -- bernoulli -- stall-and-angle-of-attack + - lift + - bernoulli + - stall-and-angle-of-attack visualization: type: how-wings-really-lift options: {} @@ -33,24 +33,24 @@ parameters: value: 50 unit: m/s variables: -- L -- \Delta p -- S + - L + - \Delta p + - S derivation: -- p + \tfrac12\rho v^2 = \text{const} -- L = \dot m\, \Delta v_y -- L = \Delta p\, S = \dot m\, \Delta v_y + - p + \tfrac12\rho v^2 = \text{const} + - L = \dot m\, \Delta v_y + - L = \Delta p\, S = \dot m\, \Delta v_y charts: [] presets: -- alpha: 5 - v: 50 -- alpha: 12 - v: 30 -- alpha: 18 - v: 40 + - alpha: 5 + v: 50 + - alpha: 12 + v: 30 + - alpha: 18 + v: 40 challenges: -- check: '0.5*1.225*v^2*(alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15))*16' - target: 15000 - tol: 1500 -- check: 'alpha > 15 and (alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15)) > 1.0' -- check: 'alpha <= 15 and 0.5*1.225*v^2*(alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15)) >= 600' + - check: '0.5*1.225*v^2*(alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15))*16' + target: 15000 + tol: 1500 + - check: 'alpha > 15 and (alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15)) > 1.0' + - check: 'alpha <= 15 and 0.5*1.225*v^2*(alpha<=15 ? 2*pi*sin(alpha*pi/180) : 1.626-0.19*(alpha-15)) >= 2000' diff --git a/content/lessons/aerodynamics/lift-to-drag/ar.md b/content/lessons/aerodynamics/lift-to-drag/ar.md index 7141e00b..0f15824a 100644 --- a/content/lessons/aerodynamics/lift-to-drag/ar.md +++ b/content/lessons/aerodynamics/lift-to-drag/ar.md @@ -24,25 +24,25 @@ charts: ## Try it -1. تخيّل جناح طائرة مقاتلة قصيرًا وغليظًا (نسبة استطالة 4) يطير بزاوية هجوم 5°. -2. اسحب النقطة «زاوية الهجوم α» على طول المنحنى. يرتفع، ثم يبلغ ذروته، ثم يهبط من جديد. -3. ارفع الآن منزلق «نسبة الاستطالة AR» نحو 25، كجناح طائرة شراعية طويل ورفيع. يرتفع المنحنى كله وتزداد قمته. +1. اضبط «نسبة الاستطالة AR» على 4 و«زاوية الهجوم α» على 5°: جناح طائرة مقاتلة قصير وعريض. تظهر القراءة f(x) = 10.1976، أي نسبة انزلاق نحو 10. +2. اسحب نقطة «زاوية الهجوم α» على طول المنحنى، من −1° إلى 14°. يرتفع المنحنى، ثم يبلغ قمته عند نحو 11.5 قرب 2.25°، ثم يهبط من جديد. +3. أعد «زاوية الهجوم α» إلى 5° وارفع «نسبة الاستطالة AR» إلى 25، كجناح طائرة شراعية طويل ورفيع. يرتفع المنحنى كله: تصير القراءة f(x) = 26.6609، وتعلو القمة إلى نحو 28.9 قرب 8.5°. ## Real-life examples -1. **جناح طائرة مقاتلة قصير غليظ.** بنسبة استطالة 4 وزاوية هجوم 5°، يحقق نسبة انزلاق نحو 10 فقط، فهو مصمم للسرعة والمناورة لا للكفاءة. +1. **جناح طائرة مقاتلة قصير وعريض.** بنسبة استطالة 4 وزاوية هجوم 5°، يحقق نسبة انزلاق نحو 10 فقط، فهو مصمم للسرعة والمناورة لا للكفاءة. 2. **جناح طائرة ركاب.** بنسبة استطالة 9 وزاوية الهجوم نفسها 5°، يبلغ نسبة انزلاق قريبة من 17، وهي قريبة من أداء طائرات الركاب الحقيقية. 3. **جناح طائرة شراعية طويل ورفيع.** بنسبة استطالة 25 وزاوية 5°، يمكنه الانزلاق نحو 27 m أفقيًا مقابل كل متر يهبطه، وهذه فائدة الجناح الطويل الرفيع. ## Test yourself 1. اضبط نسبة الاستطالة وزاوية الهجوم لتحصل على نسبة انزلاق نحو 20، قريبة من طائرة ركاب. -2. ادفع نسبة الانزلاق فوق 30، إلى مستوى الطائرات الشراعية النخبوية. -3. باستخدام جناح غليظ (نسبة استطالة 6 كحد أقصى، كجناح طائرة مقاتلة)، ابلغ مع ذلك نسبة انزلاق فوق 10. +2. ارفع نسبة الانزلاق فوق 30، إلى مستوى أفضل الطائرات الشراعية. +3. باستخدام جناح قصير وعريض (نسبة استطالة 6 كحد أقصى، كجناح طائرة مقاتلة)، ابلغ مع ذلك نسبة انزلاق فوق 10. ## Intuition -تخيّل جناح طائرة مقاتلة قصيرًا وغليظًا، نسبة استطالته 4، يطير بزاوية هجوم 5°. اسحب النقطة «زاوية الهجوم α» على طول منحنى نسبة الرفع إلى السحب. يرتفع المنحنى، ثم يبلغ ذروته، ثم يهبط من جديد. عند زاوية صغيرة جدًا لا يوجد تقريبًا رفع تقسم عليه، وعند زاوية كبيرة جدًا ينمو السحب الناتج عن توليد الرفع أسرع من الرفع نفسه، فيسحب النسبة إلى الأسفل من جديد. القمة هي الزاوية المثلى الوحيدة للطيران بها لتحقيق أقصى مسافة أفقية مقابل كل متر ارتفاع يُفقد، وهذا بالضبط ما تعنيه عبارة «أفضل سرعة انزلاق». +تخيّل جناح طائرة مقاتلة قصيرًا وعريضًا، نسبة استطالته 4، يطير بزاوية هجوم 5°. اسحب النقطة «زاوية الهجوم α» على طول منحنى نسبة الرفع إلى السحب. يرتفع المنحنى، ثم يبلغ ذروته، ثم يهبط من جديد. عند زاوية صغيرة جدًا لا يوجد تقريبًا رفع تقسم عليه، وعند زاوية كبيرة جدًا ينمو السحب الناتج عن توليد الرفع أسرع من الرفع نفسه، فيسحب النسبة إلى الأسفل من جديد. القمة هي الزاوية المثلى الوحيدة للطيران بها لتحقيق أقصى مسافة أفقية مقابل كل متر ارتفاع يُفقد، وهذا بالضبط ما تعنيه عبارة «أفضل سرعة انزلاق». ارفع الآن منزلق «نسبة الاستطالة AR» نحو 25، كجناح طائرة شراعية طويل ورفيع، وراقب المنحنى كله يرتفع وقمته تزداد. نسبة الاستطالة الأعلى تعني جناحًا أطول وأضيق بالمساحة نفسها، وهذا وحده يقلل السحب اللازم لتوليد مقدار معيّن من الرفع. ولهذا بالضبط تمتلك الطائرات الشراعية وطيور القطرس أجنحة طويلة رفيعة إلى هذا الحد، فهي لم تُصمَّم للسرعة، بل صُمِّمت لتحقيق أقل سحب ممكن مقابل الرفع الذي تحتاجه. @@ -65,13 +65,17 @@ charts: ## Real world ### الطائرات الشراعية الرياضية + تصل الطائرات الشراعية التنافسية إلى $L/D$ أعلى من 60 بنسب استطالة قريبة من 30، مما يتيح لها قطع 60 كم أفقيًا مقابل كل كيلومتر ارتفاع تفقده. ### طيور القطرس + تتيح إحدى أعلى نسب الاستطالة في الطبيعة لطيور القطرس الانزلاق مسافات هائلة فوق المحيط بين رفرفة وأخرى. ### إجراءات تعطل المحرك + يُدرَّب طيارو الطائرات التجارية على الطيران بأفضل سرعة انزلاق، أي زاوية الهجوم التي تُعظّم $L/D$، للوصول إلى أبعد موقع هبوط ممكن بعد تعطل المحركات كليًا. ### الأجنحة الطرفية + ترفع الأجنحة الطرفية نسبة الاستطالة الفعلية دون إضافة امتداد فعلي، مما يقلل السحب المستحث ويوفر الوقود في الرحلات الطويلة. diff --git a/content/lessons/aerodynamics/lift-to-drag/en.md b/content/lessons/aerodynamics/lift-to-drag/en.md index c9bce831..62800e63 100644 --- a/content/lessons/aerodynamics/lift-to-drag/en.md +++ b/content/lessons/aerodynamics/lift-to-drag/en.md @@ -25,9 +25,9 @@ charts: ## Try it -1. Picture a fighter jet's short, stubby wing (aspect ratio 4) flying at a 5° angle of attack. -2. Drag the point «angle of attack α» along the curve. It climbs, peaks, then falls again. -3. Now raise «aspect ratio AR» toward 25, like a glider's long, slender wing. The whole curve lifts, and its peak grows. +1. Set «aspect ratio AR» to 4 and «angle of attack α» to 5°: a fighter jet's short, stubby wing. The readout shows f(x) = 10.1976, a glide ratio of about 10. +2. Drag the point «angle of attack α» along the curve, from −1° up to 14°. The curve climbs, peaks at about 11.5 near 2.25°, then falls again. +3. Put «angle of attack α» back at 5° and raise «aspect ratio AR» to 25, like a glider's long, slender wing. The whole curve lifts: f(x) reads 26.6609, and the peak grows to about 28.9 near 8.5°. ## Real-life examples @@ -66,13 +66,17 @@ Induced drag is the unavoidable energy cost of shedding trailing vortices that c ## Real world ### Sailplanes + Competition gliders reach $L/D$ above 60 with aspect ratios near 30, letting them travel 60 km for every kilometre of altitude lost. ### Albatrosses + One of the highest aspect ratios in nature lets albatrosses glide enormous distances over the ocean between wingbeats. ### Engine-out procedures + Airliner pilots are trained to fly the best-glide speed — the AoA that maximises $L/D$ — to reach the furthest possible landing site after total engine failure. ### Winglets + Winglets raise the effective aspect ratio without adding physical span, cutting induced drag and saving fuel on long cruises. diff --git a/content/lessons/aerodynamics/lift-to-drag/lesson.yaml b/content/lessons/aerodynamics/lift-to-drag/lesson.yaml index e64a18b1..c5e32dce 100644 --- a/content/lessons/aerodynamics/lift-to-drag/lesson.yaml +++ b/content/lessons/aerodynamics/lift-to-drag/lesson.yaml @@ -24,7 +24,7 @@ visualization: - 14 range: - -2 - - 22 + - 34 mode: tangent visualization3d: type: airfoil @@ -60,15 +60,15 @@ charts: - 0.02 + (0.11*7)^2/(pi*x*0.85) primary: AR presets: -- AR: 4 - x: 5 -- AR: 9 - x: 5 -- AR: 25 - x: 5 + - AR: 4 + x: 5 + - AR: 9 + x: 5 + - AR: 25 + x: 5 challenges: -- check: '(0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85))' - target: 20 - tol: 2 -- check: '(0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85)) > 30' -- check: 'AR <= 6 and (0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85)) > 10' + - check: '(0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85))' + target: 20 + tol: 2 + - check: '(0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85)) > 30' + - check: 'AR <= 6 and (0.11*(x+2))/(0.02+(0.11*(x+2))^2/(pi*AR*0.85)) > 10' diff --git a/content/lessons/aerodynamics/lift/ar.md b/content/lessons/aerodynamics/lift/ar.md index 06c64b75..75b947ad 100644 --- a/content/lessons/aerodynamics/lift/ar.md +++ b/content/lessons/aerodynamics/lift/ar.md @@ -23,27 +23,27 @@ charts: ## Try it -1. تخيّل طائرة صغيرة تصعد بعد الإقلاع. هي مائلة 5° وتطير بسرعة 50 m/s. -2. ارفع منزلق «زاوية الهجوم α» ببطء. يكبر سهم الرفع الأخضر. -3. استمر بعد 15°. يتفكك الهواء فوق الجناح ويصغر السهم، وهذا هو الانهيار الهوائي. +1. ابدأ و«زاوية الهجوم α» عند 5° و«سرعة الطيران v» عند 50 m/s: طائرة صغيرة تصعد بعد الإقلاع. تظهر القراءة L = 18865 N. +2. ارفع «زاوية الهجوم α» ببطء إلى 15°. يكبر سهم الرفع الأخضر: يصعد C_L إلى 1.87 و L إلى 45815 N. +3. استمر إلى 18°. يضطرب الهواء فوق الجناح، وينزل C_L إلى 1.3، ويصغر L إلى 31850 N. هذا هو فقدان الرفع (stall). ## Real-life examples 1. **طائرة خفيفة تصعد بعد الإقلاع.** هي مائلة 5° وتطير بسرعة 50 m/s، بعيدة عن منطقة الخطر، وتنتج رفعًا قويًا وثابتًا. -2. **الطائرة نفسها في اقتراب أخير بطيء.** تميل حتى 12° وتطير بسرعة 30 m/s فقط. هي قريبة من حد الانهيار عند 15° لكنها ما زالت تطير بأمان. +2. **الطائرة نفسها في اقتراب أخير بطيء.** تميل حتى 12° وتطير بسرعة 30 m/s فقط. هي قريبة من حد فقدان الرفع عند 15° لكنها ما زالت تطير بأمان. 3. **جناح دُفع عمدًا إلى أبعد من اللازم.** يميل 17°، أي بعد الزاوية الحرجة. حتى عند 40 m/s بدأ رفعه ينهار فعلًا. ## Test yourself -1. ابلغ رفعًا نحو 20000 N، وابقَ دون زاوية الانهيار 15°. -2. ادفع زاوية الهجوم إلى ما بعد 15°، وراقب معامل الرفع يبقى فوق 1.5. +1. ابلغ رفعًا نحو 25000 N، وابقَ دون زاوية فقدان الرفع 15°. +2. ارفع زاوية الهجوم إلى ما بعد 15°، وراقب معامل الرفع يبقى فوق 1.5. 3. لا تتجاوز 15°، وولّد رفعًا لا يقل عن 30000 N. ## Intuition تخيّل جناح طائرة صغيرة يصعد بعد الإقلاع. هو مائل 5° ويطير بسرعة 50 m/s. حرّك منزلق «زاوية الهجوم α» وراقب خطوط الانسياب. يميل الجناح أكثر، فتنحني كل خطوط الهواء إلى الأسفل أثناء مرورها، وأشدّ انحناء يظهر خلف الحافة الخلفية مباشرة. هذا القدر من الهواء المدفوع للأسفل كل ثانية يضغط على الهواء، فيرد الهواء الضغط على الجناح إلى الأعلى، وهذا الرد هو أغلب ما تشعر به كرفع. تجاهل القصة القديمة القائلة إن جزيئي الهواء المنفصلين عند الحافة الأمامية يجب أن يلتقيا عند الحافة الخلفية في اللحظة نفسها. هذه القصة غير صحيحة، وتقلب السبب والنتيجة. -ارفع الآن منزلق «سرعة الطيران v» بدلًا من ذلك. راقب سهمي الرفع والسحب يكبران معًا. يرتفع الرفع بسرعة كبيرة، فمضاعفة السرعة تجعله أكبر بأربع مرات تقريبًا. لاحظ أن خطوط الانسياب تتقارب فوق السطح العلوي المنحني للجناح. هذا التقارب معناه هواء أسرع حركة، والهواء الأسرع ضغطه أقل. يضيف هذا الشفط من الأعلى إلى الضغط الزائد من الأسفل، فتنتج قوة الرفع نفسها التي تفسرها قصة دفع الهواء للأسفل. هما وصفان لشيء واحد لا تأثيران منفصلان. +ارفع الآن منزلق «سرعة الطيران v» بدلًا من ذلك. راقب سهمي الرفع والسحب يكبران معًا. يرتفع الرفع بسرعة كبيرة، فمضاعفة السرعة تجعله أكبر بأربع مرات تقريبًا. لاحظ أن خطوط الانسياب تتقارب فوق السطح العلوي المنحني للجناح. هذا التقارب معناه هواء أسرع حركة، والهواء الأسرع ضغطه أقل. يجتمع هذا الشفط من الأعلى مع الضغط الزائد من الأسفل، فتنتج قوة الرفع نفسها التي تفسرها قصة دفع الهواء للأسفل. هما وصفان لشيء واحد لا تأثيران منفصلان. ## Formal @@ -57,20 +57,24 @@ charts: ## Derivation -1. يدفع الجناح كتلة من الهواء $\dot m$ نحو الأسفل، بتغيّر رأسي في السرعة قدره $\Delta v_y$، وهذا يُسمى الغسل الهابط. +1. يدفع الجناح كتلة من الهواء $\dot m$ نحو الأسفل، بتغيّر رأسي في السرعة قدره $\Delta v_y$، وهذا هو تيار الهواء الهابط خلف الجناح. 2. يتناسب هذا التدفق الكتلي مع $\rho v S$، ويتناسب مقدار الانحراف مع $v$ و $\alpha$. وتُدمج هذه الاستجابة شبه الخطية داخل الدالة $C_L(\alpha)$. 3. نكتب العلاقة تقليديًا بعامل $\tfrac12$ حتى يطابق $C_L$ المعامل اللابعدي الذي يُقاس في أنفاق الرياح. ## Real world ### الإقلاع والهبوط + ترفع الرفارف (flaps) الانحناء الفعلي للجناح ومساحته عند السرعات المنخفضة. هذا يرفع $C_L$ حتى ينتج الجناح رفعًا كافيًا قبل أن تفارق العجلات الأرض. ### طيران الطيور والحشرات + تغيّر الطيور زاوية الهجوم α وانحناء الجناح مع كل ضربة جناح. العلاقة $L = \tfrac12\rho v^2 S C_L$ نفسها تحكم عصفورًا صغيرًا كما تحكم طائرة ركاب. ### أجنحة سيارات الفورمولا 1 + تولّد الأجنحة المقلوبة على سيارات السباق قوة ضغط سفلية (downforce) بالطريقة ذاتها، فتضغط الإطارات على المضمار وتزيد تماسكها في المنعطفات. ### الإبحار عكس الريح + الشراع في مقطعه العرضي جناح منحنٍ. يغيّر ضبط الشراع زاوية هجومه الفعلية بالنسبة إلى الريح الظاهرية. diff --git a/content/lessons/aerodynamics/lift/en.md b/content/lessons/aerodynamics/lift/en.md index 803a2e84..3788d2f1 100644 --- a/content/lessons/aerodynamics/lift/en.md +++ b/content/lessons/aerodynamics/lift/en.md @@ -22,9 +22,9 @@ charts: ## Try it -1. Picture a small aircraft climbing away after takeoff, tilted 5° into the air at 50 m/s. -2. Raise «angle of attack α» slowly. The green lift arrow grows. -3. Keep going past 15°. The air over the wing breaks up, the arrow shrinks: that is a stall. +1. Start with «angle of attack α» at 5° and «airspeed v» at 50 m/s: a small aircraft climbing away after takeoff. The readout shows L = 18865 N. +2. Raise «angle of attack α» slowly to 15°. The green lift arrow grows: C_L climbs to 1.87 and L to 45815 N. +3. Keep going to 18°. The air over the wing breaks up, C_L falls to 1.3 and L shrinks to 31850 N: that is a stall. ## Real-life examples @@ -34,7 +34,7 @@ charts: ## Test yourself -1. Reach about 20,000 N of lift while staying below the 15° stall angle. +1. Reach about 25,000 N of lift while staying below the 15° stall angle. 2. Push the angle of attack just past 15° and see the lift coefficient stay above 1.5. 3. Without exceeding 15°, generate at least 30,000 N of lift. @@ -63,13 +63,17 @@ Formally, lift on a 2D airfoil equals $\rho v \Gamma$ (the Kutta–Joukowski the ## Real world ### Takeoff and landing + Flaps increase effective camber and area at low speed, boosting $C_L$ so the wing can make enough lift before the wheels leave the ground. ### Bird and insect flight + Birds actively vary α and camber stroke by stroke; the same $L = \tfrac12\rho v^2 S C_L$ relation governs a sparrow as much as an airliner. ### Formula 1 wings + Inverted airfoils on a race car generate downforce the same way, pressing tyres into the track for more cornering grip. ### Sailing upwind + A sail is a cambered airfoil in cross-section; trimming it changes its effective angle of attack to the apparent wind. diff --git a/content/lessons/aerodynamics/lift/lesson.yaml b/content/lessons/aerodynamics/lift/lesson.yaml index 69683224..13949e9e 100644 --- a/content/lessons/aerodynamics/lift/lesson.yaml +++ b/content/lessons/aerodynamics/lift/lesson.yaml @@ -3,17 +3,17 @@ subject: aerodynamics difficulty: university equation: L = \tfrac12 \rho v^2 S\, C_L concepts: -- lift -- angle-of-attack -- pressure -- circulation + - lift + - angle-of-attack + - pressure + - circulation prerequisites: -- newtons-second-law -- function-graph + - newtons-second-law + - function-graph related: -- stall-and-angle-of-attack -- lift-to-drag -- bernoulli + - stall-and-angle-of-attack + - lift-to-drag + - bernoulli visualization: type: airfoil options: {} @@ -31,38 +31,38 @@ parameters: value: 50 unit: m/s variables: -- L -- \rho -- v -- S -- C_L + - L + - \rho + - v + - S + - C_L derivation: -- \dot{p}_{\text{air}} = \dot m\, \Delta v_y -- L = \dot{p}_{\text{air}} = \rho v S \cdot v\sin\alpha \;\propto\; \rho v^2 S \sin\alpha -- L = \tfrac12 \rho v^2 S\, C_L(\alpha) + - \dot{p}_{\text{air}} = \dot m\, \Delta v_y + - L = \dot{p}_{\text{air}} = \rho v S \cdot v\sin\alpha \;\propto\; \rho v^2 S \sin\alpha + - L = \tfrac12 \rho v^2 S\, C_L(\alpha) charts: -- domain: - - -5 - - 20 - marker: alpha - series: - - 'x < 15 ? 0.11*(x+2) : 1.87 - 0.19*(x-15)' + - domain: + - -5 + - 20 + marker: alpha + series: + - 'x < 15 ? 0.11*(x+2) : 1.87 - 0.19*(x-15)' visualization3d: type: airfoil options: models: - - airplane + - airplane primary: alpha presets: -- alpha: 5 - v: 50 -- alpha: 12 - v: 30 -- alpha: 17 - v: 40 + - alpha: 5 + v: 50 + - alpha: 12 + v: 30 + - alpha: 17 + v: 40 challenges: -- check: '0.5*1.225*v^2*16*(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15))' - target: 20000 - tol: 2000 -- check: 'alpha > 15 and (alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15)) > 1.5' -- check: 'alpha <= 15 and 0.5*1.225*v^2*16*(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15)) >= 30000' + - check: '0.5*1.225*v^2*16*(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15))' + target: 25000 + tol: 2500 + - check: 'alpha > 15 and (alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15)) > 1.5' + - check: 'alpha <= 15 and 0.5*1.225*v^2*16*(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15)) >= 30000' diff --git a/content/lessons/aerodynamics/mach-number/ar.md b/content/lessons/aerodynamics/mach-number/ar.md index edbf4a59..4ca8c0e0 100644 --- a/content/lessons/aerodynamics/mach-number/ar.md +++ b/content/lessons/aerodynamics/mach-number/ar.md @@ -21,27 +21,27 @@ charts: ## Try it -1. تخيّل طائرة ركاب تُبحر بسرعة 250 m/s عبر الهواء البارد على ارتفاع 11 كم، حيث تبلغ الحرارة نحو −53° مئوية (220 K). -2. حرّك النقطة على طول المنحنى نحو هواء أبرد بمنزلق «درجة حرارة الهواء T». يرتفع عدد ماخ، حتى مع السرعة نفسها. -3. ارفع الآن منزلق «سرعة الطائرة» نحو 340 m/s. يتسلق المؤشر نحو ماخ 1، سرعة الصوت، وقد يتجاوزها. +1. اضبط «درجة حرارة الهواء T» على 220 K (نحو −53° مئوية) وأبقِ «سرعة الطائرة» عند 250 m/s: طائرة ركاب تحلّق في الهواء البارد على ارتفاع 11 كم. تظهر القراءة f(x) = 297.3146، وهي سرعة الصوت بوحدة m/s، ويقف المؤشر في رسم عدد ماخ عند نحو 0.84. +2. حرّك النقطة على طول المنحنى نحو هواء أبرد، حتى تصل «درجة حرارة الهواء T» إلى 200 K. تنزل سرعة الصوت إلى نحو 283.5 m/s، فيرتفع عدد ماخ إلى نحو 0.88 مع أن السرعة لم تتغيّر. +3. ارفع الآن «سرعة الطائرة» إلى 340 m/s. يصعد المؤشر فوق ماخ 1، أي سرعة الصوت، إلى نحو 1.2. ## Real-life examples -1. **طائرة ركاب تُبحر على ارتفاعها.** تطير بسرعة 250 m/s عبر هواء حرارته 220 K على ارتفاع 11 كم، فتكون عند نحو ماخ 0.84، وهي النقطة المثالية التي صُمِّمت لها طائرات الركاب. -2. **طائرة صغيرة ذات مروحة في يوم دافئ.** تطير بسرعة 90 m/s عبر هواء حرارته 305 K قرب سطح البحر، فتكون عند ماخ 0.26 المريحة، بعيدًا كل البعد عن حاجز الصوت. +1. **طائرة ركاب تحلّق على ارتفاعها المعتاد.** تطير بسرعة 250 m/s عبر هواء حرارته 220 K على ارتفاع 11 كم، فتكون عند نحو ماخ 0.84، وهي النقطة المثالية التي صُمِّمت لها طائرات الركاب. +2. **طائرة صغيرة ذات مروحة في يوم دافئ.** تطير بسرعة 90 m/s عبر هواء حرارته 305 K قرب سطح البحر، فتكون عند ماخ 0.26 فقط، بعيدة كل البعد عن حاجز الصوت. 3. **طائرة مقاتلة على ارتفاع شاهق.** تطير بسرعة 340 m/s عبر الهواء البارد نفسه (220 K)، فتكون قد تجاوزت ماخ 1 بالفعل، أي كسرت حاجز الصوت. ## Test yourself 1. جد درجة حرارة وسرعة تعطيان عدد ماخ نحو 0.8، وهو سرعة تجوال طائرات الركاب المعتادة. -2. باستخدام أبرد هواء على المنزلق، ادفع عدد ماخ فوق 1. +2. باستخدام أبرد هواء على المنزلق، ارفع عدد ماخ فوق 1. 3. بسرعة لا تقل عن 100 m/s، اختر هواءً دافئًا بما يكفي لإبقاء عدد ماخ دون 0.3. ## Intuition -تخيّل طائرة ركاب تُبحر بسرعة 250 m/s عبر الهواء البارد على ارتفاع 11 كم، حيث الحرارة نحو −53° مئوية. حرّك النقطة على طول المنحنى نحو هواء أبرد بمنزلق «درجة حرارة الهواء T». تنخفض سرعة الصوت مع الجذر التربيعي لدرجة الحرارة، فالسرعة نفسها للطائرة تعطي عدد ماخ أعلى في الهواء البارد منه في الهواء الدافئ. لهذا لا يروي «مقدار السرعة» وحده سوى نصف القصة. فالسرعة 250 m/s نفسها تكون دون سرعة الصوت براحة عند مستوى سطح البحر في يوم دافئ، لكنها تقترب كثيرًا من حاجز الصوت عند درجات الحرارة الباردة في ارتفاع طيران التجوال. +تخيّل طائرة ركاب تحلّق بسرعة 250 m/s في الهواء البارد على ارتفاع 11 كم، حيث الحرارة نحو −53° مئوية. حرّك النقطة على طول المنحنى نحو هواء أبرد بمنزلق «درجة حرارة الهواء T». تنخفض سرعة الصوت مع الجذر التربيعي لدرجة الحرارة، فالسرعة نفسها للطائرة تعطي عدد ماخ أعلى في الهواء البارد منه في الهواء الدافئ. لهذا لا تكفي معرفة السرعة وحدها. فالسرعة 250 m/s نفسها أقل من سرعة الصوت بكثير عند مستوى سطح البحر في يوم دافئ، لكنها تقترب كثيرًا من حاجز الصوت عند درجات الحرارة الباردة في ارتفاع طيران التجوال. -ارفع الآن منزلق «سرعة الطائرة» نحو 340 m/s وراقب استجابة رسم عدد ماخ. يتسلق المؤشر نحو ماخ 1 وقد يتجاوزها. تطير طائرات الركاب عمدًا عند سرعة تجوال قريبة من ماخ 0.8، وهي سريعة بما يكفي لقطع المسافة بكفاءة، وتظل مع ذلك دون النقطة التي تبدأ عندها الموجات الصادمة بالتكوّن فوق الجناح، وهي موجات تزيد السحب بشدة وتُخلّ بالانسياب السلس الذي تعتمد عليه فكرة الرفع كلها. +ارفع الآن «سرعة الطائرة» نحو 340 m/s وراقب رسم عدد ماخ. يصعد المؤشر نحو ماخ 1 وقد يتجاوزه. تطير طائرات الركاب عمدًا عند سرعة تجوال قريبة من ماخ 0.8، وهي سريعة بما يكفي لقطع المسافة بكفاءة، وتظل مع ذلك دون النقطة التي تبدأ عندها الموجات الصادمة بالتكوّن فوق الجناح، وهي موجات تزيد السحب بشدة وتُخلّ بالانسياب السلس الذي تعتمد عليه فكرة الرفع كلها. ## Formal @@ -62,13 +62,17 @@ charts: ## Real world ### سرعة تجوال طائرات الركاب + يوازن التجوال قرب M ≈ 0.8 في الهواء البارد على ارتفاع 11 كم بين كفاءة الوقود وارتفاع السحب الحاد قرب M = 1. ### كونكورد والنقل الأسرع من الصوت + يتطلب الطيران المستمر أسرع من الصوت (M > 1) أجنحة مختلفة تمامًا، رقيقة ومائلة أو مثلثية، للتحكم في الموجات الصادمة وسحب الموجة. ### تصميم الجناح العابر للصوت + تؤخر زاوية الميل والمقاطع فوق الحرجة نقطة ماخ 1 المحلية على الجناح إلى سرعات أعلى، فتؤجل بداية سحب الموجة. ### الانفجارات الصوتية + تصل موجة صادمة متخلفة عن طائرة فوق صوتية إلى الأرض على هيئة قفزة ضغط مفاجئة تُسمع كدويّ انفجار. diff --git a/content/lessons/aerodynamics/mach-number/en.md b/content/lessons/aerodynamics/mach-number/en.md index b09eddb3..1ce40a4a 100644 --- a/content/lessons/aerodynamics/mach-number/en.md +++ b/content/lessons/aerodynamics/mach-number/en.md @@ -22,9 +22,9 @@ charts: ## Try it -1. Picture an airliner cruising at 250 m/s through the cold air 11 km up, where it's about −53°C (220 K). -2. Drag the point along the curve, toward colder «air temperature T». The Mach number climbs, even at the same speed. -3. Now raise «aircraft speed» toward 340 m/s. The marker climbs toward, and can pass, Mach 1 — the speed of sound. +1. Set «air temperature T» to 220 K (about −53°C) and keep «aircraft speed» at 250 m/s: an airliner cruising through the cold air 11 km up. The readout shows f(x) = 297.3146, the speed of sound in m/s, and the Mach chart marker sits at about 0.84. +2. Drag the point along the curve, toward colder «air temperature T», down to 200 K. The speed of sound falls to about 283.5 m/s, so the Mach number climbs to about 0.88, even at the same speed. +3. Now raise «aircraft speed» to 340 m/s. The marker climbs past Mach 1 — the speed of sound — to about 1.2. ## Real-life examples @@ -63,13 +63,17 @@ As local flow accelerates over a curved surface (like a wing) even a subsonic fr ## Real world ### Airliner cruise speed + Cruising near M ≈ 0.8 in the cold air at 11 km altitude balances fuel efficiency against the sharp drag rise approaching M = 1. ### Concorde and supersonic transport + Sustained supersonic cruise (M > 1) demands very different, thin swept or delta wings to manage shock waves and wave drag. ### Transonic wing design + Sweep and supercritical airfoils delay the local Mach-1 point on the wing to higher speeds, pushing back the onset of wave drag. ### Sonic booms + A shock wave trailing a supersonic aircraft reaches the ground as the sudden pressure jump heard as a boom. diff --git a/content/lessons/aerodynamics/mach-number/lesson.yaml b/content/lessons/aerodynamics/mach-number/lesson.yaml index f163e665..d0fad6d5 100644 --- a/content/lessons/aerodynamics/mach-number/lesson.yaml +++ b/content/lessons/aerodynamics/mach-number/lesson.yaml @@ -60,15 +60,15 @@ charts: - vAircraft/sqrt(1.4*287*x) primary: vAircraft presets: -- x: 220 - vAircraft: 250 -- x: 305 - vAircraft: 90 -- x: 220 - vAircraft: 340 + - x: 220 + vAircraft: 250 + - x: 305 + vAircraft: 90 + - x: 220 + vAircraft: 340 challenges: -- check: 'vAircraft/sqrt(1.4*287*x)' - target: 0.8 - tol: 0.05 -- check: 'x <= 220 and vAircraft/sqrt(1.4*287*x) > 1' -- check: 'vAircraft >= 100 and vAircraft/sqrt(1.4*287*x) < 0.3' + - check: 'vAircraft/sqrt(1.4*287*x)' + target: 0.8 + tol: 0.05 + - check: 'x <= 220 and vAircraft/sqrt(1.4*287*x) > 1' + - check: 'vAircraft >= 100 and vAircraft/sqrt(1.4*287*x) < 0.3' diff --git a/content/lessons/aerodynamics/propellers-and-jets/ar.md b/content/lessons/aerodynamics/propellers-and-jets/ar.md index 20e3f363..69375649 100644 --- a/content/lessons/aerodynamics/propellers-and-jets/ar.md +++ b/content/lessons/aerodynamics/propellers-and-jets/ar.md @@ -14,27 +14,27 @@ variables: ## Try it -1. تخيّل مدخل محرك توربيني مروحي كبير. مساحة قرص مروحته 8 m²، يطير بسرعة 230 m/s، ويضيف 60 m/s فقط إلى الهواء. -2. اقرأ قوة الدفع وكفاءة الدفع. يجب أن يبدو كلاهما مثيرًا للإعجاب. -3. صغّر «مساحة القرص A» إلى 0.3 m² وارفع «السرعة المضافة Δv» إلى 400 m/s بدلًا من ذلك. راقب الكفاءة تنخفض بشدة رغم أن المحرك يعمل الآن بجهد أكبر بكثير لكل كيلوغرام من الهواء. +1. أبقِ «مساحة القرص A» عند 8 m² و«سرعة الطائرة v» عند 230 m/s، واخفض «السرعة المضافة Δv» إلى 60 m/s: محرك مروحي كبير يضيف سرعة قليلة إلى هواء كثير. +2. اقرأ قوة الدفع وكفاءة الدفع: T = 152880 N بكفاءة 88.5%. +3. صغّر «مساحة القرص A» إلى 0.3 m² وارفع «السرعة المضافة Δv» إلى 400 m/s. ينزل الدفع إلى 63210 N وتنخفض الكفاءة بشدة إلى 53.5%، مع أن المحرك يبذل الآن جهدًا أكبر بكثير لكل كيلوغرام من الهواء. ## Real-life examples -1. **محرك توربيني مروحي حديث عالي التجاوز.** مروحة مساحتها 8 m² تضيف 60 m/s إلى الهواء عند سرعة طواف 230 m/s. تصنع دفعًا نحو 153000 N بكفاءة دفع نحو 88%. معظم «الصوت النفاث» الذي تسمعه هو في الحقيقة مروحة مجراة كبيرة. +1. **محرك توربيني مروحي حديث عالي التجاوز.** مروحة مساحتها 8 m² تضيف 60 m/s إلى الهواء عند سرعة طيران 230 m/s. تصنع دفعًا نحو 153000 N بكفاءة دفع نحو 88%. معظم ما تسمعه من «المحرك النفاث» هو في الحقيقة مروحة كبيرة داخل غلاف. 2. **محرك نفاث قديم ضيق.** فوهة قلب مساحتها 0.3 m² ترفع سرعة الهواء 400 m/s عند السرعة نفسها. تصنع دفعًا أقل، نحو 63000 N، وتهدر طاقة أكبر بكثير. تنخفض الكفاءة إلى نحو 53%. -3. **طائرة تعمل بمروحة عند سرعة أقل.** قرص مروحة مساحته 4 m² يضيف 25 m/s لطيفة عند سرعة طواف 70 m/s. يصنع دفعًا نحو 10000 N بكفاءة نحو 85%. المراوح لطيفة بتصميمها. +3. **طائرة تعمل بمروحة عند سرعة أقل.** قرص مروحة مساحته 4 m² يضيف 25 m/s فقط عند سرعة طيران 70 m/s. يصنع دفعًا نحو 10000 N بكفاءة نحو 85%. المروحة تدفع الهواء برفق بطبيعتها. ## Test yourself -1. اصنع دفعًا نحو 150000 N باستعمال مروحة كبيرة لطيفة. أبقِ السرعة المضافة دون 100 m/s. +1. اصنع دفعًا نحو 150000 N باستعمال مروحة كبيرة تدفع الهواء برفق. أبقِ السرعة المضافة دون 100 m/s. 2. حقق كفاءة دفع فوق 85%. -3. اخفض كفاءة الدفع دون 55% مع إنتاج 40000 N من الدفع على الأقل، محرك نفاث ضيق نهم. +3. اخفض كفاءة الدفع دون 55% مع إنتاج 40000 N من الدفع على الأقل، أي محرك نفاث ضيق يستهلك وقودًا كثيرًا. ## Intuition -لا يملك المحرك إلا حيلة واحدة: يمسك هواءً ويقذفه إلى الخلف أسرع مما وصل. يتكفل قانون نيوتن الثالث بالباقي. اقذف الهواء إلى الخلف، فيدفع الهواء المحرك، والطائرة المتصلة به، إلى الأمام بالقوة نفسها تمامًا. ارفع «السرعة المضافة Δv» وراقب الدفع يصعد. تغيّر سرعة أكبر على معدل التدفق الكتلي نفسه يعني قوة أكبر، بسيط بما يكفي. لكن صغّر الآن «مساحة القرص A» في الوقت نفسه، مع إبقاء الدفع قريبًا مما كان. تنخفض كتلة الهواء الممسوكة كل ثانية كثيرًا، فيحتاج إنتاج القوة نفسها تغيّر سرعة أكبر بكثير لكل كيلوغرام. +لا يملك المحرك إلا حيلة واحدة: يسحب هواءً ويقذفه إلى الخلف أسرع مما وصل. يتكفل قانون نيوتن الثالث بالباقي. اقذف الهواء إلى الخلف، فيدفع الهواء المحرك، والطائرة المتصلة به، إلى الأمام بالقوة نفسها تمامًا. ارفع «السرعة المضافة Δv» وراقب الدفع يصعد. تغيّر سرعة أكبر على معدل التدفق الكتلي نفسه يعني قوة أكبر، وهذا واضح. لكن صغّر الآن «مساحة القرص A» في الوقت نفسه، مع إبقاء الدفع قريبًا مما كان. تنخفض كثيرًا كتلة الهواء التي يسحبها المحرك كل ثانية، فيحتاج إنتاج القوة نفسها تغيّر سرعة أكبر بكثير لكل كيلوغرام. -هذه المقايضة مهمة لأن الطاقة الحركية تكبر مع مربع السرعة، لا السرعة نفسها. مضاعفة السرعة المضافة إلى كمية صغيرة من الهواء تجعل الطاقة المهدورة أكبر بنحو أربع مرات. تهدر هذه الطاقة في تسخين العادم وتسريعه بدل دفع الطائرة إلى الأمام، وهي طاقة دفع ثمنها الوقود لكن الطائرة لم تستفد منها أبدًا. المروحة الكبيرة البطيئة تكاد لا تسرّع الهواء إطلاقًا، فتُهدر بهذه الطريقة نسبة ضئيلة من طاقة المحرك. أما النفاث الصغير السريع فيسرّع قليلًا من الهواء كثيرًا، وتختفي معظم تلك الطاقة إلى الخلف ضوضاءً وعادمًا حارًا سريعًا. هذا هو السبب الكامل وراء دفن طائرات الركاب الحديثة محركاتها النفاثة الضيقة القديمة داخل مراوح مجراة ضخمة. +هذه المقايضة مهمة لأن الطاقة الحركية تكبر مع مربع السرعة، لا السرعة نفسها. مضاعفة السرعة المضافة إلى كمية صغيرة من الهواء تجعل الطاقة المهدورة أكبر بنحو أربع مرات. تهدر هذه الطاقة في تسخين العادم وتسريعه بدل دفع الطائرة إلى الأمام، وهي طاقة دفع ثمنها الوقود لكن الطائرة لم تستفد منها أبدًا. المروحة الكبيرة البطيئة تكاد لا تسرّع الهواء إطلاقًا، فتُهدر بهذه الطريقة نسبة ضئيلة من طاقة المحرك. أما النفاث الصغير السريع فيسرّع قليلًا من الهواء كثيرًا، وتختفي معظم تلك الطاقة إلى الخلف ضوضاءً وعادمًا حارًا سريعًا. لهذا السبب وضعت طائرات الركاب الحديثة محركاتها النفاثة الضيقة داخل مراوح ضخمة يحيط بها غلاف. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### المحركات التوربينية المروحية عالية التجاوز + معظم الهواء الذي تحركه محركات طائرة ركاب حديثة لا يدخل قلب المحرك الساخن إطلاقًا. يُدفع مباشرة عبر المروحة العملاقة حول الخارج، وهذه بالضبط استراتيجية «الكبير البطيء اللطيف» التي يصفها هذا الدرس. -### مراوح طائرات الهليكوبتر والدرونز -تفسّر المقايضة نفسها لماذا يكون قرص مروحة الهليكوبتر الكبير البطيء أكفأ بكثير في التحليق الثابت، من مروحة مجراة صغيرة صاخبة تنتج الدفع نفسه. +### مراوح طائرات الهليكوبتر والطائرات المسيّرة + +تفسّر المقايضة نفسها لماذا يكون قرص مروحة الهليكوبتر الكبير البطيء أكفأ بكثير في التحليق الثابت، من مروحة صغيرة صاخبة داخل غلاف تنتج الدفع نفسه. ### لماذا تضحي الطائرات المقاتلة بالكفاءة من أجل السرعة + عادم الطائرة المقاتلة الضيق عالي السرعة اختيار متعمد منخفض الكفاءة. يقايض اقتصاد الوقود بحجم مضغوط ونسبة دفع إلى وزن ضخمة لا تستطيع مروحة كبيرة بطيئة مجاراتها أبدًا. ### مراوح السفن مقابل الدواليب المجدافية + حتى دون محرك، تظهر الفكرة نفسها في تاريخ دفع السفن. مروحة عريضة بطيئة الدوران تدفع ماءً أكثر برفق، وتهدر طاقة أقل من مروحة صغيرة سريعة تخض الماء لإنتاج الدفع نفسه. diff --git a/content/lessons/aerodynamics/propellers-and-jets/en.md b/content/lessons/aerodynamics/propellers-and-jets/en.md index 7e6c4bea..f46add51 100644 --- a/content/lessons/aerodynamics/propellers-and-jets/en.md +++ b/content/lessons/aerodynamics/propellers-and-jets/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Picture a big turbofan's intake, 8 m² of fan disc, flying at 230 m/s, adding just 60 m/s to the air. -2. Read the thrust and the propulsive efficiency — both should look impressive. -3. Shrink «disc area A» right down to 0.3 m² and crank «speed added Δv» up to 400 m/s instead. Watch efficiency fall hard even though the engine is now working much harder per kilogram of air. +1. Keep «disc area A» at 8 m² and «aircraft speed v» at 230 m/s, and lower «speed added Δv» to 60 m/s: a big turbofan adding just a little speed to a lot of air. +2. Read the thrust and the propulsive efficiency: T = 152880 N at 88.5%. +3. Shrink «disc area A» right down to 0.3 m² and crank «speed added Δv» up to 400 m/s instead. Thrust drops to 63210 N and efficiency falls hard, to 53.5%, even though the engine is now working much harder per kilogram of air. ## Real-life examples @@ -58,13 +58,17 @@ Real engines don't hit this ideal efficiency: extra losses come from the fan and ## Real world ### High-bypass turbofans + Most of the air a modern airliner engine moves never enters the engine's hot core at all — it is pushed straight through the giant fan around the outside, exactly the "big, slow, gentle" strategy this lesson describes. ### Helicopter and drone rotors + The same trade-off explains why a helicopter's huge, slow rotor disc is so much more efficient at hovering than a small, screaming ducted fan would be for the same thrust. ### Why fighter jets sacrifice efficiency for speed + A fighter's narrow, high-speed exhaust is a deliberate low-efficiency choice, trading fuel economy for the compact size and huge thrust-to-weight ratio a big slow fan could never match. ### Sailing ship propellers versus paddlewheels + Even without an engine, the same idea appears in ship propulsion history: a wide, slow-turning propeller pushes more water gently and wastes less energy than a small, fast one churning the same thrust. diff --git a/content/lessons/aerodynamics/propellers-and-jets/lesson.yaml b/content/lessons/aerodynamics/propellers-and-jets/lesson.yaml index bff855b1..df58b81f 100644 --- a/content/lessons/aerodynamics/propellers-and-jets/lesson.yaml +++ b/content/lessons/aerodynamics/propellers-and-jets/lesson.yaml @@ -3,13 +3,13 @@ subject: aerodynamics difficulty: high-school equation: T = \dot m\, \Delta v concepts: -- thrust -- momentum -- propulsive-efficiency + - thrust + - momentum + - propulsive-efficiency prerequisites: [] related: -- drag-equation -- helicopters-and-rotors + - drag-equation + - helicopters-and-rotors visualization: type: propellers-and-jets options: {} @@ -31,28 +31,28 @@ parameters: min: 5 max: 420 step: 1 - value: 60 + value: 120 unit: m/s variables: -- T -- \dot m -- \Delta v + - T + - \dot m + - \Delta v derivation: -- \dot m = \rho A v -- T = \dot m\, \Delta v -- \eta = \dfrac{2v}{2v + \Delta v} + - \dot m = \rho A v + - T = \dot m\, \Delta v + - \eta = \dfrac{2v}{2v + \Delta v} charts: [] presets: -- A: 8 - v: 230 - dv: 60 -- A: 0.3 - v: 230 - dv: 400 -- A: 4 - v: 70 - dv: 25 + - A: 8 + v: 230 + dv: 60 + - A: 0.3 + v: 230 + dv: 400 + - A: 4 + v: 70 + dv: 25 challenges: -- check: 'dv<100 and abs(A*1.225*(v+dv/2)*dv - 150000) < 20000' -- check: '2*v/(2*v+dv) > 0.85' -- check: '2*v/(2*v+dv) < 0.55 and A*1.225*(v+dv/2)*dv > 40000' + - check: 'dv<100 and abs(A*1.225*(v+dv/2)*dv - 150000) < 20000' + - check: '2*v/(2*v+dv) > 0.85' + - check: '2*v/(2*v+dv) < 0.55 and A*1.225*(v+dv/2)*dv > 40000' diff --git a/content/lessons/aerodynamics/reynolds-number/ar.md b/content/lessons/aerodynamics/reynolds-number/ar.md index 5ca02308..f9a12c1e 100644 --- a/content/lessons/aerodynamics/reynolds-number/ar.md +++ b/content/lessons/aerodynamics/reynolds-number/ar.md @@ -10,32 +10,32 @@ variables: - كثافة الهواء - سرعة الانسياب - طول يميّز الجسم (باع الجناح، طول الجسم، قطر الكرة) - - اللزوجة الديناميكية للمائع، أي مدى «لزوجته» + - اللزوجة الديناميكية للمائع، أي مدى مقاومته للجريان --- ## Try it -1. ابدأ حيث تبدأ المنزلقات: جناح نحلة نحو 1 سم يرفرف بسرعة 3 m/s تقريبًا. -2. راقب الأثر خلف الشكل. عند هذا الحجم والسرعة يبقى ناعمًا، بلا اضطراب يُذكر. -3. اسحب «مقياس الطول L» و«السرعة v» نحو جناح طائرة نفاثة: عشرات الأمتار بمئات الأمتار في الثانية. راقب الأثر نفسه ينفجر دوامات فوضوية. +1. ابدأ بالقيم الظاهرة: جناح نحلة، «مقياس الطول L» يساوي 0.01 m، يرفرف بسرعة «السرعة v» تساوي 3 m/s. تظهر القراءة Re = 2.03e+3. +2. راقب الأثر خلف الجسم. عند هذا الحجم وهذه السرعة يبقى منتظمًا، بلا اضطراب يُذكر، وتقول قراءة «نوع الانسياب» إنه طبقي. +3. ارفع «مقياس الطول L» إلى نحو 8 m و«السرعة v» إلى 250 m/s: جناح طائرة نفاثة. يصعد Re إلى نحو 1.35e+8، وتقول القراءة إن الانسياب مضطرب، ويتحول الأثر نفسه إلى دوامات فوضوية. ## Real-life examples -1. **جناح نحلة.** نحو 1 سم عرضًا يرفرف بسرعة 3 m/s تقريبًا. يعطي عدد رينولدز قريبًا من 2000. يشعر الهواء بلزوجة واضحة عند هذا الحجم، وهذا جزء من سبب رفرفة الحشرات بدل الانزلاق. -2. **كرة مقذوفة.** كرة قطرها 22 سم تتحرك بسرعة 8 m/s. تعطي عدد رينولدز قرابة 119000، وهذا كبير بما يكفي ليصبح الأثر مضطربًا تمامًا، وتسري عليه مقاومة هواء «عادية». +1. **جناح نحلة.** نحو 1 سم عرضًا يرفرف بسرعة 3 m/s تقريبًا. يعطي عدد رينولدز قريبًا من 2000. يبدو الهواء لزجًا بوضوح عند هذا الحجم، وهذا جزء من سبب رفرفة الحشرات بدل الانزلاق. +2. **كرة مقذوفة.** كرة قطرها 22 سم تتحرك بسرعة 8 m/s. تعطي عدد رينولدز قرابة 119000، وهذا كبير بما يكفي ليتحول الأثر خلفها إلى دوامات (يسمّي الرسم هذا المدى الأوسط انتقاليًا)، وتؤثر فيها مقاومة الهواء «العادية» التي نعرفها. 3. **جناح طائرة عملاقة.** وتر جناح 8 أمتار بسرعة 250 m/s. يعطي عدد رينولدز نحو 135 مليون، أكبر من عدد النحلة بمئة ألف مرة. وكأن الهواء لا لزوجة له تقريبًا. ## Test yourself -1. بلغ عدد رينولدز نحو 2000، منطقة النحلة. -2. ادفع عدد رينولدز فوق 10 ملايين، منطقة الطائرة النفاثة، حيث الانسياب مضطرب تمامًا. +1. ابلغ عدد رينولدز نحو 20000، كما عند طائر صغير. +2. ارفع عدد رينولدز فوق 10 ملايين، كما عند الطائرة النفاثة، حيث الانسياب مضطرب تمامًا. 3. اخفض عدد رينولدز إلى أقل من 1: انسياب زاحف تسيطر فيه اللزوجة تمامًا، وهو عالم بكتيريا تسبح. ## Intuition -جسمان يتحركان في الهواء قد يعيشان نوعين مختلفين تمامًا من الهواء، رغم أنه الغاز نفسه. ما يهم ليس الحجم وحده ولا السرعة وحدها، بل تركيبهما معًا، موزونًا بمدى «ثقل» الهواء عند ذلك الحجم. هذا الوزن هو عدد رينولدز $\mathrm{Re}$. اسحب «مقياس الطول L» و«السرعة v» معًا نحو زاوية النحلة في المنزلقات. الأثر خلف الشكل يكاد لا يهتز. لزوجة الهواء هي الفائزة هنا، وتُسكّن أي اضطراب بالسرعة نفسها التي يتشكل بها تقريبًا. لهذا لا تشبه رفرفة جناح النحلة ريشة مروحة أبدًا. عند هذا الحجم، يقاوم الهواء الحركة كما يقاوم العسل حركة ملعقة. +جسمان يتحركان في الهواء قد يعيشان نوعين مختلفين تمامًا من الهواء، رغم أنه الغاز نفسه. ما يهم ليس الحجم وحده ولا السرعة وحدها، بل الاثنان معًا، مقارنةً بمدى لزوجة الهواء عند ذلك الحجم. هذه المقارنة يلخّصها عدد رينولدز $\mathrm{Re}$. حرّك «مقياس الطول L» و«السرعة v» معًا نحو قيم النحلة الصغيرة. الأثر خلف الشكل يكاد لا يهتز. لزوجة الهواء هي الفائزة هنا، وتُسكّن أي اضطراب بالسرعة نفسها التي يتشكل بها تقريبًا. لهذا لا تشبه رفرفة جناح النحلة ريشة مروحة أبدًا. عند هذا الحجم، يقاوم الهواء الحركة كما يقاوم العسل حركة ملعقة. -اسحب الآن المنزلقين نحو زاوية الطائرة النفاثة. ينفجر الأثر دوامات متلاطمة، لأن قصور الهواء الذاتي يطغى تمامًا على لزوجته عند الحجم الكبير والسرعة العالية. القصور الذاتي هو ميل الهواء لمواصلة الحركة بعد أي اضطراب. $\mathrm{Re}$ هو بالضبط هذه النسبة: كم يهم القصور الذاتي مقارنة بكم تهم اللزوجة. جناح الطائرة العملاقة وجناح النحلة يخضعان للمعادلات نفسها تمامًا لحركة الموائع. الفرق أنهما يعيشان في طرفين متقابلين من المقياس نفسه. +حرّك الآن المنزلقين نحو قيم الطائرة النفاثة الكبيرة. ينفجر الأثر دوامات متلاطمة، لأن قصور الهواء الذاتي يطغى تمامًا على لزوجته عند الحجم الكبير والسرعة العالية. القصور الذاتي هو ميل الهواء لمواصلة الحركة بعد أي اضطراب. $\mathrm{Re}$ هو بالضبط هذه النسبة: كم يهم القصور الذاتي مقارنة بكم تهم اللزوجة. جناح الطائرة العملاقة وجناح النحلة يخضعان للمعادلات نفسها تمامًا لحركة الموائع. الفرق أنهما يعيشان في طرفين متقابلين من المقياس نفسه. ## Formal @@ -56,13 +56,17 @@ variables: ## Real world ### نماذج نفق الرياح المصغرة + يجب على المهندسين الذين يختبرون نموذجًا مصغرًا إما تسريع انسياب النفق، أو استعمال غاز أكثف، لإبقاء $\mathrm{Re}$ مطابقًا للطائرة كاملة الحجم. وإلا فلن يتصرف هواء النموذج بالطريقة نفسها. ### لماذا لا تملك الحشرات أجنحة «طائرة مصغرة» + عند عدد رينولدز الحشرة، لا تمنح الأشكال الانسيابية الملساء ميزة تُذكر مقارنة بالأجنحة المرفرفة المنحنية. الفيزياء التي تكافئ جناح طائرة نفاثة أنيقًا لا تنطبق تقريبًا عند هذا الحجم. ### الكائنات المجهرية السابحة + تسبح البكتيريا عند عدد رينولدز قرابة 0.0001. تسيطر اللزوجة سيطرة تامة، فلا تستطيع الانزلاق ولو جزءًا من مليمتر بعد توقف سوطها، خلافًا لسمكة سابحة. ### انسياب الأنابيب والسباكة + يستعمل مهندسو السباكة عدد رينولدز نفسه، بقطر الأنبوب بديلًا عن $L$، للتنبؤ إن كان الماء سيسري بسلاسة أو باضطراب. انسياب الاضطراب يهدر طاقة ضخ أكبر بكثير في الاحتكاك. diff --git a/content/lessons/aerodynamics/reynolds-number/en.md b/content/lessons/aerodynamics/reynolds-number/en.md index 1162f6fc..9199be4b 100644 --- a/content/lessons/aerodynamics/reynolds-number/en.md +++ b/content/lessons/aerodynamics/reynolds-number/en.md @@ -17,19 +17,19 @@ variables: ## Try it -1. Start where the sliders begin: a bee's wing, about 1 cm, flapping at roughly 3 m/s. -2. Watch the wake behind the shape: at this size and speed it stays smooth, barely disturbed. -3. Drag «length scale L» and «speed v» up toward a jet's wing, tens of metres at hundreds of metres per second, and watch the same wake erupt into a chaotic, swirling mess. +1. Start where the sliders begin: a bee's wing, «length scale L» = 0.01 m, flapping at «speed v» = 3 m/s. The readout shows Re = 2.03e+3. +2. Watch the wake behind the shape: at this size and speed it stays smooth, barely disturbed, and the regime readout says laminar. +3. Drag «length scale L» up to about 8 m and «speed v» to 250 m/s, a jet's wing. Re climbs to about 1.35e+8, the regime reads turbulent, and the same wake erupts into a chaotic, swirling mess. ## Real-life examples 1. **A bee's wing.** About 1 cm across, beating at roughly 3 m/s, gives a Reynolds number near 2,000 — air feels noticeably syrupy at this scale, which is part of why insects flap rather than glide. -2. **A thrown ball.** A 22 cm ball moving at 8 m/s gives a Reynolds number around 119,000 — big enough that the wake is fully turbulent and "normal-feeling" air resistance applies. +2. **A thrown ball.** A 22 cm ball moving at 8 m/s gives a Reynolds number around 119,000 — big enough that the wake breaks up into swirls (the picture calls this middle range transitional) and "normal-feeling" air resistance applies. 3. **A jumbo jet's wing.** An 8 m wing chord at 250 m/s gives a Reynolds number of roughly 135 million — a hundred thousand times higher than the bee's, air might as well have almost no stickiness at all. ## Test yourself -1. Get the Reynolds number to about 2,000 — bee territory. +1. Get the Reynolds number to about 20,000 — small-bird territory. 2. Push the Reynolds number above 10 million — jet territory, where the flow is thoroughly turbulent. 3. Pull the Reynolds number below 1 — creeping flow, where viscosity totally dominates, the world a swimming bacterium lives in. @@ -58,13 +58,17 @@ Formally, $\mathrm{Re}$ falls out of writing the Navier–Stokes equations in di ## Real world ### Wind-tunnel scale models + Engineers testing a scale model must either speed up the tunnel's flow or use a denser gas to keep $\mathrm{Re}$ matched to the full-size aircraft, or the model's airflow simply won't behave the same way. ### Why insects don't have "mini airliner" wings + At an insect's Reynolds number, smooth streamlined shapes offer little advantage over flapping, cambered ones — the physics that rewards a sleek jet wing barely applies at that scale. ### Swimming microorganisms + A bacterium swims at a Reynolds number around 0.0001: viscosity so dominates that it cannot coast even a fraction of a millimetre after stopping its flagellum, unlike a swimming fish. ### Pipe flow and plumbing + Engineers designing pipework use the same Reynolds number, with pipe diameter as $L$, to predict whether water will flow smoothly or turbulently — turbulent flow wastes far more pumping energy to friction. diff --git a/content/lessons/aerodynamics/reynolds-number/lesson.yaml b/content/lessons/aerodynamics/reynolds-number/lesson.yaml index f229162a..479e9163 100644 --- a/content/lessons/aerodynamics/reynolds-number/lesson.yaml +++ b/content/lessons/aerodynamics/reynolds-number/lesson.yaml @@ -3,14 +3,14 @@ subject: aerodynamics difficulty: advanced equation: \mathrm{Re} = \dfrac{\rho v L}{\mu} concepts: -- reynolds-number -- viscosity -- laminar-flow -- turbulence + - reynolds-number + - viscosity + - laminar-flow + - turbulence prerequisites: [] related: -- boundary-layer -- drag-equation + - boundary-layer + - drag-equation visualization: type: reynolds-number options: {} @@ -29,26 +29,26 @@ parameters: value: 3 unit: m/s variables: -- \mathrm{Re} -- \rho -- v -- L -- \mu + - \mathrm{Re} + - \rho + - v + - L + - \mu derivation: -- \mathrm{Re} \approx \dfrac{\rho v^2 L^2}{\mu v L} -- \dfrac{\rho v^2 L^2}{\mu v L} = \dfrac{\rho v L}{\mu} -- \mathrm{Re} = \dfrac{\rho v L}{\mu} + - \mathrm{Re} \approx \dfrac{\rho v^2 L^2}{\mu v L} + - \dfrac{\rho v^2 L^2}{\mu v L} = \dfrac{\rho v L}{\mu} + - \mathrm{Re} = \dfrac{\rho v L}{\mu} charts: [] presets: -- L: 0.01 - v: 3 -- L: 0.22 - v: 8 -- L: 8 - v: 250 + - L: 0.01 + v: 3 + - L: 0.22 + v: 8 + - L: 8 + v: 250 challenges: -- check: '1.225*v*L/1.81e-5' - target: 2000 - tol: 200 -- check: '1.225*v*L/1.81e-5 > 1e7' -- check: '1.225*v*L/1.81e-5 < 1' + - check: '1.225*v*L/1.81e-5' + target: 20000 + tol: 2000 + - check: '1.225*v*L/1.81e-5 > 1e7' + - check: '1.225*v*L/1.81e-5 < 1' diff --git a/content/lessons/aerodynamics/stall-and-angle-of-attack/ar.md b/content/lessons/aerodynamics/stall-and-angle-of-attack/ar.md index fcdd44a5..af51004c 100644 --- a/content/lessons/aerodynamics/stall-and-angle-of-attack/ar.md +++ b/content/lessons/aerodynamics/stall-and-angle-of-attack/ar.md @@ -19,27 +19,27 @@ charts: ## Try it -1. تخيّل طائرة في اقتراب نهائي بطيء، مائلة 13°، قريبة من الحافة لكنها ما زالت تطير. -2. ادفع منزلق «زاوية الهجوم α» إلى ما بعد نحو 15° وراقب خطوط الانسياب فوق الجناح. تبدأ بالاهتزاز والانفصال وتتلوّن بالأحمر. -3. ارفع الآن منزلق «سرعة الطيران v» كثيرًا. لا شيء يتغيّر، ففقدان الرفع لا يهتم بسرعتك. +1. اضبط «زاوية الهجوم α» على 13° و«سرعة الطيران v» على 25 m/s: طائرة تقترب ببطء من المدرج، قريبة من حد فقدان الرفع لكنها ما زالت تطير. تظهر القراءة C_L = 1.65. +2. ارفع «زاوية الهجوم α» إلى 18° وراقب خطوط الانسياب فوق الجناح. بعد 15° تبدأ بالاهتزاز والانفصال وتتلوّن بالأحمر، وينزل C_L إلى 1.3. +3. ارفع الآن «سرعة الطيران v» إلى 70 m/s. يبقى C_L عند 1.3 وتبقى الخطوط حمراء: فقدان الرفع لا يتعلق بسرعتك. ## Real-life examples 1. **طيران عادي مستقر.** مائل 5° وبسرعة 60 m/s، وللجناح هامش أمان كبير دون الزاوية الحرجة. -2. **اقتراب نهائي بطيء.** مائل 13° وبسرعة 25 m/s فقط، قريب من الحافة لكن التيار الهوائي ما زال ملتصقًا بسلاسة. -3. **سحب حاد وسريع ينتهي بانهيار هوائي رغم ذلك.** مائل حتى 18°، أي بعد الزاوية الحرجة، وحتى بسرعة 70 m/s فقد الجناح رفعه بالفعل. +2. **اقتراب نهائي بطيء.** مائل 13° وبسرعة 25 m/s فقط، قريب من حد فقدان الرفع لكن الهواء ما زال ملتصقًا بالجناح. +3. **رفع حاد وسريع لمقدمة الطائرة ينتهي بفقدان الرفع رغم السرعة.** مائل حتى 18°، أي بعد الزاوية الحرجة، وحتى بسرعة 70 m/s فقد الجناح رفعه بالفعل. ## Test yourself -1. ادفع زاوية الهجوم إلى ما بعد 15° مع الطيران بسرعة (60 m/s على الأقل)، لتثبت أن فقدان الرفع لا يهتم بالسرعة. +1. ارفع زاوية الهجوم إلى ما بعد 15° مع الطيران بسرعة (60 m/s على الأقل)، لتثبت أن فقدان الرفع لا يتعلق بالسرعة. 2. جد الزاوية التي تعطي أعلى معامل رفع ممكن، نحو 1.87، عند حافة فقدان الرفع مباشرة. -3. أدخل الجناح في انهيار هوائي بسرعة بطيئة تشبه سرعة الهبوط، بين 20 و35 m/s. +3. اجعل الجناح يفقد الرفع بسرعة بطيئة تشبه سرعة الهبوط، بين 20 و35 m/s. ## Intuition -تخيّل طائرة في اقتراب نهائي بطيء، مائلة 13°، قريبة من حافة فقدان الرفع لكنها ما زالت تطير بأمان. ادفع منزلق «زاوية الهجوم α» إلى ما بعد نحو 15°، وراقب خطوط الانسياب فوق سطح الجناح. بدلًا من أن تتبع السطح المنحني بسلاسة، تبدأ بالاهتزاز والانفصال وتتلوّن بالأحمر. هذا معناه أن الهواء فقد تماسكه مع الجناح. لم يعد قادرًا على متابعة الانحناء المتزايد الانحدار، فينفصل عنه. وينهار معه الدفع السلس للهواء نحو الأسفل الذي كان يولّد الرفع. +تخيّل طائرة في اقتراب نهائي بطيء، مائلة 13°، قريبة من حد فقدان الرفع لكنها ما زالت تطير بأمان. ارفع «زاوية الهجوم α» إلى ما بعد نحو 15°، وراقب خطوط الانسياب فوق سطح الجناح. بدلًا من أن تتبع السطح المنحني بسلاسة، تبدأ بالاهتزاز والانفصال وتتلوّن بالأحمر. هذا معناه أن الهواء فقد تماسكه مع الجناح. لم يعد قادرًا على متابعة الانحناء المتزايد الانحدار، فينفصل عنه. وينهار معه الدفع السلس للهواء نحو الأسفل الذي كان يولّد الرفع. -لاحظ أن رفع منزلق «سرعة الطيران v» لا يُحدث هذا الانهيار بذاته. يدخل الجناح في فقدان الرفع عند أي سرعة، سريعة كانت أم بطيئة، في عنان السماء أو أثناء الاقتراب النهائي للهبوط. ما يهم فقط هو الزاوية بين الجناح والهواء القادم. يظن كثيرون أن فقدان الرفع يعني «بطيئًا جدًا»، لكن القول الصحيح هو «شديد الانحدار جدًا». الطيران البطيء يحتاج مصادفةً إلى زاوية حادة لتوليد رفع كافٍ، ولهذا يحدث الانهيار غالبًا قرب سرعة الهبوط. لكن طائرة في حالة انقضاض يمكن أن تنهار هوائيًا أيضًا، إذا سحب الطيار مقدمتها للأعلى بقوة مفرطة. +لاحظ أن رفع منزلق «سرعة الطيران v» لا يُحدث هذا الانهيار بذاته. يدخل الجناح في فقدان الرفع عند أي سرعة، سريعة كانت أم بطيئة، في عنان السماء أو أثناء الاقتراب النهائي للهبوط. ما يهم فقط هو الزاوية بين الجناح والهواء القادم. يظن كثيرون أن فقدان الرفع يعني أن الطائرة «أبطأ من اللازم»، لكن الصحيح أن جناحها «مائل أكثر من اللازم». الطيران البطيء يحتاج إلى زاوية كبيرة لتوليد رفع كافٍ، ولهذا يحدث فقدان الرفع غالبًا قرب سرعة الهبوط. لكن طائرة تنقضّ بسرعة يمكن أن تفقد الرفع أيضًا، إذا رفع الطيار مقدمتها بقوة مفرطة. ## Formal @@ -49,7 +49,7 @@ charts: ## Advanced -يحدث الانفصال حين يعجز زخم الطبقة الحدّية عن التغلب على تدرّج الضغط المعاكس على السطح العلوي الخلفي، حيث يعود الضغط تدريجيًا نحو قيمة التيار الحر. وتقاوم الطبقات الحدّية المضطربة الانفصال أفضل من الطبقات الانسيابية، لأنها تخلط الزخم من التيار الخارجي باتجاه السطح، ولهذا تُستخدم مولّدات الدوامات وأجهزة الاضطراب عمدًا لتأخير فقدان الرفع. +يحدث الانفصال حين يعجز زخم الطبقة الحدّية عن التغلب على تدرّج الضغط المعاكس على السطح العلوي الخلفي، حيث يعود الضغط تدريجيًا نحو قيمة التيار الحر. وتقاوم الطبقات الحدّية المضطربة الانفصال أفضل من الطبقات الطبقية (المنتظمة)، لأنها تخلط الزخم من التيار الخارجي باتجاه السطح، ولهذا تُستخدم مولّدات الدوامات وأجهزة الاضطراب عمدًا لتأخير فقدان الرفع. ## Derivation @@ -60,13 +60,17 @@ charts: ## Real world ### أنظمة إنذار فقدان الرفع + تستخدم الطائرات مستشعرات زاوية الهجوم، لا سرعة الطيران وحدها، لتنبيه الطيارين، وذلك بالضبط لأن فقدان الرفع ظاهرة مرتبطة بالزاوية. ### أسلوب الهبوط + يطير الطيارون بسرعة اقتراب مستهدفة خصيصًا للحفاظ على هامش أمان بين زاوية الهجوم المستخدمة و$\alpha_{\text{crit}}$. -### شرائط الانهيار والحواف المتحركة +### شرائط فقدان الرفع والحواف المتحركة + تعمل شرائط صغيرة ثابتة أو حواف أمامية متحركة (slats) على إعادة تنشيط الطبقة الحدّية لرفع قيمة $\alpha_{\text{crit}}$. ### أجنحة السيارات الخلفية والمنشآت الهوائية -تحدّ فيزياء الانفصال نفسها من مقدار قوة الضغط السفلي التي يمكن أن يولّدها جناح خلفي قبل أن ينهار هوائيًا وتنهار معه قوة الضغط السفلي. + +تحدّ فيزياء الانفصال نفسها من مقدار قوة الضغط السفلي التي يمكن أن يولّدها جناح خلفي قبل أن ينفصل الهواء عنه وتنهار معه قوة الضغط السفلي. diff --git a/content/lessons/aerodynamics/stall-and-angle-of-attack/en.md b/content/lessons/aerodynamics/stall-and-angle-of-attack/en.md index e1433ff8..69bdde18 100644 --- a/content/lessons/aerodynamics/stall-and-angle-of-attack/en.md +++ b/content/lessons/aerodynamics/stall-and-angle-of-attack/en.md @@ -1,8 +1,8 @@ --- title: Stall and the critical angle summary: >- - This is why planes can stall even while flying fast: lift depends on the - wing's angle, not its speed, and tilting too far collapses it at any speed. + This is why planes can stall even while flying fast: a stall depends on the + wing's angle, not its speed, and tilting too far collapses the lift at any speed. parameters: alpha: angle of attack α v: airspeed v @@ -20,9 +20,9 @@ charts: ## Try it -1. Picture an aircraft on a slow final approach, tilted 13°, close to the edge but still flying. -2. Push «angle of attack α» past about 15° and watch the streamlines over the wing. They start to wobble, separate, and tint red. -3. Now raise «airspeed v» a lot. Nothing changes — the stall doesn't care how fast you're going. +1. Set «angle of attack α» to 13° and «airspeed v» to 25 m/s: an aircraft on a slow final approach, close to the edge but still flying. C_L reads 1.65. +2. Push «angle of attack α» up to 18° and watch the streamlines over the wing. Past 15° they start to wobble, separate, and tint red, and C_L drops to 1.3. +3. Now raise «airspeed v» to 70 m/s. C_L stays at 1.3 and the streamlines stay red — the stall doesn't care how fast you're going. ## Real-life examples @@ -61,13 +61,17 @@ Separation occurs where the boundary layer’s momentum can no longer overcome t ## Real world ### Stall warning systems + Aircraft use angle-of-attack sensors, not airspeed alone, to warn pilots — exactly because stall is an angle phenomenon. ### Landing technique + Pilots fly a target approach speed specifically to keep a safety margin between the angle of attack in use and $\alpha_{\text{crit}}$. ### Stall strips and slats + Small fixed strips or deployable slats on the leading edge re-energise the boundary layer to push $\alpha_{\text{crit}}$ higher. ### Car spoilers and rear wings + The same separation physics limits how much downforce a rear wing can generate before it stalls and downforce collapses. diff --git a/content/lessons/aerodynamics/stall-and-angle-of-attack/lesson.yaml b/content/lessons/aerodynamics/stall-and-angle-of-attack/lesson.yaml index 5c5792bb..ea0caae1 100644 --- a/content/lessons/aerodynamics/stall-and-angle-of-attack/lesson.yaml +++ b/content/lessons/aerodynamics/stall-and-angle-of-attack/lesson.yaml @@ -3,15 +3,15 @@ subject: aerodynamics difficulty: university equation: C_L(\alpha) \nearrow \text{until } \alpha_{\text{crit}}, \text{ then } C_L \searrow concepts: -- stall -- separation -- angle-of-attack -- boundary-layer + - stall + - separation + - angle-of-attack + - boundary-layer prerequisites: -- lift + - lift related: -- lift -- lift-to-drag + - lift + - lift-to-drag visualization: type: airfoil options: {} @@ -29,36 +29,36 @@ parameters: value: 40 unit: m/s variables: -- \alpha -- \alpha_{\text{crit}} -- C_L + - \alpha + - \alpha_{\text{crit}} + - C_L derivation: -- L = W \;\Rightarrow\; \tfrac12\rho v^2 S C_L = W -- C_L \le C_{L,\max} -- v_{\text{stall}} = \sqrt{\dfrac{2W}{\rho S\, C_{L,\max}}} + - L = W \;\Rightarrow\; \tfrac12\rho v^2 S C_L = W + - C_L \le C_{L,\max} + - v_{\text{stall}} = \sqrt{\dfrac{2W}{\rho S\, C_{L,\max}}} charts: -- domain: - - -5 - - 20 - marker: alpha - series: - - 'x < 15 ? 0.11*(x+2) : 1.87 - 0.19*(x-15)' + - domain: + - -5 + - 20 + marker: alpha + series: + - 'x < 15 ? 0.11*(x+2) : 1.87 - 0.19*(x-15)' visualization3d: type: airfoil options: models: - - airplane + - airplane primary: alpha presets: -- alpha: 5 - v: 60 -- alpha: 13 - v: 25 -- alpha: 18 - v: 70 + - alpha: 5 + v: 60 + - alpha: 13 + v: 25 + - alpha: 18 + v: 70 challenges: -- check: 'alpha > 15 and v >= 60' -- check: '(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15))' - target: 1.87 - tol: 0.1 -- check: 'alpha > 15 and v >= 20 and v <= 35' + - check: 'alpha > 15 and v >= 60' + - check: '(alpha<15 ? 0.11*(alpha+2) : 1.87-0.19*(alpha-15))' + target: 1.87 + tol: 0.1 + - check: 'alpha > 15 and v >= 20 and v <= 35' diff --git a/content/lessons/aerodynamics/terminal-velocity/ar.md b/content/lessons/aerodynamics/terminal-velocity/ar.md index 10b32397..8091311d 100644 --- a/content/lessons/aerodynamics/terminal-velocity/ar.md +++ b/content/lessons/aerodynamics/terminal-velocity/ar.md @@ -23,27 +23,27 @@ charts: ## Try it -1. تخيّل قافزًا حرًّا كتلته 75 kg يسقط ببطنه للأسفل، ذراعاه وساقاه ممدودتان. -2. حرّك نقطة الزمن «الزمن t» على طول المنحنى. يبدأ حادّ الانحدار كالسقوط الحر، ثم ينحني ويتسطح. -3. صغّر الآن منزلق «المساحة الأمامية A»، كأن القافز انطوى في غطسة رأسًا للأسفل. السرعة التي يتسطح نحوها، أي السرعة النهائية، ترتفع. +1. ابدأ بالقيم الظاهرة: «الكتلة m» تساوي 75 kg، و«معامل السحب C_D» يساوي 1، و«المساحة الأمامية A» تساوي 0.7 m². هذا قافز حر يسقط وبطنه إلى الأسفل، ذراعاه وساقاه ممدودتان. عند «الزمن t» = 4 s تظهر القراءة f(x) = 30.5939، وهي السرعة بوحدة m/s. +2. حرّك نقطة «الزمن t» على طول المنحنى إلى 15 s. يبدأ المنحنى شديد الميل كالسقوط الحر (الميل 9.81 عند t = 0)، ثم ينحني ويكاد يصير أفقيًا. عند 15 s تبلغ السرعة 41.357 m/s والميل قريب من الصفر. +3. صغّر الآن «المساحة الأمامية A» إلى 0.3 m²، كأن القافز ضمّ جسمه وهبط ورأسه إلى الأسفل. ترتفع السرعة التي يستقر عندها المنحنى، أي السرعة النهائية: عند 15 s تصير السرعة 62.0803 m/s. ## Real-life examples -1. **قافز حر يسقط ببطنه للأسفل.** بكتلة 75 kg وذراعين وساقين ممدودتين (مساحة 0.7 m²)، يستقر عند نحو 55 m/s، أي نحو 200 كم/س. -2. **القافز نفسه في غطسة رأسًا للأسفل.** منطويًا بمساحة أقل بكثير (0.3 m²)، يمكنه بلوغ نحو 76 m/s، أسرع كثيرًا لمجرد تغيّر شكله. -3. **قافز أثقل بمعدات، منطوٍ قليلًا.** بكتلة 120 kg ومساحة متوسطة 0.5 m²، يستقر عند نحو 62 m/s. +1. **قافز حر يسقط ببطنه للأسفل.** بكتلة 75 kg وذراعين وساقين ممدودتين (مساحة 0.7 m²)، يستقر عند نحو 41 m/s، أي نحو 150 كم/س. +2. **القافز نفسه يهبط ورأسه إلى الأسفل.** يضمّ جسمه فتصغر مساحته كثيرًا (0.3 m²)، ويمكنه بلوغ نحو 76 m/s، أسرع كثيرًا لمجرد تغيّر شكله. +3. **قافز أثقل مع معداته، يضمّ جسمه قليلًا.** بكتلة 120 kg ومساحة متوسطة 0.5 m²، يستقر عند نحو 62 m/s. ## Test yourself 1. اضبط الكتلة ومعامل السحب والمساحة لتصل إلى سرعة نهائية نحو 60 m/s. 2. جد زمنًا وشكل جسم تبلغ عندهما سرعة السقوط نحو 50 m/s. -3. بلغ 95% على الأقل من السرعة النهائية خلال أول 10 ثوانٍ من السقوط. +3. ابلغ 95% على الأقل من السرعة النهائية خلال أول 10 ثوانٍ من السقوط. ## Intuition تخيّل قافزًا حرًّا كتلته 75 kg يسقط ببطنه للأسفل، ذراعاه وساقاه ممدودتان. حرّك نقطة الزمن «الزمن t» على طول المنحنى. يبدأ حادّ الانحدار تمامًا كما في السقوط الحر تحت الجاذبية وحدها، ثم ينحني ويتسطح تدريجيًا نحو سقف ثابت. يكون السحب في البداية ضئيلًا مقارنة بالوزن، فيتسارع الجسم بمعدل يقارب تسارع السقوط الحر. ومع ازدياد السرعة يلحق السحب بالوزن، فتتقلص السرعة الإضافية المكتسبة كل ثانية نحو الصفر. -ارفع الآن منزلق «الكتلة m». ترتفع السرعة النهائية، لأن الجسم الأثقل يحتاج قوة سحب أكبر، وبالتالي سرعة أكبر، ليوازن وزنه الزائد. صغّر بدلًا من ذلك منزلق «المساحة الأمامية A»، كأن القافز انطوى في غطسة رأسًا للأسفل. ترتفع السرعة النهائية هنا للسبب المعاكس، فسحب أقل لكل وحدة سرعة يعني حاجة إلى سرعة أكبر للوصول إلى التوازن. والقافز الحر في غطسة رأسًا للأسفل، مقارنة بوضعية منبسطة، يختار بين شكلين مختلفين تمامًا، وبالتالي بين سرعتين قصويين مختلفتين تمامًا. +ارفع الآن منزلق «الكتلة m». ترتفع السرعة النهائية، لأن الجسم الأثقل يحتاج قوة سحب أكبر، وبالتالي سرعة أكبر، ليوازن وزنه الزائد. صغّر بدلًا من ذلك «المساحة الأمامية A»، كأن القافز ضمّ جسمه وهبط ورأسه إلى الأسفل. ترتفع السرعة النهائية هنا للسبب المعاكس: حين يقل السحب عند السرعة نفسها، يحتاج الجسم إلى سرعة أكبر ليبلغ التوازن. والقافز الحر الذي يهبط ورأسه إلى الأسفل، مقارنة بمن يمدّ ذراعيه وساقيه، يختار بين شكلين مختلفين تمامًا، وبالتالي بين سرعتين قصويين مختلفتين تمامًا. ## Formal @@ -64,13 +64,17 @@ charts: ## Real world ### القفز الحر + يصل القافز الحر بوضعية البطن للأسفل إلى سرعة نهائية نحو 55 m/s. وبوضعية الرأس للأسفل، حيث تقل المساحة الأمامية كثيرًا، يمكن للشخص نفسه أن يتجاوز 90 m/s. ### قطرات المطر + تسقط قطرات المطر الصغيرة برفق بسرعة نهائية لا تتجاوز بضعة m/s، ولهذا ينساب الرذاذ الخفيف بدلًا من أن يلسع البشرة. ### تصميم المظلات + يختار مصممو المظلات مساحتها الكبيرة خصيصًا لتصبح $v_t$ صغيرة بما يكفي للنجاة عند الهبوط. ### حجم حبات البرد وأضرارها + تبلغ حبات البرد الكبيرة سرعة نهائية أعلى، لأن كتلتها تنمو أسرع من مساحتها، ولهذا يكون البرد الكبير أشد ضررًا بكثير. diff --git a/content/lessons/aerodynamics/terminal-velocity/en.md b/content/lessons/aerodynamics/terminal-velocity/en.md index 689f3325..66fb78e2 100644 --- a/content/lessons/aerodynamics/terminal-velocity/en.md +++ b/content/lessons/aerodynamics/terminal-velocity/en.md @@ -25,13 +25,13 @@ charts: ## Try it -1. Picture a 75 kg skydiver falling belly-down, arms and legs spread wide. -2. Drag the time point «time t» along the curve: it starts steep, like free fall, then bends over and flattens. -3. Now shrink «frontal area A», as if the skydiver tucked into a head-down dive. The speed it flattens toward — the terminal velocity — rises. +1. Start with the values on screen: «mass m» 75 kg, «drag coefficient C_D» 1 and «frontal area A» 0.7 m², a skydiver falling belly-down, arms and legs spread wide. At «time t» = 4 s the readout shows f(x) = 30.5939, the speed in m/s. +2. Drag the time point «time t» along the curve to 15 s: the curve starts steep, like free fall (slope 9.81 at t = 0), then bends over and flattens. At 15 s the speed is 41.357 m/s and the slope is almost zero. +3. Now shrink «frontal area A» to 0.3 m², as if the skydiver tucked into a head-down dive. The speed it flattens toward — the terminal velocity — rises: at 15 s the speed is now 62.0803 m/s. ## Real-life examples -1. **A skydiver falling belly-down.** At 75 kg with arms and legs spread (area 0.7 m²), they level off at about 55 m/s — roughly 200 km/h. +1. **A skydiver falling belly-down.** At 75 kg with arms and legs spread (area 0.7 m²), they level off at about 41 m/s — roughly 150 km/h. 2. **The same skydiver diving head-down.** Tucked in with far less area (0.3 m²), they can reach about 76 m/s — much faster, purely from a smaller shape. 3. **A heavier skydiver with gear, tucked in.** At 120 kg with a moderate 0.5 m² area, they level off around 62 m/s. @@ -66,13 +66,17 @@ The $\tanh$ solution is exact for constant $C_D$; in reality $C_D$ itself varies ## Real world ### Skydiving + A belly-to-earth skydiver reaches about 55 m/s terminal velocity; head-down, with far less frontal area, the same person can exceed 90 m/s. ### Raindrops + Small raindrops fall gently at only a few m/s terminal velocity, which is why fine drizzle drifts rather than stings. ### Parachute design + A parachute’s huge area is chosen specifically to make $v_t$ survivably small before landing. ### Hailstone size and damage + Larger hailstones have higher terminal velocity (mass grows faster than area), which is why big hail is so much more damaging. diff --git a/content/lessons/aerodynamics/terminal-velocity/lesson.yaml b/content/lessons/aerodynamics/terminal-velocity/lesson.yaml index 33085683..6da78ea0 100644 --- a/content/lessons/aerodynamics/terminal-velocity/lesson.yaml +++ b/content/lessons/aerodynamics/terminal-velocity/lesson.yaml @@ -46,7 +46,7 @@ parameters: min: 0 max: 30 step: 0.1 - value: 8 + value: 4 unit: s variables: - v(t) @@ -67,20 +67,20 @@ charts: - m*9.81 primary: m presets: -- m: 75 - Cd: 1.0 - A: 0.7 -- m: 75 - Cd: 0.7 - A: 0.3 -- m: 120 - Cd: 1.0 - A: 0.5 + - m: 75 + Cd: 1.0 + A: 0.7 + - m: 75 + Cd: 0.7 + A: 0.3 + - m: 120 + Cd: 1.0 + A: 0.5 challenges: -- check: 'sqrt(2*m*9.81/(1.225*Cd*A))' - target: 60 - tol: 5 -- check: 'sqrt(2*m*9.81/(1.225*Cd*A)) * tanh(9.81*x/sqrt(2*m*9.81/(1.225*Cd*A)))' - target: 50 - tol: 3 -- check: 'x <= 10 and tanh(9.81*x/sqrt(2*m*9.81/(1.225*Cd*A))) >= 0.95' + - check: 'sqrt(2*m*9.81/(1.225*Cd*A))' + target: 60 + tol: 5 + - check: 'sqrt(2*m*9.81/(1.225*Cd*A)) * tanh(9.81*x/sqrt(2*m*9.81/(1.225*Cd*A)))' + target: 50 + tol: 3 + - check: 'x <= 10 and tanh(9.81*x/sqrt(2*m*9.81/(1.225*Cd*A))) >= 0.95' diff --git a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/ar.md b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/ar.md index 4fbaa555..69cd582a 100644 --- a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/ar.md +++ b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/ar.md @@ -5,7 +5,7 @@ summary: >- parameters: AR: نسبة الاستطالة AR alpha: زاوية الهجوم α - winglets: الوينجلتس (أجنحة الطرف) + winglets: الجنيحات (أطراف الجناح المرفوعة) variables: - معامل السحب الحثي - معامل الرفع @@ -15,54 +15,58 @@ variables: ## Try it -1. تخيّل طائرة ركاب في اقتراب نهائي بسرعة 70 m/s. جناحاها بنسبة استطالة AR = 9 وزاوية هجوم 8°، بلا وينجلتس. -2. راقب الدوامة الملتفة المنسكبة من كل طرف جناح، واقرأ السحب الحثي الذي تكلّفه. -3. فعّل «الوينجلتس»: الرفع نفسه، لكن الدوامات أصغر وضوحًا ورقم السحب الحثي أصغر. +1. ابدأ بالقيم الظاهرة: «نسبة الاستطالة AR» تساوي 9، و«زاوية الهجوم α» تساوي 8°، و«الجنيحات» مطفأة (0). هذه طائرة ركاب تقترب من المدرج بسرعة 70 m/s. +2. راقب الدوامة التي تلتف عند كل طرف جناح، واقرأ السحب الحثي الذي تسببه: C_{D,i} = 0.0338، أي نحو 1623 N. +3. شغّل «الجنيحات» (1): الرفع نفسه، لكن الدوامات أصغر بوضوح، وينزل C_{D,i} إلى 0.0307، أي نحو 1476 N. ## Real-life examples -1. **جناح قصير عريض بلا وينجلتس.** عند AR = 9 وزاوية 8°، الدوامة سمينة، ويبلغ معامل السحب الحثي نحو 0.034. هذه تكلفة وقود حقيقية لصنع الرفع بهذه الطريقة. -2. **الجناح نفسه، مع وينجلتس.** الرفع نفسه، لكن الوينجلتس تخنق دوامة الطرف. ينخفض معامل السحب الحثي إلى نحو 0.031، أي أقل بنحو 9%، مجانًا في كل رحلة. -3. **جناح شراعية طويل نحيل.** عند AR = 25 وزاوية لطيفة 4°، تكاد الدوامة تختفي. ينخفض معامل السحب الحثي إلى نحو 0.003، أصغر بأكثر من عشر مرات. الأجنحة الطويلة تسرّب هواءً أقل بكثير حول الطرف. +1. **جناح قصير عريض بلا جنيحات.** عند AR = 9 وزاوية 8°، الدوامة كبيرة، ويبلغ معامل السحب الحثي نحو 0.034. هذه تكلفة وقود حقيقية لصنع الرفع بهذه الطريقة. +2. **الجناح نفسه، مع جنيحات.** الرفع نفسه، لكن الجنيحات تخنق دوامة الطرف. ينخفض معامل السحب الحثي إلى نحو 0.031، أي أقل بنحو 9%، مجانًا في كل رحلة. +3. **جناح طائرة شراعية طويل نحيل.** عند AR = 25 وزاوية صغيرة 4°، تكاد الدوامة تختفي. ينخفض معامل السحب الحثي إلى نحو 0.003، أصغر بأكثر من عشر مرات. الأجنحة الطويلة تسرّب هواءً أقل بكثير حول الطرف. ## Test yourself -1. بلغ معامل سحب حثي نحو 0.034، حالة الجناح القصير بلا وينجلتس. -2. فعّل الوينجلتس، وحقق معامل سحب حثي أقل من 0.031، متجاوزًا رقم الحالة بلا وينجلتس. -3. ارفع نسبة الاستطالة، وحقق معامل سحب حثي أقل من 0.005، منطقة الشراعيات. +1. اخفض معامل السحب الحثي إلى النصف، نحو 0.017. جرّب جناحًا أطول. +2. شغّل الجنيحات، وحقق معامل سحب حثي أقل من 0.031، متجاوزًا رقم الحالة بلا جنيحات. +3. ارفع نسبة الاستطالة، وحقق معامل سحب حثي أقل من 0.005، كما في الطائرات الشراعية. ## Intuition -لا يعمل الجناح إلا بإبقاء ضغط مرتفع تحته وضغط منخفض فوقه. لكن عند الطرف، لا يوجد ما يمنع ذلك الهواء عالي الضغط من الالتفاف حول الطرف إلى المنطقة منخفضة الضغط فوقه. ارفع «زاوية الهجوم α» وراقب الدوامة تكبر. رفع أكبر يعني فرق ضغط أكبر، وفرق ضغط أكبر يعني هواءً أكثر يتلهف للتسرب حول الطرف. يلتف ذلك الهواء المتسرب دوامة متتالية دوّارة، وهي الدوامة نفسها التي يجب أن تبتعد عنها طائرة تالية بمسافة أمان، وهي نفسها التي تراها أحيانًا تتكثف حلزونًا مرئيًا خلف طائرة هابطة في يوم رطب. +لا يعمل الجناح إلا بإبقاء ضغط مرتفع تحته وضغط منخفض فوقه. لكن عند الطرف، لا يوجد ما يمنع ذلك الهواء عالي الضغط من الالتفاف حول الطرف إلى المنطقة منخفضة الضغط فوقه. ارفع «زاوية الهجوم α» وراقب الدوامة تكبر. رفع أكبر يعني فرق ضغط أكبر، وفرق ضغط أكبر يعني هواءً أكثر يندفع ليتسرب حول الطرف. يلتف ذلك الهواء المتسرب في دوامة تمتد خلف الجناح، وهي الدوامة نفسها التي يجب أن تبتعد عنها الطائرة التي تطير خلفها بمسافة أمان، وهي نفسها التي تراها أحيانًا تتكثف حلزونًا مرئيًا خلف طائرة هابطة في يوم رطب. -هذه الدوامة ليست مجانية. تميل الانسياب الذي يشعر به الجناح كله قليلًا إلى الخلف، ويميل معه متجه الرفع نفسه. جزء مما كان يجب أن يكون رفعًا خالصًا يشير الآن إلى الخلف أيضًا، كسحب إضافي. اسحب «نسبة الاستطالة AR» نحو جناح طويل نحيل، وراقب الدوامة تصغر حتى مع الرفع نفسه. الجناح الأطول يوزّع الرفع نفسه على باع أكبر، فيحتاج هواء أقل نسبيًا إلى التسرب حول كل طرف لموازنة الضغط. لهذا بالضبط تفضّل الشراعيات والإوز أجنحة طويلة نحيلة، ولهذا تشتري «الوينجلتس»، وهي زعانف صغيرة تسد طريق هروب الهواء حول الطرف، جزءًا مما يخسره الجناح القصير. +هذه الدوامة ليست مجانية. تميل الانسياب الذي يشعر به الجناح كله قليلًا إلى الخلف، ويميل معه متجه الرفع نفسه. جزء مما كان يجب أن يكون رفعًا خالصًا يشير الآن إلى الخلف أيضًا، كسحب إضافي. ارفع «نسبة الاستطالة AR» نحو جناح طويل نحيل، وراقب قراءة السحب الحثي تنخفض حتى مع الرفع نفسه. الجناح الأطول يوزّع الرفع نفسه على باع أكبر، فيحتاج هواء أقل نسبيًا إلى التسرب حول كل طرف لموازنة الضغط. لهذا بالضبط تفضّل الشراعيات والإوز أجنحة طويلة نحيلة، ولهذا تعوّض «الجنيحات»، وهي زعانف صغيرة تسد طريق تسرب الهواء حول الطرف، جزءًا مما يخسره الجناح القصير. ## Formal -ينتج السحب الحثي من ميل صغير إلى الخلف في متجه الرفع، تسببه منظومة الدوامة المتتالية للجناح نفسه. لجناح بنسبة استطالة $\mathrm{AR} = b^2/S$، أي مربع الباع على المساحة، ينتج السحب الحثي $C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e}$. هنا $e \le 1$ كفاءة الباع، ولا تساوي 1 إلا في التوزيع الإهليلجي المثالي نظريًا لقوة الرفع. +ينتج السحب الحثي من ميل صغير إلى الخلف في متجه الرفع، تسببه الدوامات التي يتركها الجناح نفسه خلفه. لجناح بنسبة استطالة $\mathrm{AR} = b^2/S$، أي مربع الباع على المساحة، ينتج السحب الحثي $C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e}$. هنا $e \le 1$ كفاءة الباع، ولا تساوي 1 إلا في التوزيع الإهليلجي المثالي نظريًا لقوة الرفع. بما أن $C_{D,i}$ يكبر مع $C_L^2$، يبلغ السحب الحثي أهميته القصوى حين يكون معامل الرفع في أعلاه، أي عند السرعة المنخفضة أثناء الإقلاع والهبوط. هذا هو الوقت نفسه الذي تكون فيه دوامات أطراف الأجنحة أقوى وأكثر احتمالًا للظهور مرئية. ## Advanced -لا تُزيل الوينجلتس دوامة الطرف، بل تعيد تشكيلها. تقرّب توزيع الرفع على طول الباع قرب الطرف من التوزيع الإهليلجي، وترفع كفاءة الباع الفعلية $e$ قليلًا، وفي بعض التصاميم نسبة الاستطالة الفعلية أيضًا. تفعل ذلك دون إضافة باع فعلي بقدر ما تحتاجه إطالة حرفية للجناح، وهذا مهم لأن المطارات تضع حدودًا صارمة لباع الجناح كي تلائم بوابات الركاب. +لا تُزيل الجنيحات دوامة الطرف، بل تعيد تشكيلها. تقرّب توزيع الرفع على طول الباع قرب الطرف من التوزيع الإهليلجي، وترفع كفاءة الباع الفعلية $e$ قليلًا، وفي بعض التصاميم نسبة الاستطالة الفعلية أيضًا. تفعل ذلك دون إضافة باع فعلي بقدر ما تحتاجه إطالة حرفية للجناح، وهذا مهم لأن المطارات تضع حدودًا صارمة لباع الجناح كي تلائم بوابات الركاب. ## Derivation 1. ينتج الرفع، بتقريب أول، من دفع «أنبوب» هواء نصف قطره نحو نصف الباع إلى الأسفل: $L \approx \dot m\, w$. معدل التدفق الكتلي هو $\dot m = \rho v \cdot \pi(b/2)^2$، عبر قرص يحدده الباع $b$. -2. يميل هذا الغسل الهابط الانسيابَ الذي يشعر به الجناح فعليًا إلى الخلف، بزاوية حثية صغيرة $\alpha_i \approx w/(2v)$. ميل متجه الرفع بهذه الزاوية يعطي سحبًا حثيًا $D_i \approx L\,\alpha_i$. +2. يُميل تيار الهواء الهابط هذا الانسيابَ الذي يشعر به الجناح فعليًا إلى الخلف، بزاوية حثية صغيرة $\alpha_i \approx w/(2v)$. ميل متجه الرفع بهذه الزاوية يعطي سحبًا حثيًا $D_i \approx L\,\alpha_i$. 3. أكمل الجبر لأفضل حالة، وهي توزيع إهليلجي لانتشار الرفع على طول الباع. تحصل على النتيجة الأنيقة $C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e}$. ## Real world ### لماذا تزداد أجنحة طائرات الركاب طولًا ونحافة + تفضّل أجنحة طائرات الركاب الحديثة نسبة استطالة أعلى لهذا السبب بالضبط. أجنحة الطرف القابلة للطي، كطائرة 777X، تتيح لجناح طويل كفوء أن يلائم بوابات المطارات الحالية. ### طيران الإوز بشكل حرف V + يطير كل طائر خلف الذي أمامه وإلى جانبه قليلًا، راكبًا الحافة الخارجية الصاعدة لدوامة طرف جناح الطائر الأمامي مجانًا. لهذا يميل التشكيل دائمًا بزاوية، لا في خط مستقيم. ### مسارات التكاثف ولب الدوامة + في الأيام الرطبة، يستطيع الضغط المنخفض جدًا في لب دوامة طرف الجناح أن يبرّد الهواء الرطب دون نقطة الندى. يتكثف عندها مسار حلزوني مرئي، دون أي علاقة بعادم المحرك. ### قواعد الفصل بسبب اضطراب الأثر + يبقي مراقبو الحركة الجوية الطائرة التالية بعيدة خلف وتحت مسار طائرة ثقيلة، تحديدًا لتجنب دواماتها. قد تستمر هذه الدوامات وتقلب طائرة أصغر بخطورة لدقيقة أو أكثر. diff --git a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/en.md b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/en.md index 98be29cc..a58a8f86 100644 --- a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/en.md +++ b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. Picture an airliner on approach at 70 m/s, wings at AR = 9 and 8° angle of attack, no winglets fitted. -2. Watch the swirling vortex spilling off each wingtip, and read the induced drag it costs. -3. Flip «winglets» on: the same lift, but visibly smaller vortices and a smaller induced-drag number. +1. Start with the values on screen: «aspect ratio AR» 9, «angle of attack α» 8°, «winglets» off (0). This is an airliner on approach at 70 m/s. +2. Watch the swirling vortex spilling off each wingtip, and read the induced drag it costs: C_{D,i} = 0.0338, about 1623 N. +3. Flip «winglets» on (1): the same lift, but visibly smaller vortices, and C_{D,i} drops to 0.0307, about 1476 N. ## Real-life examples @@ -30,7 +30,7 @@ variables: ## Test yourself -1. Reach an induced drag coefficient of about 0.034 — the short-winged airliner without winglets. +1. Halve the induced drag coefficient, to about 0.017. Try a longer wing. 2. Turn winglets on and get the induced drag coefficient below 0.031, beating the no-winglet number. 3. Push the aspect ratio high and get the induced drag coefficient below 0.005, glider territory. @@ -38,7 +38,7 @@ variables: A wing only works by keeping high pressure below and low pressure above — but at the tip, there is nothing to stop that high-pressure air from simply curling up and around into the low-pressure region on top. Raise «angle of attack α» and watch the swirl grow: more lift means a bigger pressure difference, and a bigger pressure difference means more air is eager to leak around the tip. That leaking air rolls itself into a spinning trailing vortex — the same vortex a following aircraft must stay well clear of, and the same one you sometimes see condense into a visible spiral behind a landing jet on a humid day. -That vortex is not free: it tilts the whole flow the wing feels slightly backward, tilting the lift vector back with it — so part of what should have been pure lift now points backward too, as extra drag. Drag «aspect ratio AR» toward a long, slender wing and watch the vortex shrink even at the same lift: a longer wing spreads the same lift over more span, so proportionally less air needs to leak around each tip to balance the pressure. This is exactly why gliders and geese both favour long, narrow wings, and why «winglets» — small fins that block the air's escape route around the tip — buy back some of what a short wing loses. +That vortex is not free: it tilts the whole flow the wing feels slightly backward, tilting the lift vector back with it — so part of what should have been pure lift now points backward too, as extra drag. Drag «aspect ratio AR» toward a long, slender wing and watch the induced-drag readout fall even at the same lift: a longer wing spreads the same lift over more span, so proportionally less air needs to leak around each tip to balance the pressure. This is exactly why gliders and geese both favour long, narrow wings, and why «winglets» — small fins that block the air's escape route around the tip — buy back some of what a short wing loses. ## Formal @@ -59,13 +59,17 @@ Winglets do not eliminate the tip vortex; they reshape it, effectively pushing t ## Real world ### Why airliners keep getting longer, thinner wings + Modern airliner wings favour higher aspect ratio for exactly this reason, folding wingtips (like the 777X's) let a long, efficient wing still fit existing airport gates. ### Geese flying in a V + Each bird flies slightly behind and to the side of the one ahead, riding the upward-swirling outer edge of that bird's wingtip vortex for a free boost, which is also why the formation always trails off at an angle, not a straight line. ### Contrails and vortex cores + On humid days, the very low pressure at the core of a wingtip vortex can chill moist air below its dew point, condensing a visible spiral trail even without any engine exhaust involved. ### Wake turbulence separation rules + Air traffic control keeps following aircraft well behind and below a heavy jet's flight path specifically to avoid its wingtip vortices, which can persist and roll a smaller aircraft dangerously for a minute or more. diff --git a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/lesson.yaml b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/lesson.yaml index 5a682c8d..597683fa 100644 --- a/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/lesson.yaml +++ b/content/lessons/aerodynamics/wingtip-vortices-and-induced-drag/lesson.yaml @@ -3,15 +3,15 @@ subject: aerodynamics difficulty: university equation: C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e} concepts: -- induced-drag -- wingtip-vortex -- aspect-ratio -- winglets + - induced-drag + - wingtip-vortex + - aspect-ratio + - winglets prerequisites: -- lift + - lift related: -- lift-to-drag -- how-wings-really-lift + - lift-to-drag + - how-wings-really-lift visualization: type: wingtip-vortices-and-induced-drag options: {} @@ -39,28 +39,28 @@ parameters: value: 0 unit: '' variables: -- C_{D,i} -- C_L -- \mathrm{AR} -- e + - C_{D,i} + - C_L + - \mathrm{AR} + - e derivation: -- L \approx \dot m\, w, \quad \dot m = \rho v \cdot \pi\!\left(\tfrac{b}{2}\right)^2 -- \alpha_i \approx \dfrac{w}{2v} \;\Rightarrow\; D_i \approx L\,\alpha_i -- C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e} + - L \approx \dot m\, w, \quad \dot m = \rho v \cdot \pi\!\left(\tfrac{b}{2}\right)^2 + - \alpha_i \approx \dfrac{w}{2v} \;\Rightarrow\; D_i \approx L\,\alpha_i + - C_{D,i} = \dfrac{C_L^2}{\pi\, \mathrm{AR}\, e} charts: [] presets: -- AR: 9 - alpha: 8 - winglets: 0 -- AR: 9 - alpha: 8 - winglets: 1 -- AR: 25 - alpha: 4 - winglets: 0 + - AR: 9 + alpha: 8 + winglets: 0 + - AR: 9 + alpha: 8 + winglets: 1 + - AR: 25 + alpha: 4 + winglets: 0 challenges: -- check: '((2*pi*sin(alpha*pi/180))^2)/(pi*AR*(winglets>0.5?0.88:0.8))' - target: 0.034 - tol: 0.004 -- check: 'winglets>0.5 and ((2*pi*sin(alpha*pi/180))^2)/(pi*AR*0.88) < 0.031' -- check: '((2*pi*sin(alpha*pi/180))^2)/(pi*AR*(winglets>0.5?0.88:0.8)) < 0.005' + - check: '((2*pi*sin(alpha*pi/180))^2)/(pi*AR*(winglets>0.5?0.88:0.8))' + target: 0.017 + tol: 0.002 + - check: 'winglets>0.5 and ((2*pi*sin(alpha*pi/180))^2)/(pi*AR*0.88) < 0.031' + - check: '((2*pi*sin(alpha*pi/180))^2)/(pi*AR*(winglets>0.5?0.88:0.8)) < 0.005' diff --git a/content/lessons/ai/activation-functions/ar.md b/content/lessons/ai/activation-functions/ar.md index ce12655e..5ef3f4e6 100644 --- a/content/lessons/ai/activation-functions/ar.md +++ b/content/lessons/ai/activation-functions/ar.md @@ -4,11 +4,11 @@ summary: >- مهما كدّست من خطوط مستقيمة فالناتج خط مستقيم. اثنِ كل خط انحناءة صغيرة، وعندها فقط تستطيع الشبكة أن تتعلم شكل وجه. parameters: - sel: المنحنى — 0 سيجمويد، 1 تانج زائدي، 2 ReLU + sel: المنحنى — 0 سيجمويد، 1 الظل الزائدي tanh، 2 ReLU x: x — قيمة الإدخال variables: - - منحنى السيجمويد، معصور بين 0 و1 - - منحنى التانج الزائدي، معصور بين -1 و1 + - منحنى السيجمويد، محصور بين 0 و1 + - منحنى tanh، محصور بين -1 و1 - منحنى ReLU، صفر عند الإدخال السالب، وخطّ مستقيم بعده charts: - title: مقارنة منحنيات التفعيل الثلاثة @@ -16,60 +16,64 @@ charts: yLabel: المخرج series: - سيجمويد - - تانج زائدي + - tanh - ReLU --- ## Try it -1. اختر منحنى السيجمويد وحرّك x عبر مداه. يبقى المخرج معصورًا بين 0 و1 مهما كبرت x أو صغرت. -2. اختر منحنى التانج الزائدي وحرّك x من جديد. يتأرجح المخرج الآن بين -1 و1 بدل 0 و1، لكنه يحافظ على شكل حرف S نفسه الذي رأيته مع السيجمويد. -3. اختر منحنى ReLU وحرّك x من السالب إلى الموجب. المخرج ثابت عند 0 لكل x سالب، ثم يرتفع كخط مستقيم بسيط بعد الصفر، بلا انحناء إطلاقًا. +1. اضبط المنحنى على 0 (السيجمويد) وحرّك x من -4 إلى 4. ترتفع قراءة f(x) من 0.018 إلى 0.982: يبقى الناتج محصورًا بين 0 و1 مهما كبرت x أو صغرت. +2. اضبط المنحنى على 1 (tanh) وحرّك x من جديد. يتغيّر الناتج الآن من -0.9993 إلى 0.9993، أي بين -1 و1 بدل 0 و1، لكنه يحافظ على شكل حرف S نفسه الذي رأيته مع السيجمويد. +3. اضبط المنحنى على 2 (ReLU) وحرّك x من -4 إلى 4. الناتج ثابت عند 0 لكل x سالب، ثم يرتفع خطًّا مستقيمًا بعد الصفر حتى يبلغ 4 عند x = 4، بلا انحناء إطلاقًا. ## Real-life examples -1. **السيجمويد عند أقصى حدّه.** بمنحنى السيجمويد وx عند 3، يكاد المخرج يثبت عند 1، ولا يكاد يختلف عمّا عند x=4. -2. **التانج الزائدي عند أقصى حدّه.** بمنحنى التانج الزائدي وx عند -3، يكاد المخرج يثبت عند -1. +1. **السيجمويد عند أقصى حدّه.** بمنحنى السيجمويد وx عند 3، يساوي الناتج 0.9526، فهو قريب جدًّا من 1 ولا يكاد يختلف عن 0.982 عند x = 4. +2. **tanh عند أقصى حدّه.** بمنحنى tanh وx عند -3، يساوي الناتج -0.9951، فهو قريب جدًّا من -1. 3. **ReLU في منطقته المستقيمة.** بمنحنى ReLU وx عند 2، يساوي المخرج 2 بالضبط، فالمخرج هنا هو الإدخال نفسه بلا تغيير. ## Test yourself 1. اختر السيجمويد وحرّك x إلى ما فوق 3 لترى المنحنى يتسطّح قرب 1. -2. اختر التانج الزائدي وحرّك x إلى ما دون -3 لترى المنحنى يتسطّح قرب -1. +2. اختر tanh وحرّك x إلى ما دون -3 لترى المنحنى يتسطّح قرب -1. 3. اختر ReLU وقف بالضبط عند x = 2.5، وتحقّق أن المخرج يساوي x تمامًا. ## Intuition -مرّر الرقم 3 عبر عصبون عادي بلا أي ثني، فيعود العدد نفسه 3 دون تغيير، إجابة مستقيمة بلا سقف. اختر منحنى السيجمويد وحرّك x إلى 3 نفسها بدلًا من ذلك، فيعود المخرج معصورًا قرب 1. حرّك x إلى -3 فيعود معصورًا قرب 0. بهذا صار الخط المستقيم اللامحدود منحنى له حد أدنى وحد أعلى. +أدخل الرقم 3 إلى عصبون عادي لا يثني شيئًا، فيخرج الرقم نفسه 3 دون تغيير: خط مستقيم ليس له حدّ أعلى. اختر الآن منحنى السيجمويد وحرّك x إلى 3 نفسها، فيخرج الناتج قريبًا من 1. حرّك x إلى -3 فيخرج قريبًا من 0. هكذا صار الخط المستقيم الذي لا حدّ له منحنى له حدّ أدنى وحدّ أعلى. -لو ثنى كل عصبون في الشبكة مخرجه هكذا، أو لم يثنِه إطلاقًا، فتكديس طبقات أكثر لن يفيد شيئًا حين لا يوجد ثني. خطّ مستقيم يغذّي خطًّا مستقيمًا يبقى خطًّا مستقيمًا، مهما تعمّقت الطبقات. المنحنيات الثلاثة في الرسم أدناه تثني كلّها بطرق مختلفة. يعصر السيجمويد والتانج الزائدي كل شيء إلى مدى ثابت، فيصيران شبه مسطّحين بعيدًا عن الصفر. أما ReLU فيبقى مستقيمًا تمامًا عند الإدخال الموجب، ويساوي صفرًا بالضبط عند الإدخال السالب. هذا الثني الأبسط يتدرّب أسرع في الواقع، وهو ما تستخدمه معظم الشبكات الحديثة في طبقاتها الخفية. +لهذا الانحناء أهمية. لو لم يثنِ أي عصبون في الشبكة ناتجه إطلاقًا، لما أفادت زيادة الطبقات شيئًا. خطّ مستقيم يدخل في خطّ مستقيم يبقى خطًّا مستقيمًا، مهما كثرت الطبقات. المنحنيات الثلاثة في الرسم أدناه تنحني كلّها بطرق مختلفة. يحصر السيجمويد وtanh كل شيء في مدى ثابت، فيصيران شبه أفقيين بعيدًا عن الصفر. أما ReLU فيبقى مستقيمًا تمامًا عند الإدخال الموجب، ويساوي صفرًا بالضبط عند الإدخال السالب. هذا الانحناء الأبسط يجعل التدريب أسرع عمليًّا، وهو ما تستخدمه معظم الشبكات الحديثة في طبقاتها الخفية. ## Formal السيجمويد $\sigma(x) = \frac{1}{1+e^{-x}}$ و$\tanh(x)$ كلاهما منحنى ناعم بشكل S. $\tanh$ مجرد سيجمويد معاد قياسه، يُخرج $(-1, 1)$ بدل $(0, 1)$، ما يسهّل التدريب أحيانًا لأن مخرجه متمركز حول الصفر. -$\mathrm{ReLU}(x) = \max(0,x)$ يستبدل الثني الناعم بزاوية حادة عند الصفر. عند $x>0$ هو الدالة المحايدة، وعند $x\le 0$ يساوي 0 بالضبط. هذا الشكل الخطّي المتقطّع سهل الحساب، ويمنع التدرّج من التقلّص إلى لا شيء عبر طبقات كثيرة، وهي مشكلة يعاني منها كلّ من السيجمويد والتانج الزائدي. +$\mathrm{ReLU}(x) = \max(0,x)$ يستبدل الثني الناعم بزاوية حادة عند الصفر. عند $x>0$ يُخرج الإدخال نفسه، وعند $x\le 0$ يساوي 0 بالضبط. هذا الشكل المكوّن من قطعتين مستقيمتين سهل الحساب، ويمنع التدرّج من التقلّص إلى لا شيء عبر طبقات كثيرة، وهي مشكلة يعاني منها كلّ من السيجمويد وtanh. ## Advanced -يتشبّع كل من السيجمويد والتانج الزائدي عند $|x|$ الكبيرة، أي يقترب ميلهما من الصفر هناك. هذا يحرم الطبقات المبكّرة من إشارة تدرّج مفيدة أثناء التدريب، وهذه مشكلة التدرّج المتلاشي. ميل ReLU الثابت عند $x>0$ يتجنّب هذا إلى حدّ كبير، لكن بثمن نمط فشل «العصبون الميت»، حين تعلق وحدة دائمًا في منطقة $x\le 0$ فتتوقّف عن التعلّم كليًّا. نسخ مثل ReLU المتسرّب وGELU موجودة خصّيصًا لترقيع هذا الضعف، مع الاحتفاظ بشكل ReLU السهل والصديق للتدرّج. +يتشبّع كل من السيجمويد وtanh عند $|x|$ الكبيرة، أي يقترب ميلهما من الصفر هناك. هذا يحرم الطبقات المبكّرة من إشارة تدرّج مفيدة أثناء التدريب، وهذه مشكلة التدرّج المتلاشي. ميل ReLU الثابت عند $x>0$ يتجنّب هذا إلى حدّ كبير، لكن بثمن نمط فشل «العصبون الميت»، حين تعلق وحدة دائمًا في منطقة $x\le 0$ فتتوقّف عن التعلّم كليًّا. نسخ مثل ReLU المتسرّب وGELU موجودة خصّيصًا لترقيع هذا الضعف، مع الاحتفاظ بشكل ReLU السهل الذي لا يُضعف التدرّج. ## Derivation -1. السيجمويد يعصر أي إدخال حقيقي إلى الفترة المفتوحة بين 0 و1. -2. التانج الزائدي يقوم بالعصر نفسه لكن متمركزًا حول الصفر، بين -1 و1. +1. السيجمويد يضغط أي إدخال حقيقي إلى الفترة المفتوحة بين 0 و1. +2. tanh يضغط بالطريقة نفسها لكن حول الصفر، بين -1 و1. 3. ReLU يُبقي الإدخال الموجب دون تغيير ويصفّر كل ما هو سالب. ## Real world ### التعرّف على الصور + تكدّس شبكات الرؤية طبقات كثيرة من تفعيلات ReLU للتعرّف على الحواف والأشكال ثم الأجسام كاملة في النهاية. ### مرشِّحات البريد المزعج + غالبًا ما تستخدم الطبقة الأخيرة من مصنِّف البريد المزعج السيجمويد لتحويل درجتها الأخيرة إلى احتمال كونها مزعجة. ### التعرّف على الكلام -اعتمدت الشبكات الأقدم للتعرّف على الكلام والخط اليدوي كثيرًا على تفعيلات التانج الزائدي في طبقاتها الخفية. + +اعتمدت الشبكات الأقدم للتعرّف على الكلام والخط اليدوي كثيرًا على تفعيلات tanh في طبقاتها الخفية. ### مساعدو الدردشة + الطبقات الخفية داخل شبكة مساعد الدردشة تكدّس دوال تفعيل كهذه بالمليارات لتشكيل ردوده. diff --git a/content/lessons/ai/activation-functions/en.md b/content/lessons/ai/activation-functions/en.md index 333a62cb..7346d649 100644 --- a/content/lessons/ai/activation-functions/en.md +++ b/content/lessons/ai/activation-functions/en.md @@ -22,14 +22,14 @@ charts: ## Try it -1. Set curve to sigmoid and drag x across its range. Watch the output stay squashed between 0 and 1 no matter how far x goes. -2. Set curve to tanh and drag x again. The output now swings between -1 and 1 instead, keeping the same S shape as sigmoid. -3. Set curve to ReLU and drag x from negative to positive. The output sits flat at 0 for every negative x, then rises as a plain straight line past zero — no curve at all. +1. Set curve to 0 (sigmoid) and drag x from -4 to 4. The f(x) readout climbs from 0.018 to 0.982: the output stays squashed between 0 and 1 no matter how far x goes. +2. Set curve to 1 (tanh) and drag x again. The output now runs from -0.9993 to 0.9993, between -1 and 1 instead, keeping the same S shape as sigmoid. +3. Set curve to 2 (ReLU) and drag x from -4 to 4. The output sits flat at 0 for every negative x, then rises as a plain straight line past zero, reaching 4 at x = 4 — no curve at all. ## Real-life examples -1. **Sigmoid pushed to its limit.** With curve set to sigmoid and x at 3, the output already sits almost pinned to 1, barely different from x at 4. -2. **Tanh pushed to its limit.** With curve set to tanh and x at -3, the output already sits almost pinned to -1. +1. **Sigmoid pushed to its limit.** With curve set to sigmoid and x at 3, the output is 0.9526, already almost pinned to 1 and barely different from the 0.982 at x = 4. +2. **Tanh pushed to its limit.** With curve set to tanh and x at -3, the output is -0.9951, already almost pinned to -1. 3. **ReLU in its straight region.** With curve set to ReLU and x at 2, the output is exactly 2 — here the curve is nothing but the input itself. ## Test yourself @@ -42,7 +42,7 @@ charts: Feed the number 3 into a plain neuron with no bend at all and it comes back out as 3, a straight, unlimited answer. Set curve to sigmoid and drag x to that same 3 instead, and the output comes back squashed to almost 1; drag x down to -3 and it comes back squashed to almost 0. The straight, unlimited line has been bent into a curve with a floor and a ceiling. -If every neuron in a network bent its output like this, or not at all, stacking more layers would still buy nothing when there is no bend: a straight line feeding a straight line is still just a straight line, no matter how many layers deep. The three curves in the chart below all bend differently. Sigmoid and tanh squash everything into a fixed range and go nearly flat far from zero; ReLU instead stays perfectly straight for positive input and sits at exactly zero for negative input, a simpler bend that trains faster in practice and is what most modern networks use in their hidden layers. +This bend matters. If no neuron in a network bent its output at all, stacking more layers would buy nothing: a straight line feeding a straight line is still just a straight line, no matter how many layers deep. The three curves in the chart below all bend differently. Sigmoid and tanh squash everything into a fixed range and go nearly flat far from zero; ReLU instead stays perfectly straight for positive input and sits at exactly zero for negative input, a simpler bend that trains faster in practice and is what most modern networks use in their hidden layers. ## Formal @@ -63,13 +63,17 @@ Sigmoid and tanh both saturate for large $|x|$, meaning their slope approaches z ## Real world ### Image recognition + Vision networks stack many layers of ReLU activations to recognize edges, shapes and eventually whole objects. ### Spam filters + The final layer of a spam classifier often uses sigmoid to turn its last score into a probability of being spam. ### Speech recognition + Older speech and handwriting recognition networks relied heavily on tanh activations in their hidden layers. ### Chat assistants + The hidden layers inside a chat assistant's network stack activation functions like these by the billions to shape its responses. diff --git a/content/lessons/ai/ai-agents/ar.md b/content/lessons/ai/ai-agents/ar.md index ad6bc69c..5b65fa77 100644 --- a/content/lessons/ai/ai-agents/ar.md +++ b/content/lessons/ai/ai-agents/ar.md @@ -15,27 +15,27 @@ variables: ## Try it -1. مع الأدوات متاحة وميزانية 6، اسحب t حتى النهاية: أربع لفات، ابحث واقرأ واكتب وأرسل، وكل لفة تضيف نتيجتها إلى شريط السياق وتفتح البند التالي في القائمة. -2. خذ صندوق الأدوات وشغّل من جديد: الحلقة لا تدور، وعند منتصف الطريق يجيب النموذج رغم ذلك. جواب طليق وواثق ولم يتحقق من شيء. -3. أعد الأدوات واقطع الميزانية إلى لفتين: يتوقف الوكيل في منتصف المشوار، التوقعات في يده والرسالة لم تُرسل. الميزانية حقيقية، والقائمة تريك أين توقف. +1. اضبط tools على 1 وsteps على 6، واسحب t من 0 إلى 100: أربع لفات، ابحث واقرأ واكتب وأرسل، وكل لفة تضيف نتيجتها إلى شريط السياق وتفتح البند التالي في القائمة. تنتهي القراءات عند «لفات مستخدمة 4 / 4» و«اكتمل المشوار». +2. اضبط tools على 0 واسحب t من 0 إلى 100 من جديد: الحلقة لا تدور وتبقى اللفات المستخدمة 0 / 4، وعند t = 50 تتحول قراءة الحلقة إلى «خمّن» ويجيب النموذج رغم ذلك. جواب طليق وواثق ولم يتحقق من شيء. +3. أعد tools إلى 1 واجعل steps تساوي 2 واسحب t إلى 100: يتوقف الوكيل في منتصف المشوار عند «لفات مستخدمة 2 / 4» و«نفدت الميزانية»، التوقعات في يده والرسالة لم تُرسل. الميزانية حقيقية، والقائمة تريك أين توقف. ## Real-life examples - **مساعد برمجة يصلح عطلًا.** اقرأ الملف (لفة)، شغّل الاختبارات (لفة)، عدّل (لفة)، أعد الاختبارات (لفة). حلقة المشوار نفسها، والفرق أن الأداة مصرّف لا خدمة طقس. - **النموذج وحده.** اسأل نموذجًا بلا أدوات عن طقس الغد وسيجيبك فعلًا، من أنماط الكلام لا من السماء. بلا حلقة لا يوجد تحقق، يوجد إكمال نص فقط. -- **الوكيل الذي انتهت مهلته.** الأنظمة الحقيقية تسقف اللفات والسياق. الوكيل الذي يتوقف في منتصف بحث ويسلّمك ما جمعه هو نهاية «نفدت الميزانية» وقد عولجت بأدب. +- **الوكيل الذي انتهت مهلته.** الأنظمة الحقيقية تضع حدًّا أقصى لعدد اللفات ولحجم السياق. الوكيل الذي يتوقف في منتصف بحث ويسلّمك ما جمعه هو نهاية «نفدت الميزانية» نفسها، لكن بطريقة لائقة. ## Test yourself 1. أكمل المشوار: أدوات متاحة، وميزانية 4 لفات على الأقل، وتشغيل حتى النهاية. 2. شغّل الحلقة كاملة بلا صندوق أدوات وشاهد ماذا يفعل النموذج بدل أن يعتذر. -3. شغّل بالأدوات لكن بلفتين فقط، وانظر أي بنود القائمة نجا. +3. شغّل بالأدوات لكن بلفتين فقط، وانظر أي بنود القائمة اكتمل. ## Intuition نموذج اللغة محرك إكمال نصوص: لا يستطيع فحص الطقس ولا إرسال رسالة ولا تذكّر ما حدث أمس. وكل ما رأيته من «وكلاء» يفعلون أشياء يأتي من برنامج عادي جدًا يلتف حول النموذج اسمه الحاضن. يعرض الحاضن على النموذج سياقه، أي المحادثة وكل ما جُمع حتى الآن، ويدعه يقترح خطوة مكتوبة مثل «ابحث عن طقس الغد»، ثم ينفذ الخطوة فعلًا بشيفرة حقيقية، ويلصق النتيجة في السياق، ويسأل النموذج من جديد. هذه هي الحلقة التي تراها: نموذج، أداة، نتيجة، سياق، ثم التكرار. -كل مكوّن يثبت قيمته حين تنزعه. خذ الأدوات تنهار الحلقة إلى نموذج وحيد يجيب عن الطقس رغم ذلك، لأن إكمال النص كل ما يعرفه، ولا شيء فيه يعرف أنه لا يعرف. اقطع الميزانية يمت الوكيل في منتصف المشوار، لأن كل لفة تكلف وقتًا ومالًا فتفرض الأنظمة حدودًا. وراقب شريط السياق: إلصاق النتائج هو ذاكرة الوكيل الوحيدة، فإذا امتلأت النافذة وجب تلخيص القديم أو رميه. لم يأت الوكلاء من نماذج أكبر، بل جاؤوا يوم بدأت حلقة تكرار بسيطة تأخذ كلام النموذج على محمل الجد وتنفذه. +كل مكوّن يثبت قيمته حين تنزعه. أزل الأدوات فلا يبقى من الحلقة إلا نموذج وحده يجيب عن الطقس رغم ذلك، لأن إكمال النص كل ما يعرفه، ولا شيء فيه يعرف أنه لا يعرف. قلّل الميزانية فيتوقف الوكيل في منتصف المشوار، لأن كل لفة تكلف وقتًا ومالًا فتفرض الأنظمة حدودًا. وراقب شريط السياق: إلصاق النتائج هو ذاكرة الوكيل الوحيدة، فإذا امتلأت النافذة وجب تلخيص القديم أو رميه. لم يأت الوكلاء من نماذج أكبر، بل جاؤوا يوم بدأت حلقة تكرار بسيطة تأخذ كلام النموذج على محمل الجد وتنفذه. ## Formal @@ -45,7 +45,7 @@ variables: ## Advanced -الأسئلة الهندسية الصعبة تعيش كلها على حواف الحلقة. الالتزام بالواقع: نتيجة الأداة نص ملصق، ولا شيء يجبر النموذج على استعماله بأمانة، فقد يمسك الوكيل التوقعات الصحيحة ثم يخطئ في كتابتها داخل الرسالة. التعافي من الخطأ: فشل الأداة يجب أن يعود إلى السياق بصيغة يفهمها النموذج فشلًا، وإلا بنى فوق الخراب. اقتصاد السياق: المشاوير الطويلة تجبر الحاضن على تلخيص تاريخه، وما يُلخَّص بعيدًا يُنسى فعلًا. الأمان: مدى ضرر الوكيل هو صندوق أدواته، فتضبط الأنظمة الجادة صلاحية كل أداة، وتطلب تأكيدًا قبل ما لا رجعة فيه، وتسجل كل لفة، معاملةً اقتراحات النموذج كما تعاملها قائمة هذه الصفحة: اقتراحات ينفذها طرف مسؤول. +الأسئلة الهندسية الصعبة تقع كلها عند أطراف الحلقة. الالتزام بالواقع: نتيجة الأداة نص ملصق، ولا شيء يجبر النموذج على استعماله بأمانة، فقد يمسك الوكيل التوقعات الصحيحة ثم يخطئ في كتابتها داخل الرسالة. التعافي من الخطأ: فشل الأداة يجب أن يعود إلى السياق بصيغة يفهمها النموذج فشلًا، وإلا بنى فوق الخراب. اقتصاد السياق: المشاوير الطويلة تجبر الحاضن على تلخيص تاريخه، وما يُحذف عند التلخيص يُنسى فعلًا. الأمان: مدى ضرر الوكيل هو صندوق أدواته، فتضبط الأنظمة الجادة صلاحية كل أداة، وتطلب تأكيدًا قبل ما لا رجعة فيه، وتسجل كل لفة، معاملةً اقتراحات النموذج كما تعاملها قائمة هذه الصفحة: اقتراحات ينفذها طرف مسؤول. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### وكلاء البرمجة -الأدوات هي المحرر والمصرّف ومشغّل الاختبارات، والحلقة تقرأ الفشل وتعدّل حتى يخضرّ كل شيء. برمجيات كثيرة تُكتب اليوم هكذا. + +الأدوات هي المحرر والمصرّف ومشغّل الاختبارات، والحلقة تقرأ أخطاء الاختبارات وتعدّل حتى تنجح كلها. برمجيات كثيرة تُكتب اليوم هكذا. ### مساعدو البحث -ابحث وافتح واقرأ وقارن، لفات كثيرة، ونافذة السياق تقرر كم من التحقيق يبقى حاضرًا في الذهن معًا. + +ابحث وافتح واقرأ وقارن، لفات كثيرة، ونافذة السياق تحدّد كم يبقى من البحث حاضرًا أمام النموذج في وقت واحد. ### وكلاء استخدام الحاسوب + صندوق الأدوات شاشة ولوحة مفاتيح وفأرة: كل لفة لقطة شاشة داخلة ونقرة خارجة. الحلقة نفسها على مستوى البكسل. ### بوتات خدمة العملاء + ابحث عن الطلب، راجع السياسة، نفّذ الاسترداد. صناديق أدوات محدودة وميزانيات لفات صارمة، لأن كل خطوة تلمس حسابًا حقيقيًا. diff --git a/content/lessons/ai/ai-agents/en.md b/content/lessons/ai/ai-agents/en.md index 03eafe41..4128bc9f 100644 --- a/content/lessons/ai/ai-agents/en.md +++ b/content/lessons/ai/ai-agents/en.md @@ -17,14 +17,14 @@ variables: ## Try it -1. With tools on and budget 6, drag t to the end: four laps — look up, read, draft, send — each lap appending its result to the context bar, each tick unlocking the next. -2. Take the toolbox away and run again: the loop never turns; at the halfway mark the model simply *answers anyway* — fluent, confident, and checked against nothing. -3. Restore tools but cut the budget to 2: the agent dies mid-errand with the forecast in hand and the message never sent — budgets are real, and the checklist shows exactly where it stopped. +1. With tools at 1 and steps at 6, drag t from 0 to 100: four laps — look up, read, draft, send — each lap appending its result to the context bar, each tick unlocking the next. The readouts end at loops used 4 / 4 and «errand done». +2. Set tools to 0 and drag t from 0 to 100 again: the loop never turns and loops used stays at 0 / 4; at t = 50 the episode readout switches to «guessed» and the model simply _answers anyway_ — fluent, confident, and checked against nothing. +3. Set tools back to 1 but cut steps to 2 and run t to 100: the agent dies mid-errand at loops used 2 / 4, «out of budget», with the forecast in hand and the message never sent — budgets are real, and the checklist shows exactly where it stopped. ## Real-life examples - **A coding assistant fixing a bug.** Read the file (lap 1), run the tests (lap 2), edit (lap 3), re-run tests (lap 4) — the same loop as the errand, with a compiler for a weather service. -- **The model alone.** Ask a bare model for tomorrow's weather and it *will* answer — from patterns, not from the sky. Without a loop there is no checking, only completion. +- **The model alone.** Ask a bare model for tomorrow's weather and it _will_ answer — from patterns, not from the sky. Without a loop there is no checking, only completion. - **The timed-out agent.** Real harnesses cap laps and context; an agent that stops mid-research and reports what it has is this sim's out-of-budget ending, handled gracefully. ## Test yourself @@ -35,9 +35,9 @@ variables: ## Intuition -A language model is a text-completion engine: it cannot check the weather, send a message, or remember yesterday. Everything agent-like that you have seen it do comes from a surprisingly ordinary piece of software wrapped around it — the harness. The harness shows the model its context (the conversation plus everything gathered so far), lets it *propose* an action in text ("search for tomorrow's forecast"), actually executes that action with real code, and pastes the result back into the context. Then it asks the model again. That is the entire loop on screen: model, tool, result, context — repeat. +A language model is a text-completion engine: it cannot check the weather, send a message, or remember yesterday. Everything agent-like that you have seen it do comes from a surprisingly ordinary piece of software wrapped around it — the harness. The harness shows the model its context (the conversation plus everything gathered so far), lets it _propose_ an action in text ("search for tomorrow's forecast"), actually executes that action with real code, and pastes the result back into the context. Then it asks the model again. That is the entire loop on screen: model, tool, result, context — repeat. -Each ingredient earns its place when you remove it. Take the tools away and the loop collapses to a bare model, which answers the weather question anyway — the guess in a nice suit — because completing text is all it can do; nothing in it knows that it does not know. Cut the budget and the agent stops mid-errand, because every lap costs real money and time, so harnesses enforce limits. And watch the context bar: appending results is the agent's *only* memory, so when the window fills, the oldest knowledge must be summarized or dropped. Agents did not arrive by making models bigger; they arrived when a plain while-loop started taking the model's words seriously enough to act on them. +Each ingredient earns its place when you remove it. Take the tools away and the loop collapses to a bare model, which answers the weather question anyway — the guess in a nice suit — because completing text is all it can do; nothing in it knows that it does not know. Cut the budget and the agent stops mid-errand, because every lap costs real money and time, so harnesses enforce limits. And watch the context bar: appending results is the agent's _only_ memory, so when the window fills, the oldest knowledge must be summarized or dropped. Agents did not arrive by making models bigger; they arrived when a plain while-loop started taking the model's words seriously enough to act on them. ## Formal @@ -47,7 +47,7 @@ The state is nothing but the growing context — the model's weights do not chan ## Advanced -The hard engineering questions all live in the loop's edges. *Grounding:* a tool result is pasted text, and nothing forces the model to use it faithfully — an agent can hold the correct forecast and still typo it into the message. *Error recovery:* a failed tool call must re-enter the context in a form the model recognizes as failure, or it will build on garbage. *Context economy:* long errands force the harness to summarize its own history, and what gets summarized away is genuinely forgotten. *Safety:* an agent's blast radius is its toolbox, so real deployments scope permissions per tool, require confirmation for irreversible actions, and log every lap — treating the model's proposals exactly the way the checklist treats them here: as suggestions to be executed by something accountable. +The hard engineering questions all live in the loop's edges. _Grounding:_ a tool result is pasted text, and nothing forces the model to use it faithfully — an agent can hold the correct forecast and still typo it into the message. _Error recovery:_ a failed tool call must re-enter the context in a form the model recognizes as failure, or it will build on garbage. _Context economy:_ long errands force the harness to summarize its own history, and what gets summarized away is genuinely forgotten. _Safety:_ an agent's blast radius is its toolbox, so real deployments scope permissions per tool, require confirmation for irreversible actions, and log every lap — treating the model's proposals exactly the way the checklist treats them here: as suggestions to be executed by something accountable. ## Derivation @@ -58,13 +58,17 @@ The hard engineering questions all live in the loop's edges. *Grounding:* a tool ## Real world ### Coding agents + Tools are the editor, compiler and test runner; the loop reads failures and edits until green — software now routinely written this way. ### Research assistants + Search, open, read, cross-check across many laps — with the context window deciding how much of the investigation stays in mind at once. ### Computer-use agents + The toolbox is a screen, keyboard and mouse; each lap is a screenshot in, a click out — the same loop at the pixel level. ### Customer-service bots + Look up the order, check the policy, issue the refund — bounded toolboxes and strict lap budgets, because every action touches a real account. diff --git a/content/lessons/ai/ai-agents/lesson.yaml b/content/lessons/ai/ai-agents/lesson.yaml index 04535974..2a1a1a82 100644 --- a/content/lessons/ai/ai-agents/lesson.yaml +++ b/content/lessons/ai/ai-agents/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: beginner equation: C_{t+1} = C_t + r_t concepts: -- agents -- harness -- tools -- context + - agents + - harness + - tools + - context prerequisites: -- next-word-prediction + - next-word-prediction related: -- rlhf -- attention + - rlhf + - attention visualization: type: agent-loop parameters: @@ -31,26 +31,26 @@ parameters: step: 1 value: 1 variables: -- C_{t+1} -- C_t -- r_t + - C_{t+1} + - C_t + - r_t derivation: -- \text{the model reads its context and proposes one action; the harness runs the tool and captures } r_t -- '\text{appending the result is the agent''s only memory: } C_{t+1} = C_t + r_t' -- \text{the loop repeats until the errand is done, or the budget or the window runs out} + - \text{the model reads its context and proposes one action; the harness runs the tool and captures } r_t + - '\text{appending the result is the agent''s only memory: } C_{t+1} = C_t + r_t' + - \text{the loop repeats until the errand is done, or the budget or the window runs out} charts: [] primary: t presets: -- t: 100 - steps: 6 - tools: 1 -- t: 100 - steps: 6 - tools: 0 -- t: 100 - steps: 2 - tools: 1 + - t: 100 + steps: 6 + tools: 1 + - t: 100 + steps: 6 + tools: 0 + - t: 100 + steps: 2 + tools: 1 challenges: -- check: tools == 1 and steps >= 4 and t >= 95 -- check: tools == 0 and t >= 95 -- check: tools == 1 and steps <= 2 and t >= 95 + - check: tools == 1 and steps >= 4 and t >= 95 + - check: tools == 0 and t >= 95 + - check: tools == 1 and steps <= 2 and t >= 95 diff --git a/content/lessons/ai/attention/ar.md b/content/lessons/ai/attention/ar.md index 8847c1ec..70331248 100644 --- a/content/lessons/ai/attention/ar.md +++ b/content/lessons/ai/attention/ar.md @@ -16,54 +16,58 @@ variables: ## Try it -1. اضبط word على ملك (الكلمة 0) وانظر أيّ الكلمات الأخرى تحصل على أسطع وزن انتباه، وهي التي تعدّها كلمة الاستعلام الأكثر صلة. -2. غيّر word لتختار كلمة استعلام مختلفة، فتتوزّع أوزان الانتباه من جديد على كلمات مختلفة كليًّا. -3. ارفع temp نحو 3 فينتشر الانتباه بالتساوي تقريبًا عبر كل كلمة. اخفضه نحو 0.1 فيتركّز على الكلمة الأفضل مطابقة وحدها. +1. اضبط word على 0 (ملك) والحرارة temp على 1، وانظر أيّ الكلمات تحصل على أكبر الدوائر وأسطعها، فهي التي تعدّها كلمة الاستعلام الأوثق صلة بها. تُظهر القراءات: ملك 18 %، أمير 18 %، رجل 13 %، ملكة 11 %. +2. غيّر word إلى 8 (تفاحة)، فتنتقل أوزان الانتباه إلى كلمات مختلفة تمامًا: تفاحة 16 %، موزة 16 %، وتتأخّر كلمات الملوك كثيرًا. +3. عُد إلى الكلمة 0 وارفع temp إلى 3، فيتوزّع الانتباه بالتساوي تقريبًا: نحو 10 % لكل كلمة من الكلمات الأولى. اخفضه إلى 0.1 فيتركّز على أقرب الكلمات فقط: ملك 49 %، أمير 48 %، رجل 2 %. ## Real-life examples -1. **انتباه متوازن.** بحرارة عند 1، ينشر استعلام «ملك» انتباهه على بضع كلمات معقولة بقوة متقاربة. -2. **انتباه حادّ ومركَّز.** بحرارة قريبة من أدنى قيمة لها، يتكدّس معظم وزن الانتباه على كلمة واحدة الأفضل مطابقة. -3. **انتباه منتشر وغير مركَّز.** بحرارة قريبة من أعلى قيمة لها، ينتشر الانتباه بالتساوي تقريبًا، بلا تفضيل يُذكر لأي كلمة. +1. **انتباه متوازن.** بحرارة عند 1، يوزّع استعلام «ملك» انتباهه على بضع كلمات قريبة منه: 18 % لكل من ملك نفسها وأمير، و13 % لرجل، و11 % لملكة. +2. **انتباه حادّ ومركَّز.** بحرارة قريبة من أدنى قيمة لها، يتركّز معظم وزن الانتباه على أقرب الكلمات: 45 % لكل من ملك وأمير، ولا يبقى لرجل إلا 5 %. +3. **انتباه منتشر وغير مركَّز.** بحرارة قريبة من أعلى قيمة لها، يتوزّع الانتباه بالتساوي تقريبًا، بلا تفضيل يُذكر لأي كلمة: الكلمات الأربع الأولى كلها عند 10 أو 11 %. ## Test yourself 1. ركّز الانتباه حتى تنخفض الحرارة دون 0.2. -2. سطّح الانتباه حتى ترتفع الحرارة فوق 2.5. -3. اختر كلمة استعلام من النصف الثاني من الجملة، بمؤشّر 6 أو أعلى، وانظر أيّ الكلمات ينتبه إليها. +2. وزّع الانتباه على الجميع حتى ترتفع الحرارة فوق 2.5. +3. اختر كلمة استعلام من النصف الثاني من قائمة الكلمات، رقمها 6 أو أعلى، وانظر أيّ الكلمات ينتبه إليها. ## Intuition -عند قراءة الجملة «لم تدخل الكأس في الحقيبة لأنها كانت كبيرة جدًّا»، تعرف فورًا أن «ها» تعني الكأس لا الحقيبة، فقد انتبهت إلى الكلمة السابقة الصحيحة دون أن تحاول حتى. الشبكة التي تقرأ الجملة نفسها تحتاج آلية صريحة لتفعل ذلك. فهي، لكل كلمة، تنظر إلى كل كلمة أخرى، وتقرّر مدى صلة كل واحدة، ثم تمزجها معًا مرجَّحةً بتلك الصلة. +عند قراءة الجملة «لم تدخل الكأس في الحقيبة لأنها كانت كبيرة جدًّا»، تعرف فورًا أن «ها» تعني الكأس لا الحقيبة، فقد انتبهت إلى الكلمة الصحيحة قبلها دون أي جهد. الشبكة التي تقرأ الجملة نفسها تحتاج إلى طريقة واضحة لتفعل ذلك. فهي عند كل كلمة تنظر إلى الكلمات الأخرى كلها، وتحدّد مدى صلة كل واحدة بها، ثم تمزجها معًا، فتأخذ من كل كلمة بقدر صلتها. -هذا المزج هو ما يحسبه الانتباه. الكلمة الحالية تطرح سؤالًا (استعلامها)، وكل كلمة مرشّحة تقدّم إجابة عن مدى صلتها (مفتاحها)، والكلمات التي تجيب «صلة عالية جدًّا» تسهم بمعظم محتواها (قيمتها) في النتيجة. الكلمات المصنَّفة غير ذات صلة لا تكاد تسهم بشيء. +هذا المزج هو ما يحسبه الانتباه. الكلمة الحالية تطرح سؤالًا (استعلامها)، وكل كلمة مرشّحة تقدّم إجابة عن مدى صلتها (مفتاحها)، والكلمات التي تجيب «صلة عالية جدًّا» تسهم بمعظم محتواها (قيمتها) في النتيجة. أما الكلمات الضعيفة الصلة فلا تكاد تسهم بشيء. ## Formal -تُقاس الصلة بين الاستعلام $q$ ومفتاح كل كلمة $k_i$ بجداء نقطي، ثم تتحوّل إلى أوزان مجموعها واحد عبر سوفت ماكس: $a_i = \frac{\exp\!\big((q\cdot k_i)/T\big)}{\sum_j \exp\!\big((q\cdot k_j)/T\big)}$. المخرج يمزج قيمة كل كلمة $v_i$ بوزنها $a_i$. +تُقاس الصلة بين الاستعلام $q$ ومفتاح كل كلمة $k_i$ بجداء نقطي، ثم تتحوّل إلى أوزان مجموعها واحد عبر Softmax: $a_i = \frac{\exp\!\big((q\cdot k_i)/T\big)}{\sum_j \exp\!\big((q\cdot k_j)/T\big)}$. المخرج يمزج قيمة كل كلمة $v_i$ بوزنها $a_i$. -الحرارة $T$ تتحكّم في مدى حدّة تلك الأوزان. $T$ منخفضة تدفع معظم الوزن على الكلمة الأعلى تسجيلًا وحدها، و$T$ مرتفعة تنشر الوزن بالتساوي تقريبًا عبر كل كلمة بغضّ النظر عن تسجيلها، تمامًا كمنزلق الحرارة في التنبّؤ بالكلمة التالية. +الحرارة $T$ تتحكّم في مدى حدّة تلك الأوزان. $T$ منخفضة تضع معظم الوزن على الكلمة الأعلى درجة وحدها، و$T$ مرتفعة توزّع الوزن بالتساوي تقريبًا على كل الكلمات مهما كانت درجتها، تمامًا كمنزلق الحرارة في التنبّؤ بالكلمة التالية. ## Advanced -المحوّلات الحقيقية تحسب رؤوس انتباه كثيرة بالتوازي، كل واحد بإسقاطات استعلام ومفتاح وقيمة متعلَّمة خاصة به. تستطيع رؤوس مختلفة التخصّص في أنواع علاقات مختلفة. واحد يتتبّع توافق الفاعل والفعل نحويًّا، وآخر يتتبّع أيّ ضمير يشير إلى أيّ اسم. تتكدّس آلية الانتباه هذه عبر عشرات الطبقات، وهي الآلية التي قدّمتها ورقة 2017 «الانتباه كل ما تحتاجه»، والتي جعلت تدريب النماذج اللغوية الكبيرة اليوم عمليًّا. +المحوّلات الحقيقية تحسب رؤوس انتباه كثيرة بالتوازي، كل واحد بإسقاطات استعلام ومفتاح وقيمة متعلَّمة خاصة به. تستطيع رؤوس مختلفة التخصّص في أنواع علاقات مختلفة. واحد يتتبّع توافق الفاعل والفعل نحويًّا، وآخر يتتبّع أيّ ضمير يشير إلى أيّ اسم. تتكدّس آلية الانتباه هذه عبر عشرات الطبقات، وهي الآلية التي قدّمتها ورقة بحثية نُشرت عام 2017 بعنوان «الانتباه كل ما تحتاجه»، والتي جعلت تدريب النماذج اللغوية الكبيرة اليوم عمليًّا. ## Derivation -1. سجّل مدى صلة مفتاح كل كلمة بالاستعلام الحالي بجداء نقطي. -2. حوّل تلك الدرجات إلى أوزان مجموعها واحد، ليّنتها أو حدّتها الحرارة. +1. قِس مدى صلة مفتاح كل كلمة بالاستعلام الحالي بجداء نقطي. +2. حوّل تلك الدرجات إلى أوزان مجموعها واحد، تقرّبها الحرارة من بعضها أو تباعد بينها. 3. امزج قيمة كل كلمة بوزنها لتنتج المخرج لهذا الموضع. ## Real world ### مساعدو الدردشة + كل ردّ من مساعد دردشة تبنيه طبقات انتباه تقرّر أيّ الكلمات السابقة في المحادثة مهمّة للكلمة التالية. ### تحديد مرجع الضمير -معرفة ما تشير إليه «هو» أو «هم» في جملة طويلة هو بالضبط نوع الصلة الذي بُني الانتباه لحسابه. + +معرفة ما تشير إليه «هو» أو «هم» في جملة طويلة هي بالضبط نوع الصلة الذي صُمّم الانتباه لحسابه. ### الترجمة الآلية -ترجمة جملة تتطلّب الانتباه إلى كلمات المصدر الصحيحة، لا الأقرب فقط، عند إنتاج كل كلمة هدف. + +ترجمة جملة تتطلّب الانتباه إلى كلمات المصدر الصحيحة، لا الأقرب فقط، عند كتابة كل كلمة في الترجمة. ### وصف الصور + تنتبه نماذج وصف الصور إلى المنطقة المعنية من الصورة أثناء توليد كل كلمة من الوصف. diff --git a/content/lessons/ai/attention/en.md b/content/lessons/ai/attention/en.md index b3eb4534..f2fc06a1 100644 --- a/content/lessons/ai/attention/en.md +++ b/content/lessons/ai/attention/en.md @@ -16,21 +16,21 @@ variables: ## Try it -1. Set word to king (word 0) and see which other words get the brightest attention weight — the ones the query treats as most relevant. -2. Change word to pick a different query word and watch the attention weights redistribute entirely to different words. -3. Raise temp toward 3 and notice attention spreads out almost evenly across every word; lower it toward 0.1 and notice attention sharpens onto just the single best-matching word. +1. Set word to 0 (king) with temp at 1 and see which words get the biggest, brightest circles — the ones the query treats as most relevant. The readouts show king 18 %, prince 18 %, man 13 %, queen 11 %. +2. Change word to 8 (apple) and watch the attention weights move to entirely different words: apple 16 %, banana 16 %, with the royal words far behind. +3. Go back to word 0 and raise temp to 3: attention spreads out almost evenly, about 10 % for each of the top words. Lower it to 0.1 and attention sharpens onto the best matches only: king 49 %, prince 48 %, man 2 %. ## Real-life examples -1. **Balanced attention.** With temperature at 1, the query for king spreads its attention across a few plausible words at reasonable strength. -2. **Sharp, focused attention.** With temperature dropped near its minimum, almost all the attention weight piles onto a single best-matching word. -3. **Diffuse, unfocused attention.** With temperature pushed near its maximum, attention spreads out almost evenly, barely favouring any one word. +1. **Balanced attention.** With temperature at 1, the query for king spreads its attention across a few plausible words: 18 % each for king itself and prince, 13 % for man, 11 % for queen. +2. **Sharp, focused attention.** With temperature dropped near its minimum, almost all the attention weight piles onto the best matches: king and prince take 45 % each, and man is left with 5 %. +3. **Diffuse, unfocused attention.** With temperature pushed near its maximum, attention spreads out almost evenly, barely favouring any one word: the top four all sit at 10 or 11 %. ## Test yourself 1. Sharpen attention until the temperature drops below 0.2. 2. Flatten attention until the temperature rises above 2.5. -3. Pick a query word from the second half of the sentence, word index 6 or higher, and see which words it attends to. +3. Pick a query word from the second half of the word list, word index 6 or higher, and see which words it attends to. ## Intuition @@ -57,13 +57,17 @@ Real transformers compute many attention heads in parallel, each with its own le ## Real world ### Chat assistants + Every response from a chat assistant is built by layers of attention deciding which earlier words in the conversation matter for the next word. ### Pronoun resolution + Working out what "it" or "they" refers to in a long sentence is exactly the kind of relevance attention was built to compute. ### Machine translation + Translating a sentence requires attending to the right source words, not just the nearest ones, when producing each target word. ### Image captioning + Captioning models attend to the relevant region of an image while generating each word of the caption. diff --git a/content/lessons/ai/convolution/ar.md b/content/lessons/ai/convolution/ar.md index 880364ce..b8b5b108 100644 --- a/content/lessons/ai/convolution/ar.md +++ b/content/lessons/ai/convolution/ar.md @@ -5,7 +5,7 @@ summary: >- كل وقفة: هل النمط الذي أبحث عنه هنا؟ وأجوبتها تضيء حيث يختبئ. parameters: kernel: kernel — أي سؤال يسأله القالب - pos: pos — كم انزلق المسح + pos: pos — كم تقدّم المسح variables: - بكسل خرج واحد، جواب القالب هنا - قالب الأوزان التسعة @@ -14,15 +14,15 @@ variables: ## Try it -1. مع نواة الحواف الرأسية، اسحب pos عبر المسح كله: يبقى الخرج معتمًا فوق المناطق المستوية ويضيء بالضبط حيث يتغير السطوع يمينًا ويسارًا، أي عند حدود الوجه الرأسية. -2. انتقل إلى نواة الحواف الأفقية وامسح من جديد: الصورة نفسها تجيب الآن سؤالًا آخر، فتضيء فوق العينين وأعلى الابتسامة. -3. اختر التمويه وتوقف في منتصف المسح: كل جواب هو متوسط الجوار، أرقام صغيرة متشابهة في كل مكان، والحواف تذوب. +1. اضبط kernel على 0 (الحواف الرأسية)، واسحب pos من 0 إلى 100 على المسح كله. عند pos = 0 تُظهر قراءة «اضرب واجمع» 2، وعند pos = 10 تُظهر 3 فوق الحدّ الأيسر، وعند pos = 100 تُظهر -2: يبقى الخرج معتمًا فوق المناطق المستوية ويضيء بالضبط حيث يتغير السطوع يمينًا ويسارًا، أي عند حدود الوجه الرأسية. +2. اضبط kernel على 1 (الحواف الأفقية) وامسح من جديد. عند pos = 5 تُظهر القراءة 3 فوق الحدّ العلوي: الصورة نفسها تجيب الآن سؤالًا آخر، فتضيء فوق العينين وأعلى الابتسامة. +3. اضبط kernel على 2 (التمويه) وتوقف عند pos = 50: القراءة 0.44. كل جواب هو متوسط الخانات المجاورة، أرقام موجبة صغيرة بين 0 و0.56 في كل مكان، والحواف تختفي. ## Real-life examples - **مسح حواف كامل.** مئة وقفة للقالب الرأسي تحوّل الوجه إلى خريطة لحدوده اليمنى واليسرى. هذه هي المادة الخام التي تبدأ منها كل شبكة رؤية. - **مسحة التمويه.** الآلية نفسها بأوزان ألطف هي بالضبط ما تفعله تطبيقات الصور حين تنعّم البشرة. الالتفاف أقدم أدوات معالجة الصور. -- **وقفة في منتصف المسح.** أوقف أين شئت وانظر إلى الحساب: تسع عمليات ضرب وجمعة واحدة. هذا كل سر الرؤية الآلية، رقعة واحدة في كل مرة. +- **وقفة في منتصف المسح.** أوقف قالب التمويه عند pos = 50 فتقرأ 0.44: أربعة بكسلات مضيئة من تسعة. الحساب تسع عمليات ضرب وعملية جمع واحدة. هذا كل سر الرؤية الآلية، رقعة واحدة في كل مرة. ## Test yourself @@ -32,13 +32,13 @@ variables: ## Intuition -كيف تعلّم آلة أن تجد أذن قطة في أي مكان من الصورة؟ الحل الساذج، كاشف منفصل لكل موضع ممكن، جنون. وحل الالتفاف من أجمل أفكار الهندسة: تعلّم الكاشف مرة واحدة، على شكل قالب صغير من الأوزان، ثم أزلقه فوق الصورة كلها. عند كل وقفة يضرب القالب أرقامه التسعة في البكسلات التسعة تحته ويجمعها في حكم واحد: هل نمطي موجود هنا؟ ومجموع الأحكام يكوّن صورة جديدة أصغر، تسمى خريطة الملامح، تضيء حيث يسكن الملمح. +كيف تعلّم آلة أن تجد أذن قطة في أي مكان من الصورة؟ الحل الساذج، أي كاشف منفصل لكل موضع ممكن، غير معقول. وحل الالتفاف من أجمل أفكار الهندسة: تعلّم الكاشف مرة واحدة، على شكل قالب صغير من الأوزان، ثم مرّره فوق الصورة كلها. عند كل وقفة يضرب القالب أرقامه التسعة في البكسلات التسعة تحته ويجمعها في حكم واحد: هل نمطي موجود هنا؟ ومجموع الأحكام يكوّن صورة جديدة أصغر، تسمى خريطة الملامح، تضيء حيث يوجد الملمح. -قوالب هذه الصفحة تسأل أسئلة بسيطة: تغيّر رأسي، تغيّر أفقي، متوسط محلي. لكن الآلية لا تتغير حين تكبر الأسئلة. شبكة الرؤية أكوام من هذه العملية: قوالب الطبقة الأولى تجد الحواف، والطبقة التالية تُزلق قوالبها فوق خرائط الحواف فتجد الزوايا والمنحنيات، والتي بعدها تجد العيون والعجلات، حتى يسأل قالب قرب القمة فعليًا: أذن قطة هنا؟ ولم يصمم أحد تلك القوالب؛ التدريب عدّل الأرقام التسعة حتى صارت الأسئلة مفيدة. ما تختاره هنا بالاسم، تختاره الشبكة بالتدريب. +قوالب هذه الصفحة تسأل أسئلة بسيطة: تغيّر رأسي، تغيّر أفقي، متوسط محلي. لكن الآلية لا تتغير حين تكبر الأسئلة. شبكة الرؤية طبقات متتالية من هذه العملية: قوالب الطبقة الأولى تجد الحواف، والطبقة التالية تمرّر قوالبها فوق خرائط الحواف فتجد الزوايا والمنحنيات، والتي بعدها تجد العيون والعجلات، حتى يسأل قالب قرب القمة فعليًا: أذن قطة هنا؟ ولم يصمم أحد تلك القوالب؛ التدريب عدّل الأرقام التسعة حتى صارت الأسئلة مفيدة. ما تختاره هنا بالاسم، تختاره الشبكة بالتدريب. ## Formal -عند كل موضع تحسب الطبقة $y = \sum K \cdot x$: اضرب كل خلية من النواة في البكسل الذي تحتها، واجمع النواتج في رقم واحد. والانزلاق فوق صورة $12\times12$ بنواة $3\times3$ يعطي خريطة $10\times10$: كل بكسل في الخرج يرى رقعة صغيرة فقط، والأوزان التسعة نفسها تُستعمل عند كل وقفة. +عند كل موضع تحسب الطبقة $y = \sum K \cdot x$: اضرب كل خلية من النواة في البكسل الذي تحتها، واجمع النواتج في رقم واحد. وتحريك نواة فوق صورة $12\times12$ حجمها $3\times3$ يعطي خريطة $10\times10$: كل بكسل في الخرج يرى رقعة صغيرة فقط، والأوزان التسعة نفسها تُستعمل عند كل وقفة. إعادة الاستعمال هذه، أي تشارك الأوزان، هي جوهر الفكرة. طبقة كاملة الاتصال بين صورتين كهاتين تحتاج آلاف الأوزان؛ وطبقة الالتفاف تحتاج تسعة، وتتعلم من كل رقعة في كل صورة في آن واحد، وهي بطبيعتها لا تبالي بموضع النمط: أزح الصورة فتنزاح خريطة الجواب معها، لأن السؤال كان واحدًا في كل مكان. @@ -50,18 +50,22 @@ variables: 1. ضع القالب على رقعة من الصورة: تسعة أوزان فوق تسعة بكسلات، زوجًا زوجًا. 2. اضرب كل زوج واجمع: $y = \sum K \cdot x$، رقم واحد يقيس شبه هذه الرقعة بنمط القالب. -3. انزلق خانة وكرر حتى تغطي الصورة. الأجوبة تكوّن خريطة الملامح، والأوزان التسعة نفسها سألت السؤال نفسه في كل مكان. +3. تحرّك خانة واحدة وكرر حتى تغطي الصورة. الأجوبة تكوّن خريطة الملامح، والأوزان التسعة نفسها سألت السؤال نفسه في كل مكان. ## Real world ### مرشحات الصور + التمويه والشحذ والنقش في كل محرر صور هي التفافات بأوزان ثابتة. الشبكات ببساطة تعلمت قوالب أفضل مما كتب المهندسون. ### التصوير الطبي -شبكات كشف الأورام تُزلق قوالب متعلَّمة فوق صور الأشعة: الطبقات الأولى تجد الحواف والأنسجة، والأخيرة تجد المرض. + +شبكات كشف الأورام تمرّر قوالب متعلَّمة فوق صور الأشعة: الطبقات الأولى تجد الحواف والأنسجة، والأخيرة تجد المرض. ### القيادة الذاتية -خطوط المسار والمشاة واللافتات تجدها أكوام التفافية تعمل على صور الكاميرا عشرات المرات في الثانية. + +خطوط المسار والمشاة واللافتات تجدها طبقات التفاف متتالية تعمل على صور الكاميرا عشرات المرات في الثانية. ### الباركود وفتح الهاتف بالوجه -من ماسح السوبرماركت إلى الهاتف الذي يعرفك، يبدأ الخط نفسه: نوافذ صغيرة، أوزان مشتركة، خرائط ملامح. + +من ماسح السوبرماركت إلى الهاتف الذي يعرفك، تبدأ المعالجة بالطريقة نفسها: نوافذ صغيرة، أوزان مشتركة، خرائط ملامح. diff --git a/content/lessons/ai/convolution/en.md b/content/lessons/ai/convolution/en.md index 088641b3..af84d101 100644 --- a/content/lessons/ai/convolution/en.md +++ b/content/lessons/ai/convolution/en.md @@ -15,15 +15,15 @@ variables: ## Try it -1. With the vertical-edge kernel, drag pos through the whole scan: the output stays dark over flat regions and flares green/red exactly where brightness changes left-to-right — the face's vertical borders. -2. Switch to the horizontal-edge kernel and scan again: the same image now answers a different question, lighting up the brows of the eyes and the top of the smile instead. -3. Pick blur and stop mid-scan: every answer is just the neighbourhood average — small positive numbers everywhere, edges smoothed away. +1. With kernel at 0 (vertical edges), drag pos from 0 to 100 through the whole scan. At pos 0 the multiply-and-sum readout shows 2, at pos 10 it shows 3 on the left border, and at pos 100 it shows -2: the output stays dark over flat regions and flares green/red exactly where brightness changes left-to-right — the face's vertical borders. +2. Switch kernel to 1 (horizontal edges) and scan again. At pos 5 the readout shows 3 on the top border: the same image now answers a different question, lighting up the brows of the eyes and the top of the smile instead. +3. Set kernel to 2 (blur) and stop at pos 50: the readout shows 0.44. Every answer is just the neighbourhood average — small positive numbers between 0 and 0.56 everywhere, edges smoothed away. ## Real-life examples - **A full edge scan.** 100 stops of the vertical stencil turn the face into a map of its left and right borders — the raw material every vision network starts from. - **The blur pass.** The same machinery with gentler weights is exactly how photo apps soften skin: convolution is image processing's oldest tool, learned anew by networks. -- **A frozen mid-scan.** Pause anywhere and the arithmetic is nine multiplications and one sum — the whole mystery of machine vision, one patch at a time. +- **A frozen mid-scan.** Pause the blur stencil at pos 50 and it reads 0.44: four bright pixels out of nine. The arithmetic is nine multiplications and one sum — the whole mystery of machine vision, one patch at a time. ## Test yourself @@ -33,9 +33,9 @@ variables: ## Intuition -How would you teach a machine to find a cat's ear *anywhere* in a photo? The brute-force answer — learn a separate detector for every possible position — is absurd. Convolution's answer is one of the great ideas in engineering: learn the detector *once*, as a tiny stencil of weights, and slide it everywhere. At each stop the stencil multiplies its nine numbers with the nine pixels beneath and sums them into a single verdict: "is my pattern here?" The trail of verdicts is a new, smaller image — a feature map — that glows wherever the feature lives. +How would you teach a machine to find a cat's ear _anywhere_ in a photo? The brute-force answer — learn a separate detector for every possible position — is absurd. Convolution's answer is one of the great ideas in engineering: learn the detector _once_, as a tiny stencil of weights, and slide it everywhere. At each stop the stencil multiplies its nine numbers with the nine pixels beneath and sums them into a single verdict: "is my pattern here?" The trail of verdicts is a new, smaller image — a feature map — that glows wherever the feature lives. -The three stencils on this page ask toy questions — vertical change, horizontal change, local average — but nothing about the machinery changes when the questions get grand. A vision network is just stacks of this: the first layer's stencils find edges, the next layer slides stencils over the *edge maps* and finds corners and curves, the next finds eyes and wheels, until somewhere near the top a stencil effectively asks "cat ear here?". Nobody designed those stencils; training nudged the nine numbers until the questions became useful. What you choose on this page by name, a network chooses by gradient descent. +The three stencils on this page ask toy questions — vertical change, horizontal change, local average — but nothing about the machinery changes when the questions get grand. A vision network is just stacks of this: the first layer's stencils find edges, the next layer slides stencils over the _edge maps_ and finds corners and curves, the next finds eyes and wheels, until somewhere near the top a stencil effectively asks "cat ear here?". Nobody designed those stencils; training nudged the nine numbers until the questions became useful. What you choose on this page by name, a network chooses by gradient descent. ## Formal @@ -45,7 +45,7 @@ That reuse — weight sharing — is the point. A dense layer connecting two suc ## Advanced -Real layers run dozens of kernels in parallel (dozens of questions, dozens of maps) over many channels, interleaved with nonlinearities and downsampling, so receptive fields grow until the deepest units see the whole image. Trained first-layer kernels converge on edge and colour detectors strikingly like those measured in mammalian visual cortex — the same problem forcing the same solution. And the idea outgrew vision: convolutions over time read audio, convolutions over board positions power game-playing networks; wherever a pattern can appear *anywhere*, sliding one learned question across it beats learning the answer at every address — even transformers, which replaced convolution at vision's frontier, kept its core trick of processing every patch with shared weights. +Real layers run dozens of kernels in parallel (dozens of questions, dozens of maps) over many channels, interleaved with nonlinearities and downsampling, so receptive fields grow until the deepest units see the whole image. Trained first-layer kernels converge on edge and colour detectors strikingly like those measured in mammalian visual cortex — the same problem forcing the same solution. And the idea outgrew vision: convolutions over time read audio, convolutions over board positions power game-playing networks; wherever a pattern can appear _anywhere_, sliding one learned question across it beats learning the answer at every address — even transformers, which replaced convolution at vision's frontier, kept its core trick of processing every patch with shared weights. ## Derivation @@ -56,13 +56,17 @@ Real layers run dozens of kernels in parallel (dozens of questions, dozens of ma ## Real world ### Photo filters + Blur, sharpen, emboss in every photo editor are fixed convolutions — networks simply learned better stencils than engineers wrote. ### Medical imaging + Tumour-spotting networks slide learned stencils over scans; their first layers find edges and textures, their last ones find pathology. ### Self-driving perception + Lane lines, pedestrians and signs are found by convolutional stacks running on camera frames dozens of times per second. ### Barcode and face unlock + From the supermarket scanner to the phone that recognises you, the pipeline opens the same way: small windows, shared weights, feature maps. diff --git a/content/lessons/ai/convolution/lesson.yaml b/content/lessons/ai/convolution/lesson.yaml index 426b6874..8a51d02b 100644 --- a/content/lessons/ai/convolution/lesson.yaml +++ b/content/lessons/ai/convolution/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: high-school equation: y = \sum K \cdot x concepts: -- convolution -- kernel -- feature-map -- vision + - convolution + - kernel + - feature-map + - vision prerequisites: -- neural-network + - neural-network related: -- activation-functions -- attention + - activation-functions + - attention visualization: type: convolution-scan parameters: @@ -26,23 +26,23 @@ parameters: step: 1 value: 0 variables: -- y -- K -- x + - y + - K + - x derivation: -- \text{lay the small stencil on a patch of the image} -- '\text{multiply matching cells and add them up: } y = \sum K \cdot x' -- \text{slide one step and repeat; the same weights ask the same question everywhere} + - \text{lay the small stencil on a patch of the image} + - '\text{multiply matching cells and add them up: } y = \sum K \cdot x' + - \text{slide one step and repeat; the same weights ask the same question everywhere} charts: [] primary: pos presets: -- kernel: 0 - pos: 100 -- kernel: 1 - pos: 100 -- kernel: 2 - pos: 50 + - kernel: 0 + pos: 100 + - kernel: 2 + pos: 100 + - kernel: 2 + pos: 50 challenges: -- check: kernel == 0 and pos >= 99 -- check: kernel == 2 and pos >= 99 -- check: kernel == 1 and pos >= 40 and pos <= 60 + - check: kernel == 0 and pos >= 99 + - check: kernel == 2 and pos >= 99 + - check: kernel == 1 and pos >= 40 and pos <= 60 diff --git a/content/lessons/ai/diffusion/ar.md b/content/lessons/ai/diffusion/ar.md index 02224563..5b3e9756 100644 --- a/content/lessons/ai/diffusion/ar.md +++ b/content/lessons/ai/diffusion/ar.md @@ -4,38 +4,38 @@ summary: >- تعلّم النموذج مهارة واحدة: أن يمسح قليلًا من الضجيج. كرّر المسحة مئة مرة على تشويش خالص، فتظهر صورة لم تكن موجودة قط. parameters: - step: step — كم خرجت المشية من التشويش - seed: seed — من أي تشويش بعينه تبدأ المشية + step: step — كم ابتعدت الرحلة عن التشويش + seed: seed — من أي تشويش بعينه تبدأ الرحلة variables: - - اللوحة في منتصف المشية - - كم تقدّمت المشية + - اللوحة في منتصف الرحلة + - كم تقدّمت الرحلة - الضجيج الخالص الذي بدأت منه - - الصورة النظيفة التي تمشي نحوها + - الصورة النظيفة التي تتّجه إليها --- ## Try it -1. اضبط step على 0 وتأمل اللوحة: تشويش خالص لا صورة فيه. هذا حقًا كل ما يبدأ منه النموذج. -2. اسحب step صعودًا ببطء: تتكون ملامح من داخل الضجيج، بقع غائمة تتحول حوافَّ واضحة. هذا عكس الإفساد الذي تدرب عليه النموذج تمامًا. -3. عند الخطوة الكاملة، غيّر البذرة: صورة مختلفة. النموذج نفسه والمهارة نفسها، وتشويش بداية مختلف. تنوع صور الذكاء الاصطناعي كله يسكن هنا. +1. اضبط step على 0 وتأمل اللوحة: تشويش خالص لا صورة فيه. هذا حقًا كل ما يبدأ منه النموذج. تقول القراءات: الضجيج الباقي 100% و«تشويش خالص». +2. ارفع step ببطء إلى 50، حيث تقول القراءة «شيء يتشكل…»، ثم إلى 100: تتكون ملامح من داخل الضجيج، وتتحول البقع الغائمة إلى حواف واضحة، حتى يظهر على اللوحة قلب نظيف. هذا عكس الإفساد الذي تدرب عليه النموذج تمامًا. +3. أبقِ step عند 100 واضبط seed على 2 ثم 3: نجمة ثم هلال بدل القلب. النموذج نفسه والمهارة نفسها، وتشويش بداية مختلف. تنوع صور الذكاء الاصطناعي كله مصدره البذرة. ## Real-life examples -- **الخطوة صفر في أي مولد صور.** خلف كل زر «ولّد»، تبدأ اللوحة بهذا التشويش. الطلب النصي لم يرسم شيئًا؛ هو فقط سيوجه المشية. -- **المشية المكتملة.** بعد مئة خطوة صغيرة من إزالة الضجيج تقف صورة نظيفة لم تكن موجودة في أي مكان: لا منسوخة ولا ملصقة، بل متكونة. -- **زر التنويعات.** «أعطني تنويعة» يعني حرفيًا: تشويش جديد، المشية نفسها. لهذا تتشابه التنويعات في الأسلوب وتختلف في كل ما عداه. +- **الخطوة صفر في أي مولد صور.** خلف كل زر «ولّد»، تبدأ اللوحة بهذا التشويش. الطلب النصي لم يرسم شيئًا؛ هو فقط سيوجه الرحلة. +- **الرحلة المكتملة.** بعد مئة خطوة صغيرة من إزالة الضجيج تقف صورة نظيفة لم تكن موجودة في أي مكان: لا منسوخة ولا ملصقة، بل تكوّنت من التشويش. +- **زر التنويعات.** «أعطني تنويعة» يعني حرفيًا: تشويش جديد، الرحلة نفسها. لهذا تتشابه التنويعات في الأسلوب وتختلف في كل ما عداه. ## Test yourself 1. أعد اللوحة إلى التشويش الخالص. 2. امشِ بالبذرة رقم 1 حتى صورتها النظيفة. -3. غيّر البذرة وامشِ من جديد، وتأكد أن المنزلق نفسه يصل إلى صورة أخرى. +3. غيّر البذرة إلى 2 أو 3 وامشِ من جديد، وتأكد أن المنزلق نفسه يصل إلى صورة أخرى. ## Intuition تعليم شبكة أن ترسم من الصفر يبدو مستحيلًا، فيعلّمها الانتشار شيئًا أسهل بكثير: هذه صورة عليها قليل من الضجيج، أشِر نحو النظيفة. هذه مهمة تدريب ببيانات مجانية لا تنفد: إفساد صورة بالضجيج سهل، والجواب الصحيح، وهو الصورة الأصلية، معروف سلفًا. درّب على مليارات من هذه الترميمات، عند كل مستوى ضجيج من الغبار الخفيف إلى التشويش الكامل، فيصير النموذج خبيرًا في سؤال واحد: في أي اتجاه تقع «صورة أشبه بالحقيقية»؟ -والتوليد هو هذه الخبرة بالعكس. ابدأ من تشويش لم يره النموذج قط، واسأله: أين تقع الصورة الحقيقية؟ خذ خطوة صغيرة في ذلك الاتجاه، واسأل من جديد، مئة مرة، فتتكون صورة لم توجد في أي مكان قبل الآن. ومنزلق البذرة هو الجواب الصادق عن سؤال «من أين تأتي الصور المختلفة؟»: ليست من اختيار النموذج، بل من نقاط بداية مختلفة تنحدر إلى وديان مختلفة في التضاريس التي تعلمها. أما الطلب النصي، وليس في هذه المحاكاة، فهو يميل التضاريس فقط، فتنحدر المشية نحو «قطة تحت المطر» بدل أي شيء آخر. +والتوليد هو هذه الخبرة بالعكس. ابدأ من تشويش لم يره النموذج قط، واسأله: أين تقع الصورة الحقيقية؟ خذ خطوة صغيرة في ذلك الاتجاه، واسأل من جديد، مئة مرة، فتتكون صورة لم توجد في أي مكان قبل الآن. ومنزلق البذرة هو الجواب الصادق عن سؤال «من أين تأتي الصور المختلفة؟»: ليست من اختيار النموذج، بل من نقاط بداية مختلفة تنحدر إلى وديان مختلفة في التضاريس التي تعلمها. أما الطلب النصي، وليس في هذه المحاكاة، فهو يميل التضاريس فقط، فتنحدر الرحلة نحو «قطة تحت المطر» بدل أي شيء آخر. ## Formal @@ -45,7 +45,7 @@ variables: ## Advanced -القفزات العملية في هذا المجال كلها ضغط لهذه المشية: الانتشار الكامن يزيل الضجيج في فضاء مختصر متعلَّم بدل فضاء البكسلات، فيرخص الحساب مئات المرات، وهذه هي الخطوة التي وضعت توليد الصور في متناول الأجهزة العادية؛ والتقطير يختصر مئة خطوة في خطوات قليلة، مقايضًا قليلًا من الجودة بسرعة فورية. والوصفة نفسها تولّد الصوت والفيديو والجزيئات: كل ما يسهل صنع «نسخة مشوشة» منه. وسؤال بيانات التدريب هنا أحدّ من أي مكان آخر: التضاريس التي تنحدر فيها المشية منحوتة بالكامل من الصور التي رآها النموذج، ولهذا صار تقليد الأساليب ومصدر البيانات قضية عالم الفن الأولى مع الذكاء الاصطناعي. +القفزات العملية في هذا المجال كلها ضغط لهذه الرحلة: الانتشار الكامن يزيل الضجيج في فضاء مختصر متعلَّم بدل فضاء البكسلات، فيرخص الحساب مئات المرات، وهذه هي الخطوة التي وضعت توليد الصور في متناول الأجهزة العادية؛ والتقطير يختصر مئة خطوة في خطوات قليلة، مقايضًا قليلًا من الجودة بسرعة فورية. والوصفة نفسها تولّد الصوت والفيديو والجزيئات: كل ما يسهل صنع «نسخة مشوشة» منه. وسؤال بيانات التدريب هنا أحدّ من أي مكان آخر: التضاريس التي تنحدر فيها الرحلة منحوتة بالكامل من الصور التي رآها النموذج، ولهذا صار تقليد الأساليب ومصدر البيانات قضية عالم الفن الأولى مع الذكاء الاصطناعي. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### مولدات الصور -ميدجورني ودالي وستيبل ديفيوجن هي هذه المشية مع توجيه نصي. كل صورة منها بدأت تشويشًا كتشويش هذه الصفحة. + +ميدجورني ودالي وستيبل ديفيوجن هي هذه الرحلة مع توجيه نصي. كل صورة منها بدأت تشويشًا كتشويش هذه الصفحة. ### ترميم الصور + وجّه المؤشر نفسه إلى صورة تالفة فعلًا، فتصير إزالة الضجيج ترميمًا: إصلاح الصور القديمة وتكبير الدقة هما عمل الانتشار اليومي. ### الفيديو والصوت + مدّ اللوحة عبر الزمن، فيعطيك التكوّن نفسه إطارات فيديو وأصواتًا مركبة. ### اكتشاف الأدوية + انتشار على مواقع الذرات في الفضاء يقترح تركيبات بروتينية جديدة: التشويش يتكون جزيئات بدل قطط. diff --git a/content/lessons/ai/diffusion/en.md b/content/lessons/ai/diffusion/en.md index cb46d549..1950de6d 100644 --- a/content/lessons/ai/diffusion/en.md +++ b/content/lessons/ai/diffusion/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. Set step to 0 and stare at the canvas: pure static, no picture hiding in it — this is genuinely all the model is given. -2. Drag step up slowly: structure condenses out of the noise, vague blobs committing to edges — the exact reverse of the corruption the model trained on. -3. Jump to another seed at full step: a different picture — same model, same skill, different starting static. The variety of AI art lives entirely in the seed. +1. Set step to 0 and stare at the canvas: pure static, no picture hiding in it — this is genuinely all the model is given. The readouts say noise left 100% and «pure static». +2. Drag step up slowly to 50, where the readout says «something emerging…», then on to 100: structure condenses out of the noise, vague blobs committing to edges, until a clean heart stands on the canvas — the exact reverse of the corruption the model trained on. +3. Keep step at 100 and set seed to 2, then 3: a star, then a moon instead of the heart — same model, same skill, different starting static. The variety of AI art lives entirely in the seed. ## Real-life examples @@ -30,11 +30,11 @@ variables: 1. Return the canvas to pure static. 2. Walk seed #1 all the way to its clean picture. -3. Change the seed and walk again — confirm the same slider finds a different picture. +3. Change the seed to 2 or 3 and walk again — confirm the same slider finds a different picture. ## Intuition -Teaching a network to paint from scratch sounds impossible, so diffusion teaches something embarrassingly easier: here is a slightly noisy picture — point toward the clean one. That is a supervised task with infinite free training data, because corrupting a photo with noise is trivial, and the right answer (the original) is known. Train on billions of such repairs, at every noise level from "barely dusty" to "pure static", and the model becomes an expert at one question: *in which direction does "more like a real picture" lie?* +Teaching a network to paint from scratch sounds impossible, so diffusion teaches something embarrassingly easier: here is a slightly noisy picture — point toward the clean one. That is a supervised task with infinite free training data, because corrupting a photo with noise is trivial, and the right answer (the original) is known. Train on billions of such repairs, at every noise level from "barely dusty" to "pure static", and the model becomes an expert at one question: _in which direction does "more like a real picture" lie?_ Generation is that expertise run backwards. Start from static the model has never seen, ask it which way realness lies, take a small step, ask again — a hundred times — and a picture condenses that never existed anywhere. The seed slider is the honest answer to "where do different images come from": not from the model choosing, but from different starting static falling toward different valleys of the learned landscape. The prompt (not simulated here) merely tilts the landscape, so the walk condenses toward "a cat in the rain" instead of anywhere else. @@ -57,13 +57,17 @@ The field's practical breakthroughs are compressions of this walk: latent diffus ## Real world ### Image generators + Midjourney, DALL·E and Stable Diffusion are this walk with text steering — every output began as the static on this page. ### Photo restoration -Point the same pointer at a *genuinely* damaged photo and denoising becomes repair: old-photo restoration and super-resolution are diffusion's day job. + +Point the same pointer at a _genuinely_ damaged photo and denoising becomes repair: old-photo restoration and super-resolution are diffusion's day job. ### Video and audio + Extend the canvas through time and the same condensation yields generated video frames and synthesized voices. ### Drug discovery + Diffusion over 3D atom positions proposes novel protein structures — static condensing into molecules instead of cats. diff --git a/content/lessons/ai/diffusion/lesson.yaml b/content/lessons/ai/diffusion/lesson.yaml index c4df07ad..d1550629 100644 --- a/content/lessons/ai/diffusion/lesson.yaml +++ b/content/lessons/ai/diffusion/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: high-school equation: x_u = (1-u)\,\varepsilon + u\,x_0 concepts: -- diffusion -- denoising -- image-generation -- seeds + - diffusion + - denoising + - image-generation + - seeds prerequisites: -- neural-network + - neural-network related: -- rlhf -- word-embeddings + - rlhf + - word-embeddings visualization: type: diffusion-reveal parameters: @@ -19,31 +19,31 @@ parameters: min: 0 max: 100 step: 1 - value: 0 + value: 40 seed: min: 1 max: 6 step: 1 value: 1 variables: -- x_u -- u -- \varepsilon -- x_0 + - x_u + - u + - \varepsilon + - x_0 derivation: -- '\text{training: take a real picture } x_0 \text{, blend noise in, and teach the model to point back toward clean}' -- x_u = (1-u)\,\varepsilon + u\,x_0 \text{ spans the whole walk between static and picture} -- '\text{generation runs the pointer in reverse: start at pure } \varepsilon \text{ and step toward a picture that never existed}' + - '\text{training: take a real picture } x_0 \text{, blend noise in, and teach the model to point back toward clean}' + - x_u = (1-u)\,\varepsilon + u\,x_0 \text{ spans the whole walk between static and picture} + - '\text{generation runs the pointer in reverse: start at pure } \varepsilon \text{ and step toward a picture that never existed}' charts: [] primary: step presets: -- step: 0 - seed: 1 -- step: 100 - seed: 1 -- step: 100 - seed: 2 + - step: 0 + seed: 1 + - step: 100 + seed: 1 + - step: 100 + seed: 2 challenges: -- check: step == 0 -- check: step >= 95 and seed == 1 -- check: seed >= 2 and step >= 95 + - check: step == 0 + - check: step >= 95 and seed == 1 + - check: seed >= 2 and step >= 95 diff --git a/content/lessons/ai/linear-regression/ar.md b/content/lessons/ai/linear-regression/ar.md index 564ac828..0bf628a5 100644 --- a/content/lessons/ai/linear-regression/ar.md +++ b/content/lessons/ai/linear-regression/ar.md @@ -4,8 +4,8 @@ summary: >- كيف يجد الحاسوب وحده أفضل خط يمر بين نقاط مبعثرة، كسعر البيت مقابل مساحته، دون أن يمليه عليه أحد؟ parameters: - m: m — ميل الخط الملائم - c: c — تقاطع الخط الملائم + m: m — ميل الخط + c: c — النقطة التي يقطع عندها الخط المحور الرأسي lr: معدّل التعلّم — حجم كل خطوة تحديث steps: الخطوات — عدد تحديثات الانحدار التدرّجي المنفَّذة variables: @@ -16,27 +16,27 @@ variables: ## Try it -1. اضبط الخطوات steps على 0. يبدأ الخط الصلب مسطّحًا وبعيدًا عن النقاط المتناثرة. اضغط تشغيل وراقبه يقترب منها مع تزايد الخطوات. -2. ارفع معدّل التعلّم فوق المنتصف، قريبًا من 0.05. الخط يتجاوز النقاط ويتأرجح ذهابًا وإيابًا بدل أن يستقرّ. -3. أنزل معدّل التعلّم إلى قيمة صغيرة، واسحب الخطوات حتى 200. الخط يستقرّ تقريبًا فوق الخط المتقطّع. +1. اضبط الخطوات steps على 0. يبدأ الخط المتصل أفقيًّا وبعيدًا عن النقاط المتناثرة. اضغط «شغّل» وراقبه يقترب منها مع تزايد الخطوات. +2. اضبط معدّل التعلّم على 0.03 واضغط «شغّل»: يتأرجح الخط المتصل بضع خطوات ثم يستقرّ. ثم اضبطه على 0.045 واضغط «شغّل»: كل خطوة تتجاوز الهدف أكثر من سابقتها، فيخرج الخط من الرسم. +3. أعد معدّل التعلّم إلى 0.02، واسحب الخطوات حتى 200. يستقرّ الخط المتصل تقريبًا فوق الخط المتقطّع. تُظهر القراءات m = 1.003 وc = 0.936، وهما قريبان من أفضل خط: m 0.97, c 1.121. ## Real-life examples - **مدرّب صبور.** بمعدّل تعلّم متواضع 0.02 وبعد 100 خطوة منجزة، مرّ الخط بتحديثات صغيرة ومتأنية كثيرة. صار قريبًا من النقاط. -- **مدرّب متعجّل.** معدّل تعلّم قريب من 0.049، أي قرب أعلى القيم الممكنة، يجعل كل خطوة كبيرة جدًّا. بعد 20 خطوة فقط يكون الخط قد قفز بعشوائية واضحة. +- **مدرّب متعجّل.** معدّل تعلّم قريب من 0.049، أي قرب أعلى القيم الممكنة، يجعل كل خطوة كبيرة جدًّا. وكل خطوة تتجاوز الهدف أكثر من سابقتها. بعد 20 خطوة فقط يكون الخط قد خرج من الرسم تمامًا. - **تخمين أول محظوظ.** ميل يساوي 1 وتقاطع يساوي 2 بلا أي خطوة منفَّذة. يعني هذا أن أحدًا خمّن هذين الرقمين قبل أن يبدأ أي تدريب. ## Test yourself -1. شغّل التحديثات 150 خطوة على الأقل، ومعدّل التعلّم قريب من 0.02. استمرّ حتى يستقرّ الخط الصلب فوق المتقطّع. -2. ارفع معدّل التعلّم قريبًا من أعلى قيمة له، نحو 0.05. توقّف بعد 5 خطوات أو أقل، وراقب أثر خطوات كبيرة قليلة. -3. أنزل معدّل التعلّم قريبًا من أصغر قيمة له، نحو 0.001. شغّل قرابة الـ200 خطوة كاملة، وراقب كيف يصل التأنّي إلى الهدف أيضًا. +1. شغّل التحديثات 150 خطوة على الأقل، ومعدّل التعلّم قريب من 0.02. استمرّ حتى يستقرّ الخط المتصل فوق المتقطّع. +2. ارفع معدّل التعلّم قريبًا من أعلى قيمة له، نحو 0.05. توقّف بعد 5 خطوات أو أقل، وانظر إلى أين ترمي الخطَّ بضعُ خطوات كبيرة. +3. أنزل معدّل التعلّم قريبًا من أصغر قيمة له، نحو 0.001. شغّل نحو 200 خطوة كاملة، ولاحظ أن الخط يقترب من النقاط ببطء، لكنه لم يصل بعد إلى الخط المتقطّع. ## Intuition -تخيّل أنك رسمت أطوال 10 أطفال مقابل أعمارهم على ورقة مربّعات، وتريد خطًّا واحدًا مستقيمًا يمرّ قريبًا من كل نقطة. هذه الشاشة تفعل الشيء نفسه بالنقاط المتناثرة أمامك. اضغط تشغيل، فيبدأ الخط الصلب مسطّحًا وخاطئًا، ثم يدور وينزلق تدريجيًا مع تصاعد الخطوات من 0 إلى 200. كل خطوة تدفع المنزلق $m$، أي ميل الخط، قليلًا نحو النقاط. والخطوة التالية تدفع المنزلق $c$، أي النقطة التي يقطع عندها الخط المحور الرأسي، بالاتجاه نفسه. الخط المتقطّع هو أفضل خط ملائم فعلًا، محسوب مباشرة بالجبر. الخط الصلب لا يرى هذا الطريق المختصر أبدًا، بل يزحف نحوه خطوة صغيرة تلو الأخرى. +تخيّل أنك رسمت أطوال 8 أطفال مقابل أعمارهم على ورقة مربّعات، وتريد خطًّا واحدًا مستقيمًا يمرّ قريبًا من كل نقطة. هذه الشاشة تفعل الشيء نفسه بالنقاط المتناثرة أمامك. اضغط «شغّل»، فيبدأ الخط المتصل أفقيًّا وبعيدًا عن النقاط، ثم يدور ويتحرّك شيئًا فشيئًا مع زيادة الخطوات من 0 إلى 200. كل خطوة تغيّر $m$، أي ميل الخط، قليلًا نحو النقاط. والخطوة نفسها تغيّر أيضًا $c$، أي النقطة التي يقطع عندها الخط المحور الرأسي. راقب الرقمين يتغيّران في القراءات. الخط المتقطّع هو أفضل خط ملائم فعلًا، محسوب مباشرة بالجبر. الخط المتصل لا يرى هذا الطريق المختصر أبدًا، بل يزحف نحوه خطوة صغيرة تلو الأخرى. -الآن ارفع منزلق معدّل التعلّم فوق المنتصف واضغط تشغيل من جديد. معدّل قريب من أعلى قيمة له، 0.05، يجعل كل خطوة ضخمة. الخط الصلب يتجاوز النقاط ويتأرجح ذهابًا وإيابًا بدل أن يستقرّ. الفكرة أشبه بالنزول من تلّة بخطوات واسعة جدًّا، تتجاوز القاع فتعود لتصعد من جديد. أنزل معدّل التعلّم قريبًا من أصغر قيمة له، 0.001. الخط ينزلق حينها أبطأ كثيرًا، لكنه يقترب أكثر من الخط المتقطّع مع كل خطوة تضيفها. +الآن ارفع منزلق معدّل التعلّم فوق المنتصف واضغط «شغّل» من جديد. معدّل قريب من أعلى قيمة له، 0.05، يجعل كل خطوة ضخمة. الخط المتصل يتجاوز النقاط ويتأرجح ذهابًا وإيابًا، أوسع في كل مرة، بدل أن يستقرّ. الفكرة أشبه بالنزول من تلّة بخطوات واسعة جدًّا، تتجاوز القاع فتعود لتصعد من جديد. أنزل معدّل التعلّم قريبًا من أصغر قيمة له، 0.001. يتحرّك الخط حينها أبطأ كثيرًا، لكنه يقترب أكثر من الخط المتقطّع مع كل خطوة تضيفها. ## Formal @@ -52,18 +52,22 @@ variables: 1. إجمالي الخطأ الرأسي المربّع بين الخط وكل نقطة بيانات، بالمتوسط. 2. يشير التدرّج إلى اتجاه أشدّ زيادة للخسارة. -3. تحرّك عكس التدرّج، أي منحدرًا، بمقياس معدّل التعلّم. +3. تحرّك عكس التدرّج، أي نزولًا، بخطوة حجمها يحدّده معدّل التعلّم. ## Real world ### التنبّؤ والتسعير + غالبًا ما يبدأ التنبّؤ بالمبيعات أو أسعار المنازل أو الطلب من سمة أو سمتين بخط ملائم تمامًا كهذا. ### تدريب الشبكات العصبية + تُضبَط كل طبقة من شبكة عميقة بقاعدة تحديث الانحدار التدرّجي نفسها، لكن بملايين المعاملات بدل اثنين. ### تحليل اختبارات A/B -تُستخدم خطوط الانحدار للتحكّم في المتغيّرات المربِكة عند مقارنة نسختين من منتج. + +تُستخدم خطوط الانحدار لاستبعاد أثر العوامل الأخرى عند مقارنة نسختين من منتج. ### المعايرة العلمية + تُعايَر الأجهزة بملاءمة خط بين مدخل معروف وخرج مقيس، ثم يُقرأ الميل والتقاطع من الملاءمة. diff --git a/content/lessons/ai/linear-regression/en.md b/content/lessons/ai/linear-regression/en.md index c4462a62..0cd99285 100644 --- a/content/lessons/ai/linear-regression/en.md +++ b/content/lessons/ai/linear-regression/en.md @@ -20,26 +20,26 @@ variables: ## Try it 1. Set steps to 0 and look at the solid line — flat and nowhere near the scattered dots. Press play and watch it swing toward them as steps climbs. -2. Raise the learning rate slider past halfway, toward 0.05, and watch the solid line overshoot the dots and wobble back and forth instead of settling. -3. Drop the learning rate back down low and drag steps up to 200 — watch the solid line settle almost exactly onto the dashed line. +2. Set the learning rate to 0.03 and press play: the solid line wobbles back and forth for a few steps, then settles. Now set it to 0.045 and press play: each step overshoots further than the last, and the line swings out of the picture. +3. Set the learning rate back to 0.02 and drag steps up to 200 — the solid line settles almost onto the dashed line. The readouts show m = 1.003 and c = 0.936, close to the best fit m 0.97, c 1.121. ## Real-life examples - **A patient trainer.** With the learning rate at a modest 0.02 and 100 steps already run, the line has had plenty of small, careful updates and sits close to the dots. -- **A trainer in a hurry.** A learning rate near 0.049, close to the top of the range, takes huge steps, so after only 20 of them the line has already jumped around wildly. +- **A trainer in a hurry.** A learning rate near 0.049, close to the top of the range, takes huge steps, and each one overshoots further than the last, so after only 20 of them the line has swung right out of the picture. - **A lucky first guess.** Slope 1 and intercept 2 with 0 steps taken means someone guessed those numbers before any training happened at all. ## Test yourself 1. Run gradient updates for at least 150 steps with the learning rate held close to 0.02, until the solid line settles onto the dashed one. -2. Push the learning rate close to its top value, about 0.05, then stop after 5 steps or fewer — see how far a handful of big steps can go. -3. Drop the learning rate to close to its smallest value, about 0.001, then run almost the full 200 steps — see how slow-and-steady still gets there. +2. Push the learning rate close to its top value, about 0.05, then stop after 5 steps or fewer — see how far a handful of big steps can throw the line. +3. Drop the learning rate to close to its smallest value, about 0.001, then run almost the full 200 steps — see how slow-and-steady gets close to the dots, though not yet onto the dashed line. ## Intuition -Imagine plotting 10 kids' heights against their ages on a sheet of graph paper, then trying to draw one straight line that passes as close as possible to every dot. This screen does exactly that with the scattered dots you see: press play and the solid line starts out flat and wrong, then slowly turns and slides as steps climbs from 0 toward 200. Each step nudges the slider $m$, the line's slope, a little further toward the dots. The next step nudges the slider $c$, the point where the line crosses the vertical axis, in the same direction. The dashed line is the one true best-fit line, worked out directly with algebra, and the solid line never gets to see that shortcut — it only crawls toward it, one small correction at a time. +Imagine plotting 8 kids' heights against their ages on a sheet of graph paper, then trying to draw one straight line that passes as close as possible to every dot. This screen does exactly that with the scattered dots you see: press play and the solid line starts out flat and wrong, then slowly turns and slides as steps climbs from 0 toward 200. Each step nudges $m$, the line's slope, a little further toward the dots. The same step also nudges $c$, the point where the line crosses the vertical axis; watch both numbers change in the readouts. The dashed line is the one true best-fit line, worked out directly with algebra, and the solid line never gets to see that shortcut — it only crawls toward it, one small correction at a time. -Now push the learning-rate slider up past halfway and press play again. A rate close to its top value of 0.05 makes each step huge, so the solid line overshoots the dots and swings back and forth instead of settling down. That is the same idea as taking giant strides down a hill: step too far and you fly past the bottom and have to climb back up. Drop the learning rate down near its smallest value, 0.001, instead, and the solid line creeps down far more slowly, landing a little closer to the dashed line with every step you add. +Now push the learning-rate slider up past halfway and press play again. A rate close to its top value of 0.05 makes each step huge, so the solid line overshoots the dots and swings back and forth, wider every time, instead of settling down. That is the same idea as taking giant strides down a hill: step too far and you fly past the bottom and have to climb back up. Drop the learning rate down near its smallest value, 0.001, instead, and the solid line creeps down far more slowly, landing a little closer to the dashed line with every step you add. ## Formal @@ -60,13 +60,17 @@ If the learning rate exceeds a threshold set by the curvature of $L$ (related to ## Real world ### Forecasting and pricing + Predicting sales, house prices or demand from one or two features often starts with a fitted line exactly like this one. ### Training neural networks + Every layer of a deep network is tuned by the same gradient-descent update rule, just with millions of parameters instead of two. ### A/B test analysis + Regression lines are used to control for confounding variables when comparing two versions of a product. ### Scientific calibration + Instruments are calibrated by fitting a line between a known input and a measured output, then reading the slope and intercept off the fit. diff --git a/content/lessons/ai/logistic-regression/ar.md b/content/lessons/ai/logistic-regression/ar.md index c4c9ee28..5b76da9c 100644 --- a/content/lessons/ai/logistic-regression/ar.md +++ b/content/lessons/ai/logistic-regression/ar.md @@ -6,37 +6,37 @@ summary: >- parameters: w: w — مدى حدّة استجابة المنحنى لـx b: b — يزيح المنحنى يمينًا أو يسارًا - x: x — النقطة المنزلقة على المنحنى + x: x — موضع النقطة المتحرّكة على المنحنى variables: - - الدرجة الخام قبل العصر + - الدرجة الخام قبل ضغطها بين 0 و1 - مدى حدّة استجابة المنحنى لـx - يزيح المنحنى جانبيًّا، فيغيّر موضع تقاطعه مع 0.5 - - المخرج المعصور، يُقرأ كاحتمال + - الناتج بعد الضغط، ونقرؤه احتمالًا --- ## Try it -1. حرّك x عبر مداه كاملًا وشاهد النقطة تركب المنحنى الشبيه بحرف S، باقيةً دائمًا بين 0 و1. -2. ارفع w نحو 5، يشتدّ حرف S حتى يصير شبه قفزة حادة. اخفضه نحو 0.2، يتسطّح المنحنى إلى ميل لطيف. -3. حرّك b يمينًا ويسارًا. ينزاح المنحنى كله جانبيًّا، فتتحرّك النقطة التي يعبر فيها المخرج 0.5. +1. حرّك x من -6 إلى 6 وشاهد النقطة تتحرّك على المنحنى الشبيه بحرف S. ترتفع قراءة f(x) من 0.0001 إلى 0.9999 ولا تخرج أبدًا عن المدى بين 0 و1. +2. ضع x عند 0، ثم ارفع w إلى 5. يشتدّ انحدار المنحنى حتى يصير شبه قفزة، وتُظهر قراءة الميل 1.25. اخفض w إلى 0.2، فينبسط المنحنى ويصير الميل 0.05. +3. اضبط w = 1.5 وb = 3. يتحرّك المنحنى كله إلى اليسار ويقطع 0.5 عند x = -2. اضبط b = -3 فيقطع 0.5 عند x = 2. ## Real-life examples -1. **مرشِّح حادّ وواثق.** بـw قرب أعلى قيمة له، يقفز المنحنى شبه مباشرة من 0 إلى 1، فنادرًا ما يتردّد النموذج. -2. **مرشِّح لطيف وحذر.** بـw قرب أدنى قيمة له، لا يكاد التأرجح نفسه في x يحرّك المخرج، فيبقى النموذج مترددًا على مدى واسع. -3. **مرشِّح منحاز لتصنيف المزيد كمزعج.** برفع b إلى 3، حتى رسالة درجتها في x مريبة قليلًا فقط تُقرأ كمزعجة. +1. **مرشِّح حادّ وواثق.** بـw قرب أعلى قيمة له، يقفز المنحنى شبه مباشرة من 0 إلى 1. عند x = 1 يكون الناتج 0.9933، فنادرًا ما يتردّد النموذج. +2. **مرشِّح هادئ وحذر.** بـw قرب أدنى قيمة له، لا يكاد التغيّر نفسه في x يحرّك الناتج. عند x = 1 يكون الناتج 0.5744 فقط، فيبقى النموذج مترددًا على مدى واسع. +3. **مرشِّح يميل إلى عدّ رسائل أكثر مزعجة.** برفع b إلى 3، يبلغ المنحنى 0.5 عند x = -2 بدل x = 0، فكل رسالة لها x أعلى من ذلك تُعدّ مزعجة. ## Test yourself -1. قف بالضبط عند منتصف المنحنى، حيث النموذج غير متأكّد حقًّا. +1. قف بالضبط عند منتصف المنحنى، حيث تكون قراءة f(x) تساوي 0.5 والنموذج غير متأكّد حقًّا. 2. ارفع w قرب 5 وشاهد المنحنى يشتدّ حتى يصير شبه قفزة حادة. -3. ادفع الدرجة الخام فوق 3، عميقًا في منطقة «مزعج بثقة». +3. ارفع الدرجة الخام فوق 3 (أي f(x) أكبر من 0.953)، حيث يكون النموذج واثقًا أن الرسالة مزعجة. ## Intuition -لنفترض أننا سجّلنا رسالة إلكترونية على سمة واحدة x بقيمة 2، لاحتوائها مثلًا على رابط مريب. الخط المستقيم كان سيحوّل هذا الرقم 2 إلى رقم خام بلا سقف طبيعي، عديم الفائدة لسؤال نعم أو لا مثل «هل هذه الرسالة مزعجة؟». المنحنى الشبيه بحرف S هنا يحلّ ذلك. يأخذ أي درجة خام ويعصرها إلى المدى بين 0 و1، فتُقرأ النتيجة كاحتمال، يعني 1 «مزعجة بالتأكيد» ويعني 0 «ليست مزعجة بالتأكيد». +لنفترض أننا أعطينا رسالة بريد درجة واحدة x تساوي 2، لأن فيها رابطًا مريبًا مثلًا. الخط المستقيم يحوّل هذا الرقم 2 إلى رقم خام ليس له حدّ أعلى، فلا ينفع لسؤال جوابه نعم أو لا مثل «هل هذه الرسالة مزعجة؟». المنحنى الشبيه بحرف S هنا يحلّ المشكلة. يأخذ أي درجة خام ويضغطها إلى المدى بين 0 و1، فنقرأ النتيجة احتمالًا: 1 يعني «مزعجة بالتأكيد» و0 يعني «ليست مزعجة بالتأكيد». -حرّك النقطة على المنحنى لتشاهد هذا العصر يحدث مباشرة. أقصى اليسار يلتصق المنحنى بـ0، وأقصى اليمين يلتصق بـ1، وبينهما يتأرجح بسلاسة من واحد إلى الآخر. الدرجة الخام التي تغذّي هذا العصر تُسمّى $z$، وتُبنى من صيغة الوزن مضروبًا في المدخل زائد انحياز نفسها التي يستخدمها الخط المستقيم. يُضاف السيجمويد بعدها فقط لتحويل النتيجة إلى شيء يُقرأ كاحتمال. +حرّك النقطة على المنحنى لتشاهد هذا الضغط بنفسك. في أقصى اليسار يقترب المنحنى من 0، وفي أقصى اليمين يقترب من 1، وبينهما ينتقل بسلاسة من أحدهما إلى الآخر. الدرجة الخام قبل الضغط تُسمّى $z$، ونحسبها كما نحسب الخط المستقيم: الوزن مضروبًا في المدخل، ثم نضيف الانحياز. بعد ذلك تأتي دالة السيجمويد لتحوّل النتيجة إلى رقم نقرؤه احتمالًا. ## Formal @@ -46,24 +46,28 @@ variables: ## Advanced -مع أكثر من سمة إدخال واحدة، تصير $z = w_1x_1 + w_2x_2 + \dots + b$ مستوًى فائقًا. يلائم الانحدار اللوجستي الأوزان بتصغير خسارة تُسمّى الإنتروبيا المتقاطعة بدل مربّع الخطأ، لأن مربّع الخطأ يعاقب الإجابات الخاطئة الواثقة بلطف زائد. أما الإنتروبيا المتقاطعة فتكبر بحدّة كلما اقترب احتمال خاطئ وواثق من 0 أو 1، وهذا هو بالضبط ما يحتاج إليه تدريب أي مصنِّف جيد. +مع أكثر من سمة إدخال واحدة، تصير $z = w_1x_1 + w_2x_2 + \dots + b$ مستوًى فائقًا. يضبط الانحدار اللوجستي الأوزان بتصغير خسارة تُسمّى الإنتروبيا المتقاطعة بدل مربّع الخطأ، لأن مربّع الخطأ لا يعاقب الإجابات الخاطئة الواثقة بما يكفي. أما الإنتروبيا المتقاطعة فتكبر بحدّة كلما اقترب احتمال خاطئ وواثق من 0 أو 1، وهذا هو بالضبط ما يحتاج إليه تدريب أي مصنِّف جيد. ## Derivation 1. احسب الدرجة الخام، مزيجًا مرجَّحًا من المدخل وانحياز، تمامًا كما في الانحدار الخطي. -2. مرّر الدرجة عبر السيجمويد لعصرها إلى احتمال بين 0 و1. +2. مرّر الدرجة عبر السيجمويد لضغطها إلى احتمال بين 0 و1. 3. تنبّأ بالفئة الإيجابية بالضبط عندما يبلغ ذلك الاحتمال عتبة 0.5. ## Real world ### مرشِّحات البريد المزعج + تُصنَّف الرسالة بصيغة مثل هذه. والدرجات فوق العتبة تُوجَّه إلى مجلد البريد المزعج. ### تقييم المخاطر الائتمانية + يقدّر المقرضون احتمال تعثّر طالب القرض ويضعون عتبة موافقة على ذلك الاحتمال. ### فحوصات الفرز الطبية + تتحوّل نتيجة الفحص إلى احتمال إصابة بالمرض، ويقرّر الطبيب العلاج بمجرّد أن يتجاوز ذلك الاحتمال عتبة متّفقًا عليها. ### التنبّؤ بالنقر على الإعلانات + تقدّر أنظمة الإعلانات احتمال نقر الشخص على إعلان معيّن قبل أن تقرّر عرضه. diff --git a/content/lessons/ai/logistic-regression/en.md b/content/lessons/ai/logistic-regression/en.md index eb3ea9fb..369b7247 100644 --- a/content/lessons/ai/logistic-regression/en.md +++ b/content/lessons/ai/logistic-regression/en.md @@ -16,21 +16,21 @@ variables: ## Try it -1. Drag x across its whole range and watch the point ride along the S-shaped curve, always staying between 0 and 1. -2. Raise w toward 5 — the S steepens into almost a sharp step. Lower it toward 0.2 — the curve flattens into a gentle slope. -3. Slide b left and right. The whole curve shifts sideways, moving the point where the output crosses 0.5. +1. Drag x from -6 to 6 and watch the point ride along the S-shaped curve. The f(x) readout climbs from 0.0001 to 0.9999 and never leaves the range between 0 and 1. +2. Put x at 0, then raise w to 5 — the S steepens into almost a sharp step and the slope readout shows 1.25. Lower w to 0.2 — the curve flattens into a gentle slope of 0.05. +3. Set w = 1.5 and b = 3. The whole curve shifts left and now crosses 0.5 at x = -2. Set b = -3 and it crosses 0.5 at x = 2 instead. ## Real-life examples -1. **A steep, confident filter.** With w near its maximum, the curve jumps almost straight from 0 to 1 — the model rarely sits on the fence. -2. **A gentle, cautious filter.** With w near its minimum, the same swing in x barely moves the output — the model stays unsure over a wide range. -3. **A filter biased to flag more mail.** With b pushed up to 3, even mail that scores slightly suspicious on x gets read as spam. +1. **A steep, confident filter.** With w near its maximum, the curve jumps almost straight from 0 to 1 — at x = 1 the output is already 0.9933, so the model rarely sits on the fence. +2. **A gentle, cautious filter.** With w near its minimum, the same swing in x barely moves the output — at x = 1 it is only 0.5744, so the model stays unsure over a wide range. +3. **A filter biased to flag more mail.** With b pushed up to 3, the curve reaches 0.5 already at x = -2 instead of x = 0, so mail with any higher x gets read as spam. ## Test yourself -1. Land exactly on the curve's midpoint, where the model is genuinely unsure. +1. Land exactly on the curve's midpoint, where f(x) reads 0.5 and the model is genuinely unsure. 2. Push w up near 5 and watch the curve steepen into an almost sharp step. -3. Push the raw score past 3, deep into confidently-spam territory. +3. Push the raw score past 3 (f(x) above 0.953), deep into confidently-spam territory. ## Intuition @@ -57,13 +57,17 @@ With more than one input feature, $z = w_1x_1 + w_2x_2 + \dots + b$ becomes a hy ## Real world ### Spam filters + An email is scored by a formula like this one; scores above the threshold get routed to the spam folder. ### Credit risk scoring + Lenders estimate the probability a loan applicant will default and set an approval threshold on that probability. ### Medical screening tests + A test result is turned into a probability of disease, and a doctor acts once that probability crosses an agreed threshold. ### Ad click prediction + Ad systems estimate the probability a person will click a given ad before deciding whether to show it. diff --git a/content/lessons/ai/logistic-regression/lesson.yaml b/content/lessons/ai/logistic-regression/lesson.yaml index e5303c5c..c0ce95ed 100644 --- a/content/lessons/ai/logistic-regression/lesson.yaml +++ b/content/lessons/ai/logistic-regression/lesson.yaml @@ -39,7 +39,7 @@ parameters: min: -6 max: 6 step: 0.05 - value: 0 + value: -2 variables: - z - w diff --git a/content/lessons/ai/loss-landscape/ar.md b/content/lessons/ai/loss-landscape/ar.md index 206b4103..5adfc260 100644 --- a/content/lessons/ai/loss-landscape/ar.md +++ b/content/lessons/ai/loss-landscape/ar.md @@ -2,28 +2,28 @@ title: 'تضاريس الخسارة' summary: >- كل تدريب، من أبسط معادلة إلى أضخم نموذج، نزولٌ في وادٍ من الخطأ بحثًا عن أخفض نقطة. - هنا تمشي النزلة بنفسك في ثلاثة أبعاد. + هنا تنزل الوادي بنفسك في ثلاثة أبعاد. parameters: - x0: x — الوزن الأول قيد الضبط - y0: y — الوزن الثاني قيد الضبط + x0: x — الوزن الأول الذي نضبطه + y0: y — الوزن الثاني الذي نضبطه variables: - - الوزنان قيد التعديل + - الوزنان اللذان نعدّلهما - الخسارة، أي ارتفاع السطح عند (x, y) - التدرّج، اتجاه الصعود عند النقطة الحالية - - معدّل التعلّم، مدى بُعد كل خطوة + - معدّل التعلّم، أي طول كل خطوة --- ## Try it -1. حرّك x0 وy0 حول السطح. شاهد المستوى المماس يميل والسهم يشير إلى أشدّ اتجاه صعودًا من موضعك. -2. سر عكس اتجاه السهم يدويًّا عدة مرات، كل حركة يجب أن تقرّبك من قاع الوعاء. -3. قف بالضبط عند (1, -0.5)، أدنى نقطة. لاحظ السهم يتقلّص إلى شبه صفر، فالتدرّج المسطّح يعني أنك وصلت إلى حدّ أدنى. +1. ابدأ عند x0 = 2.5 وy0 = 2. تُظهر القراءات f(x, y) = 14.75 و∂f/∂x = 3 و∂f/∂y = 10. حرّك x0 وy0 وشاهد المستوى المماس يميل، والسهم يشير إلى أشدّ اتجاهات الصعود من موضعك. +2. سر عكس اتجاه السهم بيدك: الميلان موجبان، فأنقص الوزنين معًا. اضبط x0 = 2 وy0 = 1، فينزل الارتفاع من 14.75 إلى 5.5. كرّر ذلك، وكل حركة تقرّبك من قاع الوعاء. +3. قف بالضبط عند (1, -0.5)، أدنى نقطة. كل القراءات تساوي 0 والسهم يختفي: التدرّج الصفري يعني أنك وصلت إلى حدّ أدنى. ## Real-life examples -1. **بداية بعيدة عن القاع.** ادفع الوزنين إلى 2.5 و2، فيصير السطح مرتفعًا وحادًّا، مثل نموذج أرقامه ما زالت بعيدة عن أي فائدة. -2. **الجلوس عند الحدّ الأدنى بالضبط.** عند الوزنين (1, -0.5) تكون الأرض مستوية في كل اتجاه، ولا شيء يحتاج التدريب إلى إصلاحه هنا. -3. **على المنحدر البعيد.** ضع الوزنين عند -2 و-2، فيرتفع السطح من جديد، لكن على الجانب المقابل من الوعاء لموضع البداية. +1. **بداية بعيدة عن القاع.** ضع الوزنين عند 2.5 و2، فيكون السطح مرتفعًا وشديد الانحدار (الخسارة 14.75)، مثل نموذج أرقامه ما زالت بعيدة عن أي فائدة. +2. **الوقوف عند الحدّ الأدنى بالضبط.** عند الوزنين (1, -0.5) تكون الأرض مستوية في كل اتجاه، ولم يبقَ هنا شيء يصلحه التدريب. +3. **على المنحدر البعيد.** ضع الوزنين عند -2 و-2، فيرتفع السطح من جديد (الخسارة 13.5)، لكن على الجانب المقابل لموضع البداية من الوعاء. ## Test yourself @@ -33,36 +33,40 @@ variables: ## Intuition -تخيّل مقبضين على آلة، كل واحد وزن تستطيع تدويره. تخيّل أن كل إعداد ممكن لهذين المقبضين يقابله ارتفاع على تلّة، مرتفع حيث الآلة مخطئة جدًّا، ومنخفض حيث تعمل جيدًا. دوّر المقبضين فتختار نقطة على تلك التلّة، تُكتب اختصارًا $(x, y)$. وهذا الارتفاع اسمه $L$، أي الخسارة. التدريب هو متسلّق واقف في مكان ما على هذه التلّة، يحاول بلوغ أخفض وادٍ وهو معصوب العينين. كل ما يشعر به هو أيّ اتجاه ينزل من موضعه بالضبط، وهذا بالضبط ما يُظهره السهم على الشاشة. +تخيّل مقبضين على آلة، كل واحد وزن تستطيع تدويره. تخيّل أن كل إعداد ممكن لهذين المقبضين يقابله ارتفاع على تلّة، مرتفع حيث الآلة مخطئة جدًّا، ومنخفض حيث تعمل جيدًا. دوّر المقبضين فتختار نقطة على تلك التلّة، تُكتب اختصارًا $(x, y)$. وهذا الارتفاع اسمه $L$، أي الخسارة. التدريب يشبه شخصًا يمشي على هذه التلّة معصوب العينين، ويحاول بلوغ أخفض وادٍ. كل ما يشعر به هو ميل الأرض تحت قدميه. السهم على الشاشة يُظهر أشدّ اتجاهات الصعود، فالنزول يكون في الاتجاه المعاكس تمامًا. -هذا الاتجاه النازل هو ما يعطيه التدرّج $\nabla L$، وهو يشير دائمًا إلى أعلى، فخطوة التدريب تطرحه. معدّل التعلّم $\eta$ يقرّر طول كل خطوة. إن كان صغيرًا جدًّا فتستغرق الرحلة وقتًا طويلًا، وإن كان كبيرًا جدًّا فقد يقفز المتسلّق فوق الوادي كله وينتهي أعلى على المنحدر المقابل. +هذا السهم هو التدرّج $\nabla L$. يشير دائمًا إلى أعلى، ولذلك تطرحه خطوة التدريب. معدّل التعلّم $\eta$ يقرّر طول كل خطوة. إن كان صغيرًا جدًّا فتستغرق الرحلة وقتًا طويلًا، وإن كان كبيرًا جدًّا فقد يتجاوز الماشي الوادي كله وينتهي في موضع أعلى على المنحدر المقابل. ## Formal في هذا الوعاء، $L(x,y) = (x-1)^2 + 2(y+0.5)^2$ وتدرّجه هو $\nabla L = \left(\frac{\partial L}{\partial x}, \frac{\partial L}{\partial y}\right) = (2(x-1),\ 4(y+0.5))$، متجه يتلاشى بالضبط عند الحدّ الأدنى $(1, -0.5)$. -يكرّر الانحدار التدرّجي التحديث $(x,y) \gets (x,y) - \eta\,\nabla L$. ولأن هذا الوعاء بالذات محدّب، أي له الشكل نفسه في كل اتجاه، فإن هذا التحديث يضمن الوصول إلى القاع مع أي $\eta$ صغير بما يكفي. +يكرّر الانحدار التدرّجي التحديث $(x,y) \gets (x,y) - \eta\,\nabla L$. ولأن هذا الوعاء بالذات محدّب، أي ينحني إلى أعلى في كل اتجاه وله أدنى نقطة واحدة، فإن هذا التحديث يضمن الوصول إلى القاع مع أي $\eta$ صغير بما يكفي. ## Advanced -أسطح الخسارة الحقيقية للنماذج الكبيرة لا تشبه هذا الوعاء المرتّب إطلاقًا. هي تعيش في ملايين أو مليارات الأبعاد، وتمتلئ بهضاب مسطّحة وأخاديد ضيّقة ونقاط سرجية، أي مواضع يكون فيها التدرّج صفرًا دون أن تكون حدًّا أدنى حقيقيًّا في كل اتجاه. تبيّن أن الحدود الدنيا المحلية مشكلة أقل مما توحي به الحدس في الأبعاد العالية جدًّا، لكن الهضاب والأخاديد هي سبب استخدام التدريب الحقيقي لحيل مثل الزخم وأحجام الخطوة التكيّفية بدل التحديث الثابت المعدّل الموضّح هنا. +أسطح الخسارة الحقيقية للنماذج الكبيرة لا تشبه هذا الوعاء المرتّب إطلاقًا. فلها ملايين أو مليارات الأبعاد، وتمتلئ بهضاب مسطّحة وأخاديد ضيّقة ونقاط سرجية، أي مواضع يكون فيها التدرّج صفرًا دون أن تكون حدًّا أدنى حقيقيًّا في كل اتجاه. تبيّن أن الحدود الدنيا المحلية مشكلة أقل مما يوحي به الحدس في الأبعاد العالية جدًّا، لكن الهضاب والأخاديد هي سبب استخدام التدريب الحقيقي لحيل مثل الزخم وأحجام الخطوة التكيّفية بدل التحديث بمعدّل ثابت الموضّح هنا. ## Derivation 1. اكتب ارتفاع السطح كدالة في الوزنين. 2. اشتقّ بالنسبة لكل وزن لتحصل على التدرّج، اتجاه الصعود. -3. اطرح التدرّج، مضروبًا في معدّل التعلّم، لتخطو خطوة واحدة نازلة. +3. اطرح التدرّج، مضروبًا في معدّل التعلّم، لتخطو خطوة واحدة نزولًا. ## Real world ### تدريب الشبكات العصبية -كل طبقة من شبكة عميقة هي مجموعة أوزان تنزل منحدرًا على سطح من هذا النوع بالضبط، فقط بأبعاد أكثر بكثير. + +كل طبقة من شبكة عميقة هي مجموعة أوزان تنزل على سطح من هذا النوع بالضبط، لكن بأبعاد أكثر بكثير. ### التصميم الهندسي -تنزل أدوات تحسين الشكل منحدرًا على سطح من مقاومة الهواء أو تكلفة المواد لتحسين هيكل سيارة أو جناح طائرة. + +تنزل أدوات تحسين الشكل على سطح يمثّل مقاومة الهواء أو تكلفة المواد لتحسين هيكل سيارة أو جناح طائرة. ### تحسين المحافظ المالية -تنزل النماذج المالية منحدرًا على سطح من المخاطرة لإيجاد مزيج استثمارات يحقق عائدًا مستهدفًا. + +تنزل النماذج المالية على سطح يمثّل المخاطرة لإيجاد مزيج استثمارات يحقق عائدًا مستهدفًا. ### التحكّم في الروبوتات -تضبط وحدات تحكّم الروبوتات معلَماتها بنزول منحدر على سطح من خطأ التتبّع بين الحركة المقصودة والفعلية. + +تضبط وحدات تحكّم الروبوتات معلَماتها بالنزول على سطح يمثّل الفرق بين الحركة المطلوبة والحركة الفعلية. diff --git a/content/lessons/ai/loss-landscape/en.md b/content/lessons/ai/loss-landscape/en.md index 9a9a3268..29c195b3 100644 --- a/content/lessons/ai/loss-landscape/en.md +++ b/content/lessons/ai/loss-landscape/en.md @@ -15,15 +15,15 @@ variables: ## Try it -1. Drag x0 and y0 around. Watch the tangent plane tilt and the arrow point in the steepest uphill direction from wherever you stand. -2. Walk opposite the arrow a few times by hand — each move should bring you closer to the bottom of the bowl. -3. Land exactly on (1, -0.5), the lowest point. Notice the arrow shrinks to almost nothing: a flat gradient means you have reached a minimum. +1. Start at x0 = 2.5, y0 = 2. The readouts show f(x, y) = 14.75, ∂f/∂x = 3 and ∂f/∂y = 10. Drag x0 and y0 around and watch the tangent plane tilt and the arrow point in the steepest uphill direction from wherever you stand. +2. Walk opposite the arrow by hand: both slopes are positive, so lower both weights. Set x0 = 2 and y0 = 1 — the height drops from 14.75 to 5.5. Repeat, and each move brings you closer to the bottom of the bowl. +3. Land exactly on (1, -0.5), the lowest point. Every readout shows 0 and the arrow shrinks to nothing: a zero gradient means you have reached a minimum. ## Real-life examples -1. **Starting far from the bottom.** With both weights pushed out to 2.5 and 2, the surface sits high and steep, like a model whose numbers are still far from anything useful. +1. **Starting far from the bottom.** With both weights pushed out to 2.5 and 2, the surface sits high and steep (loss 14.75), like a model whose numbers are still far from anything useful. 2. **Sitting exactly at the minimum.** At weights (1, -0.5) the ground is level in every direction — there is nothing left here for training to fix. -3. **On the far slope.** With weights at -2 and -2, the surface is high again, but on the opposite side of the bowl from where training started. +3. **On the far slope.** With weights at -2 and -2, the surface is high again (loss 13.5), but on the opposite side of the bowl from where training started. ## Test yourself @@ -33,15 +33,15 @@ variables: ## Intuition -Picture two dials on a machine, each one a weight it can turn, and imagine every possible setting of those two dials mapped to a height on a hillside: high where the machine is very wrong, low where it works well. Turn the dials and you choose a point on that hillside, written $(x, y)$ for short. The height there has a name: $L$, the loss. Training is a hiker standing somewhere on this hillside trying to reach the lowest valley, but blindfolded — the only thing they can feel is which way is downhill right where they stand, which is exactly what the arrow on screen shows. +Picture two dials on a machine, each one a weight it can turn, and imagine every possible setting of those two dials mapped to a height on a hillside: high where the machine is very wrong, low where it works well. Turn the dials and you choose a point on that hillside, written $(x, y)$ for short. The height there has a name: $L$, the loss. Training is a hiker standing somewhere on this hillside trying to reach the lowest valley, but blindfolded — the only thing they can feel is how the ground slopes right where they stand. The arrow on screen shows the steepest way up, so downhill is the exact opposite way. -That local downhill direction is what the gradient $\nabla L$ gives, and it always points uphill, so a training step subtracts it. The learning rate $\eta$ decides the size of each stride: too small and the hike takes forever, too large and the hiker can stride straight over the valley and end up higher on the far slope. +That arrow is the gradient $\nabla L$. It always points uphill, so a training step subtracts it. The learning rate $\eta$ decides the size of each stride: too small and the hike takes forever, too large and the hiker can stride straight over the valley and end up higher on the far slope. ## Formal For this bowl, $L(x,y) = (x-1)^2 + 2(y+0.5)^2$ and its gradient is $\nabla L = \left(\frac{\partial L}{\partial x}, \frac{\partial L}{\partial y}\right) = (2(x-1),\ 4(y+0.5))$, a vector that vanishes exactly at the minimum $(1, -0.5)$. -Gradient descent repeats the update $(x,y) \gets (x,y) - \eta\,\nabla L$; because this particular bowl is convex, the same shape in every direction, this update is guaranteed to reach the bottom for any small enough $\eta$. +Gradient descent repeats the update $(x,y) \gets (x,y) - \eta\,\nabla L$; because this particular bowl is convex, curving upward in every direction with a single lowest point, this update is guaranteed to reach the bottom for any small enough $\eta$. ## Advanced @@ -56,13 +56,17 @@ Real loss landscapes for large models are nothing like this tidy bowl: they live ## Real world ### Training neural networks + Every layer of a deep network is a set of weights being walked downhill on exactly this kind of landscape, just with vastly more dimensions. ### Engineering design + Shape optimizers walk downhill on a landscape of drag or material cost to refine a car body or aircraft wing. ### Portfolio optimization + Financial models walk downhill on a landscape of risk to find a mix of investments that fits a target return. ### Robotics control + Robot controllers tune their parameters by walking downhill on a landscape of tracking error between the intended and actual motion. diff --git a/content/lessons/ai/neural-network/ar.md b/content/lessons/ai/neural-network/ar.md index 316150d3..14d689b5 100644 --- a/content/lessons/ai/neural-network/ar.md +++ b/content/lessons/ai/neural-network/ar.md @@ -14,8 +14,8 @@ parameters: v2: v2 — وزن المخرج على الوحدة الخفية الثانية v3: v3 — وزن المخرج على الوحدة الخفية الثالثة b: b — انحياز المخرج - x: x — إحداثي الإدخال الأول - y: y — إحداثي الإدخال الثاني + x: x — الإحداثي الأول للنقطة المُدخَلة + y: y — الإحداثي الثاني للنقطة المُدخَلة variables: - وزنا كل وحدة خفية على المدخلين - وزن كل وحدة خفية في التجميع النهائي @@ -25,54 +25,58 @@ variables: ## Try it -1. أبقِ الأوزان عند قيمها الافتراضية وحرّك x وy عبر الصورة، وانظر أين تنقلب حدود خريطة القرار من لون إلى آخر. -2. غيّر w31 وحدها وشاهد خطّ إحدى الوحدات الخفية الثلاث يدور في خريطة القرار، فكل وحدة خفية تسهم بحافّة منحنية واحدة في الحدّ الكلي. -3. ارفع v1 وv2 وv3 أو اخفضها وشاهد الحواف الثلاث تتجمّع في شكل نهائي مختلف تمامًا. تدريب شبكة حقيقية هو هذا بالضبط، ضبط كل هذه الأرقام تلقائيًّا. +1. أبقِ الأوزان عند قيمها الافتراضية. عند x = 0.5 وy = 0.5 يكون المخرج 0.682 والفئة A. اضبط x = -0.5 وy = -0.5: تعبر النقطة الحدّ في خريطة القرار، فينزل المخرج إلى 0.318 وتصير الفئة B. +2. عُد إلى x = 0.5 وy = 0.5 وغيّر w31 وحدها من -1 إلى 3. تقفز قيمة الوحدة الثالثة h₃ من 0 إلى 0.96، ويرتفع المخرج إلى 0.849، ولا يبقى الحدّ في خريطة القرار خطًّا مستقيمًا واحدًا. فكل وحدة خفية تضيف حافّة منحنية واحدة إلى الحدّ الكلي. +3. أعد w31 إلى -1، ثم اضبط v1 وv2 وv3 كلها على -1. يتبادل لونا الخريطة موضعيهما وينزل المخرج إلى 0.318 والفئة B. تدريب شبكة حقيقية هو هذا بالضبط: ضبط كل هذه الأرقام تلقائيًّا. ## Real-life examples -1. **الشكل الابتدائي.** بكل الأوزان عند قيمها الافتراضية، تميل الوحدات الخفية الثلاث كلها بالاتجاه العام نفسه، فتعطي الحدّ انحناءه الابتدائي. -2. **إعادة تشكيل حافّة واحدة.** خفض w31 وw32 إلى -3 يُرجِح خطّ الوحدة الخفية الثالثة بقوة، فيثني تلك الحافّة وحدها من الحدّ. -3. **قلب القرار.** قلب v1 وv2 وv3 كلها إلى سالبة يعكس أيّ جانب من الحدّ يُعدّ إيجابيًّا. +1. **الشكل الابتدائي.** حين تكون كل الأوزان عند قيمها الافتراضية، تُلغي الوحدتان الخفيتان الثانية والثالثة إحداهما الأخرى، فيبدأ الحدّ خطًّا مائلًا مستقيمًا واحدًا. عند النقطة (0.5, 0.5) يكون المخرج 0.682 والفئة A. +2. **إعادة تشكيل حافّة واحدة.** خفض w31 وw32 إلى -3 يدير خطّ الوحدة الخفية الثالثة بقوة، فيثني تلك الحافّة وحدها من الحدّ. ينزل المخرج عند (0.5, 0.5) إلى 0.442 والفئة B. +3. **قلب القرار.** جعل v1 وv2 وv3 كلها سالبة يبدّل الجانب الذي يُعدّ إيجابيًّا من الحدّ: ينتقل المخرج عند (0.5, 0.5) من 0.682 إلى 0.318. ## Test yourself -1. اقلب أوزان المخرج الثلاثة كلها إلى سالبة واقلب أيّ جانب يُحسب إيجابيًّا. -2. ادفع w31 قرب أقصى قيمة له، +3 أو -3، وشاهد إحدى الحواف الخفية تنقلب بقوة. +1. اجعل أوزان المخرج الثلاثة كلها سالبة، فيتبدّل الجانب الذي يُحسب إيجابيًّا. +2. حرّك w31 إلى قرب أحد طرفيه، 3 أو -3، وشاهد إحدى الحواف تدور بقوة. 3. حرّك النقطة (x, y) إلى زاوية بعيدة من الصورة، بعيدًا تمامًا عن الحدّ. ## Intuition -تخيّل فصل نقاط زرقاء عن نقاط برتقالية متناثرة على هذه الصورة باستخدام مسطرة فقط. خط مستقيم واحد لا يقدر إلا أن يقسمها إلى نصفين بسيطين، فإن كان الحدّ الحقيقي منحنيًا أخطأت المسطرة في بعض النقاط مهما أدرتها. هذه الشبكة فيها ثلاث وحدات خفية بدل مسطرة واحدة، وكل واحدة ترسم قطعها المنفصل الخاص عبر الصورة. كل وحدة خفية تنظر إلى النقطة الحالية، تُكتب $(x,y)$، وتحسب مجموعها المرجَّح الخاص من الإحداثيين، وتثني هذا المجموع بدالة تفعيل. لتلك الدالة المثنية اسم، $\phi$، وتراها تعيد تشكيل الحدّ كلما تغيّرت الأوزان. +تخيّل فصل نقاط زرقاء عن نقاط برتقالية متناثرة على هذه الصورة باستخدام مسطرة فقط. خط مستقيم واحد لا يقدر إلا أن يقسمها إلى نصفين بسيطين، فإن كان الحدّ الحقيقي منحنيًا أخطأت المسطرة في بعض النقاط مهما أدرتها. هذه الشبكة فيها ثلاث وحدات خفية بدل مسطرة واحدة، وكل واحدة ترسم خطّها الخاص عبر الصورة. كل وحدة خفية تأخذ النقطة الحالية، ونكتبها $(x,y)$، وتضرب كل إحداثي في وزنه وتجمع الناتجين، ثم تثني هذا المجموع بدالة تفعيل. اسم دالة الثني هذه $\phi$، وترى أثرها في شكل الحدّ كلما تغيّرت الأوزان. -بعدها تجمع طبقة المخرج الخطوط المنحنية الثلاثة في حدّ واحد. كل خطّ وحدة خفية يُرجَّح برقم يُسمّى $v_i$ قبل جمعها معًا، ورقم أخير، الانحياز $b$، يزيح النتيجة كلها أعلى أو أسفل. ما ينتج يستطيع الانحناء أو التعرّج أو حتى إحاطة منطقة كاملة، أشكال لن تصلها مسطرة واحدة أبدًا. وحدات خفية أكثر تعني ببساطة انحناءات أكثر متاحة للتجميع، وهذا هو السبب الوحيد لإضافة الشبكات طبقات خفية من الأساس. +بعدها تجمع طبقة المخرج الخطوط المنحنية الثلاثة في حدّ واحد. يُضرب خطّ كل وحدة خفية في رقم يُسمّى $v_i$ قبل جمعها معًا، ثم يرفع رقم أخير، هو الانحياز $b$، النتيجة كلها أو يخفضها. الحدّ الناتج يستطيع أن ينحني أو يتعرّج أو حتى يحيط بمنطقة كاملة، وهذه أشكال لا تصنعها مسطرة واحدة أبدًا. وحدات خفية أكثر تعني انحناءات أكثر يمكن جمعها، وهذا هو السبب الوحيد لإضافة الشبكات طبقات خفية من الأساس. ## Formal كل وحدة خفية تحسب $h_i = \phi(w_{i1}x + w_{i2}y)$ لـ$i=1,2,3$، مزيجها الخطّي الخاص من المدخلين ممرَّرًا عبر تفعيل غير خطّي. يجمعها المخرج كـ$\hat y = \sum_{i=1}^{3} v_i h_i + b$، مجموعًا مرجّحًا للتفعيلات الخفية زائد انحياز. -هذه شبكة ثنائية الطبقة، طبقة خفية واحدة من ثلاث وحدات، ووحدة مخرج واحدة. كل وزن، اثنا عشر رقمًا في المجموع هنا، مقبض يعيد تشكيل حدّ القرار النهائي. إجراء تدريب حقيقي يضبط كل واحد منها بالانحدار التدرّجي على خسارة، تمامًا كما في الدروس السابقة، فقط بأرقام أكثر تُضبط في آن واحد. +هذه شبكة من طبقتين: طبقة خفية واحدة فيها ثلاث وحدات، ووحدة مخرج واحدة. كل وزن، وهي عشرة أرقام هنا مع الانحياز، مقبض يعيد تشكيل حدّ القرار النهائي. إجراء تدريب حقيقي يضبط كل واحد منها بالانحدار التدرّجي على خسارة، تمامًا كما في الدروس السابقة، لكن بأرقام أكثر تُضبط في آن واحد. ## Advanced -مع وحدات خفية كافية، تستطيع شبكة كهذه تقريب أي حدّ قرار متصل عمليًّا بدقّة عشوائية، نتيجة تُعرف بمبرهنة التقريب الشامل. لكن المبرهنة لا تقول شيئًا عن عدد الوحدات اللازم، ولا عمّا إذا كان الانحدار التدرّجي سيجد أوزانًا جيدة فعلًا. الشبكات الحقيقية تكدّس طبقات خفية كثيرة بدل توسيع طبقة واحدة، لأن العمق يصل إلى حلول مفيدة وقابلة للتدريب بكفاءة أكبر بكثير من الاتساع وحده. +مع وحدات خفية كافية، تستطيع شبكة كهذه تقريب أي حدّ قرار متصل تقريبًا بأي دقّة نريدها، وهذه نتيجة تُعرف بمبرهنة التقريب الشامل. لكن المبرهنة لا تقول شيئًا عن عدد الوحدات اللازم، ولا عمّا إذا كان الانحدار التدرّجي سيجد أوزانًا جيدة فعلًا. الشبكات الحقيقية تكدّس طبقات خفية كثيرة بدل توسيع طبقة واحدة، لأن العمق يصل إلى حلول مفيدة وقابلة للتدريب بكفاءة أكبر بكثير من الاتساع وحده. ## Derivation -1. كل وحدة خفية تحسب مجموعها المرجَّح الخاص من المدخلين. +1. كل وحدة خفية تحسب مجموعًا مرجَّحًا خاصًّا بها من المدخلين. 2. تثني دالة التفعيل هذا المجموع لتصبح مخرج الوحدة الخفية. 3. تجمع طبقة المخرج المخرجات الخفية الثلاثة كلها في مجموع مرجَّح واحد زائد انحياز. ## Real world ### التعرّف على الصور + الطبقات المبكّرة في شبكة رؤية تعمل مثل هذه الوحدات الخفية، كل واحدة تكشف نمطًا بسيطًا مثل حافّة أو زاوية. ### المساعدون الصوتيون + تكدّس شبكات التعرّف على الكلام طبقات كثيرة كهذه لتحوّل موجة صوت إلى كلمات معروفة. ### مساعدو الدردشة -الشبكات خلف مساعدي الدردشة هي الفكرة نفسها مكبَّرة إلى مليارات الأوزان عبر طبقات مكدَّسة كثيرة. + +الشبكات خلف مساعدي الدردشة هي الفكرة نفسها مكبَّرة إلى مليارات الأوزان في طبقات كثيرة بعضها فوق بعض. ### كشف الاحتيال + تجمع البنوك إشارات مرجَّحة كثيرة عن معاملة ما عبر شبكة كهذه لرصد احتيال محتمل. diff --git a/content/lessons/ai/neural-network/en.md b/content/lessons/ai/neural-network/en.md index 0308096f..4e062ce2 100644 --- a/content/lessons/ai/neural-network/en.md +++ b/content/lessons/ai/neural-network/en.md @@ -25,15 +25,15 @@ variables: ## Try it -1. Leave the weights at their defaults and drag x and y across the picture. Watch the decision map's boundary and notice where the output flips from one colour to the other. -2. Change w31 alone and watch one of the three hidden units' lines rotate in the decision map — each hidden unit contributes one bent edge to the overall boundary. -3. Push v1, v2 and v3 up or down and watch the three edges combine into a different final shape entirely. Training a real network is exactly this: automatically tuning all these numbers. +1. Leave the weights at their defaults. At x = 0.5, y = 0.5 the output reads 0.682, class A. Set x = -0.5 and y = -0.5: the point crosses the boundary in the decision map, the output drops to 0.318 and the class flips to B. +2. Go back to x = 0.5, y = 0.5 and change w31 alone, from -1 to 3. The third hidden value h₃ jumps from 0 to 0.96, the output rises to 0.849, and the boundary in the decision map is no longer one straight line — each hidden unit contributes one bent edge to the overall boundary. +3. Put w31 back at -1, then set v1, v2 and v3 all to -1. The two colours of the map swap sides and the output falls to 0.318, class B. Training a real network is exactly this: automatically tuning all these numbers. ## Real-life examples -1. **Starting shape.** With every weight at its default, the three hidden units all lean the same general way, giving the boundary its starting curve. -2. **Reshaping one edge.** Pushing w31 and w32 down to -3 swings the third hidden unit's line hard, bending just that one edge of the boundary. -3. **Inverting the decision.** Flipping v1, v2 and v3 all negative flips which side of the boundary counts as the positive class. +1. **Starting shape.** With every weight at its default, the second and third hidden units cancel each other out, so the boundary starts as one straight diagonal line. At the point (0.5, 0.5) the output is 0.682, class A. +2. **Reshaping one edge.** Pushing w31 and w32 down to -3 swings the third hidden unit's line hard, bending just that one edge of the boundary. The output at (0.5, 0.5) drops to 0.442, class B. +3. **Inverting the decision.** Flipping v1, v2 and v3 all negative flips which side of the boundary counts as the positive class: the output at (0.5, 0.5) goes from 0.682 to 0.318. ## Test yourself @@ -51,7 +51,7 @@ The output layer then combines the three bent lines into one boundary. Each hidd Each hidden unit computes $h_i = \phi(w_{i1}x + w_{i2}y)$ for $i=1,2,3$, its own linear combination of the two inputs passed through a non-linear activation. The output combines them as $\hat y = \sum_{i=1}^{3} v_i h_i + b$, a weighted sum of the hidden activations plus a bias. -This is a two-layer network: one hidden layer of three units, one output unit. Every weight, twelve numbers in total here, is a knob that reshapes the final decision boundary; a real training procedure adjusts every one of them by gradient descent on a loss, exactly as in the earlier lessons, just with more numbers to adjust at once. +This is a two-layer network: one hidden layer of three units, one output unit. Every weight, ten numbers in total here counting the bias, is a knob that reshapes the final decision boundary; a real training procedure adjusts every one of them by gradient descent on a loss, exactly as in the earlier lessons, just with more numbers to adjust at once. ## Advanced @@ -66,13 +66,17 @@ With enough hidden units, a network like this one can approximate essentially an ## Real world ### Image recognition + Early layers in a vision network act like these hidden units, each detecting one simple pattern like an edge or a corner. ### Voice assistants + Speech recognition networks stack many such layers to turn a sound wave into recognized words. ### Chat assistants + The networks behind chat assistants are the same idea scaled up to billions of weights across many stacked layers. ### Fraud detection + Banks combine many weighted signals about a transaction through a network like this one to flag likely fraud. diff --git a/content/lessons/ai/next-word-prediction/ar.md b/content/lessons/ai/next-word-prediction/ar.md index 6efcd4b1..83347408 100644 --- a/content/lessons/ai/next-word-prediction/ar.md +++ b/content/lessons/ai/next-word-prediction/ar.md @@ -14,54 +14,58 @@ variables: ## Try it -1. اضغط الكلمة المظلَّلة الحالية وانظر إلى الأعمدة. كل عمود يمثّل احتمال النموذج لما يأتي بعدها، معتمدًا فقط على النصّ القصير المعروض. -2. اضغط أحد الأعمدة لتختار تلك الكلمة فعلًا وتمدّ الجملة، ثم انظر إلى الأعمدة الجديدة لما يأتي بعدها. -3. ارفع temp واضغط من جديد، فتتسطّح الأعمدة وتُختار الكلمات الأقل احتمالًا أكثر. اخفض temp فيهيمن العمود الأطول تقريبًا في كل مرة. +1. انظر إلى الكلمة الحالية الملوَّنة، «جلس»، وإلى الأعمدة تحتها. كل عمود يمثّل احتمال الكلمة التي تأتي بعدها، اعتمادًا على النصّ القصير المعروض فقط. عند الحرارة 1 تقرأ: القط 67 %، الكلب 33 %، لأن «القط» جاءت بعد «جلس» مرتين من 3. +2. اضغط عمود «القط» لتختار هذه الكلمة فعلًا وتطول الجملة، ثم انظر إلى الأعمدة الجديدة لما يأتي بعدها: أربع كلمات، لكل منها 25 %، لأن كلًّا منها جاءت بعد «القط» مرة واحدة. +3. اضغط «ابدأ من جديد» وارفع temp إلى 3، فتتقارب الأعمدة: القط 56 %، الكلب 44 %، ويقع زر «اختر الكلمة التالية» على الكلمة الأقل احتمالًا مرات أكثر. اخفض temp إلى 0.1 فيغلب العمود الأطول: القط 100 %. ## Real-life examples -1. **متوازن.** عند الحرارة الافتراضية 1، يمزج النموذج كلمات مرجَّحة مع مفاجأة بين حين وآخر. -2. **مكرَّر ومتوقَّع.** بحرارة مخفوضة قرب 0.2، يختار النموذج الكلمة الأكثر أمانًا نفسها تقريبًا في كل مرة. -3. **جامح وعشوائي.** بحرارة مرفوعة قرب 2.5، تبدأ كلمات غريبة بعيدة الاحتمال بالظهور. +1. **متوازن.** عند الحرارة الافتراضية 1، تتبع الاحتمالات الأعداد كما هي: بعد «جلس»، القط 67 % والكلب 33 %. يختار النموذج الكلمات الأرجح غالبًا، ويفاجئنا بين حين وآخر. +2. **مكرَّر ومتوقَّع.** بحرارة منخفضة قرب 0.2، يختار النموذج الكلمة الأضمن نفسها تقريبًا في كل مرة: بعد «جلس» يقفز القط إلى 97 %. +3. **جامح وعشوائي.** بحرارة مرتفعة قرب 2.5، تبدأ الكلمات الأقل احتمالًا بالظهور: بعد «جلس» يرتفع الكلب من 33 % إلى 43 %. ## Test yourself -1. اخفض الحرارة قرب أدنى قيمة لها وتنقّل عبر عدة كلمات، ولاحظها تختار المسار الآمن نفسه دائمًا. -2. ارفع الحرارة قرب أعلى قيمة لها وتنقّل عبر عدة كلمات، ولاحظ كلمات غريبة بعيدة الاحتمال تبدأ بالظهور. +1. اخفض الحرارة قرب أدنى قيمة لها واختر عدة كلمات متتالية، ولاحظ أن النموذج يسلك الطريق الأضمن نفسه دائمًا. +2. ارفع الحرارة قرب أعلى قيمة لها واختر عدة كلمات متتالية، ولاحظ أن الكلمات الأقل احتمالًا تبدأ بالظهور. 3. اضبط الحرارة على 1.5 بالضبط، في منتصف الطريق بين التوازن والجموح. ## Intuition -النصّ المعروض هو كل عالم النموذج، كل كلمة «قرأها» على الإطلاق. لكل كلمة في ذلك النصّ، عدّ أي كلمة تميل إلى اتّباعها، وكم مرة، ثم حوّل هذه الأعداد إلى احتمالات. التنبّؤ بالكلمة التالية هو الاختيار من قائمة الاحتمالات تلك فقط، غالبًا الخيار الأرجح، وأحيانًا خيار أقل احتمالًا إن سمحت الحرارة بذلك. +النصّ المعروض هو كل ما يعرفه النموذج، فهو لم «يقرأ» كلمة غيره. لكل كلمة في ذلك النصّ، عدّ النموذج الكلمات التي جاءت بعدها وكم مرة جاءت كل منها، ثم حوّل هذه الأعداد إلى احتمالات. التنبّؤ بالكلمة التالية ليس إلا اختيارًا من قائمة الاحتمالات تلك: الخيار الأرجح غالبًا، وأحيانًا خيار أقل احتمالًا إن سمحت الحرارة بذلك. -نموذج بُني هكذا، ينظر خطوة واحدة فقط إلى الوراء، هو لعبة بسيطة مقارنة بما تستخدمه مساعدات الدردشة الحقيقية، لكن الحلقة الأساسية فيه مطابقة لها. انظر إلى ما سبق، ثم أنتج احتمالًا لكل كلمة تالية ممكنة، ثم اختر واحدة، وكرّر لتبني جملة كاملة كلمة بعد كلمة. النماذج الحقيقية تنظر إلى المحادثة كلها بدل كلمة واحدة وتستخدم الانتباه لتقرّر أيّ سياق سابق مهمّ فعلًا، لكنها تنهي كل خطوة بأخذ عيّنة كلمة تالية من قائمة احتمالات تمامًا كالأعمدة هنا. +نموذج كهذا، لا ينظر إلا إلى كلمة واحدة قبله، لعبة بسيطة مقارنة بما تستخدمه مساعدات المحادثة الحقيقية، لكن الخطوات الأساسية هي نفسها. انظر إلى ما سبق، ثم أنتج احتمالًا لكل كلمة تالية ممكنة، ثم اختر واحدة، وكرّر لتبني جملة كاملة كلمة بعد كلمة. النماذج الحقيقية تنظر إلى المحادثة كلها بدل كلمة واحدة وتستخدم الانتباه لتقرّر أيّ سياق سابق مهمّ فعلًا، لكنها تنهي كل خطوة باختيار كلمة تالية من قائمة احتمالات، تمامًا كالأعمدة هنا. ## Formal -احتمال أن تتبع الكلمة $w$ الكلمة الحالية $w_t$ هو $p(w \mid w_t) = \dfrac{\exp(c(w_t,w)/T)}{\sum_{w'} \exp(c(w_t,w')/T)}$، حيث $c(w_t,w)$ يعدّ كم مرة تبعت $w$ الكلمة $w_t$ في النصّ، و$T$ الحرارة. +احتمال أن تتبع الكلمة $w$ الكلمة الحالية $w_t$ هو $p(w \mid w_t) = \dfrac{c(w_t,w)^{1/T}}{\sum_{w'} c(w_t,w')^{1/T}}$، حيث $c(w_t,w)$ يعدّ كم مرة تبعت $w$ الكلمة $w_t$ في النصّ، و$T$ الحرارة. عند $T = 1$ يساوي هذا عدد المرات مقسومًا على المجموع. -يكرّر التوليد $w_{t+1} \sim p(w \mid w_t)$. خذ عيّنة كلمة من قائمة الاحتمالات تلك، ألحقها، ثم عاملها بوصفها $w_t$ الجديدة وكرّر. هذا بالضبط كيف تتحوّل الأعمدة في الصورة إلى جملة تنمو كلما ضغطت. +يكرّر التوليد $w_{t+1} \sim p(w \mid w_t)$. اختر كلمة من قائمة الاحتمالات تلك، وأضفها إلى الجملة، ثم اجعلها $w_t$ الجديدة وكرّر. هكذا بالضبط تتحوّل الأعمدة في الصورة إلى جملة تطول كلما ضغطت. ## Advanced -هذا نموذج ثنائي الكلمات (bigram) لا يشترط إلا على كلمة سابقة واحدة، فلا يستطيع التقاط أكثر من اقتران قصير المدى بين الكلمات. أما النماذج اللغوية الحقيقية فتشترط على آلاف الكلمات السابقة معًا عبر آلية الانتباه، وتُدرَّب لا بعدّ بسيط بل بضبط مليارات الأوزان لجعل احتمالات النموذج المتنبَّأ بها تطابق نصًّا حقيقيًّا بأقرب ما يمكن عبر تريليونات كلمات التدريب. العدّ الموضَّح هنا يخدم الهدف نفسه، بأبسط طريقة ممكنة. +هذا نموذج ثنائي الكلمات (bigram) لا يعتمد إلا على كلمة سابقة واحدة، فلا يلتقط إلا العلاقة بين كلمتين متجاورتين. أما النماذج اللغوية الحقيقية فتعتمد على آلاف الكلمات السابقة معًا عبر آلية الانتباه، وتُدرَّب لا بعدّ بسيط بل بضبط مليارات الأوزان لجعل احتمالات النموذج المتنبَّأ بها تطابق نصًّا حقيقيًّا بأقرب ما يمكن عبر تريليونات كلمات التدريب. العدّ الموضَّح هنا يخدم الهدف نفسه، بأبسط طريقة ممكنة. ## Derivation 1. عُدّ كم مرة تتبع كل كلمة $w$ الكلمة الحالية $w_t$ عبر النصّ المعروض. -2. حوّل هذه الأعداد إلى توزيع احتمالي على كل كلمة تالية ممكنة، مستخدمًا الحرارة لتليينه أو تحديده. -3. خذ عيّنة الكلمة التالية من ذلك التوزيع، ثم كرّر مستخدمًا إياها كلمةً حالية جديدة. +2. حوّل هذه الأعداد إلى توزيع احتمالي على كل كلمة تالية ممكنة، مستخدمًا الحرارة لتقريب الاحتمالات من بعضها أو إبعادها. +3. اختر الكلمة التالية عشوائيًّا من ذلك التوزيع، ثم كرّر بعد أن تجعلها الكلمة الحالية الجديدة. ## Real world ### لوحات المفاتيح التنبّؤية + تقترح لوحات مفاتيح الهاتف الكلمة التالية بإحصاء من هذا النوع بالضبط، متعلَّم من نصوص كُتبت من قبل. ### مساعدو الدردشة -كل كلمة ينتجها مساعد دردشة تُؤخذ عيّنتها واحدة تلو الأخرى من توزيع احتمالي على الكلمة التالية، فقط على نطاق أوسع بكثير. + +كل كلمة يكتبها مساعد المحادثة تُختار، واحدة بعد أخرى، من توزيع احتمالي على الكلمة التالية، لكن على نطاق أوسع بكثير. ### إكمال الشيفرة تلقائيًّا + تقترح محرّرات الشيفرة الرمز التالي في شيفرتك بنموذج لغوي مدرَّب بالطريقة نفسها، لكن على شيفرة بدل نثر. ### الإكمال الذكي للبريد + تقترح برامج البريد كيفية إنهاء جملتك بالتنبّؤ بالكلمات التالية الأرجح أثناء كتابتك. diff --git a/content/lessons/ai/next-word-prediction/en.md b/content/lessons/ai/next-word-prediction/en.md index 4ffdfa90..0313955f 100644 --- a/content/lessons/ai/next-word-prediction/en.md +++ b/content/lessons/ai/next-word-prediction/en.md @@ -14,15 +14,15 @@ variables: ## Try it -1. Tap the current highlighted word and look at the bars: each one is the model's probability for what comes next, based only on the short text shown. -2. Tap one of the bars to actually pick that word and extend the sentence, then look at the new bars for what comes after it. -3. Raise temp and tap again — the bars flatten and less likely words get picked more often; lower temp and the tallest bar dominates almost every time. +1. Look at the highlighted current word, «the», and the bars under it: each one is the model's probability for what comes next, based only on the short text shown. At temperature 1 they read cat 40 %, dog 30 %, mat 20 %, log 10 % — «cat» followed «the» 4 times out of 10. +2. Tap the «cat» bar to actually pick that word and extend the sentence, then look at the new bars for what comes after it: four words, 25 % each, because each followed «cat» once. +3. Press «start over» and raise temp to 3 — the bars flatten to cat 30 %, log 19 %, so the «pick next word» button lands on less likely words more often. Lower temp to 0.1 and the tallest bar dominates: cat 95 %. ## Real-life examples -1. **Balanced.** At the default temperature of 1, the model mixes likely words with the occasional surprise. -2. **Repetitive and predictable.** With temperature pushed down near 0.2, the model keeps choosing the same safest word almost every time. -3. **Wild and random.** With temperature pushed up near 2.5, odd, barely-likely words start getting picked. +1. **Balanced.** At the default temperature of 1, the probabilities simply follow the counts: after «the», cat 40 %, dog 30 %, mat 20 %, log 10 %. The model mixes likely words with the occasional surprise. +2. **Repetitive and predictable.** With temperature pushed down near 0.2, the model keeps choosing the same safest word almost every time: after «the», cat jumps to 79 %. +3. **Wild and random.** With temperature pushed up near 2.5, odd, barely-likely words start getting picked: after «the», log climbs from 10 % to 18 %. ## Test yourself @@ -38,7 +38,7 @@ A model built this way, looking back only one word, is a toy compared to what re ## Formal -The probability of word $w$ following the current word $w_t$ is $p(w \mid w_t) = \dfrac{\exp(c(w_t,w)/T)}{\sum_{w'} \exp(c(w_t,w')/T)}$, where $c(w_t,w)$ counts how often $w$ followed $w_t$ in the text and $T$ is the temperature. +The probability of word $w$ following the current word $w_t$ is $p(w \mid w_t) = \dfrac{c(w_t,w)^{1/T}}{\sum_{w'} c(w_t,w')^{1/T}}$, where $c(w_t,w)$ counts how often $w$ followed $w_t$ in the text and $T$ is the temperature. At $T = 1$ this is just each count divided by the total. Generation repeats $w_{t+1} \sim p(w \mid w_t)$: sample a word from that probability list, append it, then treat it as the new $w_t$ and repeat. This is exactly how the bars in the picture turn into a growing sentence as you keep tapping. @@ -55,13 +55,17 @@ This bigram model only ever conditions on one previous word, so it cannot captur ## Real world ### Predictive text keyboards + Phone keyboards suggest the next word by exactly this kind of statistics learned from typed text. ### Chat assistants + Every word a chat assistant produces is sampled one at a time from a probability distribution over the next word, just at a vastly larger scale. ### Code autocomplete + Code editors suggest the next token in your code using a language model trained the same way, but on code instead of prose. ### Email smart compose + Email clients suggest how to finish your sentence by predicting the most likely next words as you type. diff --git a/content/lessons/ai/next-word-prediction/lesson.yaml b/content/lessons/ai/next-word-prediction/lesson.yaml index f8f0fca7..9d84129c 100644 --- a/content/lessons/ai/next-word-prediction/lesson.yaml +++ b/content/lessons/ai/next-word-prediction/lesson.yaml @@ -1,7 +1,7 @@ id: next-word-prediction subject: ai difficulty: beginner -equation: p(w \mid w_t) = \dfrac{\exp(c(w_t,w)/T)}{\sum_{w'} \exp(c(w_t,w')/T)} +equation: p(w \mid w_t) = \dfrac{c(w_t,w)^{1/T}}{\sum_{w'} c(w_t,w')^{1/T}} concepts: - language-model - bigram @@ -29,7 +29,7 @@ variables: - p(w \mid w_t) derivation: - c(w_t, w) - - p(w \mid w_t) = \dfrac{\exp(c(w_t,w)/T)}{\sum_{w'} \exp(c(w_t,w')/T)} + - p(w \mid w_t) = \dfrac{c(w_t,w)^{1/T}}{\sum_{w'} c(w_t,w')^{1/T}} - w_{t+1} \sim p(w \mid w_t) charts: [] primary: temp diff --git a/content/lessons/ai/overfitting/ar.md b/content/lessons/ai/overfitting/ar.md index 31a49c51..af0bad5b 100644 --- a/content/lessons/ai/overfitting/ar.md +++ b/content/lessons/ai/overfitting/ar.md @@ -4,7 +4,7 @@ summary: >- طالب حفظ أجوبة امتحان العام الماضي ينجح فيه ويرسب في كل امتحان جديد. النموذج يقع في الفخ نفسه، وهنا تراه يقع فيه. parameters: - degree: الدرجة — عدد الانحناءات المسموح بها للمنحنى الملائم + degree: الدرجة — عدد الانحناءات المسموح بها للمنحنى noise: التشويش — مدى تشتّت نقاط البيانات variables: - الدرجة، عدد الانحناءات المسموح بها للمنحنى @@ -15,33 +15,33 @@ variables: ## Try it -1. اضبط الدرجة على 1 والتشويش قرابة 0.5. المنحنى بسيط جدًّا فلا يتبع تعرّجات البيانات، فتبقى القراءتان، خطأ التدريب وخطأ النقاط الجديدة، مرتفعتين كلتاهما. -2. ارفع الدرجة إلى 10 أو 12. يتعرّج المنحنى الآن عبر كل نقطة تدريب تقريبًا، ويكاد خطأ التدريب يختفي. لكن راقب خطأ النقاط الجديدة، فهو غالبًا يزداد سوءًا لا تحسّنًا. -3. جرّب الدرجة 3 وقارن القراءتين. خطأ التدريب أعلى قليلًا مما هو عند الدرجة 12، لكن خطأ النقاط الجديدة عادة أقلّ الثلاثة جميعًا. +1. اضبط الدرجة على 1 والتشويش على 0.5. المنحنى أبسط من أن يتبع تعرّجات البيانات، فتبقى القراءتان مرتفعتين: خطأ التدريب 1.66 وخطأ النقاط الجديدة 1.723. النموذج هنا أبسط من اللازم. +2. ارفع الدرجة إلى 12. يتعرّج المنحنى الآن ليمرّ بكل نقطة تدريب تقريبًا، ويكاد خطأ التدريب يختفي عند 0.001. لكن راقب خطأ النقاط الجديدة: يقفز إلى 1297.219. +3. جرّب الدرجة 3 وقارن القراءتين. خطأ التدريب 1.028، وهو أعلى مما كان عند الدرجة 12، لكن خطأ النقاط الجديدة 1.931 فقط بدل 1297.219. ## Real-life examples -1. **بسيط جدًّا فلا ينحني.** عند الدرجة 1 لا يُسمح إلا بخط مستقيم، فلا يتبع أي تعرّج في البيانات مهما ضبطت الوزن الوحيد المتاح. -2. **منحنٍ بما يكفي للحفظ.** عند الدرجة 12 يملك المنحنى انحناءات كافية ليلتفّ بالضبط عبر كل نقطة تدريب. -3. **توازن معقول.** عند الدرجة 3 ينحني المنحنى بما يكفي ليتبع الاتجاه العام دون ملاحقة كل تعرّج تشويش صغير. +1. **بسيط جدًّا فلا ينحني.** عند الدرجة 1 لا يُسمح إلا بخط مستقيم، فلا يتبع أي تعرّج في البيانات مهما ضبطت وزنيه الاثنين. +2. **مرن إلى حدّ الحفظ.** عند الدرجة 12 يملك المنحنى انحناءات كافية ليمرّ بكل نقطة تدريب تقريبًا. +3. **توازن معقول.** عند الدرجة 3 ينحني المنحنى بما يكفي ليتبع الاتجاه العام دون أن يلاحق كل تعرّج صغير سببه التشويش. ## Test yourself -1. اضبط الدرجة على 1 أو أقل وشاهد القصور الواضح في الملاءمة. -2. ارفع الدرجة إلى 10 أو أكثر وشاهد الإفراط الواضح في الملاءمة. -3. اجمع بين تشويش شديد، فوق 0.7، ودرجة عالية، 10 أو أكثر، وشاهد خطأ النقاط الجديدة يقفز. +1. اضبط الدرجة على 1 أو أقل وشاهد نموذجًا أبسط من اللازم. +2. ارفع الدرجة إلى 10 أو أكثر وشاهد نموذجًا حفظ النقاط عن ظهر قلب. +3. اجمع بين تشويش شديد، فوق 0.7، ودرجة عالية، 10 أو أكثر، وشاهد خطأ النقاط الجديدة يقفز إلى المئات أو الآلاف. ## Intuition -اثنتا عشرة نقطة متناثرة على هذه الشاشة، ومنحنى يُرسم بينها. عند الدرجة 1 يكون المنحنى خطًّا مستقيمًا، لا يستطيع إلا أن يميل وينزاح، بلا أي طريقة ليتبع تعرّجًا بين النقاط. ارفع الدرجة نحو 12 فيكسب المنحنى انحناءات إضافية، انحناءً مع كل خطوة، حتى يملك ما يكفي منها ليلتفّ عبر النقاط الاثنتي عشرة كلّها بالضبط، مهما شتّتها التشويش. +اثنتا عشرة نقطة متناثرة على هذه الشاشة، ومنحنى يُرسم بينها. عند الدرجة 1 يكون المنحنى خطًّا مستقيمًا، لا يستطيع إلا أن يميل ويرتفع أو ينخفض، ولا يقدر على اتّباع أي تعرّج بين النقاط. ارفع الدرجة نحو 12 فيكسب المنحنى انحناءة إضافية مع كل خطوة، حتى يملك ما يكفي منها ليمرّ بالنقاط الاثنتي عشرة كلّها تقريبًا، مهما بعثرها التشويش. -ذلك المنحنى الذي يبدو مثاليًّا عند الدرجة 12 لم يتعلّم شيئًا عن النمط الحقيقي. هو فقط يرسم تشتّت هذه النقاط بعينها، بما في ذلك تشويشها. نختبر نموذجًا كهذا بالطريقة الصادقة، على نقاط لم يرها من قبل. قراءتان تحت الرسم تتابعان هذا، خطأ التدريب المقاس على النقاط المستخدمة لرسم المنحنى، وخطأ النقاط الجديدة المقاس على نقاط لم يرها من قبل. ارفع الدرجة كثيرًا فيعود خطأ النقاط الجديدة للارتفاع رغم أن خطأ التدريب لا يزال يهبط. اخفضها كثيرًا فيبقى الاثنان مرتفعين لأن الخط لم يكن مرنًا بما يكفي من الأساس. +ذلك المنحنى الذي يبدو مثاليًّا عند الدرجة 12 لم يتعلّم شيئًا عن النمط الحقيقي. هو فقط يتبع مواضع هذه النقاط بعينها، ومعها تشويشها. والاختبار العادل لنموذج كهذا يكون على نقاط لم يرها من قبل. قراءتان تحت الرسم تتابعان هذا: خطأ التدريب المقاس على النقاط المستخدمة لرسم المنحنى، وخطأ النقاط الجديدة المقاس على نقاط لم يرها من قبل. ارفع الدرجة كثيرًا فيعود خطأ النقاط الجديدة للارتفاع رغم أن خطأ التدريب لا يزال يهبط. اخفضها كثيرًا فيبقى الاثنان مرتفعين لأن الخط لم يكن مرنًا بما يكفي من الأساس. ## Formal -المنحنى الملائم $\hat y = \sum_{j=0}^{d} w_j x^j$ له $d+1$ وزن قابل للتعديل $w_j$. درجة $d$ أعلى تعني قدرة أكبر على الانحناء وملاءمة أي شيء، حتى التشويش. خطأ التدريب $L_{tr}$ يُحسب على النقاط نفسها المستخدمة لاختيار الأوزان، فلا يمكنه إلا أن يهبط أو يبقى ثابتًا مع زيادة القدرة. +المنحنى $\hat y = \sum_{j=0}^{d} w_j x^j$ له $d+1$ وزن قابل للتعديل $w_j$. درجة $d$ أعلى تعني قدرة أكبر على الانحناء ومطابقة أي شيء، حتى التشويش. خطأ التدريب $L_{tr}$ يُحسب على النقاط نفسها المستخدمة لاختيار الأوزان، فلا يمكنه إلا أن يهبط أو يبقى ثابتًا مع زيادة القدرة. -الخطأ على البيانات الجديدة $L_{new}$، وهي نقاط استُبعدت ولم تُستخدم قط في الملاءمة، تحكي قصة مختلفة. يهبط مع التقاط النموذج بنية حقيقية، ثم يعود فيرتفع بمجرد أن تبدأ القدرة الزائدة بملاءمة التشويش بدلًا من ذلك. لهذا يفحص التدريب العملي دائمًا مجموعة تحقّق منفصلة، نقاط جُنِّبت خصّيصًا لرصد الإفراط في الملاءمة قبل وقوعه على بيانات مهمّة. +الخطأ على البيانات الجديدة $L_{new}$، وهي نقاط وُضعت جانبًا ولم تُستخدم قط في ضبط الأوزان، يتصرّف بطريقة مختلفة. يهبط ما دام النموذج يلتقط النمط الحقيقي، ثم يعود فيرتفع حين تبدأ القدرة الزائدة بمطابقة التشويش. لهذا يفحص التدريب العملي دائمًا مجموعة تحقّق منفصلة، وهي نقاط تُترك جانبًا خصّيصًا لكشف الحفظ قبل أن يقع على بيانات مهمّة. ## Advanced @@ -49,20 +49,24 @@ variables: ## Derivation -1. للمنحنى الملائم وزن قابل للتعديل واحد لكل قوة من قوى x، حتى الدرجة d. -2. يستخدم خطأ التدريب صيغة مربّع الخطأ نفسها، محسوبةً على النقاط المستخدَمة لملاءمة الأوزان. -3. يستخدم خطأ البيانات الجديدة الصيغة نفسها بالضبط، لكن محسوبةً فقط على نقاط استُبعدت من الملاءمة. +1. للمنحنى وزن واحد قابل للتعديل لكل قوة من قوى x، حتى الدرجة d. +2. يستخدم خطأ التدريب صيغة مربّع الخطأ نفسها، محسوبةً على النقاط المستخدَمة لضبط الأوزان. +3. يستخدم خطأ البيانات الجديدة الصيغة نفسها بالضبط، لكن محسوبةً فقط على نقاط لم تُستخدم في ضبط الأوزان. ## Real world ### التشخيص الطبي + النموذج الذي يحفظ خصائص مرضى تدريبه بدل إشارة المرض الحقيقية قد يفشل فشلًا ذريعًا مع المريض التالي. ### التنبّؤ المالي وأسعار الأسهم -النماذج المفرطة في ملاءمة تشويش الأسعار التاريخية غالبًا ما تؤدّي أسوأ من اتجاه بسيط عندما تصل أيام سوق جديدة حقيقية. + +النماذج التي حفظت تقلّبات الأسعار القديمة تعطي غالبًا نتائج أسوأ من خط اتجاه بسيط حين تأتي أيام سوق جديدة. ### مرشِّحات البريد المزعج -المرشِّح المفرط في ملاءمة صياغة البريد المزعج القديمة بالضبط يفوّت بريدًا مزعجًا جديدًا بصياغة مختلفة قليلًا. + +المرشِّح الذي حفظ كلمات الرسائل المزعجة القديمة حرفيًّا تفوته رسائل مزعجة جديدة صيغت بطريقة مختلفة قليلًا. ### التعرّف على الصور -نموذج الرؤية الذي يحفظ صور تدريبه بعينها بدل الأشكال العامة يفشل مع صور جديدة التُقطت في إعداد مختلف. + +نموذج الرؤية الذي يحفظ صور تدريبه بعينها بدل الأشكال العامة يفشل مع صور جديدة التُقطت في مكان مختلف. diff --git a/content/lessons/ai/overfitting/en.md b/content/lessons/ai/overfitting/en.md index 0081c7af..0c91f325 100644 --- a/content/lessons/ai/overfitting/en.md +++ b/content/lessons/ai/overfitting/en.md @@ -15,13 +15,13 @@ variables: ## Try it -1. Set degree to 1 with noise around 0.5. The curve is too simple to follow the bumps in the data: both readouts, training error and new-point error, stay high — underfitting. -2. Raise degree to 10 or 12. The curve now snakes through almost every training point, and training error nearly vanishes — but watch new-point error, it often gets worse, not better. -3. Try degree 3 instead and compare the two readouts. Training error is a little higher than at degree 12, but new-point error is usually the lowest of all three settings. +1. Set degree to 1 with noise at 0.5. The curve is too simple to follow the bumps in the data: both readouts stay high, training error at 1.66 and new-point error at 1.723 — underfitting. +2. Raise degree to 12. The curve now snakes through almost every training point, and training error nearly vanishes at 0.001 — but watch new-point error: it explodes to 1297.219. +3. Try degree 3 instead and compare the two readouts. Training error is 1.028, higher than at degree 12, but new-point error is only 1.931 instead of 1297.219. ## Real-life examples -1. **Too simple to bend.** At degree 1, only a straight line is allowed — it cannot follow a single bump in the data, no matter how the one available weight is set. +1. **Too simple to bend.** At degree 1, only a straight line is allowed — it cannot follow a single bump in the data, no matter how its two weights are set. 2. **Bent enough to memorize.** At degree 12, the curve has enough bends to snake exactly through every one of the training points. 3. **A reasonable balance.** At degree 3, the curve bends enough to follow the trend without chasing every wiggle of noise. @@ -29,7 +29,7 @@ variables: 1. Set degree to 1 or lower and see the clear underfitting. 2. Push degree to 10 or above and see the clear overfitting. -3. Combine heavy noise, above 0.7, with a high degree, 10 or more, and watch new-point error blow up. +3. Combine heavy noise, above 0.7, with a high degree, 10 or more, and watch new-point error blow up into the hundreds or thousands. ## Intuition @@ -56,13 +56,17 @@ The gap between $L_{tr}$ and $L_{new}$ is a rough measure of how much a model ha ## Real world ### Medical diagnosis + A model that memorizes quirks of its training patients instead of the real disease signal can fail badly on the next patient who walks in. ### Stock and financial prediction + Models fit too closely to historical price noise often perform worse than a simple trend once real, new market days arrive. ### Spam filtering + A filter overfit to the exact wording of old spam misses new spam that uses slightly different phrasing. ### Image recognition + A vision model that memorizes its exact training photos instead of general shapes fails on new photos taken in a different setting. diff --git a/content/lessons/ai/rlhf/ar.md b/content/lessons/ai/rlhf/ar.md index 4c64c602..05bc56ab 100644 --- a/content/lessons/ai/rlhf/ar.md +++ b/content/lessons/ai/rlhf/ar.md @@ -5,7 +5,7 @@ summary: >- تحاكي ذوق البشر — وهنا ترى كيف تصيب هذه المكافأة، ومتى تنخدع. parameters: wh: wh — كم تُثمّن المكافأة أن يبدو الجواب مفيدًا - ws: ws — كم تُثمّن الحذر والصدق عن الحدود + ws: ws — كم تُثمّن الحذر والصدق في الاعتراف بما لا يعرفه beta: beta — المقود الذي يربط التلميذ بنموذجه الأساس variables: - المكافأة التي يكسبها الجواب @@ -18,19 +18,19 @@ variables: ## Try it -1. مع الإعدادات كما هي، اقرأ لماذا يفوز الجواب «أ»: الإصلاح الصادق يسجل جيدًا في الذوقين معًا ويدفع غرامة انجراف صغيرة. هكذا يُفترض أن يعمل النظام. -2. ركّب الفخ الآن: wh على 9 وws على 0 وbeta على 0. يقفز التاج إلى «ج»، الاختراع الواثق، لأنه يبدو الأكثر إفادة ولا شيء يربطه بالواقع. -3. ارفع beta إلى 4 أو أكثر: غرامة الانجراف تأكل تقدم «ج» ويستعيد الجواب الصادق التاج. المقود ليس تفصيلًا، إنه الفرق بين التهذيب والإفساد. +1. مع الإعدادات كما هي (wh = 5 وws = 5 وbeta = 2)، اقرأ لماذا يفوز الجواب «أ» بقيمة R(A) = 61 مقابل R(B) = 58 وR(C) = 44: الإصلاح الصادق ينال درجة جيدة في الصفتين معًا ويدفع غرامة انجراف صغيرة. هكذا يُفترض أن يعمل النظام. +2. ركّب الفخ الآن: wh على 9 وws على 0 وbeta على 0. يقفز التاج إلى «ج»، الاختراع الواثق، بقيمة R(C) = 90 مقابل R(A) = 81، لأنه يبدو الأكثر إفادة ولا شيء يربطه بالواقع. +3. ارفع beta إلى 4: غرامة الانجراف تأكل تقدم «ج»، فتنزل R(C) إلى 58 ولا تنزل R(A) إلا إلى 73، ويستعيد الجواب الصادق التاج. المقود ليس تفصيلًا، إنه الفرق بين التهذيب والإفساد. ## Real-life examples - **مساعد مضبوط أمام بلاغ عطل.** أوزان متوازنة ومقود مشدود: الجواب الفائز يفحص الخطأ ويقترح حلًا ويعترف بما لا يعرفه. هذا «أ» متوجًا. -- **التحايل على المكافأة واقعًا.** نماذج مبكرة مدحت كل شيء واخترعت مراجع، لأن المقيّمين كافؤوا الثقة والدفء، فتعلمت النماذج ذلك بالضبط. هذا تاج «ج» على نطاق واسع. -- **نظام الحذر المفرط.** إذا رجح الحذر على الفائدة بكثير فاز «ب» في كل سؤال: ودود ودافئ وعديم النفع. هذا هو المساعد الذي لا يقول إلا «راجع مختصًا». +- **التحايل على المكافأة واقعًا.** نماذج مبكرة مدحت كل شيء واخترعت مراجع، لأن المقيّمين كافأوا الثقة والدفء، فتعلمت النماذج ذلك بالضبط. هذا تاج «ج» على نطاق واسع. +- **نظام الحذر المفرط.** إذا رجح الحذر على الفائدة بكثير (wh = 2 وws = 9) فاز «ب» في كل سؤال، وهنا R(B) = 85 مقابل R(A) = 50: ودود ودافئ وعديم النفع. هذا هو المساعد الذي لا يقول إلا «راجع مختصًا». ## Test yourself -1. أوصل الجواب المختلق إلى الفوز: الفائدة قرب أقصاها، والحذر قرب الصفر، والمقود مرخي تمامًا. +1. أوصل الجواب المختلق إلى الفوز: الفائدة قرب أقصاها، والحذر قرب الصفر، والمقود مرخًى تمامًا. 2. أعد الفوز للإصلاح الصادق: مقود عند 4 أو أكثر مع فائدة قوية وحذر لا يتجاوز الوسط. 3. ركّب نظام «الجميل عديم النفع» حيث يفوز الرد الدافئ المتهرب بالحذر وحده. @@ -59,13 +59,17 @@ variables: ## Real world ### كل مساعد محادثة -الفرق بين نموذج خام والمساعد الذي في جيبك هو هذا الخط بالضبط. الببغاء ما يزال في الداخل، لكنه هُذّب. + +الفرق بين نموذج خام والمساعد الذي في جيبك هو هذه العملية بالضبط. الببغاء ما يزال في الداخل، لكنه هُذّب. ### التملق + النموذج الذي يوافقك على كل ما تقوله هو التحايل على المكافأة في أنقى صوره: أحب المقيّمون من يوافقهم، فتعلمت النماذج الموافقة. ### الاختلاق الواثق + المراجع والدوال المخترعة هي الجواب «ج» وقد وصل إلى الإنتاج: ما يبدو صحيحًا تغلب على ما هو صحيح. ### بيانات التفضيل سلعة + تنفق المختبرات اليوم على مقيّمين خبراء بسخاء، لأن سقف النموذج المهذب هو جودة الذوق الذي هُذب عليه. diff --git a/content/lessons/ai/rlhf/en.md b/content/lessons/ai/rlhf/en.md index f0edfb0e..b7f3a058 100644 --- a/content/lessons/ai/rlhf/en.md +++ b/content/lessons/ai/rlhf/en.md @@ -20,15 +20,15 @@ variables: ## Try it -1. With the defaults, read why A wins: the honest fix scores well on both tastes and pays little leash penalty — the system working as intended. -2. Now build the trap: wh to 9, ws to 0, beta to 0. The crown jumps to C — the confident invention — because it *sounds* most helpful and nothing anchors it to reality. -3. Pull beta back up to 4 or more: C's drift penalty eats its lead and the honest answer takes the crown back. The leash is not a detail; it is the difference between tuning and corrupting. +1. With the defaults (wh 5, ws 5, beta 2), read why A wins with R(A) = 61 against R(B) = 58 and R(C) = 44: the honest fix scores well on both tastes and pays little leash penalty — the system working as intended. +2. Now build the trap: wh to 9, ws to 0, beta to 0. The crown jumps to C — the confident invention — with R(C) = 90 against R(A) = 81, because it _sounds_ most helpful and nothing anchors it to reality. +3. Pull beta back up to 4: C's drift penalty eats its lead, R(C) falls to 58 while R(A) only falls to 73, and the honest answer takes the crown back. The leash is not a detail; it is the difference between tuning and corrupting. ## Real-life examples - **A tuned assistant on a bug report.** Weights balanced, leash on: the winning answer checks the error, proposes a fix, and admits what it cannot see — answer A, crowned. -- **Reward hacking in the wild.** Early tuned models praised everything and invented citations: raters had rewarded confidence and warmth, and the models learned *exactly* that — answer C's crown, at scale. -- **The over-cautious regime.** Care weighted far above helpfulness produces answer B everywhere: friendly, warm, and useless — the failure users call "it just tells me to see a professional". +- **Reward hacking in the wild.** Early tuned models praised everything and invented citations: raters had rewarded confidence and warmth, and the models learned _exactly_ that — answer C's crown, at scale. +- **The over-cautious regime.** Care weighted far above helpfulness (wh 2, ws 9) produces answer B everywhere, here with R(B) = 85 against R(A) = 50: friendly, warm, and useless — the failure users call "it just tells me to see a professional". ## Test yourself @@ -38,9 +38,9 @@ variables: ## Intuition -A freshly pretrained model has read half the internet and learned one skill: continue the text. Ask it a question and it may answer, continue your question with three more, or imitate a forum thread where someone sneers. Nothing in it prefers *helping you*. The missing ingredient is taste — and taste is exactly what cannot be written as rules. So the field borrowed a trick: show people pairs of answers, ask which is better, and train a *reward model* to predict those preferences. Now taste is a number, and the parrot can be trained against it. +A freshly pretrained model has read half the internet and learned one skill: continue the text. Ask it a question and it may answer, continue your question with three more, or imitate a forum thread where someone sneers. Nothing in it prefers _helping you_. The missing ingredient is taste — and taste is exactly what cannot be written as rules. So the field borrowed a trick: show people pairs of answers, ask which is better, and train a _reward model_ to predict those preferences. Now taste is a number, and the parrot can be trained against it. -The sim is that number laid bare: every answer earns reward for sounding helpful and for being careful, in whatever mix the weights say. But look at candidate C. It cites a function that does not exist — and it *sounds* superb, because the reward model can only measure what raters could see, and raters are impressed by confidence. Whenever the measurable proxy and the real goal part ways, optimization chooses the proxy; that is reward hacking, and the crown jumping to C is the whole alignment problem in one frame. The β leash — punishing drift from the base model — is the humble safeguard: you may polish the parrot, but you may not replace it with whatever scores highest. +The sim is that number laid bare: every answer earns reward for sounding helpful and for being careful, in whatever mix the weights say. But look at candidate C. It cites a function that does not exist — and it _sounds_ superb, because the reward model can only measure what raters could see, and raters are impressed by confidence. Whenever the measurable proxy and the real goal part ways, optimization chooses the proxy; that is reward hacking, and the crown jumping to C is the whole alignment problem in one frame. The β leash — punishing drift from the base model — is the humble safeguard: you may polish the parrot, but you may not replace it with whatever scores highest. ## Formal @@ -50,24 +50,28 @@ In real RLHF the first term is a neural reward model trained on thousands of hum ## Advanced -The deepest issue is that the reward model is a *model* — it has blind spots exactly where raters do, and a policy optimized hard against it will find them: flattery, confident fabrication, length padding, answers tuned to grader quirks. Over-optimizing a learned reward makes true quality go *down* while measured reward climbs — Goodhart's law with gradients. Modern pipelines fight back with better graders (including AI assistance for fact-checking), direct-preference methods (DPO) that skip the explicit reward model, and constitutional approaches where the model critiques itself against written principles. Every one of them still faces this page's question: what stops the student from pleasing the measure instead of the goal? +The deepest issue is that the reward model is a _model_ — it has blind spots exactly where raters do, and a policy optimized hard against it will find them: flattery, confident fabrication, length padding, answers tuned to grader quirks. Over-optimizing a learned reward makes true quality go _down_ while measured reward climbs — Goodhart's law with gradients. Modern pipelines fight back with better graders (including AI assistance for fact-checking), direct-preference methods (DPO) that skip the explicit reward model, and constitutional approaches where the model critiques itself against written principles. Every one of them still faces this page's question: what stops the student from pleasing the measure instead of the goal? ## Derivation 1. Raters compare pairs of answers; a reward model learns to predict their choices, turning taste into a differentiable number. 2. Candidates are scored by $R = w_h H + w_s S - \beta K$ and the policy is nudged toward higher scorers. -3. Because $H$ measures *sounding* helpful, an invented answer can outscore an honest one — unless the $\beta K$ leash and a taste for care make honesty the winning strategy. +3. Because $H$ measures _sounding_ helpful, an invented answer can outscore an honest one — unless the $\beta K$ leash and a taste for care make honesty the winning strategy. ## Real world ### Every chat assistant + The difference between a raw base model and the assistant in your pocket is precisely this pipeline — the parrot is still in there, carved. ### Sycophancy + Models that agree with whatever you assert are reward hacking in its purest form: raters liked being agreed with, so agreement was learned. ### Confident fabrication + Invented citations and APIs are answer C shipping to production — the measurable proxy (sounds right) beating the goal (is right). ### Preference data as the product + Labs now spend heavily on expert raters because the ceiling of the tuned model is the quality of the taste it was tuned against. diff --git a/content/lessons/ai/rlhf/lesson.yaml b/content/lessons/ai/rlhf/lesson.yaml index a73fbde6..dc40b70c 100644 --- a/content/lessons/ai/rlhf/lesson.yaml +++ b/content/lessons/ai/rlhf/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: high-school equation: R = w_h H + w_s S - \beta K concepts: -- rlhf -- reward-model -- alignment -- reward-hacking + - rlhf + - reward-model + - alignment + - reward-hacking prerequisites: -- next-word-prediction + - next-word-prediction related: -- temperature-and-softmax -- scaling-laws + - temperature-and-softmax + - scaling-laws visualization: type: rlhf-arena parameters: @@ -31,29 +31,29 @@ parameters: step: 1 value: 2 variables: -- R -- w_h -- H -- w_s -- S -- K + - R + - w_h + - H + - w_s + - S + - K derivation: -- \text{human raters rank answers, and a reward model learns to imitate their taste} -- R = w_h H + w_s S - \beta K \text{ then scores every answer the model proposes} -- \text{the } \beta K \text{ leash holds the student near its base model, so it cannot drift into nonsense that merely scores well} + - \text{human raters rank answers, and a reward model learns to imitate their taste} + - R = w_h H + w_s S - \beta K \text{ then scores every answer the model proposes} + - \text{the } \beta K \text{ leash holds the student near its base model, so it cannot drift into nonsense that merely scores well} charts: [] primary: beta presets: -- wh: 5 - ws: 5 - beta: 2 -- wh: 9 - ws: 0 - beta: 0 -- wh: 7 - ws: 4 - beta: 5 + - wh: 5 + ws: 5 + beta: 2 + - wh: 9 + ws: 0 + beta: 0 + - wh: 2 + ws: 9 + beta: 2 challenges: -- check: beta == 0 and wh >= 8 and ws <= 1 -- check: beta >= 4 and wh >= 6 and ws <= 5 -- check: ws >= 8 and wh <= 2 + - check: beta == 0 and wh >= 8 and ws <= 1 + - check: beta >= 4 and wh >= 6 and ws <= 5 + - check: ws >= 8 and wh <= 2 diff --git a/content/lessons/ai/scaling-laws/ar.md b/content/lessons/ai/scaling-laws/ar.md index 31ae14b8..ac94d0d2 100644 --- a/content/lessons/ai/scaling-laws/ar.md +++ b/content/lessons/ai/scaling-laws/ar.md @@ -8,7 +8,7 @@ parameters: d: d — بيانات التدريب، قوى عشرٍ من الرموز variables: - الخسارة، كم ما يزال النموذج مخطئًا - - الأرضية العصية التي لا يزيلها أي حجم + - الحد الأدنى الذي لا يزيله أي حجم - ثابت حدّ الدماغ - عدد المعاملات - ثابت حدّ البيانات @@ -17,54 +17,58 @@ variables: ## Try it -1. ثبّت d واسحب n صعودًا: تهبط الخسارة على منحنى الزاوية السفلية بسلاسة. لا قفزات ولا عتبات سحرية، منحنى يتسطح كلما تقدم. -2. راقب شريطي العقوبة وأنت تحرك المنزلقين: الشريط الأطول هو النقص الذي يستحق الإنفاق تاليًا. هذا القانون دليل تسوق بالمعنى الحرفي. -3. ركّب العملاق الجائع: n عند 12 وd عند 8.5. تريليون معامل على بيانات هزيلة، وخسارة أسوأ من نماذج أصغر منه مئة مرة أُطعمت جيدًا. +1. ثبّت d عند 10 وارفع n من 9 إلى 12: تهبط قراءة الخسارة من 2.695 إلى 2.375 على منحنى الزاوية السفلية بسلاسة. لا قفزات ولا عتبات سحرية، منحنى يتسطح كلما تقدم. +2. راقب شريطي النقص: حين تكون n عند 12 وd عند 10 يكون شريط البيانات أطول بكثير، فالبيانات هي ما يستحق الإنفاق الآن. ارفع d إلى 13 فتهبط الخسارة إلى 1.818. هذا القانون دليل تسوق بالمعنى الحرفي. +3. ركّب العملاق الجائع: n عند 12 وd عند 8.5. تريليون معامل على بضع مئات من ملايين الرموز، وخسارة 3.436، أسوأ من نماذج أصغر منه مئة مرة أُطعمت جيدًا. ## Real-life examples -- **تشغيلة بمقياس GPT-2.** مليار معامل على عشرة مليارات رمز: خسارة نحو 2.5، أي نص شبه سليم يتعثر باستمرار. هكذا كانت نماذج 2019. -- **تشغيلة حديثة متوازنة.** نحو 30 مليار معامل على نحو 600 مليار رمز، على خط D ≈ 20N تمامًا: الشريطان ينكمشان معًا ولا يُهدر شيء. +- **تجربة تدريب بحجم GPT-2.** مليار معامل على عشرة مليارات رمز: خسارة نحو 2.7، أي نص شبه سليم يتعثر باستمرار. هكذا كانت نماذج 2019. +- **تجربة تدريب حديثة متوازنة.** نحو 30 مليار معامل على نحو 600 مليار رمز، قريبًا من خط D ≈ 20N: الشريطان ينكمشان معًا ولا يُهدر شيء، وتبلغ الخسارة نحو 2.01. - **العملاق الجائع.** عادة ما قبل 2022: كبّر النموذج وأبقِ البيانات. شريط بياناته أضعاف شريط دماغه، والقانون يقول إن المال التالي مكانه الكتب لا العصبونات. ## Test yourself 1. حقق خسارة 2.0 أو أفضل بأي طريقة. -2. اجلس ضمن ±0.25 من الوصفة المتوازنة (d = n + 1.3، أي عشرون رمزًا لكل معامل) بنموذج من عشرة مليارات معامل على الأقل. -3. أعد بناء العملاق الجائع: n لا تقل عن 11.5 وd لا تزيد على 8.5، واقرأ أي حد يأكله. +2. ابقَ ضمن ±0.25 من الوصفة المتوازنة (d = n + 1.3، أي عشرون رمزًا لكل معامل) بنموذج من عشرة مليارات معامل على الأقل. +3. أعد بناء العملاق الجائع: n لا تقل عن 11.5 وd لا تزيد على 8.5، واقرأ أي الحدّين هو الأكبر. ## Intuition -أغرب ما في الذكاء الاصطناعي الحديث ليس أنه نجح، بل أن تقدمه كان قابلًا للرسم. درّب نماذج من المليون إلى المليار معامل، وارسم خسارتها مقابل حجمها على ورق لوغاريتمي، فتقع النقاط على خط مستقيم. لا هضبة توقّف عندها كما تنبأ المشككون، ولا قفزة معجزة كما تمنى المتحمسون. المهارة تصل حسب جدول له مقبضان: كم معاملًا في النموذج، وكم رمزًا من النص قرأ. ولكل مقبض عوائد متناقصة بشكل مقيس معروف، والنقصان يتجمعان ببساطة. +أغرب ما في الذكاء الاصطناعي الحديث ليس أنه نجح، بل أن تقدمه كان قابلًا للرسم. درّب نماذج من المليون إلى المليار معامل، وارسم خسارتها مقابل حجمها على ورق لوغاريتمي، فتقع النقاط على خط مستقيم. لا هضبة توقّف عندها كما تنبأ المشككون، ولا قفزة معجزة كما تمنى المتحمسون. المهارة تصل حسب جدول له مقبضان: كم معاملًا في النموذج، وكم رمزًا من النص قرأ. ولكل مقبض عوائد متناقصة بشكل مقيس معروف، والنقصان يُجمعان معًا. -هذا التجمع هو ما يعرضه الشريطان على الشاشة، وفيه تدور تجارة الذكاء الاصطناعي كلها. إذا كان حد الدماغ أطول فاشترِ معاملات، وإذا كان حد البيانات أطول فاشترِ نصوصًا. ونتيجة 2022 الشهيرة، المسماة شنشيلا، كانت ببساطة قياس الثوابت بدقة واكتشاف أن المجال كله كان يبني عمالقة جياعًا: أدمغة هائلة على غذاء هزيل. العلاج، نحو عشرين رمزًا لكل معامل، جعل نماذج أصغر تتفوق على أكبر منها بالتكلفة نفسها. وحين تسمع أن تدريب نموذج يكلف ما تكلفه محطة كهرباء وأن أحدًا وافق على الفاتورة، فذلك لأن ميزان الحرارة في هذه الصفحة موثوق بأنه سيتحرك. +هذا الجمع هو ما يعرضه الشريطان على الشاشة، وفيه تدور تجارة الذكاء الاصطناعي كلها. إذا كان حد الدماغ أطول فاشترِ معاملات، وإذا كان حد البيانات أطول فاشترِ نصوصًا. ونتيجة 2022 الشهيرة، المسماة شنشيلا، كانت ببساطة قياس الثوابت بدقة واكتشاف أن المجال كله كان يبني عمالقة جياعًا: أدمغة هائلة على غذاء هزيل. العلاج، نحو عشرين رمزًا لكل معامل، جعل نماذج أصغر تتفوق على أكبر منها بالتكلفة نفسها. وحين تسمع أن تدريب نموذج يكلف ما تكلفه محطة كهرباء وأن أحدًا وافق على الفاتورة، فذلك لأن ميزان الحرارة في هذه الصفحة موثوق بأنه سيتحرك. ## Formal -القانون الملاءم للقياسات هو $L = E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}}$، بثوابت شنشيلا: $E = 1.69$ و$A = 406.4$ و$\alpha = 0.34$ و$B = 410.7$ و$\beta = 0.28$. والأرضية $E$ هي حصة اللغة نفسها من الغموض: الجزء من الكلمة التالية الذي لا يمكن التنبؤ به مهما كبر النموذج. +القانون المستخرج من القياسات هو $L = E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}}$، بثوابت شنشيلا: $E = 1.69$ و$A = 406.4$ و$\alpha = 0.34$ و$B = 410.7$ و$\beta = 0.28$. والأرضية $E$ هي حصة اللغة نفسها من الغموض: الجزء من الكلمة التالية الذي لا يمكن التنبؤ به مهما كبر النموذج. وحوسبة التدريب تقارب $C \approx 6ND$ عملية حسابية، فالميزانية الثابتة مقايضة بين دماغ أكبر وغذاء أكثر. وتصغير $L$ تحت القيد $6ND = C$ يعطي نقطة التوازن التي ينكمش عندها الحدان معًا، وهي عدديًا قرب $D \approx 20N$. بعيدًا عن هذا الخط يتضخم أحد الحدين ويُهدر جزء من الميزانية، وهذا بالضبط ما يريك إياه إعداد العملاق الجائع. ## Advanced -القانون يقيس خسارة الكلمة التالية لا الحكمة، ومع ذلك تتبع القدرات العملية هذا المنحنى بدقة مدهشة، وبعضها يظهر فجأة: قدرة غائبة عند حجم تحضر عند الحجم التالي، وهذا «الانبثاق» يجعل تدريب نماذج الطليعة نصفه فيزياء ونصفه مغامرة. وللقانون حدود: إذا نفد النص الجيد توقف حد البيانات عن الطاعة، وهذا «جدار البيانات» الذي يدفع نحو البيانات الاصطناعية وإعادة القراءة. والقانون ملاءم للتدريب ويتجاهل أن النموذج سيُشغَّل مليارات المرات بعده، فيدفع اقتصاد التشغيل نحو نماذج صغيرة مدرَّبة أبعد بكثير من عشرين رمزًا للمعامل: خروج مقصود عن خط شنشيلا، يهدر حوسبة تدريب ليوفر حوسبة تشغيل، وهذا توقيع نماذج الهواتف الحالية. +القانون يقيس خسارة الكلمة التالية لا الحكمة، ومع ذلك تتبع القدرات العملية هذا المنحنى بدقة مدهشة، وبعضها يظهر فجأة: قدرة غائبة عند حجم تحضر عند الحجم التالي، وهذا «الانبثاق» يجعل تدريب نماذج الطليعة نصفه فيزياء ونصفه مغامرة. وللقانون حدود: إذا نفد النص الجيد توقف حد البيانات عن الطاعة، وهذا «جدار البيانات» الذي يدفع نحو البيانات الاصطناعية وإعادة القراءة. والقانون وُضع للتدريب ويتجاهل أن النموذج سيُشغَّل مليارات المرات بعده، فيدفع اقتصاد التشغيل نحو نماذج صغيرة مدرَّبة أبعد بكثير من عشرين رمزًا للمعامل: خروج مقصود عن خط شنشيلا، يهدر حوسبة تدريب ليوفر حوسبة تشغيل، وهذا توقيع نماذج الهواتف الحالية. ## Derivation -1. ثلاثة مصادر خطأ تتجمع: الأرضية $E$ التي لا يزيلها حجم، ونقص دماغ يهبط مثل $N^{-\alpha}$، ونقص غذاء يهبط مثل $D^{-\beta}$. -2. ملاءمة مئات التجارب تثبّت الأرقام: $L = 1.69 + \frac{406.4}{N^{0.34}} + \frac{410.7}{D^{0.28}}$. +1. ثلاثة مصادر خطأ تُجمع: الأرضية $E$ التي لا يزيلها حجم، ونقص دماغ يهبط مثل $N^{-\alpha}$، ونقص غذاء يهبط مثل $D^{-\beta}$. +2. مطابقة القانون لمئات التجارب تحدّد الأرقام: $L = 1.69 + \frac{406.4}{N^{0.34}} + \frac{410.7}{D^{0.28}}$. 3. عند ميزانية ثابتة $C \approx 6ND$ تكون الخسارة في أدناها حين ينكمش الحدان معًا، أي عند الوصفة المتوازنة $D \approx 20N$. ## Real world ### ميزانية نموذج طليعي -تلائم المختبرات المنحنى على تجارب صغيرة رخيصة ثم تستقرئ لتقرر هل تستحق تشغيلة بمئات الملايين الموافقة. وقد صمدت الاستقراءات حتى الآن. + +تضبط المختبرات المنحنى على تجارب صغيرة رخيصة، ثم تمدّه لتقرر هل يستحق تدريب يكلف مئات الملايين الموافقة. وقد صحّت هذه التوقعات حتى الآن. ### تصحيح شنشيلا + نموذج من 70 مليارًا قرأ 1.4 تريليون رمز تفوق على نموذج من 280 مليارًا قرأ 300 مليار، بالحوسبة نفسها. أوضح برهان على أن الوصفة تغلب الحجم. ### جدار البيانات + النص العام الجيد يقارب النفاد عند أحجام الطليعة، فصارت تنقية البيانات وشراؤها وتوليدها هي عنق الزجاجة الجديد. ### نماذج صغيرة تتفوق + نماذج بحجم الهاتف دُرّبت أبعد بكثير من غذائها المتوازن هي القانون نفسه مستغلًا بالعكس: ادفع تدريبًا زائدًا مرة، ووفر تشغيلًا كل يوم. diff --git a/content/lessons/ai/scaling-laws/en.md b/content/lessons/ai/scaling-laws/en.md index d357f596..eee9d5ef 100644 --- a/content/lessons/ai/scaling-laws/en.md +++ b/content/lessons/ai/scaling-laws/en.md @@ -18,14 +18,14 @@ variables: ## Try it -1. Hold d still and drag n up: the loss falls along the smooth inset curve — no jumps, no magic thresholds, just a power law flattening as it goes. -2. Watch the two penalty bars as you move either slider: whichever bar is taller is the shortfall worth spending on next — the law is literally a shopping guide. -3. Build the starved giant: n at 12, d at 8.5. A trillion parameters, a few hundred million tokens — and a *worse* loss than models a hundred times smaller fed properly. +1. Hold d at 10 and drag n from 9 up to 12: the loss readout falls from 2.695 to 2.375 along the smooth inset curve — no jumps, no magic thresholds, just a power law flattening as it goes. +2. Watch the two penalty bars: with n at 12 and d at 10 the data bar is far taller, so data is the shortfall worth spending on next. Raise d to 13 and the loss drops to 1.818 — the law is literally a shopping guide. +3. Build the starved giant: n at 12, d at 8.5. A trillion parameters, a few hundred million tokens — and a loss of 3.436, _worse_ than models a hundred times smaller fed properly. ## Real-life examples -- **A GPT-2-scale run.** A billion parameters on ten billion tokens: loss around 2.5 — fluent-ish text with constant stumbles, exactly what 2019 sounded like. -- **A balanced modern run.** ~30B parameters on ~600B tokens sits on the D ≈ 20N line: both penalty bars shrink together and nothing is wasted. +- **A GPT-2-scale run.** A billion parameters on ten billion tokens: loss around 2.7 — fluent-ish text with constant stumbles, exactly what 2019 sounded like. +- **A balanced modern run.** ~30B parameters on ~600B tokens sits on the D ≈ 20N line: both penalty bars shrink together, nothing is wasted, and the loss reaches about 2.01. - **The starved giant.** The pre-2022 habit: grow N, keep D. Its data bar dwarfs its brain bar — the law says the next dollar belonged in books, not neurons. ## Test yourself @@ -36,7 +36,7 @@ variables: ## Intuition -The strangest fact about modern AI is not that it works but that its progress was *plottable*. Train models from millions to billions of parameters, plot their loss against size on log-log paper, and the points fall on a straight line — no plateau where sceptics predicted, no jump where enthusiasts hoped. Skill arrives on a schedule of two knobs: how many parameters the brain has, and how many tokens of text it reads. Each knob has diminishing returns of a precise, measured shape, and their shortfalls simply add. +The strangest fact about modern AI is not that it works but that its progress was _plottable_. Train models from millions to billions of parameters, plot their loss against size on log-log paper, and the points fall on a straight line — no plateau where sceptics predicted, no jump where enthusiasts hoped. Skill arrives on a schedule of two knobs: how many parameters the brain has, and how many tokens of text it reads. Each knob has diminishing returns of a precise, measured shape, and their shortfalls simply add. That additivity is what the two bars on screen show, and it is where the business of AI lives. If the brain term dominates, buy parameters; if the data term dominates, buy tokens; the famous 2022 result (Chinchilla) was the embarrassment of measuring the constants carefully and finding the whole field had been building starved giants — enormous brains on thin diets. The fix — roughly twenty tokens per parameter — made smaller models beat bigger ones at the same compute price, and every serious model since has been fed by this curve. When you hear that training runs cost what power plants cost and were approved anyway, it is because this page's thermometer was trusted to move. @@ -48,7 +48,7 @@ Training compute is roughly $C \approx 6ND$ floating-point operations, so a fixe ## Advanced -The law measures next-word loss, not wisdom — yet downstream abilities ride it with surprising fidelity, and some arrive suddenly: a capability absent at one scale appears at the next, "emergence" that makes frontier training part physics, part astronomy. The law also has edges: run out of fresh text and the data term stops obeying (the "data wall" driving synthetic data and multiple epochs); and a law fit for *training* ignores that a model is run billions of times after, so inference economics pushes toward smaller models overtrained far past twenty tokens per parameter — deliberately off the Chinchilla line, wasting training compute to save serving compute, which is why the small-but-overfed model became the signature of the current era. +The law measures next-word loss, not wisdom — yet downstream abilities ride it with surprising fidelity, and some arrive suddenly: a capability absent at one scale appears at the next, "emergence" that makes frontier training part physics, part astronomy. The law also has edges: run out of fresh text and the data term stops obeying (the "data wall" driving synthetic data and multiple epochs); and a law fit for _training_ ignores that a model is run billions of times after, so inference economics pushes toward smaller models overtrained far past twenty tokens per parameter — deliberately off the Chinchilla line, wasting training compute to save serving compute, which is why the small-but-overfed model became the signature of the current era. ## Derivation @@ -59,13 +59,17 @@ The law measures next-word loss, not wisdom — yet downstream abilities ride it ## Real world ### Budgeting a frontier model + Labs fit this curve on small cheap runs, then extrapolate to decide whether a nine-figure training run is worth approving — and the extrapolations have held. ### The Chinchilla correction + A 70B model fed 1.4T tokens outperformed a 280B model fed 300B at equal compute — the clearest public demonstration that the recipe beats raw size. ### The data wall + High-quality public text is close to exhausted at frontier scale, making data curation, licensing and synthesis the field's new bottleneck. ### Small models that punch up + Phone-sized models trained far past their "balanced" diet are this law exploited sideways: pay extra training once, save inference forever. diff --git a/content/lessons/ai/scaling-laws/lesson.yaml b/content/lessons/ai/scaling-laws/lesson.yaml index e992baff..3d8bdd6d 100644 --- a/content/lessons/ai/scaling-laws/lesson.yaml +++ b/content/lessons/ai/scaling-laws/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: university equation: L = E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}} concepts: -- scaling-laws -- compute -- chinchilla -- loss + - scaling-laws + - compute + - chinchilla + - loss prerequisites: -- neural-network + - neural-network related: -- next-word-prediction -- overfitting + - next-word-prediction + - overfitting visualization: type: scaling-laws parameters: @@ -26,26 +26,26 @@ parameters: step: 0.25 value: 10 variables: -- L -- E -- A -- N -- B -- D + - L + - E + - A + - N + - B + - D derivation: -- '\text{two shortfalls add on top of an irreducible floor: too small a brain, too thin a diet}' -- L = 1.69 + \frac{406.4}{N^{0.34}} + \frac{410.7}{D^{0.28}} \text{ (the Chinchilla fit)} -- '\text{balance: } D \approx 20N \text{ keeps both penalty terms shrinking together}' + - '\text{two shortfalls add on top of an irreducible floor: too small a brain, too thin a diet}' + - L = 1.69 + \frac{406.4}{N^{0.34}} + \frac{410.7}{D^{0.28}} \text{ (the Chinchilla fit)} + - '\text{balance: } D \approx 20N \text{ keeps both penalty terms shrinking together}' charts: [] primary: n presets: -- n: 9 - d: 10 -- n: 10.5 - d: 11.75 -- n: 12 - d: 8.5 + - n: 9 + d: 10 + - n: 10.5 + d: 11.75 + - n: 12 + d: 8.5 challenges: -- check: 1.69 + 406.4/(10^n)^0.34 + 410.7/(10^d)^0.28 <= 2.0 -- check: abs(d - n - 1.3) <= 0.25 and n >= 10 -- check: n >= 11.5 and d <= 8.5 + - check: 1.69 + 406.4/(10^n)^0.34 + 410.7/(10^d)^0.28 <= 2.0 + - check: abs(d - n - 1.3) <= 0.25 and n >= 10 + - check: n >= 11.5 and d <= 8.5 diff --git a/content/lessons/ai/temperature-and-softmax/ar.md b/content/lessons/ai/temperature-and-softmax/ar.md index e8568f73..cf67ee0c 100644 --- a/content/lessons/ai/temperature-and-softmax/ar.md +++ b/content/lessons/ai/temperature-and-softmax/ar.md @@ -20,54 +20,58 @@ charts: ## Try it -1. اضبط الحرارة قرب 0.1 وانظر إلى المنحنى الأعلى، قرب خيار الدرجة 2. يقترب من 1، أي أن النموذج يختار تقريبًا دائمًا الخيار الأعلى درجة وحده. -2. ارفع الحرارة نحو 3 وشاهد ذلك المنحنى الأعلى يهبط نحو ثلث تقريبًا، متقاربًا مع المنحنيين الآخرين أسفل الرسم. يصير الاختيار شبه متساوٍ بين الخيارات الثلاثة. -3. اضبط الحرارة على 1 وقارن مدى تشتّت المنحنيات الثلاثة هنا بما أظهره درس التنبّؤ بالكلمة التالية عند حرارته الافتراضية 1، فهي الصيغة نفسها بالضبط، فقط بثلاث درجات ثابتة بدل معجم كامل. +1. اضبط الحرارة على 0.1 وانظر إلى المنحنى، وهو احتمال خيار الدرجة 2. قراءة f(x) تساوي 1، أي أن النموذج يختار الخيار الأعلى درجة وحده في كل مرة تقريبًا. +2. ارفع الحرارة إلى 3 وشاهد ذلك المنحنى يهبط إلى 0.4485، بينما يرتفع المنحنيان الآخران في الرسم البياني أسفله إلى نحو 0.32 و0.23. صارت الخيارات الثلاثة أقرب كثيرًا إلى التساوي. +3. اضبط الحرارة على 1: القراءة 0.6652، والمنحنيان الآخران عند نحو 0.24 و0.09. قارن تباعد المنحنيات الثلاثة هنا بما أظهره درس التنبّؤ بالكلمة التالية عند حرارته الافتراضية 1، فهي الصيغة نفسها بالضبط، لكن بثلاث درجات ثابتة بدل معجم كامل. ## Real-life examples -1. **متوازن.** عند الحرارة 1، الخيار الأعلى درجة مفضَّل لكن غير مضمون إطلاقًا. -2. **يختار الخيار الأعلى دائمًا تقريبًا.** قرب الحرارة 0.15، يكاد المنحنى الأعلى يثبت عند 1. -3. **شبه عشوائي بين الثلاثة.** قرب الحرارة 2.8، تتقارب المنحنيات الثلاثة كلّها قرب ثلث لكل منها. +1. **متوازن.** عند الحرارة 1، الخيار الأعلى درجة مفضَّل لكنه غير مضمون: يُختار باحتمال 0.6652، أي نحو مرتين من كل ثلاث. +2. **يختار الخيار الأعلى دائمًا تقريبًا.** قرب الحرارة 0.15، يكاد المنحنى الأعلى يثبت عند 1، فقيمته 0.9987. +3. **شبه عشوائي بين الثلاثة.** قرب الحرارة 2.8، تتقارب المنحنيات الثلاثة: نحو 0.46 و0.32 و0.22. ## Test yourself 1. اخفض الحرارة إلى أدنى قيمة لها وشاهد المنحنى الأعلى يثبت قرب 1. -2. ارفع الحرارة إلى أعلى قيمة لها وشاهد المنحنيات الثلاثة كلّها تتقارب قرب الثلث. +2. ارفع الحرارة إلى أعلى قيمة لها وشاهد المنحنيات الثلاثة كلّها تتقارب. 3. عد إلى الحرارة 1، لتطابق القيمة الافتراضية في درس التنبّؤ بالكلمة التالية. ## Intuition -لدى ثلاثة خيارات درجات ثابتة، هي 2 و1 و0، أي أن الأول هو التخمين الأفضل فعلًا. تقرّر الحرارة مدى التزام النموذج بهذا الترتيب حين يضطرّ للاختيار فعلًا. عند حرارة منخفضة يلعب بأمان ويأخذ تقريبًا دائمًا الدرجة الأعلى، وعند حرارة مرتفعة يعامل الخيارات الثلاثة على أنها متساوية الاحتمال تقريبًا فيختار عشوائيًّا تقريبًا. +أمامنا ثلاثة خيارات لها درجات ثابتة: 2 و1 و0، أي أن الأول هو التخمين الأفضل فعلًا. تحدّد الحرارة مدى التزام النموذج بهذا الترتيب حين يأتي وقت الاختيار. عند حرارة منخفضة يختار الأضمن ويأخذ الدرجة الأعلى في كل مرة تقريبًا، وعند حرارة مرتفعة يعامل الخيارات الثلاثة كأنها شبه متساوية فيكاد اختياره يكون عشوائيًّا. -الحرارة المنخفضة تجعل المخرج مكرَّرًا ومتوقَّعًا، لأن النموذج يأخذ الخيار الأكثر أمانًا نفسه كل مرة. الحرارة المرتفعة تجعل المخرج متنوّعًا لكنها أكثر عرضة أيضًا للانزلاق إلى خيارات ضعيفة، بالكاد معقولة، لأن الخيارات المنخفضة الدرجة تبدأ تُختار بمعدّل يقارب الخيار الأفضل. لا توجد حرارة «صحيحة» ببساطة. إنها مفاضلة يضبطها مستخدم النموذج عمدًا. +الحرارة المنخفضة تجعل الناتج مكرَّرًا ومتوقَّعًا، لأن النموذج يأخذ الخيار الأضمن نفسه كل مرة. الحرارة المرتفعة تجعل الناتج متنوّعًا، لكنه قد ينزلق إلى خيارات ضعيفة تكاد لا تكون معقولة، لأن الخيارات المنخفضة الدرجة صارت تُختار بقدر يقارب الخيار الأفضل. ليست هناك حرارة «صحيحة» دائمًا. الأمر موازنة يضبطها مستخدم النموذج عن قصد. ## Formal لكل خيار $i$ احتمال $p_i(T) = \frac{\exp(s_i/T)}{\sum_j \exp(s_j/T)}$ مبنيّ من درجته الثابتة $s_i$ والحرارة المشتركة $T$. الدرجات الثلاث هنا $s = (2,1,0)$. -قسمة كل درجة على $T$ قبل الأسّ هو ما يعيد تشكيل التوزيع. $T$ الصغيرة تكبّر الفجوة بين الدرجات قبل سوفت ماكس، و$T$ الكبيرة تقلّص تلك الفجوة إلى شبه لا شيء، وهذا بالضبط تقاطع المنحنيات في الرسم مع ارتفاع الحرارة. +قسمة كل درجة على $T$ قبل الأسّ هو ما يعيد تشكيل التوزيع. $T$ الصغيرة تكبّر الفجوة بين الدرجات قبل Softmax، و$T$ الكبيرة تقلّص تلك الفجوة إلى شبه لا شيء، وهذا بالضبط تقارب المنحنيات في الرسم مع ارتفاع الحرارة. ## Advanced -في النهاية $T \to 0$ يصير سوفت ماكس قاعدة صارمة «اختر الدرجة الأعلى دائمًا»، وفي النهاية $T \to \infty$ يصير اختيارًا عشوائيًّا متساويًا بغضّ النظر عن الدرجة. النماذج اللغوية العملية عادة تأخذ عيّنتها بحرارة بين 0.7 و1.0. بعض الأنظمة، بدل ضبط الحرارة وحدها، تحصر الاختيار في أفضل عدد قليل من الخيارات الأرجح (أخذ العيّنات من القمّة أو النواة)، لتتجنّب اختيار كلمة نادرة جدًّا حتى عند إعدادات حرارة أعلى. +في النهاية $T \to 0$ يصير Softmax قاعدة صارمة «اختر الدرجة الأعلى دائمًا»، وفي النهاية $T \to \infty$ يصير اختيارًا عشوائيًّا متساويًا بغضّ النظر عن الدرجة. النماذج اللغوية العملية عادة تأخذ عيّنتها بحرارة بين 0.7 و1.0. بعض الأنظمة، بدل ضبط الحرارة وحدها، تحصر الاختيار في أفضل عدد قليل من الخيارات الأرجح (أخذ العيّنات من القمّة أو النواة)، لتتجنّب اختيار كلمة نادرة جدًّا حتى عند إعدادات حرارة أعلى. ## Derivation 1. ثبّت الدرجات الثلاث التي تمثّل مدى جودة كل خيار. -2. اقسم كل درجة على الحرارة، ثم طبّق سوفت ماكس لتحصل على احتمالات مجموعها واحد. -3. مع اقتراب الحرارة من الصفر ينهار التوزيع على الدرجة الأعلى. مع كبرها يتسطّح التوزيع نحو التساوي. +2. اقسم كل درجة على الحرارة، ثم طبّق Softmax لتحصل على احتمالات مجموعها واحد. +3. مع اقتراب الحرارة من الصفر يتركّز التوزيع كله على الدرجة الأعلى. ومع كبرها تتقارب الاحتمالات نحو التساوي. ## Real world ### إعدادات الإبداع في مساعدي الدردشة + تعرض بعض تطبيقات الدردشة منزلق «إبداع» أو «حرارة» هو هذه المعلَمة بعينها. ### أدوات توليد الشيفرة + غالبًا ما تضبط مساعدات الشيفرة الحرارة قرب الصفر فينتج الطلب نفسه الشيفرة الأكثر أمانًا نفسها بثبات. ### أدوات الكتابة الإبداعية + ترفع أدوات العصف الذهني والكتابة الإبداعية الحرارة لتنتج اقتراحات أكثر تنوّعًا وأقل توقّعًا. ### الهلوسة، بصراحة -النموذج عند أي حرارة يأخذ دائمًا عيّنة نصّ يبدو معقولًا، دون الرجوع أبدًا إلى مصدر حقيقة. الهلوسة ليست «كذب» النموذج، بل أخذ عيّنة واثقة من توزيع يصادف أنه خاطئ، ولا يصلح إعداد حرارة وحده هذه المشكلة. + +النموذج عند أي حرارة يكتب دائمًا نصًّا يبدو معقولًا، دون أن يرجع إلى مصدر يتحقّق منه. الهلوسة ليست «كذبًا» من النموذج، بل اختيار واثق من توزيع تبيّن أنه خاطئ، ولا يحلّ ضبط الحرارة وحده هذه المشكلة. diff --git a/content/lessons/ai/temperature-and-softmax/en.md b/content/lessons/ai/temperature-and-softmax/en.md index 58ae4eb6..dd17378d 100644 --- a/content/lessons/ai/temperature-and-softmax/en.md +++ b/content/lessons/ai/temperature-and-softmax/en.md @@ -20,20 +20,20 @@ charts: ## Try it -1. Set temperature near 0.1 and look at the top curve, near the score-2 option: it sits close to 1, meaning the model almost always picks the single highest-scoring option. -2. Raise temperature toward 3 and watch that top curve fall toward roughly a third, converging with the chart's other two curves below — the choice becomes almost uniform across all three options. -3. Set temperature to 1 and compare how spread out the three curves are here with what the next-word-prediction lesson showed at its default temperature of 1 — it is the very same formula, just with three fixed scores instead of a whole vocabulary. +1. Set temperature to 0.1 and look at the curve, the probability of the score-2 option: the f(x) readout shows 1, meaning the model almost always picks the single highest-scoring option. +2. Raise temperature to 3 and watch that top curve fall to 0.4485, while the chart's other two curves below rise to about 0.32 and 0.23 — the three options are now much closer to an even split. +3. Set temperature to 1: the readout shows 0.6652, and the other two curves sit at about 0.24 and 0.09. Compare how spread out the three curves are here with what the next-word-prediction lesson showed at its default temperature of 1 — it is the very same formula, just with three fixed scores instead of a whole vocabulary. ## Real-life examples -1. **Balanced.** At temperature 1, the top-scoring option is favoured but far from guaranteed. -2. **Nearly always the top choice.** Near temperature 0.15, the top curve sits almost pinned to 1. -3. **Nearly random among the three.** Near temperature 2.8, all three curves converge close to a third each. +1. **Balanced.** At temperature 1, the top-scoring option is favoured but far from guaranteed: it is picked with probability 0.6652, about two times in three. +2. **Nearly always the top choice.** Near temperature 0.15, the top curve sits almost pinned to 1, at 0.9987. +3. **Nearly random among the three.** Near temperature 2.8, the three curves draw close together: about 0.46, 0.32 and 0.22. ## Test yourself 1. Push temperature near its minimum and watch the top curve pin close to 1. -2. Push temperature near its maximum and watch all three curves converge near a third. +2. Push temperature near its maximum and watch all three curves draw closer together. 3. Return to temperature 1, matching the default in the next-word-prediction lesson. ## Intuition @@ -46,7 +46,7 @@ Low temperature makes output repetitive and predictable, because the model keeps Each option $i$ has a probability $p_i(T) = \frac{\exp(s_i/T)}{\sum_j \exp(s_j/T)}$ built from its fixed score $s_i$ and the shared temperature $T$; here the three scores are $s = (2,1,0)$. -Dividing every score by $T$ before exponentiating is what reshapes the distribution: a small $T$ magnifies the gap between scores before the softmax, a large $T$ shrinks that gap toward nothing, which is exactly the curves crossing in the chart as temperature rises. +Dividing every score by $T$ before exponentiating is what reshapes the distribution: a small $T$ magnifies the gap between scores before the softmax, a large $T$ shrinks that gap toward nothing, which is exactly the curves drawing closer together as temperature rises. ## Advanced @@ -61,13 +61,17 @@ In the limit $T \to 0$ the softmax becomes a hard "always pick the top score" ru ## Real world ### Chat assistant creativity settings + Some chat apps expose a "creativity" or "temperature" slider that is literally this parameter. ### Code generation tools + Coding assistants often set temperature near zero so the same prompt reliably produces the same, safest code every time. ### Creative writing tools + Brainstorming and creative-writing assistants raise temperature to produce more varied, less predictable suggestions. ### Hallucination, honestly + A model at any temperature is always sampling plausible-sounding text, never consulting a source of truth; hallucination is not the model "lying", it is confident sampling from a distribution that happens to be wrong, and no temperature setting fixes that on its own. diff --git a/content/lessons/ai/temperature-and-softmax/lesson.yaml b/content/lessons/ai/temperature-and-softmax/lesson.yaml index 22575b38..14b7d974 100644 --- a/content/lessons/ai/temperature-and-softmax/lesson.yaml +++ b/content/lessons/ai/temperature-and-softmax/lesson.yaml @@ -29,7 +29,7 @@ parameters: min: 0.1 max: 3 step: 0.05 - value: 1 + value: 0.5 variables: - s_i - T diff --git a/content/lessons/ai/tokenization/ar.md b/content/lessons/ai/tokenization/ar.md index d2647eee..d2241bbe 100644 --- a/content/lessons/ai/tokenization/ar.md +++ b/content/lessons/ai/tokenization/ar.md @@ -14,19 +14,19 @@ variables: ## Try it -1. عند merges = 0 اقرأ الرقاقات: كل حرف رمز وحده، وعلامة ▁ تعني بداية كلمة. هكذا يقرأ نموذج لا معجم عنده: زحفًا، حرفًا حرفًا. -2. اسحب merges صعودًا ببطء وشاهد القاعدة تعمل: يلتصق حرفان شائعان، ثم مقطع، ثم كلمات كاملة تصير رقاقة واحدة، بينما تبقى الكلمات النادرة قطعًا. -3. انتقل إلى عينة الشيفرة ثم العربية بالدمجات نفسها: نص مختلف يعطي رقاقات مختلفة. معجم نما على نوع من النص يخدم غيره خدمة سيئة. +1. اضبط merges على 0 واقرأ الرقاقات: كل حرف رمز وحده، وعلامة ▁ تعني بداية كلمة، والعدّاد يُظهر 49 رمزًا. هكذا يقرأ نموذج لا معجم عنده: زحفًا، حرفًا حرفًا. +2. ارفع merges من 0 إلى 6 خطوة خطوة وشاهد القاعدة تعمل: تلتصق «▁th»، ثم «▁the»، ثم «▁cat» فتصير كل منها رقاقة واحدة، وتبقى الكلمات النادرة قطعًا. ينزل العدد من 49 إلى 31. وبعد 6 لا يتغيّر شيء، لأنه لم يبقَ زوج يتكرر مرتين. +3. أبقِ merges عند 10 واضبط text على 1 (الشيفرة) ثم 2 (العربية). الشيفرة تنزل من 38 رمزًا إلى 34 فقط لأنه لا يكاد يتكرر فيها شيء، والعربية تنزل من 44 إلى 32 حين تصير «▁القطة» رقاقة واحدة. الرقاقات تأتي من التكرار، ولهذا لا ينفع معجم نما على نوع من النصوص نوعًا آخر كما ينبغي. ## Real-life examples - **جملة إنجليزية بلا معجم.** جملة القط تكلف 49 رمزًا، رمزًا لكل حرف. بهذا المعدل تغرق صفحة واحدة النموذج قبل أن يقول شيئًا. -- **الجملة نفسها بعد 25 دمجة.** الكلمات الشائعة صارت رقاقات مفردة وانهار العدد. ضغطٌ مجاني سببه التكرار وحده. -- **العربية عند 12 دمجة.** القاعدة تعمل على أي لغة، لكن معجمًا تدرب على الإنجليزية أنفق رقاقاته هناك. لهذا تكلف الجملة نفسها رموزًا أكثر بلغات أخرى. +- **الجملة نفسها بعد 25 دمجة.** الكلمتان المتكررتان «the» و«cat» صارتا رقاقتين مفردتين ونزل العدد من 49 إلى 31. ضغطٌ سببه التكرار وحده. والدمجات الست الأولى فقط هي التي عملت، فبعدها لم يبقَ في هذه الجملة القصيرة زوج يتكرر. +- **العربية عند 12 دمجة.** القاعدة تعمل على أي لغة، فتنزل هذه الجملة من 44 رمزًا إلى 32. لكن معجمًا تدرب على الإنجليزية أنفق رقاقاته هناك. لهذا تكلف الجملة نفسها رموزًا أكثر بلغات أخرى. ## Test yourself -1. صفّر الدمجات واقرأ جملة كما يقرؤها نموذج بلا معجم. +1. اضبط الدمجات على صفر واقرأ جملة كما يقرؤها نموذج بلا معجم. 2. أعطِ الجملة الإنجليزية 25 دمجة على الأقل وشاهد كلمات كاملة تصير رقاقة واحدة. 3. خذ العينة العربية إلى 10 دمجات أو أكثر وقارن رقاقاتها برقاقات الإنجليزية. @@ -40,7 +40,7 @@ variables: يبني ترميز زوج البايتات المعجم هكذا: ابدأ من الحروف رموزًا، ثم كرر $m$ مرة استبدال الزوج المتجاور الأكثر تكرارًا برمز جديد. كل دمجة تضيف مدخلًا واحدًا إلى المعجم وتقصّر كل نص يحوي ذلك الزوج، فيهبط عدد الرموز $k$ أسرع ما يهبط في النص الأكثر تكرارًا. -بلا دمجات، $k = c$: رمز لكل حرف. والمعاجم الإنتاجية، بعشرات آلاف الدمجات على تيرابايتات من النص، تستقر قرب $k \approx \frac{c}{4}$ للنثر الإنجليزي، أي نحو أربعة حروف للرمز. والنسبة أسوأ للغات قليلة الحضور في بيانات التدريب: المعنى نفسه برقاقات أكثر، فتكلفة أكبر ومساحة أقل في نافذة السياق. في الترميز يتحول غذاء النموذج اللغوي إلى قدره. +بلا دمجات، $k = c$: رمز لكل حرف. والمعاجم الإنتاجية، بعشرات آلاف الدمجات على تيرابايتات من النص، تستقر قرب $k \approx \frac{c}{4}$ للنثر الإنجليزي، أي نحو أربعة حروف للرمز. والنسبة أسوأ للغات قليلة الحضور في بيانات التدريب: المعنى نفسه برقاقات أكثر، فتكلفة أكبر ومساحة أقل في نافذة السياق. فما قرأه النموذج من اللغات في تدريبه يحدّد ما يتقنه بعد ذلك. ## Advanced @@ -55,13 +55,17 @@ variables: ## Real world ### فواتير الواجهات البرمجية + كل مزودي الذكاء الاصطناعي يحاسبون بالرمز. عدّاد هذه الصفحة هو حرفيًا العداد الذي يدور وأنت تكتب للمساعد. ### نافذة السياق -«سياق 128 ألفًا» يعدّ رموزًا لا كلمات. كم نصًا يتسع فعلًا؟ يعتمد على لغتك وملاءمة المعجم لها. + +«سياق 128 ألفًا» يعدّ رموزًا لا كلمات. كم نصًا يتسع فعلًا؟ يعتمد على لغتك ومدى مناسبة المعجم لها. ### الإنصاف بين اللغات -من يكتب بلغة قليلة الحضور في بيانات التدريب يدفع رموزًا أكثر للمعنى نفسه. انحياز خُبز في النظام قبل أن يبدأ التدريب. + +من يكتب بلغة قليلة الحضور في بيانات التدريب يدفع رموزًا أكثر للمعنى نفسه. انحياز دخل النظام قبل أن يبدأ التدريب. ### غرائب النماذج + أشهر أخطاء النماذج، من كلمات لا تراها إلى نصوص تربكها، يرجع كثير منها إلى الطريقة التي صادف أن تَرمّز بها النص. diff --git a/content/lessons/ai/tokenization/en.md b/content/lessons/ai/tokenization/en.md index a21d7c97..777e001f 100644 --- a/content/lessons/ai/tokenization/en.md +++ b/content/lessons/ai/tokenization/en.md @@ -15,15 +15,15 @@ variables: ## Try it -1. At merges = 0, read the chips: every character is its own token, word starts marked with ▁ — this is the crawl a model would face with no vocabulary at all. -2. Drag merges up slowly and watch the greedy rule work: «th», then «the», whole common words fusing into single chips while rare ones stay in pieces. -3. Switch to the code sample and then the Arabic one at the same merges: different text, different chips — a vocabulary grown on one kind of text serves another kind badly. +1. Set merges to 0 and read the chips: every character is its own token, word starts marked with ▁, and the readout counts 49 tokens — this is the crawl a model would face with no vocabulary at all. +2. Drag merges from 0 to 6 one step at a time and watch the greedy rule work: «▁th», then «▁the», then «▁cat» fuse into single chips while rare words stay in pieces. The count falls from 49 to 31; past 6 nothing changes, because no pair is left that appears twice. +3. Keep merges at 10 and set text to 1 (code), then 2 (Arabic). The code only shrinks from 38 tokens to 34 because almost nothing in it repeats; the Arabic shrinks from 44 to 32 once «▁القطة» becomes one chip. Chips are earned by repetition — which is why a vocabulary grown on one kind of text serves another kind badly. ## Real-life examples - **Plain English, no vocabulary.** The cat sentence costs 49 character-tokens — at this rate a page of text would swamp the model before it said anything. -- **The same sentence, 25 merges later.** Common words have fused into single chips and the count collapses — compression earned purely by repetition. -- **Arabic at 12 merges.** The greedy rule works on any script — but a vocabulary trained mostly on English spends its chips there, which is why the same sentence often costs more tokens in other languages. +- **The same sentence, 25 merges later.** The repeated words «the» and «cat» have fused into single chips and the count drops from 49 to 31 — compression earned purely by repetition. Only the first 6 merges did any work; after that this short sentence has no repeated pair left. +- **Arabic at 12 merges.** The greedy rule works on any script, taking this sentence from 44 tokens to 32 — but a vocabulary trained mostly on English spends its chips there, which is why the same sentence often costs more tokens in other languages. ## Test yourself @@ -33,7 +33,7 @@ variables: ## Intuition -Before a model can predict anything it must read, and "read" needs an alphabet. Characters are too slow — a thought spread over hundreds of steps — and whole words are too brittle: the first typo or new name would be unreadable. The compromise the field settled on is wonderfully unclever: start from characters, count every adjacent pair in a mountain of text, glue the most frequent pair into a new symbol, and repeat tens of thousands of times. The result is a vocabulary where «the» is one chip because English repeats it endlessly, while a rare word travels as two or three chips — and *nothing* is ever unreadable, because in the worst case it falls back to characters. +Before a model can predict anything it must read, and "read" needs an alphabet. Characters are too slow — a thought spread over hundreds of steps — and whole words are too brittle: the first typo or new name would be unreadable. The compromise the field settled on is wonderfully unclever: start from characters, count every adjacent pair in a mountain of text, glue the most frequent pair into a new symbol, and repeat tens of thousands of times. The result is a vocabulary where «the» is one chip because English repeats it endlessly, while a rare word travels as two or three chips — and _nothing_ is ever unreadable, because in the worst case it falls back to characters. The chips on screen are that exact algorithm running on the sample. This one design choice leaks into everything you have noticed about AI: billing is per token because the model's work is per token; a long foreign word costs more because the vocabulary spent its chips elsewhere; and a model asked to count the letters in «strawberry» struggles precisely because it has never seen letters — it sees one or two chips, with the letters sealed inside. @@ -45,7 +45,7 @@ With no merges, $k = c$, one per character. Production vocabularies (tens of tho ## Advanced -The vocabulary is frozen before the model ever trains, and every quirk becomes permanent: digits may split oddly (why arithmetic is strangely hard), spaces belong to the *following* token (why trailing spaces confuse completions), and a single rare chip can carry bizarre behaviour if it almost never appeared in training. Counting problems — letters in a word, words in a sentence — are tokenization problems in disguise: the model is asked about objects its alphabet dissolved. Newer systems bite the bullet and read raw bytes, paying with longer sequences; where that trade settles is an open question, but whoever wins, some alphabet always comes first. +The vocabulary is frozen before the model ever trains, and every quirk becomes permanent: digits may split oddly (why arithmetic is strangely hard), spaces belong to the _following_ token (why trailing spaces confuse completions), and a single rare chip can carry bizarre behaviour if it almost never appeared in training. Counting problems — letters in a word, words in a sentence — are tokenization problems in disguise: the model is asked about objects its alphabet dissolved. Newer systems bite the bullet and read raw bytes, paying with longer sequences; where that trade settles is an open question, but whoever wins, some alphabet always comes first. ## Derivation @@ -56,13 +56,17 @@ The vocabulary is frozen before the model ever trains, and every quirk becomes p ## Real world ### API bills + Every AI provider prices per token — this page's counter is literally the meter that runs while a chatbot reads your message. ### The context window -"128k context" counts tokens, not words: how much *text* fits depends on the language and the vocabulary's fit to it. + +"128k context" counts tokens, not words: how much _text_ fits depends on the language and the vocabulary's fit to it. ### Multilingual fairness + Users writing in underrepresented scripts pay more tokens for the same meaning — a bias baked in before training began. ### Prompt oddities + Famous glitches — misspelled words the model cannot see, magic strings that derail it — usually trace back to how the text happened to tokenize. diff --git a/content/lessons/ai/tokenization/lesson.yaml b/content/lessons/ai/tokenization/lesson.yaml index 85324b43..5aabf37b 100644 --- a/content/lessons/ai/tokenization/lesson.yaml +++ b/content/lessons/ai/tokenization/lesson.yaml @@ -3,15 +3,15 @@ subject: ai difficulty: beginner equation: k \approx \frac{c}{4} concepts: -- tokens -- bpe -- vocabulary -- subwords + - tokens + - bpe + - vocabulary + - subwords prerequisites: -- what-is-machine-learning + - what-is-machine-learning related: -- word-embeddings -- next-word-prediction + - word-embeddings + - next-word-prediction visualization: type: tokenizer parameters: @@ -19,30 +19,30 @@ parameters: min: 0 max: 30 step: 1 - value: 0 + value: 3 text: min: 0 max: 2 step: 1 value: 0 variables: -- k -- c -- m + - k + - c + - m derivation: -- '\text{with no merges, every character is its own token: } k = c' -- \text{each of the } m \text{ merges glues the commonest adjacent pair into one new vocabulary chip} -- \text{big trained vocabularies land near } k \approx \frac{c}{4} \text{ for English prose} + - '\text{with no merges, every character is its own token: } k = c' + - \text{each of the } m \text{ merges glues the commonest adjacent pair into one new vocabulary chip} + - \text{big trained vocabularies land near } k \approx \frac{c}{4} \text{ for English prose} charts: [] primary: merges presets: -- merges: 0 - text: 0 -- merges: 25 - text: 0 -- merges: 12 - text: 2 + - merges: 0 + text: 0 + - merges: 25 + text: 0 + - merges: 12 + text: 2 challenges: -- check: merges == 0 -- check: text == 0 and merges >= 25 -- check: text == 2 and merges >= 10 + - check: merges == 0 + - check: text == 0 and merges >= 25 + - check: text == 2 and merges >= 10 diff --git a/content/lessons/ai/what-is-machine-learning/ar.md b/content/lessons/ai/what-is-machine-learning/ar.md index d52535d2..8e99094e 100644 --- a/content/lessons/ai/what-is-machine-learning/ar.md +++ b/content/lessons/ai/what-is-machine-learning/ar.md @@ -4,8 +4,8 @@ summary: >- مرشّح البريد المزعج ومقترح الأفلام والمساعد الذكي يتعلمون كلهم بالطريقة نفسها: أرقام تُعدَّل قليلًا قليلًا حتى تقل الأخطاء. parameters: - m: m — ميل الخط الملائم - c: c — تقاطع الخط الملائم + m: m — ميل الخط + c: c — النقطة التي يقطع عندها الخط المحور الرأسي lr: معدّل التعلّم — حجم كل خطوة تحديث steps: الخطوات — عدد التحديثات المنفَّذة حتى الآن variables: @@ -16,27 +16,27 @@ variables: ## Try it -1. انظر إلى الخط البرتقالي عند الخطوات = 0، تجده مسطّحًا ويتجاهل النقاط الزرقاء كلّها. -2. اضغط تشغيل وشاهد الخطوات تتصاعد. يدور الخط البرتقالي وينزاح حتى يمرّ بين النقاط، ملاحقًا الخط المتقطّع الفيروزي. -3. ارفع lr كثيرًا، أعد الخطوات إلى 0، واضغط تشغيل من جديد. لاحظ الخط يتجاوز الهدف ويتأرجح بدل أن يستقرّ بسلاسة. +1. انظر إلى الخط البرتقالي عند الخطوات = 0، تجده أفقيًّا وبعيدًا عن النقاط الزرقاء كلّها. قراءة الخطأ تساوي 280.73. +2. اضغط «شغّل» وشاهد الخطوات تزيد حتى 200. يدور الخط البرتقالي ويتحرّك حتى يمرّ بين النقاط، مقتربًا من الخط الفيروزي المتقطّع. تنتهي القراءات قرب m = 1.003 وc = 0.936، وينزل الخطأ إلى 0.348. +3. اضبط lr على 0.045 (تعود الخطوات إلى 0) واضغط «شغّل» من جديد. كل خطوة الآن تتجاوز الهدف أكثر من التي قبلها: يتأرجح الخط أوسع فأوسع حتى يخرج من الرسم، ويكبر الخطأ بدل أن يصغر. ## Real-life examples -1. **قبل أي تدريب.** الخط مسطّح ويتجاهل كل نقطة، هذا شكل النموذج الجديد كليًّا قبل أن يرى مثالًا واحدًا. +1. **قبل أي تدريب.** الخط أفقي وبعيد عن كل النقاط. هكذا يكون النموذج الجديد قبل أن يرى مثالًا واحدًا. 2. **بعد تدريب كامل.** بعد 150 خطوة تعديل، استقرّ ميل الخط ونقطة بدايته في شكل يمرّ بين النقاط المتناثرة. -3. **تدريب سريع جدًّا.** مع معدّل تعلّم قريب من أعلى قيمة له، يندفع الخط نحو النقاط ويتجاوزها، فيتأرجح بدل أن يستقرّ. +3. **تدريب سريع جدًّا.** مع معدّل تعلّم قريب من أعلى قيمة له، يندفع الخط نحو النقاط ويتجاوزها أكثر مع كل خطوة. بعد 20 خطوة يكون قد خرج من الرسم تمامًا. ## Test yourself -1. درّب النموذج كامل الـ200 خطوة. +1. درّب النموذج 200 خطوة كاملة. 2. أبطئ التدريب حتى ينخفض معدّل التعلّم دون 0.003. -3. ارفع معدّل التعلّم فوق 0.045 ودعه يعمل بعد الخطوة 10، وشاهده يتجاوز الهدف. +3. ارفع معدّل التعلّم فوق 0.045 واتركه يعمل إلى ما بعد الخطوة 10، وشاهده يتجاوز الهدف أكثر مع كل خطوة. ## Intuition -تخيّل أطوال عشرة أصدقاء مرسومة نقاطًا زرقاء على صفحة، وخطًّا برتقاليًّا واحدًا يحاول المرور قريبًا منها كلّها. عند الخطوة صفر يكون الخط مسطّحًا، يتجاهل كل نقطة. حرّك المنزلق المسمّى «الخطوات» إلى الأعلى، فيبدأ الخط البرتقالي بالدوران والانزياح من تلقاء نفسه، ملاحقًا الخط الفيروزي المتقطّع وهو أفضل ملاءمة ممكنة، ويقترب منه أكثر مع كل خطوة. ميل هذا الخط اسمه $m$، وتراه يتغيّر كلما دار الخط. ونقطة بدايته اسمها $c$، وتراها تتحرّك كلما انزاح الخط أعلى أو أسفل. +تخيّل أطوال ثمانية أصدقاء مرسومة نقاطًا زرقاء على صفحة، وخطًّا برتقاليًّا واحدًا يحاول المرور قريبًا منها كلّها. عند الخطوة صفر يكون الخط أفقيًّا، بعيدًا عن كل النقاط. زِد قيمة المنزلق المسمّى «الخطوات»، فيبدأ الخط البرتقالي بالدوران والتحرّك من تلقاء نفسه نحو الخط الفيروزي المتقطّع، وهو أفضل خط ممكن، ويقترب منه أكثر مع كل خطوة. ميل هذا الخط اسمه $m$، وتراه يتغيّر كلما دار الخط. ونقطة بدايته اسمها $c$، وتراها تتحرّك كلما تحرّك الخط إلى أعلى أو أسفل. -يقيس رقم واحد مقدار خطأ الخط، واسمه $L$ أي الخسارة. يعني التدريب ببساطة تصغير $L$ دفعة صغيرة تلو الأخرى. ويقوم النموذج الضخم خلف مساعد الدردشة بالتصغير نفسه تمامًا، لكن على معادلة فيها مليارات الأرقام بدل رقمين، مفحوصة على بيانات أكثر بكثير من عشر نقاط. +يقيس رقم واحد مقدار خطأ الخط، واسمه $L$ أي الخسارة. التدريب هو تصغير $L$ بتعديل صغير بعد تعديل. والنموذج الضخم الذي يعمل خلف مساعد المحادثة يفعل الشيء نفسه تمامًا، لكن على معادلة فيها مليارات الأرقام بدل رقمين، وعلى بيانات أكثر بكثير من ثماني نقاط. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### التوصيات -تلائم خدمات البث نموذجًا يتنبّأ بمدى إعجابك بكل عمل، ثم تعدّله كلما شاهدت وقيّمت المزيد. + +تدرّب خدمات البث نموذجًا يتنبّأ بمدى إعجابك بكل عمل، ثم تعدّله كلما شاهدت وقيّمت المزيد. ### مرشِّحات البريد المزعج -تتعلّم أنظمة البريد فصل الرسائل المزعجة عن الحقيقية بملاءمة نموذج لملايين الأمثلة التي صنّفها المستخدمون من قبل. + +تتعلّم أنظمة البريد فصل الرسائل المزعجة عن الحقيقية بتدريب نموذج على ملايين الأمثلة التي صنّفها المستخدمون من قبل. ### الترجمة الآلية -تلائم أنظمة الترجمة نموذجًا ضخمًا يحوّل جملة بلغة إلى جملة بلغة أخرى، مدرَّبًا على أزواج من الأمثلة. + +تدرّب أنظمة الترجمة نموذجًا ضخمًا يحوّل جملة بلغة إلى جملة بلغة أخرى، مدرَّبًا على أزواج من الأمثلة. ### التصوير الطبي -تلائم أدوات التشخيص نموذجًا لصور صنّفها أطباء من قبل، ثم تنبّه إلى صور جديدة تشبه حالات المرض المصنَّفة. + +تدرّب أدوات التشخيص نموذجًا على صور صنّفها أطباء من قبل، ثم تنبّه إلى صور جديدة تشبه حالات المرض المصنَّفة. diff --git a/content/lessons/ai/what-is-machine-learning/en.md b/content/lessons/ai/what-is-machine-learning/en.md index e9f62c1d..74e2d103 100644 --- a/content/lessons/ai/what-is-machine-learning/en.md +++ b/content/lessons/ai/what-is-machine-learning/en.md @@ -16,27 +16,27 @@ variables: ## Try it -1. Look at the orange line when steps is 0 — it is flat and ignores the blue dots completely. -2. Press play and watch steps climb. The orange line rotates and slides until it threads through the dots, chasing the teal dashed line. -3. Push lr up high, reset steps to 0, and press play again. Notice the line overshoot and wobble instead of settling smoothly. +1. Look at the orange line when steps is 0 — it is flat and ignores the blue dots completely. The loss readout shows 280.73. +2. Press play and watch steps climb to 200. The orange line rotates and slides until it threads through the dots, chasing the teal dashed line. The readouts end near m = 1.003 and c = 0.936, and the loss has dropped to 0.348. +3. Set lr to 0.045 (steps jumps back to 0) and press play again. Each step now overshoots further than the one before: the line swings wider and wider until it leaves the picture, and the loss grows instead of shrinking. ## Real-life examples 1. **Before any training.** The line is flat and ignores every dot — this is what a brand-new model looks like before it has ever seen an example. 2. **After a full training run.** After 150 steps of nudging, the line's slope and starting point have settled into a shape that threads through the scattered points. -3. **Trained too fast.** With the learning rate pushed almost to its highest setting, the line races toward the points and overshoots, wobbling instead of settling. +3. **Trained too fast.** With the learning rate pushed almost to its highest setting, the line races toward the points and overshoots further on every step. After 20 steps it has swung right out of the picture. ## Test yourself 1. Train for the full 200 steps. 2. Slow training down until the learning rate drops below 0.003. -3. Push the learning rate above 0.045 and let it run past step 10 — watch it overshoot. +3. Push the learning rate above 0.045 and let it run past step 10 — watch it overshoot further each step. ## Intuition -Picture ten friends' heights sketched as blue dots on a page, with one straight orange line trying to pass close to all of them. At step 0 the line is flat, ignoring every dot; drag the slider labelled "steps" up and the orange line starts swinging and sliding on its own, chasing the teal dashed line — the best possible fit — a little closer with every step. Its steepness has a name: it is $m$, and you can watch it change as the line rotates. Where it starts has a name too: it is $c$, and you can watch it shift as the line slides up or down. +Picture eight friends' heights sketched as blue dots on a page, with one straight orange line trying to pass close to all of them. At step 0 the line is flat, ignoring every dot; drag the slider labelled "steps" up and the orange line starts swinging and sliding on its own, chasing the teal dashed line — the best possible fit — a little closer with every step. Its steepness has a name: it is $m$, and you can watch it change as the line rotates. Where it starts has a name too: it is $c$, and you can watch it shift as the line slides up or down. -The single number that measures how wrong the line still is also has a name: $L$, the loss. Training simply means shrinking $L$, one small nudge at a time, and a giant model behind a chat assistant does the exact same shrinking — just on a formula holding billions of numbers instead of two, checked against far more data than ten dots. +The single number that measures how wrong the line still is also has a name: $L$, the loss. Training simply means shrinking $L$, one small nudge at a time, and a giant model behind a chat assistant does the exact same shrinking — just on a formula holding billions of numbers instead of two, checked against far more data than eight dots. ## Formal @@ -57,13 +57,17 @@ Fitting a line to a handful of points is a toy problem chosen because it can be ## Real world ### Recommendations + Streaming services fit a model that predicts how much you will like each title, then adjust it as you watch and rate more. ### Spam filters + Email systems learn to separate spam from real mail by fitting a model to millions of examples that were already labelled by users. ### Machine translation + Translation systems fit a huge model that turns a sentence in one language into a sentence in another, trained on paired examples. ### Medical imaging + Diagnostic tools fit a model to scans that doctors have already labelled, then flag new scans that look similar to the labelled disease cases. diff --git a/content/lessons/ai/word-embeddings/ar.md b/content/lessons/ai/word-embeddings/ar.md index 6a87d41b..22e9ea7c 100644 --- a/content/lessons/ai/word-embeddings/ar.md +++ b/content/lessons/ai/word-embeddings/ar.md @@ -13,42 +13,46 @@ variables: ## Try it -1. ابحث عن «ملك» و«رجل» على الخريطة وتتبّع السهم الذاهب من رجل إلى ملك. -2. ابدأ الآن من امرأة وتتبّع السهم نفسه، بالاتجاه والطول نفسيهما. انظر أين يهبط. -3. تحقّق من أقرب كلمة إلى موضع هبوط السهم، يجب أن تكون ملكة. لاحظ كيف تتجمّع الكلمات المتشابهة قريبة من بعضها حتى قبل رسم أي سهم. +1. ابحث عن «ملك» و«رجل» على الخريطة وتتبّع بإصبعك السهم الذاهب من رجل إلى ملك: يتّجه أفقيًّا نحو جهة المكانة الأعلى، دون أي تغيّر في الارتفاع. +2. ابدأ الآن من امرأة وتتبّع السهم نفسه، بالاتجاه والطول نفسيهما. انظر أين ينتهي. +3. تحقّق من أقرب كلمة إلى الموضع الذي انتهى عنده السهم. الدائرة المتقطّعة تحدّد الموضع، والقراءة تذكر أقرب كلمة: ملكة، بتشابه 1. لاحظ كيف تتجمّع الكلمات المتشابهة قريبة من بعضها حتى قبل رسم أي سهم. ## Intuition -تخيّل كل كلمة موضوعة في مكان ما على خريطة ضخمة، بإحداثيين اثنين فقط هنا ليتّسع كل شيء على الشاشة. بدل تخزين كل كلمة برمز عديم المعنى، يخزّنها التضمين كنقطة على تلك الخريطة، موضوعة بحيث تنتهي الكلمات المستخدَمة بطرق متشابهة قريبة من بعضها. ملك يجاور ملكة، وقطة تجاور كلبًا، بعيدًا عن كليهما. موضع كل نقطة تعلّمه النموذج من طريقة استخدام الكلمات فعلًا عبر كمّ هائل من النصوص، لا وضعٌ يدويّ بشري. +تخيّل كل كلمة موضوعة في مكان ما على خريطة ضخمة، بإحداثيين اثنين فقط هنا ليتّسع كل شيء على الشاشة. بدل تخزين كل كلمة برمز لا معنى له، يخزّنها التضمين نقطةً على تلك الخريطة، بحيث تقع الكلمات التي تُستخدم بطرق متشابهة قريبة من بعضها. أمير يجاور ملكًا، وتفاحة تجاور موزة، بعيدًا عن كليهما. موضع كل نقطة تعلّمه النموذج من طريقة استخدام الكلمات فعلًا في كمّ هائل من النصوص، ولم يضعه أحد بيده. -بمجرد أن تصير الكلمات نقاطًا، يبدأ الحساب عليها يتوافق مع المعنى. السهم من رجل إلى ملك يشير تقريبًا بالاتجاه والمسافة نفسيهما للسهم من امرأة إلى ملكة، لأن السهمين يلتقطان الانتقال نفسه: من كلمة عامة إلى نظيرتها الملكية. أضف هذا الانتقال نفسه إلى امرأة، وتهبط قرب ملكة، دون أن تُخبَر أي كلمة قط بمعنى «ملكي». +حين تصير الكلمات نقاطًا، يصير للحساب عليها معنى. السهم من رجل إلى ملك له تقريبًا اتجاه السهم من امرأة إلى ملكة وطوله، لأن السهمين يعبّران عن الانتقال نفسه: من كلمة عامة إلى نظيرتها الملكية. أضف هذا الانتقال نفسه إلى امرأة، فتصل قرب ملكة، دون أن يشرح أحد لأي من الكلمتين معنى «ملكي». ## Formal كل كلمة يمثّلها متجه، $v_K$ لملك، و$v_M$ لرجل، و$v_W$ لامرأة، و$v_Q$ لملكة. تظهر تشبيهات مثل «رجل إلى ملك كامرأة إلى ملكة» كفروق متجهات متساوية تقريبًا، $v_K - v_M \approx v_Q - v_W$. -إعادة ترتيب هذه العلاقة تعطي الحساب الشهير $v_K - v_M + v_W \approx v_Q$. اطرح اتجاه «رجل» من ملك، ثم أضف اتجاه «امرأة»، فتهبط قرب ملكة. وهذه العملية لا معنى لها إلا لأن الفضاء بُني بحيث تحمل الاتجاهات المتّسقة معاني متّسقة. +إعادة ترتيب هذه العلاقة تعطي الحساب الشهير $v_K - v_M + v_W \approx v_Q$. اطرح اتجاه «رجل» من ملك، ثم أضف اتجاه «امرأة»، فتصل قرب ملكة. وهذه العملية لا معنى لها إلا لأن الفضاء بُني بحيث تحمل الاتجاهات المتّسقة معاني متّسقة. ## Advanced -التضمينات الحقيقية تعيش في مئات الأبعاد لا في البُعدين الموضَّحين هنا، تعلّمها نموذج بتدريبه على التنبّؤ بكلمة من السياق المحيط بها عبر مجموعات نصوص هائلة. قد تنتهي اتجاهات متقاربة إلى ترميز علاقات متداخلة كثيرة معًا، مثل الزمن، والجنس، والجمع، والموضوع. هذا بالضبط ما يجعل التضمينات قوية، ولماذا حساب ملك/رجل/امرأة/ملكة المرتّب يعمل تقريبًا فقط، لا مع كل تشبيه. +للتضمينات الحقيقية مئات الأبعاد لا البُعدان الموضَّحان هنا، وقد تعلّمها نموذج بتدريبه على التنبّؤ بكلمة من السياق المحيط بها عبر مجموعات نصوص هائلة. قد تنتهي اتجاهات متقاربة إلى ترميز علاقات متداخلة كثيرة معًا، مثل الزمن، والجنس، والجمع، والموضوع. هذا بالضبط ما يجعل التضمينات قوية، وهو أيضًا سبب أن حساب ملك/رجل/امرأة/ملكة المرتّب يصحّ تقريبًا فقط، ولا يصحّ مع كل تشبيه. ## Derivation 1. كل كلمة نقطة في فضاء المتجهات (ثنائي الأبعاد هنا). 2. اتجاه رجل إلى ملك يطابق اتجاه امرأة إلى ملكة. -3. إضافة هذا الانتقال إلى نقطة امرأة تهبط قرب نقطة ملكة. +3. إضافة هذا الانتقال إلى نقطة امرأة توصلنا قرب نقطة ملكة. ## Real world ### محرّكات البحث + يرتّب البحث النتائج حسب قرب تضمين الاستعلام من تضمين كل صفحة، لا بمطابقة الكلمات الحرفية فقط. ### أنظمة التوصية -تُضمَّن المنتجات والأغاني والمقالات كنقاط أيضًا، فيعني «عنصر مشابه» «نقطة قريبة». + +تُمثَّل المنتجات والأغاني والمقالات نقاطًا أيضًا، فيصير معنى «عنصر مشابه» هو «نقطة قريبة». ### مساعدو الدردشة + فهم أن «سيارة» و«مركبة» تعنيان الشيء نفسه تقريبًا يعتمد على وقوع تضمينهما قريبًا من بعضهما. ### الترجمة الآلية + تصير الترجمة بين اللغات أسهل بمجرّد وضع كلمات اللغتين في فضاء تضمين مشترك. diff --git a/content/lessons/ai/word-embeddings/en.md b/content/lessons/ai/word-embeddings/en.md index 392c91de..89781f29 100644 --- a/content/lessons/ai/word-embeddings/en.md +++ b/content/lessons/ai/word-embeddings/en.md @@ -13,13 +13,13 @@ variables: ## Try it -1. Find king and man on the map and trace the arrow that goes from man to king. +1. Find king and man on the map and trace with your finger the arrow that goes from man to king: straight to the right, with no change in height. 2. Now start at woman and trace that same arrow, the same direction and length. See where it lands. -3. Check which word sits closest to where the arrow landed — it should be queen, and notice how similar words already cluster near each other even before you draw any arrows. +3. Check which word sits closest to where the arrow landed — the dashed ring marks the spot and the readout names the nearest word: queen, with similarity 1. Notice how similar words already cluster near each other even before you draw any arrows. ## Intuition -Imagine every word placed somewhere on a huge map, using just two coordinates here so the whole thing fits on screen. Instead of storing each word as a meaningless code, an embedding stores it as a point on that map, placed so that words used in similar ways end up near each other: king sits near queen, cat sits near dog, far from either. The position of every point was learned from how the words actually get used across huge amounts of text, not placed there by hand. +Imagine every word placed somewhere on a huge map, using just two coordinates here so the whole thing fits on screen. Instead of storing each word as a meaningless code, an embedding stores it as a point on that map, placed so that words used in similar ways end up near each other: prince sits near king, apple sits near banana, far from either. The position of every point was learned from how the words actually get used across huge amounts of text, not placed there by hand. Once words are points, arithmetic on the points starts to line up with meaning. The arrow from man to king points roughly the same way and the same distance as the arrow from woman to queen, because both arrows capture the same shift: moving from a general word to its royal counterpart. Add that same shift onto woman and you land near queen, without either word ever being told what "royal" means. @@ -42,13 +42,17 @@ Real embeddings live in hundreds of dimensions rather than the two shown here, l ## Real world ### Search engines + Search ranks results by how close a query's embedding sits to each page's embedding, not just matching exact words. ### Recommendation systems + Products, songs or articles get embedded as points too, so "similar item" means "nearby point". ### Chat assistants + Understanding that "car" and "automobile" mean nearly the same thing relies on their embeddings sitting close together. ### Machine translation + Translating between languages is easier once words from both languages are placed in a shared embedding space. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. diff --git a/content/lessons/biology/action-potential/ar.md b/content/lessons/biology/action-potential/ar.md index 58f6b618..b93eb7ba 100644 --- a/content/lessons/biology/action-potential/ar.md +++ b/content/lessons/biology/action-potential/ar.md @@ -19,27 +19,27 @@ variables: ## Try it -1. راقب الخط ثابتًا وهادئًا، وتيار المنبّه $I$ عند الصفر. هذه خلية عصبية ساكنة تمامًا. -2. ارفع $I$ قليلًا ثم أفلِته. ينخفض الخط قليلًا ويعود إلى السكون، فلا شرارة بعد. -3. تابع رفع $I$ حتى يتجاوز 1 على مقياسه. يقفز الخط فجأة في شرارة حادة ثم يهبط، فقد أطلقت الخلية شرارتها. +1. اجعل تيار المنبّه $I$ يساوي 0. يبقى الخط ثابتًا وهادئًا قرب $v = -1.2$. هذه خلية عصبية ساكنة. +2. ارفع $I$ إلى 0.1. يرتفع الخط قليلًا حتى $-1.04$ تقريبًا، ثم يهدأ قرب $-1.14$، فلا شرارة بعد. +3. اجعل $I$ الآن 0.2. يقفز الخط فجأة إلى نحو 1.8، ثم يهبط إلى نحو $-2$ ويعود إلى السكون: أطلقت الخلية شرارة واحدة. وعند $I = 0.5$ تطلق شرارة بعد شرارة. ## Real-life examples - **خلية عصبية ساكنة.** بلا أي منبّه ($I = 0$)، يبقى جهد الغشاء ثابتًا وهادئًا، كجرس باب لا يلمسه أحد فيبقى صامتًا. -- **نقرة خفيفة بلا شرارة.** منبّه ضعيف ($I = 0.2$) بالكاد يزعزع جهد السكون، كلمسة خفيفة على زرّ جرس لا تكفي لتشغيله. +- **نقرة خفيفة بلا شرارة.** منبّه ضعيف ($I = 0.1$) بالكاد يزعزع جهد السكون، كلمسة خفيفة على زرّ جرس لا تكفي لتشغيله. - **تيار قوي وإطلاق متكرّر.** منبّه يتجاوز العتبة بكثير ($I = 1.2$) مع تعافٍ أسرع ($\tau = 8$) يجعل الخلية تطلق شرارة تلو أخرى، كجرس مضغوط عليه باستمرار فيرنّ مرارًا. ## Test yourself -1. ارفع تيار المنبّه $I$ فوق 1.0 لتجعل الخلية تطلق شرارة بعد شرارة. +1. اجعل تيار المنبّه $I$ فوق 1.0 ولا يزيد على 1.4، لتطلق الخلية شرارة بعد شرارة. 2. اجعل إعدادَي التعافي $a$ و$b$ متساويين. -3. أبطئ التعافي إلى أقصاه $\tau = 20$ مع إبقاء تيار المنبّه دون 0.2، لتبقى الخلية ساكنة. +3. أبطئ التعافي إلى أقصاه $\tau = 20$ مع إبقاء تيار المنبّه عند 0.1 أو أقل، لتبقى الخلية ساكنة. ## Intuition -تخيّل جرس باب. نقرة خفيفة على الزرّ لا تفعل شيئًا، لكن اضغطه بقوّة كافية فيرنّ كاملًا دفعة واحدة، بلا رنين نصفي هادئ. تعمل الخلية العصبية بالطريقة نفسها. ارفع المنزلق الأول، تيار المنبّه $I$، قليلًا فقط. الخط الذي يمثّل جهد الغشاء، $v$، بالكاد يتحرّك قبل أن يعود إلى السكون. ادفع $I$ الآن أبعد، متجاوزًا 1 تقريبًا على مقياسه. هذه المرّة لا يرتفع $v$ ببطء، بل ينطلق في شرارة حادة واحدة ثم يهبط مباشرة. القفزة نفسها تتكرر كل مرّة، الكل أو لا شيء، مهما بعدت عن العتبة. +تخيّل جرس باب. نقرة خفيفة على الزرّ لا تفعل شيئًا، لكن اضغطه بقوّة كافية فيرنّ كاملًا دفعة واحدة، فلا يرنّ نصف رنّة. تعمل الخلية العصبية بالطريقة نفسها. ارفع المنزلق الأول، تيار المنبّه $I$، قليلًا فقط. الخط الذي يمثّل جهد الغشاء، $v$، بالكاد يتحرّك قبل أن يعود إلى السكون. ارفع $I$ الآن أكثر، إلى نحو 0.2. هذه المرّة لا يرتفع $v$ ببطء، بل ينطلق في شرارة حادة واحدة ثم يهبط مباشرة. القفزة نفسها تتكرر كل مرّة، الكل أو لا شيء، مهما بعدت عن العتبة. -بعد تلك الشرارة لا تستطيع الخلية أن تطلق شرارة أخرى فورًا. خطّ ثانٍ على الرسم، متغيّر التعافي $w$، يبقى مرتفعًا فترة. يسحب $v$ إلى ما دون مستوى سكونه قبل أن يهدأ كلاهما. هذا الانخفاض هو الفترة الحرونة، أشبه بجرس باب مفصول للحظة بعد أن يرنّ، حتى لو ضغطت زرّه من جديد فورًا. ارفع المنزلق المسمّى $\tau$، المقياس الزمني للتعافي، فتطول تلك الفترة المفصولة أكثر. تدير الخلايا العصبية الحقيقية هذا الأمر بقناتين أيونيتين منفصلتين، للصوديوم والبوتاسيوم. أما هذا النموذج المبسّط فيحتفظ بمتغيّر إثارة سريع ومتغيّر تعافٍ بطيء فقط، بما يكفي لإعادة إنتاج العتبة والشرارة والوقفة الحرونة. +بعد تلك الشرارة لا تستطيع الخلية أن تطلق شرارة أخرى فورًا. خطّ ثانٍ على الرسم، متغيّر التعافي $w$، يبقى مرتفعًا فترة. يسحب $v$ إلى ما دون مستوى سكونه قبل أن يهدأ كلاهما. هذا الانخفاض هو فترة الجموح، أشبه بجرس باب مفصول للحظة بعد أن يرنّ، حتى لو ضغطت زرّه من جديد فورًا. ارفع المنزلق المسمّى $\tau$، المقياس الزمني للتعافي، فتطول فترة الانفصال هذه. تدير الخلايا العصبية الحقيقية هذا الأمر بقناتين أيونيتين منفصلتين، للصوديوم والبوتاسيوم. أما هذا النموذج المبسّط فيحتفظ بمتغيّر إثارة سريع ومتغيّر تعافٍ بطيء فقط، بما يكفي ليُظهر العتبة والشرارة وفترة الجموح. ## Formal @@ -49,24 +49,28 @@ variables: ## Advanced -نموذج فيتزهيو-ناغومو اختزال ثنائي الأبعاد لمعادلات هودجكن-هكسلي رباعية الأبعاد، ويحتفظ فقط بمتغيّر منبّه سريع ($v$) ومتغيّر تعافٍ بطيء ($w$). يعيد وصفيًا إنتاج العتبة وشكل الشرارة والفترة الحرونة لخلية عصبية حقيقية، وهو بسيط بما يكفي لتحليله بطرق مستوى الطور. لكنه يفقد في المقابل تفاصيل فيزيائية حيوية، مثل نواقلية الصوديوم والبوتاسيوم المنفصلتين التي يحملها النموذج الأصلي. +نموذج فيتزهيو-ناغومو اختزال ثنائي الأبعاد لمعادلات هودجكن-هكسلي رباعية الأبعاد، ويحتفظ فقط بمتغيّر منبّه سريع ($v$) ومتغيّر تعافٍ بطيء ($w$). يعيد وصفيًا إنتاج العتبة وشكل الشرارة وفترة الجموح لخلية عصبية حقيقية، وهو بسيط بما يكفي لتحليله بطرق مستوى الطور. لكنه يفقد في المقابل تفاصيل فيزيائية حيوية، مثل نواقلية الصوديوم والبوتاسيوم المنفصلتين التي يحملها النموذج الأصلي. ## Derivation 1. الحد التكعيبي يجعل $v$ قابلاً للإثارة، يتسارع ذاتيًا قرب السكون لكنه يُسحب للخلف حين يكبر، فينتج شرارة حادة بدل نمو تدريجي. 2. يطارد متغيّر التعافي $w$ المتغيّر $v$ ببطء (حين يكبر $\tau$)، فيرتفع أثناء الشرارة ويسحب $v$ إلى الأسفل بعدها. -3. هذا الفصل الزمني بين $v$ السريع و$w$ البطيء هو ما ينتج الشرارة الحادة ثم الانخفاض الحروني، بدل تذبذب سلس منتظم. +3. هذا الفصل الزمني بين $v$ السريع و$w$ البطيء هو ما ينتج الشرارة الحادة ثم انخفاض فترة الجموح، بدل تذبذب سلس منتظم. ## Real world ### الإشارات العصبية + كل فكرة ومنعكس وانقباض عضلي يبدأ بجهود فعل كهذا تتسابق على طول المحاور. ### المخدّرات الموضعية -تسدّ أدوية كالليدوكائين قنوات الصوديوم خلف العتبة، فتمنع جهود الفعل في المنطقة المعالَجة. + +تسدّ أدوية كالليدوكائين قنوات الصوديوم المسؤولة عن العتبة، فتمنع جهود الفعل في المنطقة المعالَجة. ### إيقاع القلب -تطلق خلايا القلب شرارات مماثلة كاملة أو لا شيء، وفترة حرونة كهذه تمنع القلب من إعادة الإطلاق مبكرًا جدًا. + +تطلق خلايا القلب شرارات مماثلة كاملة أو لا شيء، وفترة جموح كهذه تمنع القلب من أن ينبض مرة أخرى قبل أوانه. ### الصرع -تتضمّن النوبات إطلاق خلايا عصبية بتزامن مفرط، حين تنهار ديناميكيات العتبة والفترة الحرونة الطبيعية. + +تتضمّن النوبات إطلاق خلايا عصبية بتزامن مفرط، حين تنهار ضوابط العتبة وفترة الجموح الطبيعية. diff --git a/content/lessons/biology/action-potential/en.md b/content/lessons/biology/action-potential/en.md index ed6f746e..9d7c942f 100644 --- a/content/lessons/biology/action-potential/en.md +++ b/content/lessons/biology/action-potential/en.md @@ -23,25 +23,25 @@ variables: ## Try it -1. Watch the trace sit flat and quiet, with the stimulus current $I$ at zero — a resting neuron. -2. Raise $I$ a little and let go. The trace dips slightly and settles back to rest: no spike. -3. Keep raising $I$ past about 1 on its scale. The trace suddenly shoots up into a sharp spike and drops back down — the neuron has fired. +1. Set the stimulus current $I$ to 0. The trace sits flat and quiet near $v = -1.2$ — a resting neuron. +2. Raise $I$ to 0.1. The trace lifts a little, to about $-1.04$, and settles back near $-1.14$: no spike. +3. Now set $I$ to 0.2. The trace suddenly shoots up to about 1.8, drops to about $-2$ and returns to rest — the neuron has fired once. At $I = 0.5$ it fires again and again. ## Real-life examples - **A neuron at rest.** With no stimulus at all ($I = 0$), the membrane voltage stays flat and quiet, the way a doorbell nobody is touching stays silent. -- **A gentle nudge, no spike.** A weak stimulus ($I = 0.2$) barely disturbs the resting voltage, like a light touch on a doorbell button that isn't quite hard enough to ring it. +- **A gentle nudge, no spike.** A weak stimulus ($I = 0.1$) barely disturbs the resting voltage, like a light touch on a doorbell button that isn't quite hard enough to ring it. - **A strong current, firing again and again.** A stimulus well past threshold ($I = 1.2$) with a faster recovery ($\tau = 8$) makes the neuron spike over and over, the way a held-down doorbell rings again and again. ## Test yourself -1. Push the stimulus current $I$ above 1.0 so the neuron keeps firing spike after spike. +1. Set the stimulus current $I$ above 1.0 but no higher than 1.4, so the neuron keeps firing spike after spike. 2. Set the two recovery settings, $a$ and $b$, to the same number. -3. Slow the recovery all the way to $\tau = 20$ while keeping the stimulus current below 0.2, so the neuron stays quiet. +3. Slow the recovery all the way to $\tau = 20$ while keeping the stimulus current at 0.1 or below, so the neuron stays quiet. ## Intuition -Think of a doorbell: a light brush of the button does nothing, but press it hard enough and it rings fully, all at once — never a soft, half-way ring. A neuron works the same way. Raise the first slider, the stimulus current $I$, just a little. The line for membrane voltage, $v$, barely stirs before settling back down to rest. Now push $I$ further, past about 1 on its scale. This time $v$ does not creep up gently. It rockets into one sharp spike and drops straight back down — the same all-or-nothing jump every time, however far past the threshold you pushed. +Think of a doorbell: a light brush of the button does nothing, but press it hard enough and it rings fully, all at once — never a soft, half-way ring. A neuron works the same way. Raise the first slider, the stimulus current $I$, just a little. The line for membrane voltage, $v$, barely stirs before settling back down to rest. Now push $I$ further, to about 0.2. This time $v$ does not creep up gently. It rockets into one sharp spike and drops straight back down — the same all-or-nothing jump every time, however far past the threshold you pushed. After that spike, the neuron cannot fire again right away. A second line on the chart, the recovery variable $w$, stays raised for a while. It pulls $v$ below its resting level before both settle back down. That dip is the refractory period — like a doorbell briefly disconnected right after it rings, even if you press it again straight away. Raise the slider called $\tau$, the recovery timescale, and that disconnected period stretches out longer. Real neurons manage this with two separate ion gates, for sodium and for potassium; this simplified model keeps only a fast spiking variable and a slow recovery variable, just enough to reproduce the threshold, the spike, and the refractory pause. @@ -64,13 +64,17 @@ FitzHugh–Nagumo is a two-dimensional reduction of the four-dimensional Hodgkin ## Real world ### Nerve signalling + Every thought, reflex and muscle contraction starts with action potentials like this one racing down axons. ### Local anaesthetics + Drugs like lidocaine block the sodium channels behind the threshold, preventing action potentials in the treated area. ### Cardiac rhythm + Heart cells fire similar all-or-nothing spikes, and a refractory period like this one prevents the heart from re-triggering too soon. ### Epilepsy + Seizures involve neurons firing in a hypersynchronised way when normal threshold and refractory dynamics break down. diff --git a/content/lessons/biology/action-potential/lesson.yaml b/content/lessons/biology/action-potential/lesson.yaml index 0ae2f620..9d034188 100644 --- a/content/lessons/biology/action-potential/lesson.yaml +++ b/content/lessons/biology/action-potential/lesson.yaml @@ -21,8 +21,8 @@ visualization: - v - v^3/3 - w + I - (v + a - b*w)/tau initial: - - "-1.2" - - "-0.6" + - '-1.2' + - '-0.6' tMax: 200 labels: - membrane voltage v @@ -67,19 +67,19 @@ derivation: charts: [] primary: I presets: -- I: 0 - a: 0.7 - b: 0.8 - tau: 12.5 -- I: 0.2 - a: 0.7 - b: 0.8 - tau: 12.5 -- I: 1.2 - a: 0.7 - b: 0.8 - tau: 8 + - I: 0 + a: 0.7 + b: 0.8 + tau: 12.5 + - I: 0.1 + a: 0.7 + b: 0.8 + tau: 12.5 + - I: 1.2 + a: 0.7 + b: 0.8 + tau: 8 challenges: -- check: I > 1.0 -- check: abs(a - b) < 0.02 -- check: tau > 19 and I < 0.2 + - check: I > 1.0 and I < 1.45 + - check: abs(a - b) < 0.02 + - check: tau > 19 and I < 0.12 diff --git a/content/lessons/biology/bacterial-growth/ar.md b/content/lessons/biology/bacterial-growth/ar.md index 6bcc5b82..13cfaf00 100644 --- a/content/lessons/biology/bacterial-growth/ar.md +++ b/content/lessons/biology/bacterial-growth/ar.md @@ -15,27 +15,27 @@ variables: ## Try it -1. راقب الطبق قرب $t=0$: حفنة المستعمرات الابتدائية فقط، والعدّاد يطابقها. -2. اسحب منزلق الزمن للأمام. يبقى الطبق هادئًا معظم الشوط، ثم يفيض — ويقفز العدّاد متجاوزًا ما يستطيع الطبق رسمه أصلًا. -3. اسحب الآن منزلق زمن التضاعف، $T$، إلى الأسفل. تتزاحم علامات الخط الزمني، وتتّسع الفترة نفسها لتضاعفات أكثر بكثير. +1. اجعل منزلق الزمن عند $t=0$: في الطبق المستعمرات العشر الأولى فقط، والعدّاد يقرأ 10. +2. اسحب منزلق الزمن للأمام. عند 150 دقيقة تعطي خمس تضاعفات 320 خلية. وعند 600 دقيقة عشرون تضاعفًا: يقرأ العدّاد 10.49 M، أي أكثر بكثير من الـ360 التي يستطيع الطبق رسمها. +3. أعد الزمن الآن إلى 120 دقيقة، واسحب منزلق زمن التضاعف، $T$، من 30 نزولًا إلى 10. تتزاحم علامات الخط الزمني، وتتّسع الفترة نفسها لـ12 تضاعفًا بدل 4: يقفز العدد من 160 إلى نحو 41 k. ## Real-life examples -- **بكتيريا القولون في مرق دافئ.** بدءًا من 10 خلايا فقط ($N_0 = 10$) وتضاعف كل 20 دقيقة ($T = 20$)، تنمو المستعمرة لساعتين ($t = 120$)، أي أكثر من ست تضاعفات تكفي لتجاوز 600 خلية. -- **بكتيريا مزارع اللبن.** تتضاعف بكتيريا لاكتوباسيلس بدءًا من 20 خلية ($N_0 = 20$) أبطأ، كل 65 دقيقة تقريبًا ($T = 65$)، وبعد أكثر من 4 ساعات ($t = 260$) تكون قد تكاثرت أضعافًا كثيرة. -- **بكتيريا تربة بطيئة.** نوع بطيء من بكتيريا التربة يبدأ من 5 خلايا فقط ($N_0 = 5$) ويتضاعف كل 110 دقائق فقط ($T = 110$)، ويستمرّ بالنمو بعد أكثر من 7 ساعات ($t = 440$). +- **بكتيريا القولون في مرق دافئ.** بدءًا من 10 خلايا فقط ($N_0 = 10$) وتضاعف كل 20 دقيقة ($T = 20$)، تنمو المستعمرة لساعتين ($t = 120$)، أي ست تضاعفات بالضبط تعطي 640 خلية. +- **بكتيريا الزبادي.** تتضاعف بكتيريا لاكتوباسيلس بدءًا من 20 خلية ($N_0 = 20$) أبطأ، كل 65 دقيقة تقريبًا ($T = 65$)، وبعد أكثر من 4 ساعات ($t = 260$) تكون قد تضاعفت أربع مرات فبلغت 320 خلية. +- **بكتيريا تربة بطيئة.** نوع بطيء من بكتيريا التربة يبدأ من 5 خلايا فقط ($N_0 = 5$) ويتضاعف كل 110 دقائق فقط ($T = 110$)، فلا يتضاعف إلا أربع مرات بعد أكثر من 7 ساعات ($t = 440$): 80 خلية. ## Test yourself 1. جِد الزمن $t$ الذي تتضاعف عنده المستعمرة مرّة واحدة بالضبط، فاجعل $t$ مساويًا لزمن التضاعف $T$. 2. جِد الزمن الذي ينمو عنده التجمّع إلى ثمانية أضعاف بدايته (ثلاث تضاعفات). -3. ابدأ بما لا يقلّ عن 80 خلية وبزمن تضاعف بطيء يتجاوز 100 دقيقة، وادفع رغم ذلك عدد المستعمرة فوق 500. +3. ابدأ بما لا يقلّ عن 80 خلية وبزمن تضاعف بطيء يتجاوز 100 دقيقة، واجعل عدد الخلايا مع ذلك يتجاوز 500. ## Intuition -تستطيع بكتيريا القولون E. coli في مرق دافئ غني بالمغذّيات أن تتضاعف كل 20 دقيقة تقريبًا. خلية واحدة تصبح اثنتين، واثنتان تصبحان أربعًا، وخلال عشر ساعات تصبح الخلية الواحدة أكثر من مليار خلية. اسحب منزلق الزمن، المسمّى $t$، للأمام من الصفر. راقب عدد الخلايا $N$ يرتفع ببطء في البداية ثم أسرع فأسرع، فكل تضاعف يضيف من الخلايا بقدر كل التضاعفات السابقة مجتمعة. على الخط الزمني، كل علامة هي تضاعف واحد: يبدو الطبق شبه فارغ معظم الشوط ثم يمتلئ في العلامات الأخيرة القليلة، مع أن زمن التضاعف $T$ لا يتغيّر أبدًا. +تستطيع بكتيريا القولون E. coli في مرق دافئ غني بالمغذّيات أن تتضاعف كل 20 دقيقة تقريبًا. خلية واحدة تصبح اثنتين، واثنتان تصبحان أربعًا، وخلال عشر ساعات تصبح الخلية الواحدة أكثر من مليار خلية. اسحب منزلق الزمن، المسمّى $t$، للأمام من الصفر. راقب عدد الخلايا $N$ يرتفع ببطء في البداية ثم أسرع فأسرع، فكل تضاعف يضيف من الخلايا بقدر كل التضاعفات السابقة مجتمعة. على الخط الزمني، كل علامة هي تضاعف واحد: يبدو الطبق شبه فارغ معظم الوقت ثم يمتلئ في العلامات الأخيرة القليلة، مع أن زمن التضاعف $T$ لا يتغيّر أبدًا. -اسحب الآن منزلق زمن التضاعف، $T$، إلى الأسفل بدلًا من ذلك. يتضاعف التجمّع نفسه أكثر تكرارًا خلال الفترة نفسها، فيفيض الطبق أبكر بكثير. أما زمن التضاعف الأطول فيفعل العكس، إذ يمدّد الصعود. لكن لا تستمر أي مزرعة حقيقية على هذا الحال إلى الأبد. تنفد المغذّيات وتتراكم الفضلات، فينحني النمو البكتيري الحقيقي في النهاية إلى منحنى مسطّح على شكل حرف S. هذا هو المنحنى اللوجستي الذي يتناوله درس آخر. +اسحب الآن منزلق زمن التضاعف، $T$، إلى الأسفل بدلًا من ذلك. يتضاعف التجمّع نفسه مرات أكثر خلال الفترة نفسها، فيفيض الطبق أبكر بكثير. أما زمن التضاعف الأطول فيفعل العكس، إذ يمدّد الصعود. لكن لا تستمر أي مزرعة حقيقية على هذا الحال إلى الأبد. تنفد المغذّيات وتتراكم الفضلات، فينحني النمو البكتيري الحقيقي في النهاية إلى منحنى مسطّح على شكل حرف S. هذا هو المنحنى اللوجستي الذي يتناوله درس آخر. ## Formal @@ -56,13 +56,17 @@ variables: ## Real world ### سلامة الغذاء + يمكن أن تتضاعف البكتيريا المتروكة في حرارة الغرفة كل 20 إلى 30 دقيقة، ولهذا يُبرَّد الطعام القابل للتلف لإبطاء هذا التضاعف. ### الزراعة المخبرية + يقدّر علماء الأحياء الدقيقة زمن التضاعف من قراءات الكثافة الضوئية ليصفوا سرعة نمو سلالة ما. ### العدوى + يمكن أن تنمو العدوى البكتيرية غير المعالجة أسيًا في الجسم حتى يتدخل الجهاز المناعي أو المضادات الحيوية. ### جرعات المضادات الحيوية + تُوقَّت جداول الجرعات وفق زمن تضاعف مسبب المرض لتبقي تركيز الدواء متقدمًا على إعادة النمو بين الجرعات. diff --git a/content/lessons/biology/bacterial-growth/en.md b/content/lessons/biology/bacterial-growth/en.md index 93deccf0..7331a54f 100644 --- a/content/lessons/biology/bacterial-growth/en.md +++ b/content/lessons/biology/bacterial-growth/en.md @@ -16,15 +16,15 @@ variables: ## Try it -1. Watch the dish near $t=0$: just the starting handful of colonies, and the counter matching them. -2. Drag the time slider forward. The dish stays calm for most of the run, then floods — the counter rockets past what the dish can even draw. -3. Now drag the doubling-time slider, $T$, down. The timeline's tick marks crowd together, and the same stretch of time fits many more doublings. +1. Set the time slider to $t=0$: just the starting 10 colonies in the dish, and the counter reading 10. +2. Drag the time slider forward. At 150 minutes, five doublings give 320 cells. At 600 minutes, twenty doublings: the counter reads 10.49 M, far past the 360 the dish can draw. +3. Now set the time back to 120 minutes and drag the doubling-time slider, $T$, from 30 down to 10. The timeline's tick marks crowd together, and the same stretch of time fits 12 doublings instead of 4: the count jumps from 160 to about 41 k. ## Real-life examples -- **E. coli in a warm broth.** Starting from just 10 cells ($N_0 = 10$) and doubling every 20 minutes ($T = 20$), the colony grows for 2 hours ($t = 120$): over six doublings, enough to pass 600 cells. -- **Yogurt culture bacteria.** Lactobacillus starting from 20 cells ($N_0 = 20$) doubles more slowly, about every 65 minutes ($T = 65$); after over 4 hours ($t = 260$) it has still multiplied many times over. -- **Slow soil bacteria.** A sluggish soil species starting from just 5 cells ($N_0 = 5$) and doubling only every 110 minutes ($T = 110$) still keeps climbing after over 7 hours ($t = 440$). +- **E. coli in a warm broth.** Starting from just 10 cells ($N_0 = 10$) and doubling every 20 minutes ($T = 20$), the colony grows for 2 hours ($t = 120$): exactly six doublings, giving 640 cells. +- **Yogurt culture bacteria.** Lactobacillus starting from 20 cells ($N_0 = 20$) doubles more slowly, about every 65 minutes ($T = 65$); after over 4 hours ($t = 260$) it has doubled four times, to 320 cells. +- **Slow soil bacteria.** A sluggish soil species starting from just 5 cells ($N_0 = 5$) and doubling only every 110 minutes ($T = 110$) has doubled only four times after over 7 hours ($t = 440$): 80 cells. ## Test yourself @@ -57,13 +57,17 @@ Real bacterial growth curves show four phases — lag, exponential, stationary, ## Real world ### Food safety + Bacteria left at room temperature can double every 20–30 minutes, which is why perishable food is refrigerated to slow this down. ### Lab culturing + Microbiologists estimate doubling time from optical density readings to characterise how fast a strain grows. ### Infections + Untreated bacterial infections can grow exponentially in the body until the immune system or antibiotics intervene. ### Antibiotic dosing + Dosing schedules are timed against a pathogen’s doubling time to keep drug concentration ahead of regrowth between doses. diff --git a/content/lessons/biology/bacterial-growth/lesson.yaml b/content/lessons/biology/bacterial-growth/lesson.yaml index a88fc92f..80efd1c4 100644 --- a/content/lessons/biology/bacterial-growth/lesson.yaml +++ b/content/lessons/biology/bacterial-growth/lesson.yaml @@ -42,18 +42,18 @@ derivation: charts: [] primary: T presets: -- N0: 10 - T: 20 - x: 120 -- N0: 20 - T: 65 - x: 260 -- N0: 5 - T: 110 - x: 440 + - N0: 10 + T: 20 + x: 120 + - N0: 20 + T: 65 + x: 260 + - N0: 5 + T: 110 + x: 440 challenges: -- check: 2^(x/T) - target: 2 -- check: 2^(x/T) - target: 8 -- check: N0 >= 80 and T > 100 and N0*2^(x/T) > 500 + - check: 2^(x/T) + target: 2 + - check: 2^(x/T) + target: 8 + - check: N0 >= 80 and T > 100 and N0*2^(x/T) > 500 diff --git a/content/lessons/biology/cell-size-and-surface-area/ar.md b/content/lessons/biology/cell-size-and-surface-area/ar.md index 7a8b0078..34291671 100644 --- a/content/lessons/biology/cell-size-and-surface-area/ar.md +++ b/content/lessons/biology/cell-size-and-surface-area/ar.md @@ -16,37 +16,37 @@ variables: ## Try it -1. ابدأ بخلية صغيرة، نصف قطرها نحو 10 μm، قريب من خلية بشرية حقيقية، وبنشاط طبيعي. كل جزء من الخلية داخل المدى الآمن بسهولة. -2. اسحب نصف القطر حتى 1000 μm. راقب ظهور «لُب جائع» أحمر بمجرد أن يعجز المدى الآمن عن بلوغ المركز. -3. اخفض النشاط إلى قرب 0.1 وكبّر الخلية من جديد. يمتد المدى الآمن، وتنجو خلية أكبر بكثير. +1. ابدأ بخلية صغيرة، نصف قطرها 10 μm، قريب من خلية بشرية حقيقية، وبنشاط طبيعي (1). يصل الأكسجين إلى عمق 200 μm، فكل جزء من الخلية داخل المدى الآمن بسهولة: الحجم الجائع 0%. +2. اسحب نصف القطر نحو 1000 μm. راقب ظهور «لُب جائع» أحمر بمجرد أن يتجاوز نصف القطر 200 μm ويعجز المدى الآمن عن بلوغ المركز. عند 1000 μm يكون 51.2% من الحجم جائعًا. +3. اخفض النشاط إلى 0.1. يمتد المدى الآمن إلى 632 μm، وتنجو خلية أكبر بكثير: عند نصف قطر 600 μm يعود الحجم الجائع إلى 0%. ## Real-life examples -1. **بكتيريا قطرها μm 1.** حتى مع أيض مرتفع، تبلغ نسبة المساحة إلى الحجم 3 μm⁻¹، وهي نسبة ضخمة. غشاء وفير لكل جزء من السيتوبلازم، وهذا أحد أسباب سرعة نمو البكتيريا وانقسامها. -2. **خلية بشرية نموذجية، قطرها نحو 15 μm.** داخل المدى الآمن براحة ومساحة فائضة. هذا تقريبًا الحجم الذي تستقر عنده الخلايا الحيوانية الحقيقية. -3. **لُب ورم سريع النمو، قطره 800 μm.** أكبر بكثير من المدى الآمن. معظم حجمه جائع من الأكسجين، وهذا بالضبط سبب حاجة الأورام بعد بضعة مليمترات إلى تكوين أوعية دموية خاصة بها لتنجو. +1. **بكتيريا نصف قطرها 1 μm.** حتى مع أيض مرتفع، تبلغ نسبة المساحة إلى الحجم 3 μm⁻¹، وهي نسبة ضخمة. غشاء وفير لكل جزء من السيتوبلازم، وهذا أحد أسباب سرعة نمو البكتيريا وانقسامها. +2. **خلية بشرية نموذجية، نصف قطرها نحو 15 μm.** داخل المدى الآمن وبفارق كبير. هذا تقريبًا الحجم الذي تستقر عنده الخلايا الحيوانية الحقيقية. +3. **لُب ورم سريع النمو، نصف قطره 800 μm.** أكبر بكثير من المدى الآمن. معظم حجمه (55.8%) محروم من الأكسجين، وهذا بالضبط سبب حاجة الأورام بعد بضعة مليمترات إلى تكوين أوعية دموية خاصة بها لتنجو. ## Test yourself 1. صغّر الخلية حتى مقياس البكتيريا، حيث تبلغ نسبة المساحة إلى الحجم نحو 3 μm⁻¹. -2. كبّر الخلية، ونشاطها معًا، حتى يصبح أكثر من نصف حجمها جائعًا. -3. ابنِ خلية ضخمة لكن آمنة: أكبر من 500 μm، لكنها هادئة جدًا (نشاط أقل من 0.2) بحيث تظل تحصل على أكسجين كافٍ في كل مكان. +2. كبّر الخلية، ونشاطها معًا، حتى يصبح نحو نصف حجمها جائعًا (بين 45% و55%). +3. ابنِ خلية ضخمة لكن آمنة: نصف قطرها أكبر من 500 μm، لكنها هادئة جدًا (نشاط أقل من 0.2) بحيث تظل تحصل على أكسجين كافٍ في كل مكان. ## Intuition تنمو مساحة السطح مع مربع نصف القطر، لكن الحجم ينمو مع مكعبه. ضاعف نصف القطر فتتضاعف المساحة أربع مرات بينما يتضاعف الحجم ثماني مرات. الخلية الصغيرة تملك غشاءً وفيرًا جدًا لكل سيتوبلازم خلفه مباشرة. أما الخلية الضخمة فتملك غشاءً قليلًا نسبيًا، لأن معظم ذلك السيتوبلازم أصبح بعيدًا عن أي غشاء. -هذه بالضبط المشكلة التي يواجهها الأكسجين. لا يستطيع الانتشار إلا لمسافة محدودة، نحو 200 μm داخل خلية هادئة، قبل أن يستهلكه السيتوبلازم الذي يمر خلاله بالكامل. الخلية الصغيرة تقع بأكملها داخل هذا المدى، فيصل الأكسجين إلى كل مكان فيها. كبّر الخلية أكثر من هذا المدى فيظهر لُب جائع في المنتصف. ينمو هذا اللُب بسرعة لأنه حجم لا مجرد حلقة رقيقة، فلُب يبدو وكأنه قشرة رقيقة قُشِطت لا يزال بإمكانه أن يكون معظم كتلة الخلية. الخلية الأكثر نشاطًا تستهلك الأكسجين أسرع فيتقلّص مداها الآمن أكثر، ولهذا تعاني الأنسجة سريعة النمو من مشكلة الحجم أبكر من الأنسجة الهادئة. +هذه بالضبط المشكلة التي يواجهها الأكسجين. لا يستطيع الانتشار إلا لمسافة محدودة، نحو 200 μm داخل خلية هادئة، قبل أن يستهلكه السيتوبلازم الذي يمر خلاله بالكامل. الخلية الصغيرة تقع بأكملها داخل هذا المدى، فيصل الأكسجين إلى كل مكان فيها. كبّر الخلية أكثر من هذا المدى فيظهر لُب جائع في المنتصف. ينمو هذا اللُب بسرعة لأنه حجم لا مجرد حلقة رقيقة، فحتى لو بدا أن ما نُزع عنه قشرة رقيقة فقط، قد يكون هذا اللُب معظم كتلة الخلية. الخلية الأكثر نشاطًا تستهلك الأكسجين أسرع فيتقلّص مداها الآمن أكثر، ولهذا تعاني الأنسجة سريعة النمو من مشكلة الحجم أبكر من الأنسجة الهادئة. ## Formal مساحة سطح الكرة هي $\mathrm{SA} = 4\pi r^2$ وحجمها $V = \tfrac{4}{3}\pi r^3$، ومن ثمّ $\mathrm{SA}/V = 3/r$: نسبة السطح المغذّي إلى الحجم المُغذّى تتناقص عكسيًا مع نصف القطر، بلا مفرّ من ذلك لأي شكل شبه كروي. -يتغيّر عمق الانتشار الآمن كـ $d = d_0/\sqrt{a}$، حيث $d_0 \approx 200\ \mu\mathrm{m}$ ذلك العمق عند نشاط طبيعي $a=1$، ويتقلّص مع ارتفاع النشاط. بمجرد أن يتجاوز نصف القطر $r$ العمق $d$، يبقى لُب نصف قطره $r-d$ جائعًا، وبما أنه حجم فإن تلك النسبة الجائعة هي $\left(\frac{r-d}{r}\right)^3$. تنمو هذه النسبة بسرعة بمجرد أن تصبح الخلية أكبر قليلًا من اللازم. +يتغيّر عمق الانتشار الآمن وفق العلاقة $d = d_0/\sqrt{a}$، حيث $d_0 \approx 200\ \mu\mathrm{m}$ ذلك العمق عند نشاط طبيعي $a=1$، ويتقلّص مع ارتفاع النشاط. بمجرد أن يتجاوز نصف القطر $r$ العمق $d$، يبقى لُب نصف قطره $r-d$ جائعًا، وبما أنه حجم فإن تلك النسبة الجائعة هي $\left(\frac{r-d}{r}\right)^3$. تنمو هذه النسبة بسرعة بمجرد أن تصبح الخلية أكبر قليلًا من اللازم. ## Advanced -تتحايل الأنسجة الحقيقية على هذا الحد بطريقتين، هما البقاء صغيرة والانقسام بدل التضخم، واستبدال الكرة بشكل يملك مساحة أكبر لكل وحدة حجم. مثال ذلك ألياف عضلية طويلة ورفيعة، أو خلايا ورقية مسطحة ومطوية، أو الزغابات المتفرّعة المبطّنة لأمعائك. كلها الحيلة نفسها في تصغير $r$، أي غشاء أكثر لكل وحدة سيتوبلازم، دون تصغير الكائن كله. +تتحايل الأنسجة الحقيقية على هذا الحد بطريقتين، هما البقاء صغيرة والانقسام بدل التضخم، واستبدال الكرة بشكل يملك مساحة أكبر لكل وحدة حجم. مثال ذلك ألياف عضلية طويلة ورفيعة، أو خلايا أوراق النبات المسطحة والمطوية، أو الزغابات المتفرّعة المبطّنة لأمعائك. كلها الحيلة نفسها في تصغير $r$، أي غشاء أكثر لكل وحدة سيتوبلازم، دون تصغير الكائن كله. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### زغابات الأمعاء + تُغطّى بطانة أمعائك الدقيقة بزغابات تشبه الأصابع، وكل واحدة منها بدورها مغطاة بزغيبات أصغر. تطوي هذه الزغيبات السطح مرارًا لتحشر غشاءً أكبر بكثير للامتصاص في الطول نفسه من الأمعاء. ### تكوّن الأوعية الدموية في الأورام -لا يستطيع الورم الصلب النمو سلبيًا إلا حتى مليمتر أو اثنين تقريبًا قبل أن يفتقر لُبه للأكسجين. بعد ذلك عليه أن يُحفّز نمو أوعية دموية جديدة أو يموت مركزه. + +لا يستطيع الورم الصلب أن ينمو دون أوعية دموية خاصة به إلا حتى مليمتر أو اثنين تقريبًا قبل أن يفتقر لُبه للأكسجين. بعد ذلك عليه أن يُحفّز نمو أوعية دموية جديدة أو يموت مركزه. ### لماذا تتكوّن الكائنات من خلايا صغيرة كثيرة + الفيل ليس خلية واحدة بحجم فيل. إنه تريليونات من الخلايا العادية الحجم. كلما اقتربت خلية نامية من تجاوز حجمها الآمن، تنقسم بدلًا من ذلك، فتستعيد نصف قطر صغير ونسبة سطح إلى حجم صحية. ### بيوض الأسماك والضفادع + يمكن لبيضة ضفدع أن يتجاوز قطرها المليمتر، أبعد بكثير مما تنجو منه خلية نشطة. والسبب أنها قبل الإخصاب شبه خاملة، فنشاطها المنخفض يمدّد مداها الآمن ليطابق حجمها. diff --git a/content/lessons/biology/cell-size-and-surface-area/en.md b/content/lessons/biology/cell-size-and-surface-area/en.md index 7bc9c66c..417695c5 100644 --- a/content/lessons/biology/cell-size-and-surface-area/en.md +++ b/content/lessons/biology/cell-size-and-surface-area/en.md @@ -18,27 +18,27 @@ variables: ## Try it -1. Start small — radius about 10 μm, close to a real human cell — at normal activity. Every part of the cell is well within reach. -2. Drag the radius up toward 1000 μm. Watch a red "starved core" appear once the safe reach can no longer get all the way to the centre. -3. Drop activity down near 0.1 and grow the cell again. The safe reach stretches out, and a much bigger cell now survives. +1. Start small — radius 10 μm, close to a real human cell — at normal activity (1). Oxygen reaches 200 μm deep, so every part of the cell is well within reach: starved volume 0%. +2. Drag the radius up toward 1000 μm. Watch a red "starved core" appear once the radius passes 200 μm and the safe reach can no longer get all the way to the centre. At 1000 μm, 51.2% of the volume is starved. +3. Drop activity down to 0.1. The safe reach stretches out to 632 μm, and a much bigger cell now survives: at radius 600 μm the starved volume is back to 0%. ## Real-life examples -1. **A bacterium, 1 μm across.** Even at a high metabolism, SA:V comes out to 3 μm⁻¹ — huge — plenty of membrane for every bit of cytoplasm, which is one reason bacteria can grow and divide so fast. -2. **A typical human cell, about 15 μm across.** Comfortably inside the safe reach with room to spare — this is roughly the size real animal cells settle at. -3. **The core of a fast-growing tumour, 800 μm across.** Far bigger than the safe reach; most of its volume is starved of oxygen — exactly why tumours past a couple of millimetres must grow their own blood vessels to survive. +1. **A bacterium, 1 μm in radius.** Even at a high metabolism, SA:V comes out to 3 μm⁻¹ — huge — plenty of membrane for every bit of cytoplasm, which is one reason bacteria can grow and divide so fast. +2. **A typical human cell, about 15 μm in radius.** Comfortably inside the safe reach with room to spare — this is roughly the size real animal cells settle at. +3. **The core of a fast-growing tumour, 800 μm in radius.** Far bigger than the safe reach; most of its volume (55.8%) is starved of oxygen — exactly why tumours past a couple of millimetres must grow their own blood vessels to survive. ## Test yourself 1. Shrink the cell down to bacterium scale, where SA:V reaches about 3 μm⁻¹. -2. Grow the cell, and its activity, until more than half of its volume is starved. -3. Build a huge but safe cell: over 500 μm across, yet so dormant (activity under 0.2) that it still gets enough oxygen everywhere. +2. Grow the cell, and its activity, until about half of its volume is starved (between 45% and 55%). +3. Build a huge but safe cell: over 500 μm in radius, yet so dormant (activity under 0.2) that it still gets enough oxygen everywhere. ## Intuition Surface area grows with the square of the radius, but volume grows with the cube — double the radius and the surface only quadruples while the volume grows eightfold. A tiny cell has tons of membrane for the cytoplasm just behind it; a huge one has comparatively little, because most of that cytoplasm is now far from any membrane at all. -That is exactly the problem oxygen runs into. It can only diffuse in so far — about 200 μm into a resting cell — before the cytoplasm it passes through has already used it up. A small cell is entirely within that reach, so oxygen gets everywhere. Grow the cell past that reach and a starved core appears in the middle, growing fast because it is a *volume*, not just a ring: a core that looks like a thin shell has been peeled away can still be most of the cell's mass. A busier, more active cell burns oxygen faster and the safe reach shrinks further, which is why fast-growing tissue struggles with size sooner than a dormant one does. +That is exactly the problem oxygen runs into. It can only diffuse in so far — about 200 μm into a resting cell — before the cytoplasm it passes through has already used it up. A small cell is entirely within that reach, so oxygen gets everywhere. Grow the cell past that reach and a starved core appears in the middle, growing fast because it is a _volume_, not just a ring: a core that looks like a thin shell has been peeled away can still be most of the cell's mass. A busier, more active cell burns oxygen faster and the safe reach shrinks further, which is why fast-growing tissue struggles with size sooner than a dormant one does. ## Formal @@ -59,13 +59,17 @@ Real tissue works around this limit two ways: by staying small and dividing rath ## Real world ### Intestinal villi + The lining of your small intestine is covered in finger-like villi, and each of those in turn is covered in even smaller microvilli — folding the surface over and over to pack far more absorbing membrane into the same length of gut. ### Tumour angiogenesis + A solid tumour can only grow passively to about a millimetre or two before its core runs short of oxygen; past that it has to trigger the growth of new blood vessels (angiogenesis) or the centre dies. ### Why organisms are made of many small cells + An elephant is not one elephant-sized cell — it is trillions of ordinary-sized ones. Every time a growing cell would cross its safe size, it divides instead, restoring a small radius and a healthy surface-to-volume ratio. ### Fish and frog eggs + A frog egg can be over a millimetre across, far past what an active cell could survive at, only because before fertilisation it is almost dormant — a low activity that stretches its safe reach out to match. diff --git a/content/lessons/biology/cell-size-and-surface-area/lesson.yaml b/content/lessons/biology/cell-size-and-surface-area/lesson.yaml index 2213c593..79b95d80 100644 --- a/content/lessons/biology/cell-size-and-surface-area/lesson.yaml +++ b/content/lessons/biology/cell-size-and-surface-area/lesson.yaml @@ -43,16 +43,16 @@ derivation: - \left(\dfrac{r-d}{r}\right)^3 = \text{starved fraction of the volume, once } r>d charts: [] presets: -- r: 1 - activity: 3 -- r: 15 - activity: 1 -- r: 800 - activity: 2 + - r: 1 + activity: 3 + - r: 15 + activity: 1 + - r: 800 + activity: 2 challenges: -- check: 3/r - target: 3 -- check: (max(0, r - 200/sqrt(activity))/r)^3 - target: 0.5 - tol: 0.05 -- check: r>500 and activity<0.2 and r<=200/sqrt(activity) + - check: 3/r + target: 3 + - check: (max(0, r - 200/sqrt(activity))/r)^3 + target: 0.5 + tol: 0.05 + - check: r>500 and activity<0.2 and r<=200/sqrt(activity) diff --git a/content/lessons/biology/diffusion-and-osmosis/ar.md b/content/lessons/biology/diffusion-and-osmosis/ar.md index daf591ff..ec2549c0 100644 --- a/content/lessons/biology/diffusion-and-osmosis/ar.md +++ b/content/lessons/biology/diffusion-and-osmosis/ar.md @@ -17,27 +17,27 @@ variables: ## Try it -1. راقب الجسيمات ترتدّ عبر الغشاء عشوائيًا، وبعضها يعبر بالفعل من جهة إلى أخرى وبالعكس. -2. اسحب «الجسيمات على اليسار» لأعلى، أعلى بكثير من «الجسيمات على اليمين». تحدث الآن عبورات من اليسار إلى اليمين أكثر من العكس، لمجرّد وجود جسيمات أكثر هناك أصلًا. -3. ارفع نفاذية الغشاء. تحدث العبورات أكثر تكرارًا على الجانبين معًا، ويتساوى الجانبان أسرع. +1. تبدأ الصورة بـ150 جسيمًا على اليسار و20 على اليمين. راقبها تتحرّك عشوائيًا عند الغشاء، وبعضها يعبر من جهة إلى أخرى ثم يعود. +2. اجعل «الجسيمات على اليسار» 200 و«الجسيمات على اليمين» 0. يصير العبور من اليسار إلى اليمين أكثر بكثير من العكس، لأن الجسيمات كلها تبدأ هناك، ويقترب العددان شيئًا فشيئًا من 100 في كل جانب. +3. ارفع نفاذية الغشاء إلى 100%. يكثر العبور من الجانبين معًا، ويتساوى الجانبان أسرع. ## Real-life examples - **مكعّب سكّر يذوب في شاي ساخن.** تدرّج قوي (180 جسيمًا مقابل 10) عند حرارة دافئة (350 كلفن) ومسام نصف مفتوحة (50%) يدفع السكّر بسرعة بعيدًا عن البقعة المزدحمة قرب المكعّب. -- **ملح كاد يتساوى في كوب ماء.** مع تقارب الجانبين (100 مقابل 90 جسيمًا) ومسام مفتوحة بحرّية (70%)، يصبح التدفّق الصافي صغيرًا بالفعل، إذ تلغي معظم العبورات بعضها بعضًا. +- **ملح كاد يتساوى في كوب ماء.** مع تقارب الجانبين (100 مقابل 90 جسيمًا) ومسام واسعة (70%)، يصبح التدفّق الصافي صغيرًا بالفعل، إذ تلغي معظم العبورات بعضها بعضًا. - **جدار خلية بارد وسميك بالكاد يسمح بالمرور.** تدرّج كبير (150 مقابل 20) لكن غشاءً شبه مغلق (نفاذية 10%) عند حرارة باردة (150 كلفن) يجعل الانتشار يزحف ببطء. ## Test yourself 1. اجعل الجانبين متساويين تقريبًا في عدد الجسيمات، بفارق أقلّ من 5. -2. أنشئ تدرّجًا يكون فيه اليسار أزدحم بثلاثة أضعاف اليمين، مع غشاء مفتوح أكثر من 80%. +2. اجعل عدد الجسيمات على اليسار ثلاثة أضعاف عددها على اليمين، مع غشاء مفتوح أكثر من 80%. 3. أبطئ الانتشار كثيرًا. اخفض النفاذية دون 20% وبرّد النظام دون 160 كلفن. ## Intuition -راقب الجسيمات تعبر الغشاء عشوائيًّا. لا قاعدة تجعل عددًا أكبر يذهب يسارًا بدل يمينًا أو العكس. لكن بما أنك تبدأ بجسيمات أكثر بكثير في الجانب المزدحم، تحدث عبورات عشوائية من اليسار إلى اليمين أكثر بكثير من العكس لمجرّد كثرة العدد، ويكون التدفّق الصافي من التركيز العالي إلى المنخفض حتى يتشابه الجانبان تقريبًا. +راقب الجسيمات تعبر الغشاء عشوائيًّا. لا قاعدة تجعل عددًا أكبر يذهب يسارًا لا يمينًا أو العكس. لكن بما أنك تبدأ بجسيمات أكثر بكثير في الجانب المزدحم، يعبر من اليسار إلى اليمين عدد أكبر بكثير من العكس لمجرّد كثرة العدد، ويكون التدفّق الصافي من التركيز العالي إلى المنخفض حتى يتشابه الجانبان تقريبًا. -ارفع النفاذية فتحدث العبورات أكثر تكرارًا على الجانبين معًا، فيصل الاتّزان أسرع دون أن يتغيّر مكان استقراره. وارفع درجة الحرارة فتهتزّ الجسيمات بنشاط أكبر، ما يسرّع الانتشار بالطريقة نفسها. هذا التصوّر الجسيمي نموذج مفاهيمي، فالجزيئات الحقيقية لا تحمل بطاقات هوية صغيرة، لكن إحصاءات عبورات فردية عشوائية كثيرة تعيد إنتاج قانون فيك للانتشار بدقّة. +ارفع النفاذية فيكثر العبور من الجانبين معًا، فيصل الاتّزان أسرع دون أن يتغيّر مكان استقراره. وارفع درجة الحرارة فتهتزّ الجسيمات بنشاط أكبر، ما يسرّع الانتشار بالطريقة نفسها. هذا التصوّر الجسيمي نموذج مفاهيمي، فالجزيئات الحقيقية لا تحمل بطاقات هوية صغيرة، لكن إحصاءات عبورات فردية عشوائية كثيرة تعيد إنتاج قانون فيك للانتشار بدقّة. ## Formal @@ -58,13 +58,17 @@ variables: ## Real world ### الخلايا في ماء مالح + تفقد كرية دم حمراء في ماء البحر الماء بالتناضح فتنكمش، وفي ماء نقي تنتفخ وقد تنفجر. ### وظيفة الكلى + تعتمد النفرونات على تدرّجات التركيز عبر الأغشية لاستعادة الماء والمذابات من البول. ### انتفاخ النبات + الماء الداخل إلى خلايا النبات بالتناضح يضغط الغشاء الخلوي على الجدار الصلب، فيبقي النبات منتصبًا. ### تبادل الغازات في الرئتين -ينتشر الأكسجين وثاني أكسيد الكربون عبر الغشاء الرقيق للحويصلات، وكلّ منهما يتحرّك مع تدرّج تركيزه الخاصّ. + +ينتشر الأكسجين وثاني أكسيد الكربون عبر الغشاء الرقيق للحويصلات، وكلّ منهما ينتقل من حيث تركيزه أعلى إلى حيث تركيزه أقل. diff --git a/content/lessons/biology/diffusion-and-osmosis/en.md b/content/lessons/biology/diffusion-and-osmosis/en.md index 145af87c..32075088 100644 --- a/content/lessons/biology/diffusion-and-osmosis/en.md +++ b/content/lessons/biology/diffusion-and-osmosis/en.md @@ -21,9 +21,9 @@ variables: ## Try it -1. Watch the particles bounce across the membrane at random — some already crossing left to right and back again. -2. Drag "particles on the left" far above "particles on the right." More crossings now happen left-to-right than right-to-left, simply because more particles start out on that side. -3. Raise membrane permeability. Crossings happen more often on both sides at once, and the two sides even out faster. +1. The start has 150 particles on the left and 20 on the right. Watch them bounce across the membrane at random — some already crossing left to right and back again. +2. Set "particles on the left" to 200 and "particles on the right" to 0. Crossings now happen left-to-right far more than right-to-left, simply because the particles start out on that side, and the two counts drift toward about 100 each. +3. Raise membrane permeability to 100%. Crossings happen more often on both sides at once, and the two sides even out faster. ## Real-life examples @@ -62,13 +62,17 @@ Osmosis is diffusion of water specifically, driven by a solute gradient the wate ## Real world ### Cells in salt water + A red blood cell in seawater loses water by osmosis and shrivels; in pure water it swells and can burst. ### Kidney function + Nephrons rely on concentration gradients across membranes to reclaim water and solutes from urine. ### Plant turgor + Water entering plant cells by osmosis presses the cell membrane against the rigid wall, keeping the plant upright. ### Gas exchange in lungs + Oxygen and carbon dioxide diffuse across the thin membrane of alveoli, each moving down its own concentration gradient. diff --git a/content/lessons/biology/diffusion-and-osmosis/lesson.yaml b/content/lessons/biology/diffusion-and-osmosis/lesson.yaml index 58c85ead..57628e14 100644 --- a/content/lessons/biology/diffusion-and-osmosis/lesson.yaml +++ b/content/lessons/biology/diffusion-and-osmosis/lesson.yaml @@ -34,7 +34,7 @@ parameters: max: 100 step: 5 value: 50 - unit: "%" + unit: '%' temp: min: 150 max: 600 @@ -46,7 +46,7 @@ parameters: max: 90 step: 1 value: 50 - unit: "%" + unit: '%' variables: - J - D @@ -59,22 +59,22 @@ derivation: charts: [] primary: nLeft presets: -- nLeft: 180 - nRight: 10 - perm: 50 - temp: 350 - split: 50 -- nLeft: 100 - nRight: 90 - perm: 70 - temp: 300 - split: 50 -- nLeft: 150 - nRight: 20 - perm: 10 - temp: 150 - split: 50 + - nLeft: 180 + nRight: 10 + perm: 50 + temp: 350 + split: 50 + - nLeft: 100 + nRight: 90 + perm: 70 + temp: 300 + split: 50 + - nLeft: 150 + nRight: 20 + perm: 10 + temp: 150 + split: 50 challenges: -- check: abs(nLeft - nRight) < 5 -- check: abs(nLeft/nRight - 3) < 0.3 and perm > 80 -- check: perm < 20 and temp < 160 + - check: abs(nLeft - nRight) < 5 + - check: abs(nLeft/nRight - 3) < 0.3 and perm > 80 + - check: perm < 20 and temp < 160 diff --git a/content/lessons/biology/dna-and-mutation-rates/ar.md b/content/lessons/biology/dna-and-mutation-rates/ar.md index f7dd4622..b8d42df1 100644 --- a/content/lessons/biology/dna-and-mutation-rates/ar.md +++ b/content/lessons/biology/dna-and-mutation-rates/ar.md @@ -1,7 +1,7 @@ --- -title: كيف تتراكم طفرات الدنا +title: كيف تتراكم طفرات الحمض النووي summary: >- - نسخ الدنا يخطئ نادرًا، لكن الأخطاء القليلة تتراكم عبر الأجيال حتى يتغير لقاح الإنفلونزا كل عام. + نسخ الحمض النووي (DNA) يخطئ نادرًا، لكن الأخطاء القليلة تتراكم عبر الأجيال حتى يتغير لقاح الإنفلونزا كل عام. parameters: N: طول التسلسل N mu: معدل الطفرات μ (× 10⁻⁶ لكل قاعدة لكل جيل) @@ -15,25 +15,25 @@ variables: ## Try it -1. ابدأ بمعدل بطيء يشبه معدل الإنسان، وبضعة أجيال فقط. لا يتغيّر شيء تقريبًا. -2. ادفع الأجيال حتى 1000 مع إبقاء المعدل منخفضًا، وراقب الفروق تتراكم ببطء مربعًا أحمر تلو الآخر. -3. بدّل إلى معدل سريع يشبه الفيروسات. راقب الشريط يمتلئ بمربعات حمراء والخط يقفز على الفور تقريبًا. +1. ابدأ بمعدل بطيء يشبه معدل الإنسان (μ = 0.01)، وبـ10 أجيال فقط. لا يتغيّر شيء تقريبًا: الطفرات المتوقعة E تساوي 0 ولا مربع أحمر. +2. اجعل المعدل μ = 1 وارفع عدد الأجيال إلى 1000. يرتفع E ببطء إلى 1: نحو قاعدة واحدة متغيّرة في التسلسل كله (1000 قاعدة)، وهذا أقل من أن يظهر في نافذة الـ60 مربعًا. +3. بدّل إلى معدل سريع يشبه الفيروسات، μ = 100. يقفز E إلى 100، ويتغيّر 10% من القواعد، ويحمرّ 6 مربعات من الـ60. ## Real-life examples -1. **جين بشري يُنسخ عبر 10 أجيال.** بمعدل خطأ واحد تقريبًا لكل مئة مليون قاعدة، لا يتغيّر شيء عمليًا. يُنسخ الدنا البشري بعناية فائقة. -2. **بكتيريا E. coli تتطور في المختبر عبر 1000 جيل.** تجربة حقيقية (تجربة لينسكي، ما زالت مستمرة بعد عشرات آلاف الأجيال): تتطفّر البكتيريا أسرع وتنقسم بسرعة تكفي لظهور تغيّر حقيقي على مقياس زمني مخبري. +1. **جين بشري يُنسخ عبر 10 أجيال.** بمعدل خطأ واحد تقريبًا لكل مئة مليون قاعدة، لا يتغيّر شيء عمليًا. يُنسخ الحمض النووي البشري بعناية فائقة. +2. **بكتيريا E. coli تتطور في المختبر عبر 1000 جيل.** تجربة حقيقية (تجربة لينسكي، ما زالت مستمرة بعد عشرات آلاف الأجيال): تنقسم البكتيريا بسرعة كبيرة، عدة أجيال في اليوم، فيظهر تغيّر حقيقي خلال مدة التجربة في المختبر. 3. **قطعة جين إنفلونزا عبر موسم واحد، نحو 50 دورة تضاعف.** آلة نسخ الإنفلونزا أكثر عرضة للخطأ بكثير، فتظهر سلالات جديدة خلال موسم واحد، ولهذا يُحدَّث لقاح الإنفلونزا كل عام. ## Test yourself -1. بلغ بالضبط 50 قاعدة متوقع تغيّرها. -2. أنشئ سيناريو سريع الطفرات وطويل الأمد: معدل لا يقل عن 50، وعدد أجيال لا يقل عن 20. +1. اجعل عدد القواعد المتوقع تغيّرها 50 بالضبط. +2. جهّز حالة سريعة الطفرات وطويلة الأمد: معدل لا يقل عن 50، وعدد أجيال لا يقل عن 20. 3. اجعل بالضبط 1% من التسلسل قد تغيّر. ## Intuition -تخيّل نسخ الدنا كآلة تصوير شديدة الحرص. لا تُلطّخ حرفًا تقريبًا أبدًا، لكن شغّلها مرارًا، آلاف الحروف في كل مرة، ولا بد أن تظهر بضع لطخات. كل جولة نسخ لتسلسل من $N$ قاعدة، باحتمال خطأ لكل قاعدة قدره $\mu$، تُدخل نحو $N\mu$ فرق جديد عن الأصل. هذا ضئيل لآلة نسخ حريصة، لكنه ليس صفرًا. +تخيّل نسخ الحمض النووي كآلة تصوير شديدة الحرص. تكاد لا تلطّخ حرفًا أبدًا، لكن شغّلها مرارًا، آلاف الحروف في كل مرة، ولا بد أن تظهر بضع لطخات. كل جولة نسخ لتسلسل من $N$ قاعدة، باحتمال خطأ لكل قاعدة قدره $\mu$، تُدخل نحو $N\mu$ فرق جديد عن الأصل. هذا ضئيل لآلة نسخ حريصة، لكنه ليس صفرًا. شغّل آلة النسخ نفسها لـ $g$ جيلًا متتاليًا، وتتراكم الفروق عن سلف مشترك بخط شبه مستقيم، فتعطي نحو $N\mu g$ تغيّرًا متراكمًا. يصح هذا طالما بقي $\mu g$ صغيرًا، بحيث لا يُرجَّح أن تُصاب القاعدة نفسها مرتين. فيروس بآلة نسخ أقل دقة، أو أجيال أكثر بكثير مضغوطة في الموسم نفسه، يمكنه أن يراكم خلال أسابيع ما تحتاج أنواع حريصة وبطيئة التكاثر ملايين السنين لتراكمه. @@ -41,11 +41,11 @@ variables: عدد الفروق المتراكمة المتوقع بعد $g$ جيلًا هو $E \approx N\mu g$، ونسبة التسلسل التي تغيّرت هي $E/N = \mu g$. هذه النسبة مستقلة عن طول التسلسل، لأن تسلسلًا أطول يجمع أخطاء أكثر تناسبيًا لكن النسبة المتأثرة تبقى نفسها. -هذا هو المبدأ العامل خلف الساعة الجزيئية: بقياس $\mu$ في المختبر وقياس الفرق المتراكم $E$ بمقارنة تسلسلين، يقدّر $g \approx E/(N\mu)$ كم جيل نسخ يفصل بينهما. +هذا هو المبدأ الذي تقوم عليه الساعة الجزيئية: بقياس $\mu$ في المختبر وقياس الفرق المتراكم $E$ بمقارنة تسلسلين، يقدّر $g \approx E/(N\mu)$ كم جيل نسخ يفصل بينهما. ## Advanced -التقريب الخطي $E \approx N\mu g$ ينهار بمجرد أن يكبر $\mu g$ بما يكفي، لأن قاعدة تطفّرت من قبل يمكن أن تتطفّر مرة أخرى. أحيانًا تعود إلى الحرف الأصلي، وأحيانًا تتحول إلى حرف ثالث، فترتفع النسبة الحقيقية المتغيّرة أبطأ قليلًا مما يتنبأ به الخط المستقيم عند $\mu g$ كبير. تصحّح طرق الساعة الجزيئية الحقيقية هذا الأثر، لكن النسخة الخطية دقيقة بما يكفي للجينات الحريصة بطيئة الطفرة التي تُستعمل لها عادة. +التقريب الخطي $E \approx N\mu g$ ينهار بمجرد أن يكبر $\mu g$ بما يكفي، لأن قاعدة تطفّرت من قبل يمكن أن تتطفّر مرة أخرى. أحيانًا تعود إلى الحرف الأصلي، وأحيانًا تتحول إلى حرف ثالث، فترتفع النسبة الحقيقية المتغيّرة أبطأ قليلًا مما يتنبأ به الخط المستقيم عند $\mu g$ كبير. تصحّح طرق الساعة الجزيئية الحقيقية هذا الأثر، لكن النسخة الخطية دقيقة بما يكفي للجينات التي تُنسخ بدقة وتتغيّر ببطء، وهي التي تُستعمل لها عادة. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### تأريخ افتراق الأنواع + مقارنة الجين نفسه في نوعين وعدّ الفروق، ثم القسمة على معدل طفرات مقيس، يعطي تاريخًا تقريبيًا لآخر سلف مشترك بينهما. هذه هي الساعة الجزيئية. ### تطوّر مقاومة المضادات الحيوية + البكتيريا التي تنقسم بسرعة، مع طفرات تحدث في كل نسخة، تنتج أحيانًا طفرة تنجو من مضاد حيوي. فتتكاثر هذه السلالة بينما تموت جاراتها غير المقاومة. ### تحديث لقاح الإنفلونزا كل عام + آلة نسخ الإنفلونزا المعرّضة للخطأ تسمح بظهور سلالات جديدة خلال أشهر، بسرعة تكفي لأن لا يطابق لقاح العام الماضي غالبًا السلالات المنتشرة هذا العام. ### تراكم السرطان عبر العمر + تحتاج معظم أنواع السرطان عدة طفرات محددة في سلالة الخلية نفسها قبل أن تصبح خطرة. هذا تراكم بطيء عبر عقود من الانقسام الخلوي العادي، وهو أحد أسباب ارتفاع خطر السرطان بشدة مع التقدم في العمر. diff --git a/content/lessons/biology/dna-and-mutation-rates/en.md b/content/lessons/biology/dna-and-mutation-rates/en.md index 849456c9..a9c84dfd 100644 --- a/content/lessons/biology/dna-and-mutation-rates/en.md +++ b/content/lessons/biology/dna-and-mutation-rates/en.md @@ -18,14 +18,14 @@ variables: ## Try it -1. Start with a slow, human-like rate and only a handful of generations — almost nothing changes. -2. Push generations up toward 1000, keeping the rate low, and watch differences slowly accumulate one red box at a time. -3. Switch to a fast, virus-like rate. Watch the strip fill with red boxes and the line shoot up almost immediately. +1. Start with a slow, human-like rate (μ = 0.01) and only 10 generations — almost nothing changes: expected mutations E reads 0 and no box is red. +2. Set the rate to μ = 1 and push generations up to 1000. E climbs slowly to 1: about one changed base in the whole 1000-base sequence, still too few to show in the 60-box window. +3. Switch to a fast, virus-like rate, μ = 100. E jumps to 100, 10% of the bases have changed, and 6 of the 60 boxes turn red. ## Real-life examples 1. **A human gene copied across 10 generations.** At about one mistake per hundred million bases, essentially nothing changes — human DNA is copied with extraordinary care. -2. **E. coli evolving in the lab for 1000 generations.** A real experiment (Lenski's, still running after tens of thousands of generations): bacteria mutate faster and divide fast enough for real change to show up in a lab timescale. +2. **E. coli evolving in the lab for 1000 generations.** A real experiment (Lenski's, still running after tens of thousands of generations): bacteria divide so fast — several generations a day — that real change shows up on a lab timescale. 3. **A flu gene segment over one flu season, about 50 replication cycles.** Influenza's copying machinery makes far more mistakes per copy — new variants appear within a single season, which is why flu vaccines are updated every year. ## Test yourself @@ -59,13 +59,17 @@ The linear approximation $E \approx N\mu g$ breaks down once $\mu g$ is no longe ## Real world ### Dating when species split + Comparing the same gene in two species and counting the differences, then dividing by a measured mutation rate, gives a rough date for their last common ancestor — the molecular clock. ### Antibiotic resistance evolving + Bacteria dividing fast, with mutations happening on every copy, occasionally produce a mutation that survives an antibiotic — which then multiplies while its non-resistant neighbours die. ### Flu shots updated every year + Influenza's error-prone copying machinery lets new variants appear within months, fast enough that last year's vaccine often no longer matches this year's circulating strains. ### Cancer building up over a lifetime + Most cancers need several specific mutations in the same cell line before they turn dangerous — a slow accumulation over decades of ordinary cell division, which is one reason cancer risk climbs sharply with age. diff --git a/content/lessons/biology/dna-and-mutation-rates/lesson.yaml b/content/lessons/biology/dna-and-mutation-rates/lesson.yaml index 8a7e0a20..8c7ccb74 100644 --- a/content/lessons/biology/dna-and-mutation-rates/lesson.yaml +++ b/content/lessons/biology/dna-and-mutation-rates/lesson.yaml @@ -42,20 +42,20 @@ derivation: - \dfrac{E}{N} = \mu g = \text{fraction of bases changed} charts: [] presets: -- N: 1000 - mu: 0.01 - g: 10 -- N: 1000 - mu: 0.5 - g: 1000 -- N: 1000 - mu: 50 - g: 50 + - N: 1000 + mu: 0.01 + g: 10 + - N: 1000 + mu: 0.5 + g: 1000 + - N: 1000 + mu: 50 + g: 50 challenges: -- check: N*mu*g/1e6 - target: 50 - tol: 5 -- check: mu>=50 and g>=20 -- check: mu*g/1e6 - target: 0.01 - tol: 0.002 + - check: N*mu*g/1e6 + target: 50 + tol: 5 + - check: mu>=50 and g>=20 + - check: mu*g/1e6 + target: 0.01 + tol: 0.002 diff --git a/content/lessons/biology/enzyme-kinetics/ar.md b/content/lessons/biology/enzyme-kinetics/ar.md index ca76eb34..86ec3095 100644 --- a/content/lessons/biology/enzyme-kinetics/ar.md +++ b/content/lessons/biology/enzyme-kinetics/ar.md @@ -22,20 +22,20 @@ charts: ## Try it -1. ابدأ عند [S] منخفض وراقب الطاولة: الركيزة شحيحة، ومعظم الآلات جالسة بلا عمل، وعدّاد المعدّل بالكاد يرتفع. -2. اسحب [S] صعودًا إلى Km. يضيء نصف الإنزيمات بالضبط مشغولًا ويقرأ العدّاد نصف Vmax — هذا كل ما يعنيه Km. -3. تابع السحب متجاوزًا Km. تكتظ السحابة لكن الطاولة شبه ممتلئة أصلًا — يزحف العدّاد نحو Vmax ويستوي، فالآلات متشبعة. +1. اجعل [S] = 0.5 وراقب الطاولة: الركيزة قليلة، وآلتان فقط من 10 مشغولتان (20%)، وعدّاد المعدّل يقرأ v = 1.00 فقط. +2. ارفع [S] إلى Km = 2. ينشغل نصف الإنزيمات بالضبط (5/10) ويقرأ العدّاد نصف Vmax، أي v = 2.50 — هذا كل ما يعنيه Km. +3. تابع السحب إلى [S] = 30. تزدحم السحابة لكن الطاولة شبه ممتلئة (9/10 مشغولة) — يزحف العدّاد إلى v = 4.69، أقلّ بقليل من Vmax = 5، ويستوي، فالآلات متشبعة. ## Real-life examples - **إنزيم اللاكتاز يهضم سكّر الحليب.** إنزيم سريع وحسّاس (Vmax = 8، Km = 1.5) يعمل على كمية متواضعة من اللاكتوز ([S] = 3) يُبقي معظم الطاولة مشغولة بالفعل، فيحلّل السكّر بسرعة. -- **كحول ديهيدروجيناز يزيل الإيثانول.** إنزيم الكبد (Vmax = 4، Km = 4) يعمل عند مستوى ركيزة مطابق ([S] = 4) بسرعة نصفية بالضبط، وهذا جزء مما يبقي إزالة الكحول من الدم شبه ثابتة. +- **كحول ديهيدروجيناز يزيل الإيثانول.** إنزيم الكبد (Vmax = 4، Km = 4) يعمل عند مستوى ركيزة مطابق ([S] = 4) بنصف سرعته بالضبط: 5 آلات من 10 مشغولة والعدّاد يقرأ v = 2.00. - **إنزيم مُغرَق بالركيزة.** مع وفرة الركيزة ([S] = 25) وKm معتدل يساوي 2، يكون الإنزيم مشبَعًا تقريبًا، ويعمل قرب سقفه Vmax = 5. ## Test yourself 1. اجعل [S] مساويًا لـKm حتى يبلغ معدّل التفاعل نصف Vmax بالضبط. -2. ادفع [S] بما يكفي ليتجاوز المعدّل 90% من Vmax. +2. ارفع [S] بما يكفي ليتجاوز المعدّل 90% من Vmax. 3. باستخدام إنزيم سريع بـKm أقل من 2، ابلغ معدّل تفاعل أعلى من 3. ## Intuition @@ -52,7 +52,7 @@ charts: ## Advanced -تنبع معادلة مايكلس-منتن من افتراض الحالة المستقرة القائل إن مركّب الإنزيم والركيزة يتكوّن ويتفكّك بمعدّلين متساويين ($d[ES]/dt \approx 0$). يصح هذا حين تكون الركيزة بفائض كبير على الإنزيم، وهو شرط يتحقق في معظم الأوضاع المدرسية والصناعية، وإن لم يتحقق دائمًا داخل خلية مزدحمة. +تنبع معادلة مايكلس-منتن من افتراض الحالة المستقرة القائل إن مركّب الإنزيم والركيزة يتكوّن ويتفكّك بمعدّلين متساويين ($d[ES]/dt \approx 0$). يصح هذا حين تكون الركيزة بفائض كبير على الإنزيم، وهو شرط يتحقق في معظم تجارب المختبر والمصانع، وإن لم يتحقق دائمًا داخل خلية مزدحمة. ## Derivation @@ -63,13 +63,17 @@ charts: ## Real world ### تصميم الأدوية + تعمل أدوية كثيرة كمثبّطات تنافسية، فترفع Km الظاهري لإنزيم مستهدَف بحيث لا تعود الركيزة الطبيعية قادرة على منافسته بفعالية عند التراكيز المعتادة. ### عدم تحمّل اللاكتوز + يحدّد Km وVmax لإنزيم اللاكتاز كمية سكّر الألبان التي يستطيع الجهاز الهضمي معالجتها قبل ظهور الأعراض. ### التحفيز الصناعي -نحجّم مفاعلات الإنزيمات باستخدام Vmax وKm للتنبّؤ بالإنتاجية عند تركيز تغذية ركيزة معيّن. + +يُحدَّد حجم مفاعلات الإنزيمات باستخدام Vmax وKm للتنبّؤ بالإنتاجية عند تركيز تغذية ركيزة معيّن. ### إنزيمات الكبد والكحول + تحدّد حركية إنزيم كحول ديهيدروجيناز المعدّل شبه الثابت الذي يزيل به الجسم الإيثانول من الدم. diff --git a/content/lessons/biology/enzyme-kinetics/en.md b/content/lessons/biology/enzyme-kinetics/en.md index 41cedce2..d546c541 100644 --- a/content/lessons/biology/enzyme-kinetics/en.md +++ b/content/lessons/biology/enzyme-kinetics/en.md @@ -26,14 +26,14 @@ charts: ## Try it -1. Start at low [S] and watch the bench: substrate is scarce, most machines sit idle, and the rate meter barely lifts. -2. Drag [S] up to Km. Exactly half the enzymes light up busy and the meter reads half of Vmax — that is all Km means. -3. Keep dragging past Km. The cloud thickens but the bench is already nearly full — the meter creeps toward Vmax and flattens, machines saturated. +1. Set [S] = 0.5 and watch the bench: substrate is scarce, only 2 of the 10 machines are busy (20%), and the rate meter reads just v = 1.00. +2. Drag [S] up to Km = 2. Exactly half the enzymes light up busy (5/10) and the meter reads half of Vmax, v = 2.50 — that is all Km means. +3. Keep dragging to [S] = 30. The cloud thickens but the bench is nearly full (9/10 busy) — the meter creeps to v = 4.69, just under Vmax = 5, and flattens, machines saturated. ## Real-life examples - **Lactase digesting milk sugar.** A fast, sensitive enzyme (Vmax = 8, Km = 1.5) working on a modest amount of lactose ([S] = 3) already keeps most of the bench busy, breaking sugar down quickly. -- **Alcohol dehydrogenase clearing ethanol.** The liver's enzyme (Vmax = 4, Km = 4) working at a matching substrate level ([S] = 4) runs at exactly half speed — this is part of what keeps blood-alcohol clearance roughly steady. +- **Alcohol dehydrogenase clearing ethanol.** The liver's enzyme (Vmax = 4, Km = 4) working at a matching substrate level ([S] = 4) runs at exactly half speed: 5 of the 10 machines are busy and the meter reads v = 2.00. - **An enzyme swamped with substrate.** With plenty of substrate available ([S] = 25) and a moderate Km = 2, the enzyme is almost completely saturated, running close to its ceiling, Vmax = 5. ## Test yourself @@ -67,13 +67,17 @@ The Michaelis–Menten equation follows from the steady-state assumption that th ## Real world ### Drug design + Many drugs work as competitive inhibitors, raising a target enzyme’s apparent Km so normal substrate can no longer compete effectively at typical concentrations. ### Lactose intolerance + The enzyme lactase’s Km and Vmax determine how much dairy sugar the gut can process before symptoms appear. ### Industrial catalysis + Enzyme reactors are sized using Vmax and Km to predict throughput at a given substrate feed concentration. ### Liver enzymes and alcohol + Alcohol dehydrogenase’s kinetics set the roughly constant rate at which the body clears ethanol from the blood. diff --git a/content/lessons/biology/enzyme-kinetics/lesson.yaml b/content/lessons/biology/enzyme-kinetics/lesson.yaml index 43080840..8d103e4d 100644 --- a/content/lessons/biology/enzyme-kinetics/lesson.yaml +++ b/content/lessons/biology/enzyme-kinetics/lesson.yaml @@ -31,7 +31,7 @@ parameters: value: 3 variables: - v - - "[S]" + - '[S]' - V_{max} - K_m derivation: @@ -48,18 +48,18 @@ charts: - Vmax*x/(2*Km+x) primary: x presets: -- Vmax: 8 - Km: 1.5 - x: 3 -- Vmax: 4 - Km: 4 - x: 4 -- Vmax: 5 - Km: 2 - x: 25 + - Vmax: 8 + Km: 1.5 + x: 3 + - Vmax: 4 + Km: 4 + x: 4 + - Vmax: 5 + Km: 2 + x: 25 challenges: -- check: x/(Km+x) - target: 0.5 - tol: 0.02 -- check: x/(Km+x) > 0.9 -- check: Km < 2 and Vmax*x/(Km+x) > 3 + - check: x/(Km+x) + target: 0.5 + tol: 0.02 + - check: x/(Km+x) > 0.9 + - check: Km < 2 and Vmax*x/(Km+x) > 3 diff --git a/content/lessons/biology/hardy-weinberg/ar.md b/content/lessons/biology/hardy-weinberg/ar.md index 0b24dfa9..a9942c67 100644 --- a/content/lessons/biology/hardy-weinberg/ar.md +++ b/content/lessons/biology/hardy-weinberg/ar.md @@ -21,9 +21,9 @@ charts: ## Try it -1. حرّك $p$ نحو 0.5 وراقب المربع ينقسم إلى أربع رقع متساوية — تصبح فئة «نسخة من كلّ نوع» (Aa) الحصة الأكبر، 50 من القرويين المئة. -2. حرّك $p$ قريبًا من 1. تغمر رقعة AA المربع، وتستحوذ فئة «نسختا A» على التجمّع كلّه تقريبًا. -3. حرّك $p$ قريبًا من 0. تستحوذ زاوية «نسختا a» بدلًا منها الآن — العدّ نفسه، معكوسًا. +1. حرّك $p$ إلى 0.5 وراقب المربع ينقسم إلى أربع رقع متساوية — تصبح فئة «نسخة من كلّ نوع» (Aa) الحصة الأكبر، 50 من القرويين المئة. +2. حرّك $p$ إلى 0.9. تغمر رقعة AA المربع، وتستحوذ فئة «نسختا A» على معظم التجمّع: 81 من القرويين المئة، مع 18 من Aa وواحد فقط من aa. +3. حرّك $p$ إلى 0.1. تستحوذ زاوية «نسختا a» بدلًا منها الآن، ولها 81 من القرويين المئة — العدّ نفسه، معكوسًا. ## Real-life examples @@ -35,13 +35,13 @@ charts: 1. جِد $p$ حيث تشكّل فئة «نسختا A» 49% من التجمّع. 2. جِد $p$ حيث تبلغ فئة «نسخة من كلّ نوع» أكبر حجم ممكن. -3. ادفع فئة «نسختا a» النادرة دون 1% من التجمّع. +3. اجعل فئة «نسختا a» النادرة أقلّ من 1% من التجمّع. ## Intuition تخيّل جينًا له نسختان، A وa، ولا تعرف عنه سوى رقم واحد، هو حصّة النسخة A من كل النسخ في التجمّع، وتُسمّى $p$. حرّك منزلق $p$ وراقب ثلاث فئات تظهر تحته، وهي من يحمل نسختَي A، ومن يحمل نسخة من كلّ نوع، ومن يحمل نسختَي a. عند $p = 0.5$ تكون فئة "نسخة من كلّ نوع" الأكبر، وتضمّ نصف التجمّع. هذا ليس لأن الخلط "مفضَّل" بأي شكل، بل هو عدّ بسيط. هناك طريقتان لتحمل نسخة من كلّ نوع، A من أمّك وa من أبيك أو العكس، وطريقة واحدة فقط لتحمل النسخة نفسها مرّتين. -ادفع $p$ نحو 0 أو نحو 1 فتتقلّص فئة "نسخة من كلّ نوع" وتختفي، مع إحدى فئتَي التماثل. فحين يحمل الجميع تقريبًا الحرف نفسه، لا يبقى من يحمل الحرف الآخر تقريبًا. تفترض هذه اللقطة ألا شيء يدفع التطوّر. فلا انتقاء يفضّل حرفًا، ولا طفرات جديدة، ولا حظّ تجمّع صغير، ولا وافدون جدد. يقارن علماء الأحياء أرقام تجمّع حقيقي بهذا الأساس، وأي اختلاف عنه إشارة إلى أن شيئًا ما يعكّر هذه الصورة الهادئة. +ادفع $p$ نحو 0 أو نحو 1 فتتقلّص فئة "نسخة من كلّ نوع" وتختفي، مع إحدى فئتَي التماثل. فحين يحمل الجميع تقريبًا الحرف نفسه، لا يبقى من يحمل الحرف الآخر تقريبًا. تفترض هذه اللقطة ألا شيء يدفع التطوّر. فلا انتقاء يفضّل حرفًا، ولا طفرات جديدة، ولا صدفة تغيّر النسب في تجمّع صغير، ولا وافدون جدد. يقارن علماء الأحياء أرقام تجمّع حقيقي بهذا الأساس، وأي اختلاف عنه إشارة إلى أن شيئًا ما يعكّر هذه الصورة الهادئة. ## Formal @@ -51,7 +51,7 @@ charts: ## Advanced -نقيس الانحرافات عن نسب هاردي-واينبرغ مثلًا بمعامل الاستيطان $F = 1 - H_{obs}/H_{exp}$، الذي يقارن التغاير الزيجوتي المرصود بالمتوقّع. وهو أداة تشخيص قياسية في علم الوراثة السكانية لكشف زواج الأقارب أو التزاوج الانتقائي أو الانتقاء أو البنية السكانية. والاتزان مفيد تحديدًا لأنه الفرضية الصفرية التي تُختبر ضدّها. +نقيس الانحرافات عن نسب هاردي-واينبرغ مثلًا بمعامل التثبيت $F = 1 - H_{obs}/H_{exp}$، الذي يقارن التغاير الزيجوتي المرصود بالمتوقّع. وهو أداة تشخيص قياسية في علم الوراثة السكانية لكشف زواج الأقارب أو التزاوج الانتقائي أو الانتقاء أو البنية السكانية. والاتزان مفيد تحديدًا لأنه الفرضية الصفرية التي تُختبر ضدّها. ## Derivation @@ -62,13 +62,17 @@ charts: ## Real world ### فحص الأمراض المتنحّية + معرفة تردد الحاملين (2pq) لأليل مرض متنحٍّ من تردد المصابين (q²) يوجّه الاستشارة الوراثية. ### كشف الانتقاء + تجمّع تنحرف أعداد أنماطه الجينية عن نسب هاردي-واينبرغ يشير إلى أن شيئًا ما يعمل، كالانتقاء أو التزاوج غير العشوائي أو الانحراف. -### وراثة الحفظ -كثيرًا ما تُظهر التجمّعات الصغيرة المعزولة نقصًا في التغاير الزيجوتي مقارنة بهاردي-واينبرغ بسبب زواج الأقارب، إشارة تحذير رئيسية للحفظ. +### وراثة صون الأنواع + +كثيرًا ما تُظهر التجمّعات الصغيرة المعزولة نقصًا في التغاير الزيجوتي مقارنة بهاردي-واينبرغ بسبب تزاوج الأقارب، وهذه إشارة تحذير مهمّة لمن يعملون على حماية الأنواع. ### فصائل الدم + ترددات فصائل دم ABO في تجمّع مثال كلاسيكي يُستخدم لتدريس حسابات هاردي-واينبرغ. diff --git a/content/lessons/biology/hardy-weinberg/en.md b/content/lessons/biology/hardy-weinberg/en.md index 5f4e0b05..01c7fab0 100644 --- a/content/lessons/biology/hardy-weinberg/en.md +++ b/content/lessons/biology/hardy-weinberg/en.md @@ -22,9 +22,9 @@ charts: ## Try it -1. Drag $p$ toward 0.5 and watch the square split into four equal patches — the "one of each" group (Aa) becomes the largest share, 50 of the 100 villagers. -2. Drag $p$ close to 1. The AA patch floods the square, and the "two A" villagers take over almost the whole population. -3. Drag $p$ close to 0. The "two a" corner takes over instead — the same counting, mirrored. +1. Drag $p$ to 0.5 and watch the square split into four equal patches — the "one of each" group (Aa) becomes the largest share, 50 of the 100 villagers. +2. Drag $p$ to 0.9. The AA patch floods the square, and the "two A" villagers take over most of the population: 81 of the 100, with 18 Aa and just 1 aa. +3. Drag $p$ to 0.1. The "two a" corner takes over instead, with 81 of the 100 villagers — the same counting, mirrored. ## Real-life examples @@ -63,13 +63,17 @@ Deviations from Hardy–Weinberg proportions (measured, e.g., by the fixation in ## Real world ### Screening for recessive disease + Knowing the frequency of carriers (2pq) of a recessive disease allele from the frequency of affected individuals (q²) guides genetic counselling. ### Detecting selection + A population whose genotype counts drift from Hardy–Weinberg proportions is a signal that something — selection, non-random mating, drift — is acting. ### Conservation genetics + Small, isolated populations often show heterozygote deficits relative to Hardy–Weinberg due to inbreeding, a key conservation warning sign. ### Blood types + ABO blood group frequencies in a population are classic examples used to teach Hardy–Weinberg calculations. diff --git a/content/lessons/biology/hardy-weinberg/lesson.yaml b/content/lessons/biology/hardy-weinberg/lesson.yaml index e970b1f1..40a857c5 100644 --- a/content/lessons/biology/hardy-weinberg/lesson.yaml +++ b/content/lessons/biology/hardy-weinberg/lesson.yaml @@ -39,11 +39,11 @@ charts: - (1-x)^2 primary: x presets: -- x: 0.98 -- x: 0.5 -- x: 0.8 + - x: 0.98 + - x: 0.5 + - x: 0.8 challenges: -- check: x^2 - target: 0.49 -- check: abs(x - 0.5) < 0.02 -- check: (1-x)^2 < 0.01 + - check: x^2 + target: 0.49 + - check: abs(x - 0.5) < 0.02 + - check: (1-x)^2 < 0.01 diff --git a/content/lessons/biology/heart-rate-and-blood-flow/ar.md b/content/lessons/biology/heart-rate-and-blood-flow/ar.md index 94928bc9..f4522590 100644 --- a/content/lessons/biology/heart-rate-and-blood-flow/ar.md +++ b/content/lessons/biology/heart-rate-and-blood-flow/ar.md @@ -14,20 +14,20 @@ variables: ## Try it -1. ابدأ عند الراحة: 70 نبضة في الدقيقة، 70 مل لكل نبضة. راقب الدورة تستغرق نحو دقيقة لتُكمل طوافًا كاملًا. -2. ارفع معدل ضربات القلب نحو وتيرة الهرولة وراقب الدورة تتسارع. -3. ادفع معدل الضربات وحجم الضربة معًا إلى أقصى مجهود رياضي مدرّب. راقب النتاج القلبي يتجاوز 20 لتر/دقيقة والدورة تكتمل في نحو 12 ثانية فقط. +1. ابدأ عند الراحة: 70 نبضة في الدقيقة، 70 مل لكل نبضة. راقب النقطة تستغرق نحو دقيقة لتُكمل لفّة كاملة. +2. ارفع معدل ضربات القلب إلى وتيرة الهرولة، 140 نبضة في الدقيقة، وراقب اللفّة تتسارع: النتاج القلبي 9.8 لتر/دقيقة واللفّة الواحدة تستغرق نحو 31 ثانية. +3. ارفع معدل الضربات وحجم الضربة معًا إلى أقصى مجهود لرياضي مدرَّب: 190 نبضة في الدقيقة و130 مل. راقب النتاج القلبي يبلغ 24.7 لتر/دقيقة واللفّة تكتمل في نحو 12 ثانية فقط. ## Real-life examples 1. **الاسترخاء على الأريكة.** 70 نبضة في الدقيقة، 70 مل لكل نبضة. نحو 4.9 لتر/دقيقة، قريب من كامل حجم دمك يتحرك مرة كل دقيقة. 2. **هرولة معتدلة.** يرتفع معدل الضربات إلى نحو 140 نبضة/دقيقة، ويرتفع حجم الضربة أيضًا مع امتلاء القلب وتفريغه بقوة أكبر. يزيد النتاج أكثر من الضعف، إلى نحو 12.6 لتر/دقيقة. -3. **رياضي نخبة في أقصى مجهود.** قلب مدرَّب قرب 190 نبضة/دقيقة، بحجم ضربة بنته سنوات من التدريب إلى نحو 130 مل. يمكنه دفع النتاج القلبي فوق 24 لتر/دقيقة، خمسة أضعاف معدل الراحة. +3. **رياضي محترف في أقصى مجهود.** قلب مدرَّب قرب 190 نبضة/دقيقة، بحجم ضربة بنته سنوات من التدريب إلى نحو 130 مل. يمكنه دفع النتاج القلبي فوق 24 لتر/دقيقة، خمسة أضعاف معدل الراحة. ## Test yourself -1. اقترب من نتاج قلبي عند الراحة يبلغ نحو 5 لتر/دقيقة. -2. بلغ نتاجًا قلبيًا لرياضي نخبة نحو 25 لتر/دقيقة. +1. اصنع قلب رياضي مدرَّب وهو مستريح: معدل ضربات أقل من 55 نبضة في الدقيقة، ومع ذلك نتاج قلبي نحو 5 لتر/دقيقة. +2. اجعل النتاج القلبي نحو 25 لتر/دقيقة، كما عند رياضي محترف. 3. اجعل معدل الضربات فوق 150 وحجم الضربة فوق 90 في الوقت نفسه. ## Intuition @@ -38,13 +38,13 @@ variables: ## Formal -النتاج القلبي هو حاصل ضرب الاثنين، $\mathrm{CO} = \mathrm{HR}\times \mathrm{SV}$، ويُذكر عادة بالمليلتر في الدقيقة ثم يُقسم على 1000 لللتر في الدقيقة. يستقر شخص بالغ عند الراحة قرب $\mathrm{CO}\approx 5$ لتر/دقيقة، وهو تقريبًا طواف كامل واحد لنحو 5 لترات من الدم في الجسم. +النتاج القلبي هو حاصل ضرب الاثنين، $\mathrm{CO} = \mathrm{HR}\times \mathrm{SV}$، ويُذكر عادة بالمليلتر في الدقيقة ثم يُقسم على 1000 ليصير باللتر في الدقيقة. يستقر شخص بالغ عند الراحة قرب $\mathrm{CO}\approx 5$ لتر/دقيقة، وهو تقريبًا دورة كاملة واحدة لنحو 5 لترات من الدم في الجسم. -بما أن $\mathrm{CO}$ حاصل ضرب، فإن ارتفاع أي من العاملين يرفعه: معدل ضربات أسرع وحده يمكن أن يضاعف النتاج تقريبًا، وقلب أكفأ يرفع حجم ضربته أيضًا أثناء المجهود يمكنه أن يضاعف الأثرين معًا، وهذا كيف يبلغ رياضيو التحمل النخبة نتاجًا قلبيًا يفوق معدل الراحة بأضعاف. +بما أن $\mathrm{CO}$ حاصل ضرب، فإن ارتفاع أي من العاملين يرفعه: معدل ضربات أسرع وحده يمكن أن يضاعف النتاج تقريبًا، وقلب أكفأ يرفع حجم ضربته أيضًا أثناء المجهود يمكنه أن يضاعف الأثرين معًا، وهكذا يبلغ كبار رياضيي التحمل نتاجًا قلبيًا يفوق معدل الراحة بأضعاف. ## Advanced -حجم الضربة نفسه ليس ثابتًا. كلما امتلأت حجرات القلب بدم أكثر بين نبضة وأخرى، انقبضت عضلة القلب بقوة أكبر ودفعت كمية أكبر، وهي استجابة ميكانيكية مدمجة تُسمى آلية فرانك-ستارلنغ. يوسّع التدريب على التحمل حجرات القلب عبر أشهر، فيرفع حجم الضربة عند *الراحة* بشكل دائم. وهذا بالضبط سبب أن معدل ضربات القلب عند الراحة لرياضي مدرَّب جيدًا قد ينخفض إلى 40-50 نبضة/دقيقة ومع ذلك يوصّل نتاجًا قلبيًا طبيعيًا تمامًا. +حجم الضربة نفسه ليس ثابتًا. كلما امتلأت حجرات القلب بدم أكثر بين نبضة وأخرى، انقبضت عضلة القلب بقوة أكبر ودفعت كمية أكبر، وهي استجابة ميكانيكية مدمجة تُسمى آلية فرانك-ستارلنغ. يوسّع التدريب على التحمل حجرات القلب عبر أشهر، فيرفع حجم الضربة عند _الراحة_ بشكل دائم. وهذا بالضبط سبب أن معدل ضربات القلب عند الراحة لرياضي مدرَّب جيدًا قد ينخفض إلى 40-50 نبضة/دقيقة ومع ذلك يعطي نتاجًا قلبيًا طبيعيًا تمامًا. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### معدل ضربات القلب عند الراحة كمؤشر لياقة + يراقب الأطباء وأجهزة اللياقة معدل ضربات القلب عند الراحة، لأن معدلًا أقل عند النتاج القلبي نفسه يعني غالبًا قلبًا أقوى يحرّك دمًا أكثر في كل نبضة واحدة. ### قصور القلب + في قصور القلب لا تستطيع العضلة المُضعفة دفع دم بقدر ما كانت تفعله في كل نبضة، فينخفض حجم الضربة. وغالبًا يعوّض القلب بالنبض أسرع، لكن النتاج القلبي قد يظل أقل مما يحتاجه الجسم. ### استجابة الكرّ والفرّ + اندفاع الأدرينالين يرفع معدل ضربات القلب فورًا تقريبًا ويجعل كل نبضة تنقبض بقوة أكبر، فيرتفع النتاج القلبي خلال ثوانٍ لإيصال أكسجين أكثر إلى العضلات. ### أجهزة اللياقة القابلة للارتداء -تقيس معظم ساعات اللياقة معدل ضربات القلب مباشرة من نبضك، وتقدّر النتاج القلبي بشكل غير مباشر، مستعملة إياه للحكم على شدة التمرين رغم أن حجم الضربة نفسه أصعب بكثير أن يُقاس خارج المستشفى. + +تقيس معظم ساعات اللياقة معدل ضربات القلب مباشرة من نبضك، وتقدّر النتاج القلبي بشكل غير مباشر، مستعملة إياه للحكم على شدة التمرين رغم أن حجم الضربة نفسه قياسه خارج المستشفى أصعب بكثير. diff --git a/content/lessons/biology/heart-rate-and-blood-flow/en.md b/content/lessons/biology/heart-rate-and-blood-flow/en.md index b7480172..e13a13b3 100644 --- a/content/lessons/biology/heart-rate-and-blood-flow/en.md +++ b/content/lessons/biology/heart-rate-and-blood-flow/en.md @@ -16,8 +16,8 @@ variables: ## Try it 1. Start at rest: 70 beats per minute, 70 mL per beat. Watch the loop take about a minute to complete one full circuit. -2. Raise heart rate toward a jogging pace and watch the loop speed up. -3. Push both heart rate and stroke volume to a trained athlete's maximum effort. Watch cardiac output blow past 20 L/min and the loop complete in barely 12 seconds. +2. Raise heart rate to a jogging pace, 140 beats per minute, and watch the loop speed up: cardiac output reads 9.8 L/min and one circuit takes about 31 seconds. +3. Push both heart rate and stroke volume to a trained athlete's maximum effort: 190 beats per minute and 130 mL. Watch cardiac output reach 24.7 L/min and the loop complete in barely 12 seconds. ## Real-life examples @@ -27,7 +27,7 @@ variables: ## Test yourself -1. Land close to a resting cardiac output of about 5 L/min. +1. Build a trained athlete's resting heart: a heart rate under 55 beats per minute that still gives a cardiac output of about 5 L/min. 2. Reach an elite athlete's cardiac output of about 25 L/min. 3. Get heart rate above 150 and stroke volume above 90 at the same time. @@ -45,7 +45,7 @@ Because $\mathrm{CO}$ is a product, either factor rising raises it: a faster hea ## Advanced -Stroke volume itself is not fixed — the more blood fills the heart's chambers between beats, the more forcefully the heart muscle contracts and the more it ejects, a built-in mechanical response called the Frank–Starling mechanism. Endurance training enlarges the heart's chambers over months, raising the *resting* stroke volume permanently — which is exactly why a well-trained resting heart rate can sit as low as 40–50 bpm and still deliver a completely normal cardiac output. +Stroke volume itself is not fixed — the more blood fills the heart's chambers between beats, the more forcefully the heart muscle contracts and the more it ejects, a built-in mechanical response called the Frank–Starling mechanism. Endurance training enlarges the heart's chambers over months, raising the _resting_ stroke volume permanently — which is exactly why a well-trained resting heart rate can sit as low as 40–50 bpm and still deliver a completely normal cardiac output. ## Derivation @@ -56,13 +56,17 @@ Stroke volume itself is not fixed — the more blood fills the heart's chambers ## Real world ### Resting heart rate as a fitness marker + Doctors and fitness trackers alike watch resting heart rate because a lower one, at the same cardiac output, usually means a stronger heart moving more blood with every single beat. ### Heart failure + In heart failure the weakened muscle cannot eject as much blood per beat, so stroke volume drops; the heart often compensates by beating faster, but cardiac output can still fall short of what the body needs. ### The fight-or-flight response + A surge of adrenaline raises heart rate almost instantly and makes each beat squeeze harder, boosting cardiac output within seconds to get more oxygen to the muscles. ### Wearable fitness trackers + Most fitness watches measure heart rate directly from your pulse and estimate cardiac output indirectly, using it to judge exercise intensity even though stroke volume itself is much harder to measure without a hospital. diff --git a/content/lessons/biology/heart-rate-and-blood-flow/lesson.yaml b/content/lessons/biology/heart-rate-and-blood-flow/lesson.yaml index 13a593f3..0f7c0ad2 100644 --- a/content/lessons/biology/heart-rate-and-blood-flow/lesson.yaml +++ b/content/lessons/biology/heart-rate-and-blood-flow/lesson.yaml @@ -37,17 +37,15 @@ derivation: - \mathrm{CO} = \mathrm{HR}\times \mathrm{SV} \ (\text{mL/min}), \qquad \mathrm{CO}[\text{L/min}] = \dfrac{\mathrm{HR}\times \mathrm{SV}}{1000} charts: [] presets: -- HR: 70 - SV: 70 -- HR: 140 - SV: 90 -- HR: 190 - SV: 130 + - HR: 70 + SV: 70 + - HR: 140 + SV: 90 + - HR: 190 + SV: 130 challenges: -- check: HR*SV/1000 - target: 5 - tol: 0.3 -- check: HR*SV/1000 - target: 25 - tol: 2 -- check: HR>150 and SV>90 + - check: HR < 55 and abs(HR*SV/1000 - 5) < 0.3 + - check: HR*SV/1000 + target: 25 + tol: 2 + - check: HR>150 and SV>90 diff --git a/content/lessons/biology/logistic-population/ar.md b/content/lessons/biology/logistic-population/ar.md index 0d89a452..6cda1834 100644 --- a/content/lessons/biology/logistic-population/ar.md +++ b/content/lessons/biology/logistic-population/ar.md @@ -16,9 +16,9 @@ variables: ## Try it -1. راقب المنحنى يبدأ منخفضًا ويتصاعد كأنه نموّ أُسّي غير مقيّد تقريبًا. -2. ارفع K، القدرة الاستيعابية. يحصل التجمّع الآن على مساحة أكبر وينمو إلى مستوى نهائي أعلى. -3. ارفع r، معدّل النموّ، بدلًا من ذلك. يصبح الصعود أكثر انحدارًا، لكنه لا يزال يستوي عند K نفسه. +1. في البداية (r = 0.3 و K = 1000 و P0 = 50)، راقب المنحنى يبدأ منخفضًا ويصعد كأنه نموّ أُسّي بلا قيود تقريبًا، ثم يستوي عند 1000. +2. ارفع K، القدرة الاستيعابية، إلى 2000. يجد التجمّع الآن متّسعًا أكبر وينمو حتى يستقرّ عند 2000. +3. أعد K إلى 1000، وارفع r، معدّل النموّ، إلى 0.6. يصبح الصعود أسرع: يتجاوز العدد 500 قرب t = 5 بدل t = 10، لكنه يستوي عند 1000 كما كان. ## Real-life examples @@ -29,14 +29,14 @@ variables: ## Test yourself 1. اجعل عدد السكان الابتدائي نصف القدرة الاستيعابية بالضبط، وهي أسرع نقطة نموّ على المنحنى. -2. أعطِ التجمّع مساحة للنموّ عشرين ضعفًا، فاجعل K عشرين ضعف P0 على الأقل. +2. أعطِ التجمّع متّسعًا لينمو أربعين ضعفًا: اجعل K أربعين ضعف P0 على الأقل. 3. اجعل التجمّع يتعافى بسرعة بضبط r فوق 0.5 مع البدء بأقلّ من 30 فردًا. ## Intuition -تتكاثر الخميرة المضافة إلى دورق ماء سكّري بسرعة في البداية، وتتضاعف مرّة بعد مرّة، لكن الدورق يتّسع لكمية محدودة من الحياة فقط، فيتوقّف النموّ في النهاية. اسحب منزلق عدد السكان الابتدائي، P0، إلى قيمة قريبة من الصفر. يتصاعد المنحنى كأنه نموّ أُسّي بسيط تقريبًا، لأن الموارد تبدو غير محدودة عندما يتنافس عليها أفراد قليلون جدًّا. راقب الآن ما يحدث حين يقترب المنحنى من السقف الذي يحدّده K، القدرة الاستيعابية للبيئة. ينحني ويستوي، لأن ازدحام الموارد يخنق النموّ بمجرّد اقتراب التجمّع مما تستطيع البيئة إعالته. +تتكاثر الخميرة المضافة إلى دورق ماء سكّري بسرعة في البداية، وتتضاعف مرّة بعد مرّة، لكن الدورق لا يتّسع إلا لعدد محدود من الخلايا، فيتوقّف النموّ في النهاية. اسحب منزلق عدد السكان الابتدائي، P0، إلى قيمة قريبة من الصفر. يتصاعد المنحنى كأنه نموّ أُسّي بسيط تقريبًا، لأن الموارد تبدو غير محدودة عندما يتنافس عليها أفراد قليلون جدًّا. راقب الآن ما يحدث حين يقترب المنحنى من السقف الذي يحدّده K، القدرة الاستيعابية للبيئة. ينحني ويستوي، لأن الغذاء والمكان يقلّان فيتوقّف النموّ حين يقترب التجمّع مما تستطيع البيئة إعالته. -ارفع K، السقف نفسه، فيحصل التجمّع على مساحة أكبر للنموّ قبل أن يستوي. ارفع r بدلًا من ذلك، معدّل النموّ، فيصبح الصعود أكثر انحدارًا دون أن يتحرّك ذلك السقف. فـr يحدّد الوتيرة، وK يحدّد الوجهة. ينمو المنحنى كلّه أسرع ما يكون في منتصف الطريق بالضبط إلى السقف، حين يبلغ التجمّع نصف القدرة الاستيعابية. +ارفع K، السقف نفسه، فيجد التجمّع متّسعًا أكبر للنموّ قبل أن يستوي. ارفع r بدلًا من ذلك، معدّل النموّ، فيصبح الصعود أسرع دون أن يتحرّك ذلك السقف. فـr يحدّد الوتيرة، وK يحدّد الوجهة. ينمو المنحنى كلّه أسرع ما يكون في منتصف الطريق بالضبط إلى السقف، حين يبلغ التجمّع نصف القدرة الاستيعابية. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### الخميرة في الدورق + تتبع تجمّعات مخبرية كلاسيكية من الخميرة أو البكتيريا هذا المنحنى بدقة تقريبًا بمجرد أن تبدأ المغذّيات بالنفاد. ### إدارة الحياة البرية -تُدار تجمّعات الغزلان أو الأسماك بتقدير K لموطن معيّن ومنع الحصاد من دفع الأعداد فوقه. + +تُدار تجمّعات الغزلان أو الأسماك بتقدير K لموطن معيّن وضبط الصيد حتى لا تزيد الأعداد عليه. ### استيطان الجزر + ينمو نوع أُدخل إلى جزيرة بسرعة في البداية، ثم يستقرّ عدده قرب القدرة الاستيعابية للجزيرة. ### سكان البشر -يُنمذج بعض الديموغرافيين نموّ السكان الإقليمي بأنه لوجستي، مع K يحدّده الموارد والأرض والتقنية. + +يصف بعض علماء السكان نموّ سكان منطقة ما بأنه لوجستي، مع K يحدّده الموارد والأرض والتقنية. diff --git a/content/lessons/biology/logistic-population/en.md b/content/lessons/biology/logistic-population/en.md index 3e3e0e44..c80b1bdc 100644 --- a/content/lessons/biology/logistic-population/en.md +++ b/content/lessons/biology/logistic-population/en.md @@ -19,9 +19,9 @@ variables: ## Try it -1. Watch the curve start low and climb almost like unchecked exponential growth. -2. Raise K, the carrying capacity. The population now has more room and grows to a higher final level. -3. Raise r, the growth rate, instead. The climb gets steeper, but it still levels off at the same K. +1. At the start (r = 0.3, K = 1000, P0 = 50), watch the curve start low, climb almost like unchecked exponential growth, then flatten at 1000. +2. Raise K, the carrying capacity, to 2000. The population now has more room and grows to a final level of 2000. +3. Put K back at 1000 and raise r, the growth rate, to 0.6 instead. The climb gets steeper — the population passes 500 near t = 5 instead of t = 10 — but it still levels off at 1000. ## Real-life examples @@ -32,7 +32,7 @@ variables: ## Test yourself 1. Set the starting population at exactly half the carrying capacity — the fastest-growing point on the curve. -2. Give the population room to grow twentyfold: make K at least 20 times P0. +2. Give the population room to grow fortyfold: make K at least 40 times P0. 3. Make the population recover quickly by setting r above 0.5 while starting from fewer than 30 individuals. ## Intuition @@ -60,13 +60,17 @@ For $P$ slightly below $K$, writing $P = K - \epsilon$ gives $\dot\epsilon \appr ## Real world ### Yeast in a flask + Classic lab populations of yeast or bacteria follow this curve almost exactly once nutrients start to run out. ### Wildlife management + Deer or fish populations are managed by estimating K for a habitat and keeping harvests from pushing numbers above it. ### Island colonisation + A species introduced to an island grows fast at first, then its numbers level off near the island’s carrying capacity. ### Human population + Some demographers model regional population growth as logistic, with K set by resources, land and technology. diff --git a/content/lessons/biology/logistic-population/lesson.yaml b/content/lessons/biology/logistic-population/lesson.yaml index 324ffd4c..c20bc309 100644 --- a/content/lessons/biology/logistic-population/lesson.yaml +++ b/content/lessons/biology/logistic-population/lesson.yaml @@ -57,16 +57,16 @@ derivation: charts: [] primary: r presets: -- r: 0.8 - K: 200 - P0: 10 -- r: 0.25 - K: 1000 - P0: 50 -- r: 0.06 - K: 500 - P0: 20 + - r: 0.8 + K: 200 + P0: 10 + - r: 0.25 + K: 1000 + P0: 50 + - r: 0.06 + K: 500 + P0: 20 challenges: -- check: abs(P0/K - 0.5) < 0.02 -- check: K/P0 >= 20 -- check: r > 0.5 and P0 < 30 + - check: abs(P0/K - 0.5) < 0.02 + - check: K/P0 >= 40 + - check: r > 0.5 and P0 < 30 diff --git a/content/lessons/biology/natural-selection/ar.md b/content/lessons/biology/natural-selection/ar.md index 3b05c48e..2e93bcf8 100644 --- a/content/lessons/biology/natural-selection/ar.md +++ b/content/lessons/biology/natural-selection/ar.md @@ -14,13 +14,13 @@ variables: ## Try it -1. ابدأ بـp0 قريب من 0.05، أي طفرة نادرة جديدة، وراقب المنحنى بالكاد يتحرّك. -2. ارفع s فوق الصفر بكثير. يتسارع صعود المنحنى، لكنه يحافظ على شكله السيني نفسه. -3. اجعل s سالبًا بدلًا من ذلك. ينخفض المنحنى الآن نحو الصفر، فالأليل يُستبعد تدريجيًا. +1. ابدأ بـ s = 0.1 و p0 = 0.05، أي طفرة نادرة جديدة. بالكاد يتحرّك المنحنى في البداية، ولا يبلغ 0.5 إلا قرب t = 29، ثم يستوي قرب 1. +2. ارفع s إلى 0.3. يتسارع صعود المنحنى فيبلغ 0.5 قرب t = 10، لكنه يحافظ على شكله نفسه الشبيه بحرف S. +3. اجعل s سالبًا، عند −0.1. ينخفض المنحنى الآن من 0.05 نحو الصفر، فالأليل يختفي تدريجيًا. ## Real-life examples -- **فراشات الفلفل تصبح داكنة.** ميزة قوية ضدّ افتراس الطيور (s = 0.3) تتيح لطفرة لون داكن نادرة (p0 = 0.05) أن تنتشر بسرعة في غابة موبوءة بالسخام والتلوّث. +- **العثّ المرقّط يصير داكنًا.** ميزة قوية ضدّ افتراس الطيور (s = 0.3) تتيح لطفرة لون داكن نادرة (p0 = 0.05) أن تنتشر بسرعة في غابة سوّد السخام والتلوّث أشجارها. - **ظهور مقاومة المضادات الحيوية.** بكتيريا مقاومة واحدة وسط تجمّع هائل (p0 = 0.01) بميزة بقاء قوية (s = 0.2) تحت تعرّض ثابت لمضاد حيوي يمكن أن تستحوذ على التجمّع خلال أيام. - **أليل ضارّ في تراجع.** بدءًا من نصف التجمّع (p0 = 0.5)، يُستبعد أليل ضارّ بدرجة خفيفة (s = −0.15) جيلًا بعد جيل. @@ -54,14 +54,18 @@ variables: ## Real world -### فراشات الفلفل -انتشرت الفراشات الداكنة بسرعة في إنجلترا الملوثة في القرن التاسع عشر، إذ كان s>0 بفضل نجاتها من افتراس الطيور على الأشجار المسودّة بالسخام، ثم تراجعت بعد تحسن جودة الهواء. +### العثّ المرقّط + +انتشر العثّ الداكن بسرعة في إنجلترا الملوثة في القرن التاسع عشر، إذ كان s>0 بفضل نجاته من الطيور على الأشجار المسودّة بالسخام، ثم تراجع بعد تحسن جودة الهواء. ### مقاومة المضادات الحيوية + ينتشر أليل مقاومة له s صغير عبر تجمّع بكتيري خلال أيام فقط تحت تعرض ثابت لمضاد حيوي. ### مقاومة المبيدات + تُظهر تجمّعات حشرية تعرضت لمبيد ارتفاعًا سينيًا نموذجيًا في تردد الأليل المقاوم عبر أجيال متتالية. ### استمرار إنزيم اللاكتاز + انتشر الأليل الذي يتيح للبالغين هضم الحليب عبر التجمّعات الرعوية على مدى آلاف السنين مع انتشار تربية الألبان. diff --git a/content/lessons/biology/natural-selection/en.md b/content/lessons/biology/natural-selection/en.md index 597247e6..bac02e50 100644 --- a/content/lessons/biology/natural-selection/en.md +++ b/content/lessons/biology/natural-selection/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Start p0 near 0.05 — a rare new mutation — and watch the curve barely move. -2. Raise s well above zero. The curve climbs faster, but keeps its same S shape. -3. Make s negative instead. The curve now falls toward zero: the allele is being weeded out. +1. Start with s = 0.1 and p0 = 0.05 — a rare new mutation. The curve barely moves at first, takes until about t = 29 to reach 0.5, then levels off near 1. +2. Raise s to 0.3. The curve climbs faster — it reaches 0.5 near t = 10 — but keeps its same S shape. +3. Make s negative instead, at −0.1. The curve now falls from 0.05 toward zero: the allele is being weeded out. ## Real-life examples @@ -58,13 +58,17 @@ Real selection also depends on dominance: a recessive beneficial allele (only he ## Real world ### Peppered moths + Dark moths spread rapidly in polluted 19th-century England (s>0 against bird predation on soot-darkened trees), then receded once air quality improved. ### Antibiotic resistance + A resistance allele with even a small s spreads through a bacterial population within days under constant antibiotic exposure. ### Pesticide resistance + Insect populations exposed to a pesticide show textbook S-curve rises in the resistant allele’s frequency over successive generations. ### Lactase persistence + The allele letting adults digest milk spread through pastoral populations over thousands of years as dairying spread. diff --git a/content/lessons/biology/natural-selection/lesson.yaml b/content/lessons/biology/natural-selection/lesson.yaml index 65560fe9..b099e8d0 100644 --- a/content/lessons/biology/natural-selection/lesson.yaml +++ b/content/lessons/biology/natural-selection/lesson.yaml @@ -50,13 +50,13 @@ derivation: charts: [] primary: s presets: -- s: 0.3 - p0: 0.05 -- s: 0.2 - p0: 0.01 -- s: -0.15 - p0: 0.5 + - s: 0.3 + p0: 0.05 + - s: 0.2 + p0: 0.01 + - s: -0.15 + p0: 0.5 challenges: -- check: p0 < 0.05 and s > 0.25 -- check: s < 0 and p0 > 0.5 -- check: abs(p0 - 0.5) < 0.02 + - check: p0 < 0.05 and s > 0.25 + - check: s < 0 and p0 > 0.5 + - check: abs(p0 - 0.5) < 0.02 diff --git a/content/lessons/biology/photosynthesis-and-light/ar.md b/content/lessons/biology/photosynthesis-and-light/ar.md index d54efecb..a8efc1c1 100644 --- a/content/lessons/biology/photosynthesis-and-light/ar.md +++ b/content/lessons/biology/photosynthesis-and-light/ar.md @@ -19,27 +19,27 @@ variables: ## Try it -1. ابدأ بضوء منخفض وتركيز ثاني أكسيد كربون عادي في الهواء الطلق. المعدل بالكاد موجب. -2. ارفع الضوء نحو شمس الظهيرة الكاملة وراقب المنحنى يتسطّح. يصبح هضبة قبل أن يبدو «مكتملًا» بكثير. -3. ارفع ثاني أكسيد الكربون أيضًا الآن. ترتفع الهضبة كلها. +1. ابدأ بضوء منخفض، 30، وتركيز ثاني أكسيد الكربون العادي في الهواء الطلق، 420 جزءًا بالمليون. المعدل الصافي 0.37: بالكاد موجب. +2. ارفع الضوء إلى 1000 فيصير المعدل الصافي 7.75. تابع إلى شمس الظهيرة الكاملة، 2000، فلا يبلغ إلا 8.55: تسطّح المنحنى وصار هضبة قبل أن يبدو «مكتملًا» بكثير. +3. ارفع الآن ثاني أكسيد الكربون أيضًا إلى 800 جزء بالمليون. ترتفع الهضبة كلها: يرتفع Pmax من 10.5 إلى 20 ويصير المعدل الصافي 17.18. ## Real-life examples -1. **يوم غائم، أو ورقة في ظل عميق.** يصلها نحو 100 μmol من الضوء فقط. المعدل بالكاد يفوق النقطة التي يغطّي عندها التمثيل الضوئي تنفس الورقة نفسه بالضبط. -2. **شمس الظهيرة الكاملة، هواء طلق عادي عند نحو 420 جزء بالمليون من CO₂.** لم يعد الضوء المشكلة، لكن المعدل يستقر عند هضبة أقل بكثير من أقصاه الحقيقي. أصبح CO₂ هو العامل المقيِّد بدلًا منه. -3. **صوبة زراعية مُخصَّبة بـ CO₂ في ضوء كامل.** يضخّ المزارعون CO₂ حتى نحو 1000 جزء بالمليون بالضبط لرفع هذه الهضبة، وهي ممارسة بستنة حقيقية وشائعة تسرّع نمو المحاصيل قياسيًا. +1. **يوم غائم، أو ورقة في ظل عميق.** يصلها نحو 100 μmol من الضوء فقط. المعدل الصافي 2.5 فقط، غير بعيد عن النقطة التي يغطّي عندها التمثيل الضوئي تنفس الورقة نفسها بالكاد. +2. **شمس الظهيرة الكاملة، هواء طلق عادي عند نحو 420 جزء بالمليون من CO₂.** لم يعد الضوء المشكلة، لكن المعدل يستقر عند هضبة قرب 8.3، أقل بكثير من أقصاه الحقيقي. أصبح CO₂ هو العامل المقيِّد بدلًا منه. +3. **بيت محمي يُزوَّد بـ CO₂ إضافي في ضوء كامل.** يضخّ المزارعون CO₂ حتى نحو 1000 جزء بالمليون لرفع هذه الهضبة تحديدًا، هنا إلى نحو 16.6، وهي ممارسة زراعية حقيقية وشائعة تسرّع نمو المحاصيل بشكل ملحوظ. ## Test yourself 1. اجعل الورقة مشبعة ضوئيًا عند تركيز CO₂ العادي في الهواء الطلق اليوم. -2. أعد إنتاج صوبة مُخصَّبة بـ CO₂ تعمل قرب التشبع الضوئي. +2. حاكِ بيتًا محميًا يُزوَّد بـ CO₂ إضافي ويعمل قرب التشبع الضوئي. 3. جِد تقريبًا نقطة تعادل الضوء، حيث يكون المعدل الصافي قريبًا من الصفر. ## Intuition عند الضوء المنخفض، يُستعمل كل فوتون إضافي يصل الورقة فورًا تقريبًا. قلّة قليلة فقط من آلة التقاط الضوء في الورقة مشغولة، فيرتفع المعدل بحدّة مع زيادة الضوء. هذا هو الجزء الحاد من المنحنى. -بعد مستوى ضوء معيّن، تعجز الآلة التي تحوّل الضوء الملتقَط فعليًا إلى سكر عن مجاراة الوارد مهما زاد عدد الفوتونات. إنها تعمل بأقصى طاقتها أصلًا، مقيّدة بشيء آخر تمامًا، عادة سرعة التقاط CO₂ من الهواء. يتوقف الضوء الإضافي عن الإفادة، ويتسطّح المنحنى في هضبة. الطريقة الوحيدة لرفع ذلك السقف هي إزالة أيًّا كان العائق الحقيقي الآن. أعطِ الورقة CO₂ أكثر، فترتفع الهضبة نفسها. +بعد مستوى ضوء معيّن، تعجز الآلة التي تحوّل الضوء الملتقَط فعليًا إلى سكر عن مجاراة الوارد مهما زاد عدد الفوتونات. إنها تعمل بأقصى طاقتها أصلًا، مقيّدة بشيء آخر تمامًا، عادة سرعة التقاط CO₂ من الهواء. يتوقف الضوء الإضافي عن الإفادة، ويتسطّح المنحنى في هضبة. الطريقة الوحيدة لرفع ذلك السقف هي إزالة العائق الحقيقي الآن، أيًّا كان. أعطِ الورقة CO₂ أكثر، فترتفع الهضبة نفسها. ## Formal @@ -59,14 +59,18 @@ variables: ## Real world -### الصوب المُخصَّبة بـ CO₂ -تضخّ الصوب التجارية CO₂ إلى ضعفي أو ثلاثة أضعاف المستوى الخارجي عمدًا لرفع هضبة التمثيل الضوئي وتسريع نمو المحاصيل. هذا أحد أكثر الاستعمالات الواقعية المباشرة لهذا المنحنى بالضبط. +### البيوت المحمية المزوَّدة بـ CO₂ + +تضخّ البيوت المحمية التجارية CO₂ إلى ضعفي أو ثلاثة أضعاف المستوى الخارجي عمدًا لرفع هضبة التمثيل الضوئي وتسريع نمو المحاصيل. هذا أحد أكثر الاستعمالات الواقعية المباشرة لهذا المنحنى بالضبط. ### أوراق الشمس وأوراق الظل + غالبًا ما تطوّر النباتات النامية في ظل عميق مستوى ضوء نصفي $K$ أقل، فتبلغ هضبتها (الأدنى) عند ضوء أخفت بكثير من نبتة محبة للشمس، مقايضة سقفًا أدنى بالعمل جيدًا في ضوء ضعيف. ### التنافس على الضوء في مظلة الغابة + تحتفظ الأشجار العالية بأسطع ضوء لأوراقها العلوية. وغالبًا ما تظل النباتات والشتلات تحتها مقيَّدة بالضوء طوال حياتها، لا تبلغ أبدًا الجزء المسطّح من منحنياتها الخاصة. ### ارتفاع CO₂ في الغلاف الجوي -ارتفع CO₂ في الغلاف الجوي العالمي من نحو 280 جزءًا بالمليون قبل الثورة الصناعية إلى أكثر من 420 اليوم، رافعًا هضبة التمثيل الضوئي قياسيًا لنباتات كثيرة. هذا أثر حقيقي يسمّيه الباحثون التخصيب بثاني أكسيد الكربون، رغم أنه يأتي مصحوبًا بآثار أخرى لتغيّر المناخ. + +ارتفع CO₂ في الغلاف الجوي العالمي من نحو 280 جزءًا بالمليون قبل الثورة الصناعية إلى أكثر من 420 اليوم، فارتفعت هضبة التمثيل الضوئي بشكل ملحوظ لنباتات كثيرة. هذا أثر حقيقي يسمّيه الباحثون التخصيب بثاني أكسيد الكربون، رغم أنه يأتي مصحوبًا بآثار أخرى لتغيّر المناخ. diff --git a/content/lessons/biology/photosynthesis-and-light/en.md b/content/lessons/biology/photosynthesis-and-light/en.md index 380fb7ba..63c93d38 100644 --- a/content/lessons/biology/photosynthesis-and-light/en.md +++ b/content/lessons/biology/photosynthesis-and-light/en.md @@ -21,15 +21,15 @@ variables: ## Try it -1. Start in low light with ordinary outdoor CO₂. The rate is barely positive. -2. Raise light toward full midday sun and watch the curve level off — flattening into a plateau well before it looks "finished." -3. Now raise CO₂ as well. The whole plateau lifts higher. +1. Start in low light, 30, with ordinary outdoor CO₂, 420 ppm. The net rate reads 0.37: barely positive. +2. Raise light to 1000 and the net rate reads 7.75. Go on to full midday sun, 2000, and it only reaches 8.55 — the curve has flattened into a plateau well before it looks "finished." +3. Now raise CO₂ to 800 ppm as well. The whole plateau lifts higher: Pmax goes from 10.5 to 20 and the net rate reads 17.18. ## Real-life examples -1. **A cloudy day, or a leaf deep in the shade.** Only about 100 μmol of light reaches it — the rate is barely above the point where photosynthesis just covers the leaf's own respiration. -2. **Full midday sun, ordinary outdoor air at about 420 ppm CO₂.** Light is no longer the problem, but the rate plateaus well under its true maximum — CO₂ has become the limiting factor instead. -3. **A CO₂-enriched greenhouse in full light.** Growers pump CO₂ up toward 1000 ppm exactly to lift this plateau — a real, common horticultural practice that measurably speeds up crop growth. +1. **A cloudy day, or a leaf deep in the shade.** Only about 100 μmol of light reaches it — the net rate is only 2.5, not far above the point where photosynthesis just covers the leaf's own respiration. +2. **Full midday sun, ordinary outdoor air at about 420 ppm CO₂.** Light is no longer the problem, but the rate plateaus at about 8.3, well under its true maximum — CO₂ has become the limiting factor instead. +3. **A CO₂-enriched greenhouse in full light.** Growers pump CO₂ up toward 1000 ppm exactly to lift this plateau, here to about 16.6 — a real, common horticultural practice that measurably speeds up crop growth. ## Test yourself @@ -62,13 +62,17 @@ The real machinery behind that ceiling is a single enzyme, Rubisco, which grabs ## Real world ### CO₂-enriched greenhouses + Commercial greenhouses routinely pump CO₂ up to two or three times the outdoor level specifically to raise the photosynthesis plateau and speed up crop growth — one of the most direct real-world uses of this exact curve. ### Sun leaves and shade leaves + Plants growing in deep shade often evolve a lower half-saturation light level $K$, reaching their (lower) plateau at much dimmer light than a sun-loving plant, which trades a lower ceiling for working well in poor light. ### Competing for light in a forest canopy + Tall trees keep the brightest light for their own upper leaves; the plants and saplings below are often light-limited their whole lives, never reaching the flat part of their own curve. ### Rising atmospheric CO₂ + Global atmospheric CO₂ has risen from about 280 ppm before industrialisation to over 420 ppm today, measurably raising the photosynthetic plateau for many plants — a real effect researchers call CO₂ fertilisation, though it comes bundled with the other effects of a changing climate. diff --git a/content/lessons/biology/photosynthesis-and-light/lesson.yaml b/content/lessons/biology/photosynthesis-and-light/lesson.yaml index 1914b070..32b51225 100644 --- a/content/lessons/biology/photosynthesis-and-light/lesson.yaml +++ b/content/lessons/biology/photosynthesis-and-light/lesson.yaml @@ -43,15 +43,15 @@ derivation: - '\text{compensation point:} P = 0 \implies I = \dfrac{RK}{P_{max}-R}' charts: [] presets: -- I: 100 - C: 420 -- I: 1500 - C: 420 -- I: 1500 - C: 1000 + - I: 100 + C: 420 + - I: 1500 + C: 420 + - I: 1500 + C: 1000 challenges: -- check: I>1000 and C>=400 and C<=450 -- check: C>=800 and I>=1000 -- check: 20*min(1,C/800)*(I/(200+I)) - 1 - target: 0 - tol: 0.3 + - check: I>1000 and C>=400 and C<=450 + - check: C>=800 and I>=1000 + - check: 20*min(1,C/800)*(I/(200+I)) - 1 + target: 0 + tol: 0.3 diff --git a/content/lessons/biology/predator-prey/ar.md b/content/lessons/biology/predator-prey/ar.md index f16dcaa2..b93832a3 100644 --- a/content/lessons/biology/predator-prey/ar.md +++ b/content/lessons/biology/predator-prey/ar.md @@ -14,34 +14,34 @@ variables: - تجمّع الفريسة (كالأرانب مثلًا) - تجمّع المفترس (كالثعالب مثلًا) - معدّل ولادة الفريسة، غير مقيّد بالمفترسات - - معدّل الافتراس، أي عدد مرات إزالة فريسة عند كل لقاء - - الكفاءة، أي حصّة الفريسة المفترَسة المحوَّلة إلى مفترسات جديدة + - معدّل الافتراس، أي كم مرة ينتهي اللقاء باصطياد فريسة + - الكفاءة، أي نصيب الفرائس المأكولة الذي يتحوّل إلى مفترسين جدد - معدّل موت المفترس، غير مقيّد بالفريسة --- ## Try it -1. راقب الفريسة ترتفع أولًا بينما لا يزال المفترسون نادرين. -2. راقب المفترسين يرتفعون بعد ذلك مع وفرة الغذاء (الفريسة)، ثم راقب أعداد الفريسة تنهار. -3. راقب المفترسين يجوعون ويتراجعون مع ندرة الفريسة، فتتعافى الفريسة، وتتكرّر الدورة من جديد. +1. تبدأ الصورة بـ40 فريسة و9 مفترسين. راقب الفريسة ترتفع أولًا إلى نحو 96 قرب t = 1.8، والمفترسون ما زالوا قليلين. +2. راقب المفترسين يرتفعون بعد ذلك مع وفرة الغذاء (الفريسة) إلى نحو 44 قرب t = 2.9، ثم راقب أعداد الفريسة تنهار إلى نحو 16. +3. راقب المفترسين يجوعون ويتراجعون إلى نحو 9 مع قلّة الفريسة، فتتعافى الفريسة، وتتكرّر الدورة كل 6.7 وحدة زمنية تقريبًا. ## Real-life examples -- **الوشق وأرانب الثلج.** دورة بطيئة كلاسيكية (معدّل ولادة a = 0.6، معدّل افتراس b = 0.02) تبدأ من 40 أرنبًا و9 وشوق، تطابق دورة الازدهار والانهيار الممتدّة عقدًا في سجلّات تجارة الفراء الحقيقية. +- **الوشق وأرانب الثلج.** دورة بطيئة كلاسيكية (معدّل ولادة a = 0.6، معدّل افتراس b = 0.02) تبدأ من 40 أرنبًا و9 حيوانات وشق، تطابق دورة الازدهار والانهيار الممتدّة عقدًا في سجلّات تجارة الفراء الحقيقية. - **آفة ومفترسها بدورة سريعة.** معدّلات مرتفعة في كل شيء (a = 1.5، b = 0.15) تبدأ من 30 آفة و10 مفترسات تنتج دورة ازدهار وانهيار أسرع بكثير. -- **الذئاب وقطيع غزلان كبير.** تراجع بطيء للمفترس (d = 0.2) يبدأ من 50 غزالًا و15 ذئبًا يمدّد الدورة إلى تذبذب طويل وهادئ. +- **الذئاب وقطيع غزلان كبير.** تراجع بطيء للمفترس (d = 0.2) يبدأ من 50 غزالًا و15 ذئبًا يمدّد الدورة إلى تذبذب طويل وبطيء. ## Test yourself 1. اضبط مستوى اتزان المفترس (a مقسومًا على b) عند 20. 2. اضبط مستوى اتزان الفريسة (d مقسومًا على حاصل ضرب c وb) عند 50. -3. ابدأ بأربعة أضعاف عدد المفترسين من الفريسة. +3. ابدأ بعدد من الفرائس يساوي أربعة أضعاف عدد المفترسين. ## Intuition راقب المنحنيين يطارد أحدهما الآخر. ترتفع الفريسة أولًا لأن قلة المفترسات لا توقفها، ثم يرتفع عدد المفترسين مع وفرة الغذاء، فتنهار أعداد الفريسة، فيجوع المفترسون، فتتعافى الفريسة من جديد، وهكذا دواليك. اسحب b لأعلى فيصطاد المفترسون الفريسة بسهولة أكبر، فتنخفض ذروة الفريسة وتتسارع الدورة. -ارفع d فيموت المفترسون أسرع كلما ندرت الفريسة، ما يعمّق قيعانهم. وارفع a فتتعافى الفريسة أسرع، ما يرفع الذرى. لا يستقر أي من التجمّعين عند عدد ثابت هنا. بل يدوران حول نقطة الاتزان $(\text{prey},\text{pred}) = (d/(cb),\, a/b)$ إلى الأبد، في حلقة مغلقة يحدد حجمها نقطة البداية. +ارفع d فيموت المفترسون أسرع كلما ندرت الفريسة، فتهبط أعدادهم إلى مستويات أدنى. وارفع a فتتعافى الفريسة أسرع، فتعلو القمم. لا يستقر أي من التجمّعين عند عدد ثابت هنا. بل يدوران حول نقطة الاتزان $(\text{prey},\text{pred}) = (d/(cb),\, a/b)$ إلى الأبد، في حلقة مغلقة يحدد حجمها نقطة البداية. ## Formal @@ -62,13 +62,17 @@ variables: ## Real world ### الوشق وأرنب الثلج + سجلّات شركة خليج هدسون لتجارة الفراء (1845–1935) تُظهر دورة وشق-أرنب تدوم نحو عقد كامل تطابق هذا النموذج بدقّة. ### مصايد الأسماك + ابتكر فيتو فولتيرا النموذج ليفسّر لماذا ارتفعت مصايد الأسماك المفترسة في البحر الأدرياتيكي حين توقّف الصيد أثناء الحرب العالمية الأولى. ### مكافحة الآفات + إدخال مفترس طبيعي لمكافحة آفة قد يتذبذب هو نفسه لسنوات قبل أن يستقرّ. ### الاستجابة المناعية + تظهر دورة مشابهة بين تجمّع مسبّب مرض والخلايا المناعية التي تطارده. diff --git a/content/lessons/biology/predator-prey/en.md b/content/lessons/biology/predator-prey/en.md index edfcf966..eb7dfb39 100644 --- a/content/lessons/biology/predator-prey/en.md +++ b/content/lessons/biology/predator-prey/en.md @@ -22,15 +22,15 @@ variables: ## Try it -1. Watch prey rise first, while predators are still scarce. -2. Watch predators rise next as food (prey) becomes abundant — then watch prey crash. -3. Watch predators starve and decline as prey grows scarce, letting prey recover — and the cycle repeats. +1. The start has 40 prey and 9 predators. Watch prey rise first, to about 96 near t = 1.8, while predators are still scarce. +2. Watch predators rise next as food (prey) becomes abundant, to about 44 near t = 2.9 — then watch prey crash to about 16. +3. Watch predators starve and decline to about 9 as prey grows scarce, letting prey recover — and the cycle repeats about every 6.7 time units. ## Real-life examples - **Lynx and snowshoe hare.** A slow, classic cycle (birth rate a = 0.6, predation rate b = 0.02) starting from 40 hares and 9 lynx, matching the decade-long boom-and-bust seen in real fur-trading records. - **A fast-cycling pest and its predator.** High rates all round (a = 1.5, b = 0.15) starting from 30 pests and 10 predators produce a much quicker boom-and-bust cycle. -- **Wolves and a large deer herd.** A slow predator decline (d = 0.2) starting from 50 deer and 15 wolves stretches the cycle into a long, gentle swing. +- **Wolves and a large deer herd.** A slow predator decline (d = 0.2) starting from 50 deer and 15 wolves stretches the cycle into a long, slow swing. ## Test yourself @@ -63,13 +63,17 @@ Because Lotka–Volterra cycles are only neutrally stable (conserved, not attrac ## Real world ### Lynx and snowshoe hare + Hudson’s Bay Company fur-trading records (1845–1935) show an almost decade-long lynx–hare cycle matching this model closely. ### Fisheries + Vito Volterra devised the model to explain why predatory fish catches rose in the Adriatic when fishing paused during World War I. ### Pest control + Introducing a natural predator to control a pest can itself oscillate for years before settling down. ### Immune response + A similar cycle appears between a pathogen population and the immune cells that hunt it. diff --git a/content/lessons/biology/predator-prey/lesson.yaml b/content/lessons/biology/predator-prey/lesson.yaml index 31d7b05d..1054d7f9 100644 --- a/content/lessons/biology/predator-prey/lesson.yaml +++ b/content/lessons/biology/predator-prey/lesson.yaml @@ -76,28 +76,28 @@ derivation: charts: [] primary: b presets: -- a: 0.6 - b: 0.02 - c: 0.3 - d: 0.3 - x0: 40 - y0: 9 -- a: 1.5 - b: 0.15 - c: 0.6 - d: 1.2 - x0: 30 - y0: 10 -- a: 0.8 - b: 0.03 - c: 0.4 - d: 0.2 - x0: 50 - y0: 15 + - a: 0.6 + b: 0.02 + c: 0.3 + d: 0.3 + x0: 40 + y0: 9 + - a: 1.5 + b: 0.15 + c: 0.6 + d: 1.2 + x0: 30 + y0: 10 + - a: 0.8 + b: 0.03 + c: 0.4 + d: 0.2 + x0: 50 + y0: 15 challenges: -- check: a/b - target: 20 -- check: d/(c*b) - target: 50 -- check: x0/y0 - target: 4 + - check: a/b + target: 20 + - check: d/(c*b) + target: 50 + - check: x0/y0 + target: 4 diff --git a/content/lessons/biology/sir-epidemic/ar.md b/content/lessons/biology/sir-epidemic/ar.md index 14a55cc1..aa4b21a3 100644 --- a/content/lessons/biology/sir-epidemic/ar.md +++ b/content/lessons/biology/sir-epidemic/ar.md @@ -24,9 +24,9 @@ variables: ## Try it -1. راقب منحنى المصابين يرتفع مع انتشار المرض عبر تجمّع قابل للعدوى. -2. ارفع β، معدّل المخالطات المُعدية. يقفز منحنى المصابين أعلى وأبكر. -3. ارفع γ، معدّل التعافي، بدلًا من ذلك. تصل الموجة نفسها أخفض وتمرّ أسرع. +1. في البداية (β = 0.3 و γ = 0.1)، راقب منحنى المصابين يرتفع مع انتشار المرض، ويبلغ ذروته عند نحو 302 شخص قرب اليوم 30، ثم ينخفض. +2. ارفع β، معدّل المخالطات المُعدية، إلى 0.5. تقفز ذروة المصابين إلى نحو 479 شخصًا وتأتي أبكر، قرب اليوم 17. +3. أعد β إلى 0.3، وارفع γ، معدّل التعافي، إلى 0.2. تنخفض الذروة إلى نحو 66 شخصًا. ## Real-life examples @@ -36,15 +36,15 @@ variables: ## Test yourself -1. اضبط العدد الأساسي للتكاثر (β مقسومًا على γ) عند 3 بالضبط. -2. بلغ عتبة مناعة القطيع 80% (1 ناقص γ مقسومًا على β يساوي 0.8). +1. اضبط العدد الأساسي للتكاثر (β مقسومًا على γ) عند 4 بالضبط. +2. اجعل عتبة مناعة القطيع 80% (1 ناقص γ مقسومًا على β يساوي 0.8). 3. ابدأ تفشّيًا لا يمكنه الانطلاق. أبقِ العدد الأساسي للتكاثر دون 1، بدءًا من 20 حالة ابتدائية على الأقل. ## Intuition -ثلاثة منحنيات تتسابق على الرسم: القابلون للعدوى ينخفضون، والمصابون يرتفعون ثم يعودون إلى الصفر، والمتعافون يتصاعدون ثم يستقرّون. اسحب β لأعلى فيقفز منحنى المصابين أعلى وأبكر، فمخالطات أكثر تعني موجة أسرع وأحدّ. اسحب γ لأعلى بدلًا من ذلك فيغادر الناس فئة المصابين أسرع، فتصل الموجة نفسها أخفض وتمرّ أسرع. +ثلاثة منحنيات تتسابق على الرسم: القابلون للعدوى ينخفضون، والمصابون يرتفعون ثم يعودون إلى الصفر، والمتعافون يتصاعدون ثم يستقرّون. اسحب β لأعلى فيقفز منحنى المصابين أعلى وأبكر، فمخالطات أكثر تعني موجة أسرع وأحدّ. اسحب γ لأعلى بدلًا من ذلك فيغادر الناس فئة المصابين أسرع، فتأتي الموجة أخفض بكثير: عدد أقل من الناس يمرضون في الوقت نفسه. -ينمو منحنى المصابين فقط طالما $\beta S/N > \gamma$. فبمجرد أن ينتقل عدد كافٍ من الناس إلى الجانب الذي استُنفد فيه القابلون للعدوى، تسبّب كل حالة أقلّ من إصابة جديدة واحدة في المتوسط. وينقلب الوباء من تلقاء نفسه حتى لو لم يُحصَّن أحد باختياره. هذه هي مناعة القطيع، وتتحقّق عندما تهبط نسبة القابلين للعدوى دون $1/R_0$، حيث $R_0 = \beta/\gamma$. +ينمو منحنى المصابين فقط طالما $\beta S/N > \gamma$. فبمجرد أن يقلّ عدد القابلين للعدوى بما يكفي، تسبّب كل حالة أقلّ من إصابة جديدة واحدة في المتوسط. وينقلب الوباء من تلقاء نفسه حتى لو لم يُحصَّن أحد باختياره. هذه هي مناعة القطيع، وتتحقّق عندما تهبط نسبة القابلين للعدوى دون $1/R_0$، حيث $R_0 = \beta/\gamma$. ## Formal @@ -54,24 +54,28 @@ $R_0 = \beta/\gamma$ هو متوسط عدد الإصابات الثانوية ا ## Advanced -علاقة الحجم النهائي $\ln(S_0/S_\infty) = R_0(1 - S_\infty/N)$ تُشتقّ بقسمة $dS$ على $dR$ ثم التكامل، وتبيّن أنه حتى مع $R_0$ كبير جدًّا يبقى جزء من السكان دون إصابة. الوباء يخمد بسبب تناقص مجمّع القابلين للعدوى، لا بسبب نفاد الوقت. +علاقة الحجم النهائي $\ln(S_0/S_\infty) = R_0(1 - S_\infty/N)$ تُشتقّ بقسمة $dS$ على $dR$ ثم التكامل، وتبيّن أنه حتى مع $R_0$ كبير جدًّا يبقى جزء من السكان دون إصابة. الوباء يخمد لأن عدد القابلين للعدوى يتناقص، لا بسبب نفاد الوقت. ## Derivation 1. حلّل معادلة المصابين إلى عوامل، فيتّضح أن نموّ $I$ أو تناقصه يعتمد فقط على إشارة $\beta S/N - \gamma$. 2. لا يمكن للوباء أن ينمو إلا طالما نسبة القابلين للعدوى تتجاوز $1/R_0$. -3. بمجرد أن تتجاوز نسبة المحصّنين (أو المُزالين) $1 - 1/R_0$، تهبط نسبة القابلين للعدوى المتبقّية دون $1/R_0$ وتتراجع الإصابات الجديدة من تلقاء نفسها. +3. بمجرد أن تتجاوز نسبة المحصّنين (أو من خرجوا من دائرة العدوى) $1 - 1/R_0$، تهبط نسبة القابلين للعدوى المتبقّية دون $1/R_0$ وتتراجع الإصابات الجديدة من تلقاء نفسها. ## Real world ### الإنفلونزا الموسمية + للإنفلونزا R0 نحو 1.3، لذلك غالبًا ما تكفي نسبة متواضعة من المحصّنين كل موسم لمنعها من الانتشار الواسع. ### الحصبة + للحصبة R0 يقارب 15–18، من أعلى القيم المعروفة، ولهذا تلزم تغطية تلقيح نحو 95% لتحقيق مناعة القطيع. ### تسطيح المنحنى + خفض β عبر التباعد أو الكمامات لا يؤخّر الوباء فحسب، بل يخفض ذروة المصابين ويوسّعها، مما يبقي المستشفيات دون طاقتها القصوى. ### استئصال الجدري + دفع التلقيح المستمر نسبة القابلين للعدوى حول العالم دون 1/R0 في كل مكان دفعة واحدة، فبلغ الجدري الصفر في الطبيعة بحلول 1980. diff --git a/content/lessons/biology/sir-epidemic/en.md b/content/lessons/biology/sir-epidemic/en.md index 79d7ede3..fcacc975 100644 --- a/content/lessons/biology/sir-epidemic/en.md +++ b/content/lessons/biology/sir-epidemic/en.md @@ -28,9 +28,9 @@ variables: ## Try it -1. Watch the infected curve rise as the disease spreads through a susceptible population. -2. Raise β, the rate of contacts that infect. The infected curve shoots higher and earlier. -3. Raise γ, the recovery rate, instead. The same wave arrives lower and passes quicker. +1. At the start (β = 0.3, γ = 0.1), watch the infected curve rise as the disease spreads, peak at about 302 people near day 30, then fall. +2. Raise β, the rate of contacts that infect, to 0.5. The infected peak jumps to about 479 people and comes earlier, near day 17. +3. Put β back at 0.3 and raise γ, the recovery rate, to 0.2 instead. The peak drops to about 66 people. ## Real-life examples @@ -40,15 +40,15 @@ variables: ## Test yourself -1. Set the basic reproduction number (β divided by γ) to exactly 3. +1. Set the basic reproduction number (β divided by γ) to exactly 4. 2. Reach a herd-immunity threshold of 80% (1 minus γ divided by β equals 0.8). 3. Start an outbreak that cannot take off: keep the reproduction number below 1, starting from at least 20 initial cases. ## Intuition -Three curves race across the plot: susceptible falls, infected rises then falls back to zero, recovered climbs and levels off. Drag β up and the infected curve shoots higher and earlier — more contacts mean a faster, sharper wave. Drag γ up instead and people leave the infected group faster, so the same wave arrives lower and passes quicker. +Three curves race across the plot: susceptible falls, infected rises then falls back to zero, recovered climbs and levels off. Drag β up and the infected curve shoots higher and earlier — more contacts mean a faster, sharper wave. Drag γ up instead and people leave the infected group faster, so the wave comes out much lower: fewer people are sick at the same time. -The infected curve only grows while $\beta S/N > \gamma$: once enough people have moved to the susceptible-depleted side, each case infects less than one new person on average and the outbreak turns over on its own, even with nobody left immune by choice. That is herd immunity — reached once the susceptible share falls below $1/R_0$, where $R_0 = \beta/\gamma$. +The infected curve only grows while $\beta S/N > \gamma$: once enough people have left the susceptible group, each case infects less than one new person on average and the outbreak turns over on its own, even with nobody left immune by choice. That is herd immunity — reached once the susceptible share falls below $1/R_0$, where $R_0 = \beta/\gamma$. ## Formal @@ -69,13 +69,17 @@ The final-size relation $\ln(S_0/S_\infty) = R_0(1 - S_\infty/N)$ (obtained by d ## Real world ### Seasonal flu + Flu has R0 around 1.3, so a modest fraction of immune people each season is often enough to keep it from taking off widely. ### Measles + Measles has R0 near 15–18, among the highest known, which is why roughly 95% vaccination coverage is needed for herd immunity. ### Flattening the curve + Lowering β through distancing or masks does not just delay an epidemic — it lowers and widens the infected peak, keeping hospitals below capacity. ### Smallpox eradication + Sustained vaccination pushed the susceptible share worldwide below 1/R0 everywhere at once, driving smallpox to zero in the wild by 1980. diff --git a/content/lessons/biology/sir-epidemic/lesson.yaml b/content/lessons/biology/sir-epidemic/lesson.yaml index 5d725f9c..0644df5f 100644 --- a/content/lessons/biology/sir-epidemic/lesson.yaml +++ b/content/lessons/biology/sir-epidemic/lesson.yaml @@ -26,7 +26,7 @@ visualization: initial: - N - I0 - I0 - - "0" + - '0' tMax: 160 labels: - susceptible @@ -73,21 +73,21 @@ derivation: charts: [] primary: beta presets: -- N: 1000 - I0: 5 - beta: 0.13 - gamma: 0.1 -- N: 1000 - I0: 5 - beta: 0.75 - gamma: 0.05 -- N: 2000 - I0: 10 - beta: 0.1 - gamma: 0.3 + - N: 1000 + I0: 5 + beta: 0.13 + gamma: 0.1 + - N: 1000 + I0: 5 + beta: 0.75 + gamma: 0.05 + - N: 2000 + I0: 10 + beta: 0.1 + gamma: 0.3 challenges: -- check: beta/gamma - target: 3 -- check: 1 - gamma/beta - target: 0.8 -- check: beta/gamma < 1 and I0 >= 20 + - check: beta/gamma + target: 4 + - check: 1 - gamma/beta + target: 0.8 + - check: beta/gamma < 1 and I0 >= 20 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. 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. 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. 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: 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. 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 } 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. 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 } 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- - سرعتك في هذه اللحظة بالضبط، لا في الدقيقة الماضية. النهاية هي ما يقترب منه الرقم. +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. 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. 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. 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. 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. 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 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. diff --git a/content/lessons/chemistry/atomic-structure/ar.md b/content/lessons/chemistry/atomic-structure/ar.md index 235210b1..8a40ceca 100644 --- a/content/lessons/chemistry/atomic-structure/ar.md +++ b/content/lessons/chemistry/atomic-structure/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. حرّك «العدد الذري Z» صعودًا. راقب رمز العنصر واسمه يتغيران مع كل بروتون جديد. -2. حرّك الآن «النيوترونات N» وحدها. يبقى العنصر نفسه، لكنك تبني نظيرًا مختلفًا. -3. راقب المدارات الإلكترونية تمتلئ وتفرغ. كلما اكتمل المدار الخارجي بالضبط، وصلت إلى غاز نبيل. +1. اجعل «العدد الذري Z» يساوي 6 و«عدد النيوترونات N» يساوي 6. تظهر في القراءات ذرة الكربون (C) وعددها الكتلي A = 12. انقل Z إلى 7، فيصير العنصر نيتروجين (N). +2. أعد Z إلى 6، ثم انقل «عدد النيوترونات N» وحده إلى 8. العنصر ما زال الكربون، لكن A = 14، فقد بنيت النظير كربون-14. +3. اجعل Z يساوي 2 ثم 10 ثم 18. في كل مرة يمتلئ المدار الخارجي تمامًا (توزيع الإلكترونات 2 ثم 2·8 ثم 2·8·8)، وتصل إلى غاز نبيل: الهيليوم ثم النيون ثم الأرجون. ## Real-life examples @@ -31,15 +31,15 @@ variables: ## Intuition -انظر إلى الرسم. دائرة صغيرة في الوسط هي النواة، وحلقات من النقاط حولها هي المدارات الإلكترونية. ابدأ من الكربون، وله 6 بروتونات و6 نيوترونات، وهو ذرة قلم الرصاص وذرة جسمك أيضًا. حرّك المنزلق المسمى «العدد الذري Z» درجة واحدة إلى 7، فيتغيّر وسم النواة، ويتحول رمز العنصر إلى نيتروجين، وتظهر نقطة جديدة في الحلقة الخارجية. +انظر إلى الرسم. دائرة صغيرة في الوسط هي النواة، وحلقات من النقاط حولها هي المدارات الإلكترونية. اجعل Z = 6 و N = 6 لتبدأ من الكربون، وله 6 بروتونات و6 نيوترونات، وهو الذرة التي في قلم الرصاص وفي جسمك أيضًا. حرّك المنزلق المسمى «العدد الذري Z» درجة واحدة إلى 7، فيتغيّر الرقم المكتوب داخل النواة، ويتحول رمز العنصر إلى نيتروجين، وتظهر نقطة جديدة في الحلقة الخارجية. -حرّك الآن «عدد النيوترونات N» وحده، واترك Z كما هو. يبقى اسم العنصر نيتروجين، لأن النيوترونات لا تغيّر هوية العنصر، بل وزن تلك الذرة فقط. راقب الحلقة الخارجية بدلًا من ذلك. كلما امتلأت بالضبط، عند 2 أو 10 أو 18 نقطة، وصل الرسم إلى غاز نبيل، مثل الهيليوم أو النيون أو الأرجون، وهي أهدأ الذرات وأقلها تفاعلًا على الإطلاق. +حرّك الآن «عدد النيوترونات N» وحده، واترك Z كما هو. يبقى اسم العنصر نيتروجين، لأن النيوترونات لا تغيّر هوية العنصر، بل وزن تلك الذرة فقط. راقب الحلقة الخارجية بدلًا من ذلك. كلما امتلأت بالضبط، عند Z = 2 أو 10 أو 18، وصل الرسم إلى غاز نبيل، مثل الهيليوم أو النيون أو الأرجون، وهي أهدأ الذرات وأقلها تفاعلًا على الإطلاق. ## Formal العدد الكتلي $A = Z + N$ يعدّ النكليونات. العدد الذري $Z$ وحده يحدد هوية العنصر، ويُكتب رقمًا سفليًا بينما يُكتب $A$ رقمًا علويًا: ${}^{A}_{Z}\mathrm{X}$. والذرات التي لها العدد الذري $Z$ نفسه لكن عدد نيوترونات $N$ مختلف هي نظائر العنصر نفسه. -في العناصر العشرين الأولى، تمتلئ المدارات الإلكترونية بالترتيب 2، 8، 8، 2 (السعة $2n^2$ تصح فقط للمدار الأول، وبعده تلاحظ النمط البسيط 2-8-8 قبل أن تعقّد مدارات 3d الأمور عند $Z = 21$). +في العناصر العشرين الأولى، تمتلئ المدارات الإلكترونية بالترتيب 2، 8، 8، 2 (قاعدة السعة $2n^2$ تعطي 2 و8 للمدارين الأول والثاني. المدار الثالث يتسع لـ 18، لكنه يتوقف مؤقتًا عند 8، فتلاحظ النمط البسيط 2-8-8 قبل أن تعقّد مدارات 3d الأمور عند $Z = 21$). ## Advanced @@ -54,13 +54,17 @@ variables: ## Real world ### التأريخ بالكربون المشع + الكربون-14 نظير له نيوترونان إضافيان مقارنة بالكربون-12 العادي، ويتحلل بمعدل معروف يُستخدم لتأريخ البقايا العضوية. ### الطاقة النووية + يختلف اليورانيوم-235 عن اليورانيوم-238 في عدد النيوترونات فقط، لكن النظير الأخف وحده هو القادر على استمرار تفاعل متسلسل. ### الجدول الدوري + أعمدة الجدول الدوري مجموعات من العناصر لها العدد نفسه من إلكترونات التكافؤ. وهذا المدار الخارجي المشترك سبب تشابه تفاعل الصوديوم والبوتاسيوم إلى هذا الحد. ### الترابط الكيميائي + تتفاعل الذرات لتملأ مدارها الخارجي أو تفرغه. وهذه الفكرة وحدها تفسر لماذا يتكون ملح الطعام $\mathrm{NaCl}$ بنسبة واحد إلى واحد. diff --git a/content/lessons/chemistry/atomic-structure/en.md b/content/lessons/chemistry/atomic-structure/en.md index a4387d5d..d1f40959 100644 --- a/content/lessons/chemistry/atomic-structure/en.md +++ b/content/lessons/chemistry/atomic-structure/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Drag «atomic number Z» upward. Watch the element symbol and name change one proton at a time. -2. Now drag «neutrons N» on its own. The element stays the same, but you build a different isotope. -3. Watch the electron shells fill and empty: whenever the outer shell exactly completes, you land on a noble gas. +1. Set «atomic number Z» to 6 and «neutrons N» to 6. The readout shows Carbon (C) with mass number A = 12. Move Z to 7: the element becomes Nitrogen (N). +2. Put Z back to 6, then move «neutrons N» alone to 8. The element is still Carbon, but A = 14: you built the isotope carbon-14. +3. Set Z to 2, then 10, then 18. The outer shell is exactly full each time (electron config 2, then 2·8, then 2·8·8), and you land on a noble gas: helium, neon, argon. ## Real-life examples @@ -33,15 +33,15 @@ variables: ## Intuition -Look at the diagram: a small circle in the middle is the nucleus, and rings of dots around it are the electron shells. Start at carbon, with 6 protons and 6 neutrons — that's the atom in pencil lead and in your own skin. Drag the slider labelled «atomic number Z» up by one, to 7, and the nucleus label changes, the element symbol flips to nitrogen, and one more dot appears in the outer ring. +Look at the diagram: a small circle in the middle is the nucleus, and rings of dots around it are the electron shells. Set Z = 6 and N = 6 to start at carbon, with 6 protons and 6 neutrons — that's the atom in pencil lead and in your own skin. Drag the slider labelled «atomic number Z» up by one, to 7, and the nucleus label changes, the element symbol flips to nitrogen, and one more dot appears in the outer ring. -Now drag «neutrons N» on its own, leaving Z untouched: the element name stays nitrogen, because neutrons don't change which element you have, only how heavy that atom is. Watch the outer ring instead: every time it fills up exactly, at 2, 10 or 18 dots, the diagram lands on a noble gas — helium, neon, argon — the calmest, least reactive atoms there are. +Now drag «neutrons N» on its own, leaving Z untouched: the element name stays nitrogen, because neutrons don't change which element you have, only how heavy that atom is. Watch the outer ring instead: every time it fills up exactly, at Z = 2, 10 or 18, the diagram lands on a noble gas — helium, neon, argon — the calmest, least reactive atoms there are. ## Formal The mass number $A = Z + N$ counts nucleons; the atomic number $Z$ alone identifies the element and is written as a subscript, $A$ as a superscript: ${}^{A}_{Z}\mathrm{X}$. Atoms with the same $Z$ but different $N$ are isotopes of the same element. -For the first twenty elements, electron shells fill in the order 2, 8, 8, 2 (capacities $2n^2$ only for the first shell; beyond that the simple 2-8-8 pattern is what you observe before 3d orbitals complicate things at $Z = 21$). +For the first twenty elements, electron shells fill in the order 2, 8, 8, 2 (the capacity rule $2n^2$ gives 2 and 8 for the first two shells; the third shell could hold 18, but it pauses at 8, so the simple 2-8-8 pattern is what you observe before 3d orbitals complicate things at $Z = 21$). ## Advanced @@ -56,13 +56,17 @@ The 2-8-8-2 rule is a simplification: real shell filling follows the Aufbau prin ## Real world ### Carbon dating + Carbon-14, an isotope with two extra neutrons compared to ordinary carbon-12, decays at a known rate used to date organic remains. ### Nuclear power + Uranium-235 versus uranium-238 differ only in neutron count, but only the lighter isotope sustains a chain reaction. ### The periodic table + Columns are groups of elements with the same valence electron count — that shared outer shell is why sodium and potassium react so similarly. ### Chemical bonding + Atoms react to fill or empty their valence shell — this single idea explains why table salt is $\mathrm{NaCl}$, one-to-one. diff --git a/content/lessons/chemistry/chemical-equilibrium/ar.md b/content/lessons/chemistry/chemical-equilibrium/ar.md index 20384c40..1879f125 100644 --- a/content/lessons/chemistry/chemical-equilibrium/ar.md +++ b/content/lessons/chemistry/chemical-equilibrium/ar.md @@ -22,9 +22,9 @@ charts: ## Try it -1. حرّك نقطة الزمن «t» على طول المنحنى. راقب [A] ينخفض و[B] يرتفع، ثم يتسطّحان كلاهما، لكن ليس إلى الصفر. -2. ارفع «ثابت السرعة الأمامي kf». ينخفض المستوى الثابت، ويميل الاتزان الآن أكثر نحو B. -3. ارفع «ثابت السرعة العكسي kr» بدلًا من ذلك. يرتفع المستوى الثابت، ويميل الاتزان الآن أكثر نحو A. +1. اسحب «الزمن t» من 0 إلى 20. القراءة f(x)، وهي [A]، تنخفض من 1 ثم تثبت عند نحو 0.25، لا عند الصفر. وفي الرسم البياني في الأسفل يرتفع [B] ثم يثبت عند نحو 0.75. +2. اترك «الزمن t» عند 20 وارفع «ثابت سرعة التفاعل الأمامي kƒ» من 0.3 إلى 0.9. ينخفض المستوى الثابت إلى f(x) = 0.1، فالاتزان يميل الآن أكثر نحو B. +3. أعد kƒ إلى 0.3 وارفع «ثابت سرعة التفاعل العكسي kᵣ» من 0.1 إلى 0.3. يرتفع المستوى الثابت إلى f(x) = 0.5، فالاتزان يميل الآن أكثر نحو A. ## Real-life examples @@ -34,15 +34,15 @@ charts: ## Test yourself -1. اضبط ثابتي السرعة بحيث يميل الاتزان نحو B بثلاثة أضعاف قوة ميله نحو A (K يساوي 3). +1. اضبط ثابتي السرعة بحيث يميل الاتزان نحو B أربعة أضعاف ميله نحو A (K يساوي 4). 2. دع التفاعل يصل إلى الاتزان وتركيز A المتبقي 0.3 mol/L بالضبط. 3. اجعل الاتزان يميل نحو المتفاعل بقوة تجعل أكثر من 80% من A باقيًا. ## Intuition -تخيّل زجاجة مشروب غازي فتحتها للتو. يتحول ثاني أكسيد الكربون الذائب إلى فقاعات باستمرار، وبعض الفقاعات تذوب من جديد، حتى يستقر الفوران في همسة ثابتة بدل أن يتوقف. في الرسم، يبدأ منحنى [A] مرتفعًا ثم ينخفض، ويبدأ منحنى [B] من الصفر ثم يرتفع. حرّك النقطة المسمّاة «t» (الزمن) على طولهما وراقبهما يتسطّحان، لكن دون أن يصلا إلى الصفر أو إلى القمة. +تخيّل زجاجة مشروب غازي فتحتها للتو. يتحول ثاني أكسيد الكربون الذائب إلى فقاعات باستمرار، وبعض الفقاعات تذوب من جديد، حتى يهدأ الفوران ويصير أزيزًا خفيفًا ثابتًا بدل أن يتوقف. في الرسم، يبدأ منحنى [A] مرتفعًا ثم ينخفض، ويبدأ منحنى [B] من الصفر ثم يرتفع. حرّك نقطة «الزمن t» عليهما وراقبهما يثبتان عند مستوى معيّن، لكن دون أن يصلا إلى الصفر أو إلى القمة. -يتسطّحان لأن التفاعل لا يتوقف فعليًا. ما زال A يتحول إلى B، وB يتحول من جديد إلى A، لكن بالسرعة نفسها. ارفع المنزلق «ثابت السرعة الأمامي kf» فينزاح الجزء المسطح من الخطين، ويفوز B بنصيب أكبر. هذه هي فكرة مبدأ لو شاتلييه كلها. ادفع السرعتين فتتحرك نقطة الاستقرار، رغم أن الذهاب والإياب نفسه لا يتوقف أبدًا. +يثبتان لأن التفاعل لا يتوقف فعليًا. ما زال A يتحول إلى B، وB يتحول من جديد إلى A، لكن بالسرعة نفسها. ارفع المنزلق «ثابت سرعة التفاعل الأمامي kƒ» فينتقل الجزء المستوي من الخطين، ويفوز B بنصيب أكبر. هذه هي فكرة مبدأ لو شاتلييه كلها. غيّر السرعتين فتتحرك نقطة الاستقرار، رغم أن الذهاب والإياب نفسه لا يتوقف أبدًا. ## Formal @@ -56,20 +56,24 @@ charts: ## Derivation -1. التفاعل الأمامي يزيل A، والتفاعل العكسي المتغذّي من B يعيده. +1. التفاعل الأمامي يزيل A، والتفاعل العكسي يحوّل B من جديد إلى A. 2. اجمع الحدود فتحصل على معادلة تفاضلية خطية تتراخى نحو نقطة ثابتة. 3. حُلّ المعادلة، وعند $t\to\infty$ يقترب الحل من قيمة الاتزان $[\mathrm{A}]_0 k_r/(k_f+k_r)$. ## Real world ### عملية هابر + تصنيع الأمونيا اتزان حقيقي، ويختار المهندسون الضغط ودرجة الحرارة لدفعه نحو مزيد من الناتج من دون إيقاف التفاعل العكسي تمامًا. ### نقل الأكسجين في الدم + ارتباط الهيموغلوبين بالأكسجين اتزان عكوس، فالتحرر في الأنسجة والالتقاط في الرئتين يعتمدان على انزياح التوازن مع التركيز المحلي. ### المشروبات الغازية + $\mathrm{CO_2}$ الذائب في زجاجة مغلقة يكون في اتزان مع $\mathrm{CO_2}$ الغازي فوقه. فتح الزجاجة يزيح هذا التوازن فيفور المشروب. ### اتزانات الذوبانية + محلول الملح المشبع الذي توجد فيه بلورات غير ذائبة في القاع يكون في اتزان ديناميكي، فالذوبان وإعادة التبلور يستمران بسرعتين متساويتين. diff --git a/content/lessons/chemistry/chemical-equilibrium/en.md b/content/lessons/chemistry/chemical-equilibrium/en.md index 074693a8..99afaefa 100644 --- a/content/lessons/chemistry/chemical-equilibrium/en.md +++ b/content/lessons/chemistry/chemical-equilibrium/en.md @@ -26,9 +26,9 @@ charts: ## Try it -1. Drag the time point «t» along the curve. Watch [A] fall and [B] rise, both flattening out — but not to zero. -2. Raise «forward rate constant kf». The plateau shifts lower: equilibrium now favours B more. -3. Raise «reverse rate constant kr» instead. The plateau shifts higher: equilibrium now favours A more. +1. Drag «time t» from 0 to 20. The readout f(x), which is [A], falls from 1 and flattens out at about 0.25 — not zero. On the chart below, [B] rises and flattens at about 0.75. +2. Leave «time t» at 20 and raise «forward rate constant kƒ» from 0.3 to 0.9. The plateau drops to f(x) = 0.1: equilibrium now favours B more. +3. Put kƒ back to 0.3 and raise «reverse rate constant kᵣ» from 0.1 to 0.3 instead. The plateau rises to f(x) = 0.5: equilibrium now favours A more. ## Real-life examples @@ -38,15 +38,15 @@ charts: ## Test yourself -1. Set the rate constants so equilibrium favours B three times as strongly as A (K = 3). +1. Set the rate constants so equilibrium favours B four times as strongly as A (K = 4). 2. Let the reaction run to equilibrium with exactly 0.3 mol/L of A remaining. 3. Make equilibrium favour the reactant so strongly that more than 80% of A is still left. ## Intuition -Picture a bottle of soda you just opened: dissolved CO2 keeps turning into bubbles, while some bubbles keep re-dissolving, until the fizzing settles into a steady hiss instead of stopping. On the chart, the curve for [A] starts high and falls, and the curve for [B] starts at zero and climbs. Drag the point marked «t» (time) along them and watch both flatten out, but never reach zero or the very top. +Picture a bottle of soda you just opened: dissolved CO2 keeps turning into bubbles, while some bubbles keep re-dissolving, until the fizzing settles into a steady hiss instead of stopping. On the chart, the curve for [A] starts high and falls, and the curve for [B] starts at zero and climbs. Drag the point «time t» along them and watch both flatten out, but never reach zero or the very top. -They flatten because the reaction never actually stops: A is still turning into B, and B is still turning back into A, just at matched rates. Raise the slider «forward rate constant kf» and the flat part of both lines shifts — B ends up winning a bigger share. That's the whole idea behind Le Chatelier's principle: push on the rates, and the resting point moves, even though the back-and-forth itself never stops. +They flatten because the reaction never actually stops: A is still turning into B, and B is still turning back into A, just at matched rates. Raise the slider «forward rate constant kƒ» and the flat part of both lines shifts — B ends up winning a bigger share. That's the whole idea behind Le Chatelier's principle: push on the rates, and the resting point moves, even though the back-and-forth itself never stops. ## Formal @@ -67,13 +67,17 @@ Le Chatelier’s principle is a consequence, not a separate law: perturbing $[\m ## Real world ### Haber process + Ammonia synthesis is a genuine equilibrium; engineers choose pressure and temperature to push it toward more product without stopping the reverse reaction entirely. ### Blood oxygen transport + Haemoglobin binding oxygen is a reversible equilibrium — release in tissues and uptake in the lungs both rely on the balance shifting with local concentration. ### Carbonated drinks + $\mathrm{CO_2}$ dissolved in a sealed bottle is in equilibrium with gaseous $\mathrm{CO_2}$ above it; opening the bottle shifts that balance and it fizzes. ### Solubility equilibria + A saturated salt solution with undissolved crystals at the bottom is at dynamic equilibrium — dissolving and recrystallising continue at equal rates. diff --git a/content/lessons/chemistry/chemical-equilibrium/lesson.yaml b/content/lessons/chemistry/chemical-equilibrium/lesson.yaml index 0690104a..24bfb7c2 100644 --- a/content/lessons/chemistry/chemical-equilibrium/lesson.yaml +++ b/content/lessons/chemistry/chemical-equilibrium/lesson.yaml @@ -78,7 +78,7 @@ presets: kr: 0.6 challenges: - check: kf / kr - target: 3 + target: 4 - check: A0*(kr + kf*exp(-(kf+kr)*x))/(kf+kr) target: 0.3 - check: kf < kr and A0*(kr + kf*exp(-(kf+kr)*x))/(kf+kr) > 0.8*A0 diff --git a/content/lessons/chemistry/chemical-reaction/ar.md b/content/lessons/chemistry/chemical-reaction/ar.md index abc31a43..1cee72e0 100644 --- a/content/lessons/chemistry/chemical-reaction/ar.md +++ b/content/lessons/chemistry/chemical-reaction/ar.md @@ -14,27 +14,27 @@ variables: ## Try it -1. حرّك شريطي «h2» و«o2» لتحديد عدد جزيئات كل منهما على الطاولة. -2. حرّك «مدى تقدم التفاعل» من 0 إلى 1. راقب الجزيئات تقترن اثنين اثنين، وجزيئات الماء تظهر. -3. ارفع أحد الغازين أعلى بكثير من الآخر. تتوقف الجزيئات الزائدة عن التفاعل وتحصل على حلقة متقطعة تشير إلى أنها زائدة بمجرد نفاد الآخر. +1. اجعل «عدد جزيئات H₂» يساوي 4 و«عدد جزيئات O₂» يساوي 2. تقول القراءة إن النسبة مضبوطة ولا يوجد متفاعل محدِّد (exact ratio — none). +2. حرّك «مدى تقدم التفاعل» من 0 إلى 1. كل جزيء O₂ يأخذ معه جزيئين من H₂، وتظهر القراءة H₂O formed: 4، والمتبقي (leftover) هو H₂ 0 · O₂ 0. +3. ارفع الآن «عدد جزيئات H₂» إلى 10 وأبقِ «عدد جزيئات O₂» عند 2. تظهر حلقة متقطعة حول ستة جزيئات هيدروجين زائدة، وتقول القراءة إن المتفاعل المحدِّد (limiting reactant) هو O₂ والمتبقي H₂ 6 · O₂ 0. ## Real-life examples -1. **خلط الهيدروجين والأكسجين بالنسبة التي تطلبها المعادلة بالضبط.** 4 جزيئات H₂ و2 جزيء O₂ تتفاعل بالكامل دون أن يتبقى شيء، وهذه نسبة 2 إلى 1 من المعادلة الموزونة. -2. **فائض أكسجين في الخزان.** 2 جزيء H₂ و6 جزيئات O₂. ينفد الهيدروجين أولًا، ويبقى معظم الأكسجين دون تفاعل. +1. **خلط الهيدروجين والأكسجين بالنسبة التي تطلبها المعادلة بالضبط.** 4 جزيئات H₂ وجزيئا O₂ تتفاعل بالكامل دون أن يتبقى شيء، وهذه نسبة 2 إلى 1 من المعادلة الموزونة. +2. **فائض أكسجين في الخزان.** جزيئا H₂ و6 جزيئات O₂. ينفد الهيدروجين أولًا، ويبقى معظم الأكسجين دون تفاعل. 3. **محرك صاروخ في منتصف احتراقه.** 10 جزيئات H₂ وجزيئا O₂، والتفاعل في منتصفه. سينفد الأكسجين أولًا، فيحدد كمية الماء التي يمكن تكوينها. ## Test yourself 1. اخلط الهيدروجين والأكسجين بالنسبة 2 إلى 1 بالضبط، دون هدر. -2. اضبط خليطًا فيه فائض أكسجين كبير بحيث يبقى جزيئا O₂ على الأقل دون تفاعل. +2. اضبط خليطًا فيه فائض أكسجين كبير بحيث يبقى 3 جزيئات O₂ على الأقل دون تفاعل. 3. أتمّ التفاعل وأنتج 8 جزيئات ماء بالضبط. ## Intuition -تخيّل وصفة تحتاج بيضتين بالضبط مقابل كوب دقيق واحد. أحضِر 4 بيضات و6 أكواب دقيق، فلن تصنع سوى دفعتين قبل أن ينفد البيض، مهما بقي من الدقيق. في الشاشة، حرّك «h2» و«o2» لتحديد عدد جزيئات الهيدروجين والأكسجين على الطاولة، ثم حرّك «مدى تقدم التفاعل» من 0 إلى 1 وراقب أزواج الكرات تختفي معًا بينما تظهر جزيئات ماء جديدة منحنية الشكل. +تخيّل وصفة تحتاج بيضتين بالضبط مقابل كوب دقيق واحد. أحضِر 4 بيضات و6 أكواب دقيق، فلن تصنع سوى دفعتين قبل أن ينفد البيض، مهما بقي من الدقيق. على الشاشة، حرّك «عدد جزيئات H₂» و«عدد جزيئات O₂» لتحديد عدد جزيئات الهيدروجين والأكسجين على الطاولة، ثم حرّك «مدى تقدم التفاعل» من 0 إلى 1 وراقب الكرات تترك أزواجها وتتجمع من جديد في جزيئات ماء منحنية الشكل. -ارفع «h2» أعلى بكثير من «o2»، وبعد أن يجري التفاعل تحصل جزيئات الهيدروجين الزائدة على حلقة متقطعة وتبقى مكانها دون تفاعل، لأن الأكسجين نفد أولًا وحدّد كمية الماء الممكن تكوينها. أي مكوّن ينفد أولًا يسمى المتفاعل المحدِّد، وهو الذي يقرر كمية الناتج، مهما بقي من المكوّن الآخر. +ارفع «عدد جزيئات H₂» أعلى بكثير من «عدد جزيئات O₂»، فتظهر حلقة متقطعة حول جزيئات الهيدروجين الزائدة، وتبقى مكانها دون تفاعل، لأن الأكسجين نفد أولًا وحدّد كمية الماء الممكن تكوينها. أي مكوّن ينفد أولًا يسمى المتفاعل المحدِّد، وهو الذي يقرر كمية الناتج، مهما بقي من المكوّن الآخر. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### وقود الصواريخ + يحترق الهيدروجين السائل والأكسجين السائل بهذا التفاعل بالذات لتشغيل محركات المرحلة العليا من الصواريخ. ### خلايا الوقود -إذا أُجري هذا التفاعل بخطوات معكوسة ومتحكَّم بها فإنك تستخرج طاقة كهربائية بدلًا من الحرارة، وهذا هو أساس عمل خلايا وقود الهيدروجين. + +إذا أُجري هذا التفاعل نفسه بخطوات مضبوطة ومن دون لهب فإنك تستخرج طاقة كهربائية بدلًا من الحرارة، وهذا هو أساس عمل خلايا وقود الهيدروجين. ### الطبخ والخَبز -نسب المقادير في الوصفات حسابات ستوكيومترية. إذا قلّ أحد المكوّنات ذهب الباقي هدرًا، تمامًا مثل المتفاعل المحدِّد. + +نسب المقادير في الوصفات مثل نسب المواد في التفاعل. إذا قلّ أحد المكوّنات ذهب الباقي هدرًا، تمامًا مثل المتفاعل المحدِّد. ### التصنيع الصناعي + تتعمد المصانع الكيميائية تزويد العملية بفائض من المتفاعل الأرخص حتى يُستهلك المتفاعل الأغلى ثمنًا بأكبر قدر ممكن. diff --git a/content/lessons/chemistry/chemical-reaction/en.md b/content/lessons/chemistry/chemical-reaction/en.md index ee902668..876d1440 100644 --- a/content/lessons/chemistry/chemical-reaction/en.md +++ b/content/lessons/chemistry/chemical-reaction/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. Drag «h2» and «o2» to set how many molecules of each are on the table. -2. Drag «reaction progress» from 0 to 1. Watch molecules pair off two at a time and water molecules appear. -3. Push one gas far higher than the other. The excess molecules stop reacting and pick up a dashed "excess" ring once the other runs out. +1. Set «H₂ molecules» to 4 and «O₂ molecules» to 2. The readout says limiting reactant: exact ratio — none. +2. Drag «reaction progress» from 0 to 1. Every O₂ molecule takes two H₂ molecules with it, and the readout shows H₂O formed: 4, with leftover H₂ 0 · O₂ 0. +3. Now raise «H₂ molecules» to 10 and keep «O₂ molecules» at 2. Six hydrogen molecules get a dashed "excess" ring; the readout shows limiting reactant: O₂ and leftover H₂ 6 · O₂ 0. ## Real-life examples @@ -34,9 +34,9 @@ variables: ## Intuition -Think of a recipe that needs exactly 2 eggs for every 1 cup of flour: bring 4 eggs and 6 cups of flour, and you can only make two batches before the eggs run out, no matter how much flour is left. On screen, drag «h2» and «o2» to set how many hydrogen and oxygen molecules sit on the table, then drag «reaction progress» from 0 to 1 and watch pairs of balls vanish together while new, bent water molecules appear. +Think of a recipe that needs exactly 2 eggs for every 1 cup of flour: bring 4 eggs and 6 cups of flour, and you can only make two batches before the eggs run out, no matter how much flour is left. On screen, drag «H₂ molecules» and «O₂ molecules» to set how many hydrogen and oxygen molecules sit on the table, then drag «reaction progress» from 0 to 1 and watch the balls leave their pairs and regroup into new, bent water molecules. -Push «h2» much higher than «o2» and, once the reaction runs, the leftover hydrogen molecules pick up a dashed ring and just sit there unreacted — the oxygen ran out first and capped how much water could form. Whichever ingredient runs out first is called the limiting reactant, and it decides how much product you get, no matter how much of the other ingredient is sitting around. +Push «H₂ molecules» much higher than «O₂ molecules» and the leftover hydrogen molecules pick up a dashed ring and just sit there unreacted — the oxygen ran out first and capped how much water could form. Whichever ingredient runs out first is called the limiting reactant, and it decides how much product you get, no matter how much of the other ingredient is sitting around. ## Formal @@ -57,13 +57,17 @@ Balancing is really solving a linear system: assign unknown coefficients to each ## Real world ### Rocket fuel + Liquid hydrogen and liquid oxygen burn in exactly this reaction to power upper-stage rocket engines. ### Fuel cells -Run the reaction in reverse-controlled steps and you extract electrical energy instead of heat — the basis of hydrogen fuel cells. + +Run the same reaction in controlled steps, without a flame, and you extract electrical energy instead of heat — the basis of hydrogen fuel cells. ### Cooking and baking + Recipe ratios are stoichiometry: too little of one ingredient and the rest goes to waste, exactly like a limiting reactant. ### Industrial synthesis + Chemical plants deliberately feed an excess of the cheaper reactant so the expensive one is used as completely as possible. diff --git a/content/lessons/chemistry/dilution-molarity/ar.md b/content/lessons/chemistry/dilution-molarity/ar.md index 0ce65273..52a1eadc 100644 --- a/content/lessons/chemistry/dilution-molarity/ar.md +++ b/content/lessons/chemistry/dilution-molarity/ar.md @@ -14,15 +14,15 @@ variables: ## Try it -1. حرّك نقطة الحجم النهائي «x» على المنحنى. راقب التركيز ينخفض كلما أضفت مزيدًا من المذيب. -2. ارفع «التركيز الابتدائي C₁». يرتفع المنحنى كله، فقد بدأت بعدد أكبر من المولات. -3. ارفع «الحجم الابتدائي V₁» بدلًا من ذلك. الأثر نفسه، فمولات أكثر تعني تركيزًا أعلى عند أي حجم نهائي. +1. اسحب «الحجم النهائي V₂» إلى 1 ثم 2 ثم 4. القراءة f(x)، وهي التركيز النهائي، تصير 2 ثم 1 ثم 0.5: كلما تضاعف الحجم نزل التركيز إلى النصف. +2. اترك V₂ عند 4 وارفع «التركيز الابتدائي C₁» من 2 إلى 4. يرتفع المنحنى كله وتصير f(x) = 1، فقد بدأت بعدد أكبر من المولات. +3. أعد C₁ إلى 2 وارفع «الحجم الابتدائي V₁» من 1 إلى 2. الأثر نفسه: f(x) = 1 مرة أخرى، فمولات أكثر تعني تركيزًا أعلى عند أي حجم نهائي. ## Real-life examples 1. **تخفيف حمض مركَّز لتجربة معملية.** 0.5 L من حمض مركَّز بتركيز 2 mol/L يُكمَّل إلى 5 L، فعدد مولات الحمض يبقى كما هو، لكنه ينتشر في عشرة أضعاف الحجم. -2. **تحضير عصير من مُركَّز.** 1 L من مُركَّز بتركيز 4 mol/L يُكمَّل إلى 4 L من عصير صالح للشرب، بربع القوة وأربعة أضعاف الحجم. -3. **تحضير محلول ملحي وريدي من مُركَّز.** 0.2 L فقط من مُركَّز بتركيز 3 mol/L يُخفَّف إلى 2 L ليعطي محلولًا آمنًا ومخففًا للمريض. +2. **تحضير عصير من مُركَّز.** 1 L من مُركَّز بتركيز 4 mol/L يُكمَّل إلى 4 L من عصير صالح للشرب، بربع التركيز وأربعة أضعاف الحجم. +3. **تحضير محلول ملحي وريدي من مُركَّز.** 0.1 L فقط من مُركَّز بتركيز 3 mol/L يُخفَّف إلى 2 L فيعطي 0.15 mol/L، وهو تركيز المحلول الملحي المعتاد في المغذّي الوريدي. ## Test yourself @@ -32,7 +32,7 @@ variables: ## Intuition -تخيّل زجاجة صغيرة من عصير مُركَّز. لتر واحد منه، بتركيز سكر 2 mol/L، يُسكب في إبريق ويُكمَّل بالماء إلى 4 لترات. السكر نفسه لم يتغيّر، لكنه انتشر الآن في أربعة أضعاف السائل. في الرسم، حرّك النقطة المسمّاة «x» (الحجم النهائي) يمينًا وراقب منحنى التركيز ينخفض، لا في خط مستقيم بل منحنيًا، لأن مضاعفة الحجم تنصّف التركيز بالضبط. +تخيّل زجاجة صغيرة من عصير مُركَّز. لتر واحد منه، بتركيز سكر 2 mol/L، يُسكب في إبريق ويُكمَّل بالماء إلى 4 لترات. السكر نفسه لم يتغيّر، لكنه انتشر الآن في أربعة أضعاف السائل. في الرسم، حرّك نقطة «الحجم النهائي V₂» يمينًا وراقب منحنى التركيز ينخفض، لا في خط مستقيم بل في خط منحنٍ، لأن مضاعفة الحجم تُنزل التركيز إلى النصف بالضبط. ارفع «التركيز الابتدائي C₁» أو «الحجم الابتدائي V₁» بدلًا من ذلك، فيرتفع المنحنى كله. بدأت بسكر أكثر، فيكون العصير أقوى عند أي حجم نهائي. والشيء الذي لا يتغيّر أثناء التخفيف هو كمية السكر نفسها، أي C₁ مضروبًا في V₁، وكل شيء آخر مجرد كمية الماء التي أضفتها. @@ -55,13 +55,17 @@ variables: ## Real world ### العمل المخبري + يحضّر الكيميائيون بانتظام محلولًا مخففًا للعمل من محلول مركَّز مخزَّن باستخدام العلاقة $C_1V_1 = C_2V_2$ بالضبط. ### جرعات الأدوية + تُخفَّف تراكيز الأدوية الوريدية إلى مستويات آمنة ودقيقة باستخدام العلاقة نفسها. ### الطبخ -تخفيف عصير مركَّز أو مرق بالماء هو تخفيف بعينه، الكتلة نفسها من مركبات النكهة، لكن موزَّعة بشكل أرقّ. + +تخفيف عصير مركَّز أو مرق بالماء هو تخفيف بعينه، الكتلة نفسها من مركبات النكهة، لكن موزَّعة في سائل أكثر. ### العلوم البيئية -ينخفض تركيز الملوِّث في النهر كلما اختلط بمزيد من الماء في اتجاه المصب، فالحمل الملوِّث يبقى محفوظًا حتى مع انخفاض تركيزه. + +ينخفض تركيز الملوِّث في النهر كلما اختلط بمزيد من الماء في اتجاه المصب، فكمية الملوِّث تبقى كما هي حتى مع انخفاض تركيزه. diff --git a/content/lessons/chemistry/dilution-molarity/en.md b/content/lessons/chemistry/dilution-molarity/en.md index df4d3806..96d7ebf9 100644 --- a/content/lessons/chemistry/dilution-molarity/en.md +++ b/content/lessons/chemistry/dilution-molarity/en.md @@ -16,15 +16,15 @@ variables: ## Try it -1. Drag the final-volume point «x» along the curve. Watch the concentration fall as you add more solvent. -2. Raise «starting concentration C₁». The whole curve shifts upward — more moles to start with. -3. Raise «starting volume V₁» instead. Same effect: more moles means a higher concentration at any final volume. +1. Drag «final volume V₂» to 1, then 2, then 4. The readout f(x), the final concentration, shows 2, then 1, then 0.5: each doubling of the volume halves the concentration. +2. Leave V₂ at 4 and raise «starting concentration C₁» from 2 to 4. The whole curve shifts upward and f(x) = 1 — more moles to start with. +3. Put C₁ back to 2 and raise «starting volume V₁» from 1 to 2 instead. Same effect: f(x) = 1 again, because more moles means a higher concentration at any final volume. ## Real-life examples 1. **Diluting a concentrated acid for an experiment.** 0.5 L of 2 mol/L stock acid topped up to 5 L: the moles of acid stay the same, just spread through ten times the volume. 2. **Making juice from concentrate.** 1 L of 4 mol/L concentrate topped up to 4 L of drinkable juice — a quarter as strong, four times the volume. -3. **Preparing an IV drip from concentrated saline.** Just 0.2 L of 3 mol/L stock diluted up to 2 L gives a safe, dilute solution for a patient. +3. **Preparing an IV drip from concentrated saline.** Just 0.1 L of 3 mol/L stock diluted up to 2 L gives 0.15 mol/L, the strength of an ordinary saline drip. ## Test yourself @@ -34,9 +34,9 @@ variables: ## Intuition -Picture a small bottle of concentrated juice: 1 litre of it, at 2 mol/L of sugar, poured into a jug and topped up with water to 4 litres. The sugar itself didn't change, but it is now spread through four times the liquid. On the chart, drag the point marked «x» (final volume) to the right and watch the concentration curve fall — not in a straight line, but bending, because doubling the volume exactly halves the concentration. +Picture a small bottle of concentrated juice: 1 litre of it, at 2 mol/L of sugar, poured into a jug and topped up with water to 4 litres. The sugar itself didn't change, but it is now spread through four times the liquid. On the chart, drag the point «final volume V₂» to the right and watch the concentration curve fall — not in a straight line, but bending, because doubling the volume exactly halves the concentration. -Raise «starting concentration C1» or «starting volume V1» instead, and the whole curve shifts upward: you began with more sugar, so at any final volume the drink is stronger. What never changes during dilution is the amount of sugar itself, C1 times V1 — everything else is just how much water you added. +Raise «starting concentration C₁» or «starting volume V₁» instead, and the whole curve shifts upward: you began with more sugar, so at any final volume the drink is stronger. What never changes during dilution is the amount of sugar itself, C1 times V1 — everything else is just how much water you added. ## Formal @@ -57,13 +57,17 @@ The same bookkeeping — a conserved quantity partitioned across a changing exte ## Real world ### Lab work + Chemists routinely make a dilute working solution from a concentrated stock using exactly $C_1V_1 = C_2V_2$. ### Medicine dosing + IV drug concentrations are diluted to safe, precise levels using the same relationship. ### Cooking + Diluting concentrated juice or stock with water is dilution — the same mass of flavour compounds, spread thinner. ### Environmental science + Pollutant concentration in a river drops as it mixes with more water downstream — the pollutant load is conserved even as its concentration falls. diff --git a/content/lessons/chemistry/dilution-molarity/lesson.yaml b/content/lessons/chemistry/dilution-molarity/lesson.yaml index 62e2415c..007cdc34 100644 --- a/content/lessons/chemistry/dilution-molarity/lesson.yaml +++ b/content/lessons/chemistry/dilution-molarity/lesson.yaml @@ -41,7 +41,7 @@ parameters: min: 0.5 max: 10 step: 0.1 - value: 2 + value: 4 unit: L variables: - C @@ -61,7 +61,7 @@ presets: V1: 1 x: 4 - C1: 3 - V1: 0.2 + V1: 0.1 x: 2 challenges: - check: C1*V1/x diff --git a/content/lessons/chemistry/electrochemistry-cells/ar.md b/content/lessons/chemistry/electrochemistry-cells/ar.md index 31d492ed..b82e3971 100644 --- a/content/lessons/chemistry/electrochemistry-cells/ar.md +++ b/content/lessons/chemistry/electrochemistry-cells/ar.md @@ -15,15 +15,15 @@ variables: ## Try it -1. حرّك منزلق «حاصل التفاعل Q» صعودًا بعيدًا عن 1. تزدحم كأس النواتج، ويهبط الفولتميتر، وترى إلكترونات السلك تتباطأ بوضوح. -2. ارفع «عدد الإلكترونات المنتقلة n» بدلًا من ذلك. الارتفاع نفسه في Q يكلّف جهدًا أقل الآن — تكاد الإبرة لا تتحرك. -3. ارفع «الجهد القياسي للخلية E⁰». يقفز الفولتميتر وتسرع الإلكترونات، فهذه بطارية أقوى منذ البداية. +1. ارفع منزلق حاصل التفاعل Q من 1 إلى أعلى قيمة له، نحو 1000. تزدحم كأس النواتج، وتنخفض القراءة E من 1.1 V إلى 1.011 V، وتتباطأ الإلكترونات في السلك. +2. اترك Q عند أعلى قيمة وغيّر «عدد الإلكترونات المنتقلة n». عند n = 1 تصير القراءة E = 0.923 V، وعند n = 3 تصير E = 1.041 V. الارتفاع نفسه في Q يُنقص من الجهد أقل كلما كان n أكبر. +3. أعد Q إلى نحو 1 وارفع «الجهد القياسي للخلية E⁰» من 1.1 إلى 2. يقفز الفولتميتر إلى نحو 2 V وتسرع الإلكترونات، فهذه بطارية أقوى منذ البداية. ## Real-life examples -1. **خلية دانيال، لحظة توصيلها.** جهد قياسي 1.10 فولت، وإلكترونان منتقلان، والمتفاعلات والنواتج متوازنة (Q يساوي 1)، فتعطي الخلية جهدها الكامل المقرر. -2. **بطارية أوشكت على النفاد.** بعد تفريغ طويل، تراكمت النواتج بألف ضعف المتفاعلات (Q يساوي 500)، فحتى مع تقدير جيد 1.5 فولت، انخفض الجهد بوضوح. -3. **لحظة تشغيل الخلية.** لا نواتج تقريبًا بعد (Q قرب أدنى قيمة له)، فيقرأ الجهد قريبًا من قيمته القياسية الكاملة 1.8 فولت للحظات. +1. **خلية دانيال، لحظة توصيلها.** جهد قياسي 1.10 فولت، وإلكترونان منتقلان، والمتفاعلات والنواتج بتراكيز قياسية متساوية (Q يساوي 1)، فتعطي الخلية جهدها الكامل المقرر. +2. **بطارية أوشكت على النفاد.** بعد تفريغ طويل، تراكمت النواتج حتى صارت خمسمئة ضعف المتفاعلات (Q يساوي 500)، فحتى مع جهد مقرر جيد قدره 1.5 فولت، انخفض الجهد بوضوح. +3. **لحظة تشغيل الخلية.** لا نواتج تقريبًا بعد (Q عند أدنى قيمة له، 0.001)، فيصل الجهد للحظات إلى نحو 1.98 فولت، أي أعلى قليلًا من قيمته القياسية 1.8 فولت. ## Test yourself @@ -33,9 +33,9 @@ variables: ## Intuition -تخيّل بطارية AA جديدة، جهدها المقرر 1.5 فولت، مقارنة بأخرى شغّلت مصباحًا يدويًا ساعات طويلة. يبدو ضوء المصباح أضعف بوضوح، لأن جهد البطارية انخفض عن قيمته المقررة. في الشاشة، حرّك منزلق «حاصل التفاعل Q» صعودًا بعيدًا عن 1 لتتخيّل تلك البطارية المستهلكة، إذ استُهلكت المتفاعلات وتراكمت النواتج. راقب الفولتميتر ينخفض وتيار الإلكترونات يتباطأ وأنت تحرّك المنزلق. الكيمياء نفسها والجهد المقرر نفسه، لكن بقي دفع أقل. +تخيّل بطارية AA جديدة، جهدها المقرر 1.5 فولت، مقارنة بأخرى شغّلت مصباحًا يدويًا ساعات طويلة. يبدو ضوء المصباح أضعف بوضوح، لأن جهد البطارية انخفض عن قيمته المقررة. على الشاشة، ارفع منزلق حاصل التفاعل Q بعيدًا عن 1 لتتخيّل تلك البطارية المستهلكة، إذ استُهلكت المتفاعلات وتراكمت النواتج. راقب الفولتميتر ينخفض وتيار الإلكترونات يتباطأ وأنت تحرّك المنزلق. الكيمياء نفسها والجهد المقرر نفسه، لكن قوة الدفع صارت أقل. -حرّك الآن «عدد الإلكترونات المنتقلة n» بدلًا من ذلك. فكلما زاد عدد الإلكترونات المتبادلة في كل حدث تفاعل، خفّض الارتفاع نفسه في Q جهدًا أقل، فتحافظ بطارية ذات n أكبر على جهدها بثبات أكبر وهي تُفرَّغ. هذا هو مضمون معادلة نرنست كله، أي أن الجهد يساوي القيمة المقررة مطروحًا منها مقدار يكبر كلما ارتفع حاصل التفاعل Q. +غيّر الآن «عدد الإلكترونات المنتقلة n». فكلما زاد عدد الإلكترونات المتبادلة في كل تفاعل، أنقص الارتفاع نفسه في Q من الجهد مقدارًا أقل، فتحافظ بطارية ذات n أكبر على جهدها بثبات أكبر وهي تُفرَّغ. هذا هو مضمون معادلة نرنست كله، أي أن الجهد يساوي القيمة المقررة مطروحًا منها مقدار يكبر كلما ارتفع حاصل التفاعل Q. ## Formal @@ -50,19 +50,23 @@ variables: ## Derivation 1. ينقسم تفاعل الأكسدة والاختزال إلى نصفي تفاعل يتبادلان معًا $n$ إلكترونًا، ويحدد مجموع جهدي اختزالهما القياسيين الجهد القياسي للخلية $E^0$. -2. تعدّل معادلة نرنست العامة تلك القيمة القياسية بحد يتناسب مع لوغاريتم حاصل التفاعل، مقيَّسًا بالحرارة وعدد الإلكترونات. +2. تعدّل معادلة نرنست العامة تلك القيمة القياسية بحد يتناسب مع لوغاريتم حاصل التفاعل، ويعتمد مقداره على الحرارة وعدد الإلكترونات. 3. عند 25°C تنكمش الثوابت المعتمدة على الحرارة إلى الرقم 0.05916، فتُعطي الصيغة المبسطة والمستخدمة عادة للمعادلة. ## Real world ### لماذا يهبط جهد البطارية وهي تُفرَّغ -مع تفريغ البطارية، تُستهلك المتفاعلات وتتراكم النواتج، فيرتفع $Q$ وينخفض الجهد باطراد عن قيمته القياسية الطازجة، وهو بالضبط ما يمثّله منزلق Q في هذا الدرس. + +مع تفريغ البطارية، تُستهلك المتفاعلات وتتراكم النواتج، فيرتفع $Q$ وينخفض الجهد باطراد عن قيمته القياسية وهي جديدة، وهو بالضبط ما يمثّله منزلق Q في هذا الدرس. ### خلية دانيال والبطاريات المبكرة + جعل ناتج خلية دانيال الموثوق البالغ 1.10 فولت منها واحدة من أوائل البطاريات العملية، استُخدمت لتشغيل أنظمة التلغراف المبكرة في القرن التاسع عشر. ### مقاييس pH والأقطاب الانتقائية للأيونات + كثير من أجهزة استشعار المختبر في جوهرها خلايا كهروكيميائية، تحوّل فرق تركيز إلى جهد عبر هذه العلاقة بالضبط، ثم تحوّل ذلك الجهد مجددًا إلى قراءة. ### التآكل والحماية الكاثودية + الصدأ عملية كهروكيميائية، ويحمي المهندسون السفن وخطوط الأنابيب بتوصيل فلز أسهل أكسدة يضحي بنفسه، فيُحوَّل مكان حدوث كل نصف تفاعل. diff --git a/content/lessons/chemistry/electrochemistry-cells/en.md b/content/lessons/chemistry/electrochemistry-cells/en.md index 3bc100f1..7555f832 100644 --- a/content/lessons/chemistry/electrochemistry-cells/en.md +++ b/content/lessons/chemistry/electrochemistry-cells/en.md @@ -17,15 +17,15 @@ variables: ## Try it -1. Drag «reaction quotient Q» up, away from 1. The product beaker crowds up, the voltmeter sags, and the electrons on the wire visibly slow down. -2. Raise «electrons transferred n» instead. The same climb in Q now costs less voltage — the needle barely moves. -3. Raise «standard cell potential E⁰». The voltmeter jumps and the electrons hurry — a stronger battery to start with. +1. Drag the reaction quotient Q slider up from 1 to the top, about 1000. The product beaker crowds up, the readout E sags from 1.1 V to 1.011 V, and the electrons on the wire slow down. +2. Leave Q at the top and change «electrons transferred n» instead. With n = 1 the readout shows E = 0.923 V; with n = 3 it shows E = 1.041 V. The same climb in Q costs less voltage when n is larger. +3. Bring Q back down to about 1 and raise «standard cell potential E⁰» from 1.1 to 2. The voltmeter jumps to about 2 V and the electrons hurry — a stronger battery to start with. ## Real-life examples -1. **A fresh Daniell cell, just connected.** Standard potential 1.10 V, two electrons transferred, reactants and products in balance (Q = 1): the cell delivers its full rated voltage. -2. **A battery that has nearly run flat.** After a long discharge, products have built up a thousandfold over reactants (Q = 500): even with a decent 1.5 V rating, the voltage has sagged noticeably. -3. **The instant a cell is switched on.** Virtually no products exist yet (Q near its minimum): the voltage briefly reads close to its full standard value of 1.8 V. +1. **A fresh Daniell cell, just connected.** Standard potential 1.10 V, two electrons transferred, reactants and products at equal, standard concentrations (Q = 1): the cell delivers its full rated voltage. +2. **A battery that has nearly run flat.** After a long discharge, products have built up five-hundredfold over reactants (Q = 500): even with a decent 1.5 V rating, the voltage has sagged noticeably. +3. **The instant a cell is switched on.** Virtually no products exist yet (Q at its minimum, 0.001): the voltage briefly reads about 1.98 V, even a little above its standard value of 1.8 V. ## Test yourself @@ -58,13 +58,17 @@ The Nernst equation is why a cell's voltage can be used to measure concentration ## Real world ### Why a battery's voltage sags as it runs down + As a battery discharges, reactants are consumed and products accumulate, raising $Q$ and steadily lowering the voltage below its fresh, standard value — exactly what this lesson's Q slider acts out. ### The Daniell cell and early batteries + The Daniell cell's reliable 1.10 V output made it one of the first practical batteries, used to power early telegraph systems in the 19th century. ### pH meters and ion-selective electrodes + Many lab sensors are electrochemical cells at heart, converting a concentration difference into a voltage through this exact relationship, then converting that voltage back into a reading. ### Corrosion and cathodic protection + Rusting is an electrochemical process; engineers protect ships and pipelines by attaching a more easily oxidised metal that sacrifices itself, shifting which half-reaction happens where. diff --git a/content/lessons/chemistry/ideal-gas-law/ar.md b/content/lessons/chemistry/ideal-gas-law/ar.md index 6d2e393c..23afa0b4 100644 --- a/content/lessons/chemistry/ideal-gas-law/ar.md +++ b/content/lessons/chemistry/ideal-gas-law/ar.md @@ -22,15 +22,15 @@ charts: ## Try it -1. اسحب المكبس إلى اليسار لتضغط الغاز. تضرب الجسيمات الجدران أكثر ويرتفع مقياس الضغط. -2. ارفع «درجة الحرارة T». تطير الجسيمات أسرع ويرتفع الضغط مجددًا مع أن المساحة نفسها. -3. ارفع «الكمية n». جسيمات أكثر فضربات أكثر فضغط أكبر. هذا هو القانون كله. +1. اسحب المكبس إلى اليسار حتى يصير «الحجم V» 12.5 L، أي نصف ما بدأ به. تضرب الجسيمات الجدران أكثر ويتضاعف P، من نحو 100 kPa إلى نحو 200 kPa. +2. أعد V إلى 25 وارفع «درجة الحرارة T» من 300 إلى 600. تطير الجسيمات أسرع ويصير P نحو 200 kPa مرة أخرى مع أن الحيّز لم يتغير. +3. أعد T إلى 300 وارفع «الكمية n» من 1 إلى 2. جسيمات أكثر فضربات أكثر، ويصير P نحو 200 kPa من جديد. هذا هو القانون كله. ## Real-life examples 1. **بالون حفلة مملوء بالهيليوم.** نحو 0.5 مول من الغاز عند حرارة الغرفة (300 K) يملأ نحو 12 لترًا. 2. **إطار سيارة في يوم حار.** نحو 2 مول من الهواء تسخّن إلى 320 K، محصورًا في حجم الإطار الثابت 10 لترات، يرفع الضغط بوضوح. -3. **أسطوانة غوص مضغوطة بشدة.** نحو 5 مولات من الهواء مضغوطة في 8 لترات فقط عند حرارة الغرفة (300 K). +3. **أسطوانة غوص مضغوطة بشدة.** نحو 5 مولات من الهواء مضغوطة في 8 لترات فقط عند حرارة الغرفة (300 K)، وهذا أكثر بكثير مما يتسع له الحيّز نفسه عند الضغط العادي. ## Test yourself @@ -40,9 +40,9 @@ charts: ## Intuition -تخيّل مضخة دراجة هوائية. تدفع المقبض إلى الأسفل فيُحشَر الهواء نفسه في حيز أصغر داخل الأسطوانة. في الشاشة، اسحب المكبس يسارًا لتُصغّر الحجم V، وراقب الجسيمات نفسها تصطدم بالجدران أكثر. ترتفع قراءة عدد الاصطدامات في الثانية، ويرتفع مقياس الضغط في الأعلى معها. +تخيّل مضخة دراجة هوائية. تدفع المقبض إلى الأسفل فيُحشَر الهواء نفسه في حيز أصغر داخل الأسطوانة. على الشاشة، اسحب المكبس يسارًا لتُصغّر الحجم V، وراقب الجسيمات نفسها تصطدم بالجدران أكثر. ترتفع قراءة عدد الاصطدامات في الثانية، ويرتفع مقياس الضغط في الأعلى معها. -حرّك الآن شريط درجة الحرارة T إلى الأعلى بدلًا من ذلك. تتسارع كل الجسيمات، فتصطدم بالجدران بقوة أكبر وتكرار أكبر حتى في الحجم نفسه. حرّك شريط الكمية n إلى الأعلى، فيصبح هناك ببساطة عدد أكبر من الجسيمات لتصطدم. مقياس الضغط في الحقيقة مجرد حصيلة متراكمة لتلك الاصطدامات، فكلما زادت أو اشتدت، ارتفعت القراءة. +ارفع الآن منزلق «درجة الحرارة T». تتسارع كل الجسيمات، فتصطدم بالجدران بقوة أكبر ومرات أكثر حتى في الحجم نفسه. ارفع منزلق «الكمية n»، فيزيد عدد الجسيمات التي تصطدم بالجدران. مقياس الضغط في الحقيقة عدّاد لتلك الاصطدامات، فكلما زادت أو اشتدت، ارتفعت القراءة. ## Formal @@ -56,20 +56,24 @@ charts: ## Derivation -1. ثلاثة قوانين تجريبية منفصلة. ضغط الحجم إلى الداخل يرفع الضغط، وتسخين الغاز عند ضغط ثابت يوسّعه، وإضافة مزيد من الغاز عند ضغط ثابت يوسّعه أيضًا. +1. ثلاثة قوانين تجريبية منفصلة. تصغير الحجم يرفع الضغط، وتسخين الغاز عند ضغط ثابت يوسّعه، وإضافة مزيد من الغاز عند ضغط ثابت يوسّعه أيضًا. 2. يثبّت كل قانون منها المتغيرات الأخرى. وبدمج القوانين الثلاثة معًا، لا بد أن يتناسب الضغط مع الجداء $nT$ وأن يتناسب عكسيًا مع $V$. 3. أدخل ثابت تناسب واحد هو $R$ لتتحوّل هذه العلاقة المجمّعة إلى معادلة، وهي قانون الغاز المثالي. ## Real world ### المحركات + يضغط محرك السيارة خليط الهواء والوقود قبل الإشعال، وتقليص $V$ يرفع $P$ و$T$، ثم يترك غاز الاحتراق الساخن يتمدد ليدفع المكبس. ### التبريد + تُدوِّر الثلاجات ومكيفات الهواء سائل التبريد بين الانضغاط والتمدد، وتستخدم علاقة $PV = nRT$ لنقل الحرارة من البارد إلى الساخن. ### الإطارات وخزانات الغاز -يرتفع ضغط الإطار في يوم حار لأن $T$ ارتفعت فقط، بينما بقي $n$ و$V$ شبه ثابتين. وهذا بالضبط الشريط الذي يمكنك تحريكه هنا. + +يرتفع ضغط الإطار في يوم حار لأن $T$ ارتفعت فقط، بينما بقي $n$ و$V$ شبه ثابتين. وهذا بالضبط المنزلق الذي يمكنك تحريكه هنا. ### الغلاف الجوي + ينخفض ضغط الهواء مع الارتفاع لأن كمية الغاز الضاغطة من فوق تقل. وتتشكل الأنظمة الجوية حين تختلط جيوب هواء بقيم مختلفة من $T$ و$P$. diff --git a/content/lessons/chemistry/ideal-gas-law/en.md b/content/lessons/chemistry/ideal-gas-law/en.md index 7c022234..86058727 100644 --- a/content/lessons/chemistry/ideal-gas-law/en.md +++ b/content/lessons/chemistry/ideal-gas-law/en.md @@ -24,9 +24,9 @@ charts: ## Try it -1. Drag the piston to the left to squeeze the gas. The particles hit the walls more often and the pressure gauge rises. -2. Raise «temperature T». The particles fly faster and the pressure rises again, even with the same space. -3. Raise «amount n». More particles, more hits, more pressure. That is the whole law. +1. Drag the piston to the left until «volume V» reads 12.5 L, half of where it started. The particles hit the walls more often and P doubles, from about 100 kPa to about 200 kPa. +2. Put V back to 25 and raise «temperature T» from 300 to 600. The particles fly faster and P reads about 200 kPa again, even with the same space. +3. Put T back to 300 and raise «amount n» from 1 to 2. More particles, more hits, and P is about 200 kPa once more. That is the whole law. ## Real-life examples @@ -65,13 +65,17 @@ Kinetic theory derives it: $PV = \tfrac13 N m \langle v^2 \rangle$ together with ## Real world ### Engines + A car engine compresses an air-fuel mixture (shrinking $V$ raises $P$ and $T$) before ignition, then lets the hot combustion gas expand to push the piston. ### Refrigeration + Fridges and air conditioners cycle a refrigerant through compression and expansion, using the $PV = nRT$ relationship to move heat from cold to warm. ### Tyres and gas tanks + A tyre's pressure rises on a hot day purely because $T$ went up while $n$ and $V$ stayed almost fixed — exactly the slider you can move here. ### The atmosphere + Air pressure falls with altitude because there is less gas above pressing down; weather systems form as pockets of air at different $T$ and $P$ mix. diff --git a/content/lessons/chemistry/ideal-gas-law/lesson.yaml b/content/lessons/chemistry/ideal-gas-law/lesson.yaml index 84e1782e..b77a803c 100644 --- a/content/lessons/chemistry/ideal-gas-law/lesson.yaml +++ b/content/lessons/chemistry/ideal-gas-law/lesson.yaml @@ -3,14 +3,14 @@ subject: chemistry difficulty: high-school equation: PV = nRT concepts: -- pressure -- volume -- temperature -- moles + - pressure + - volume + - temperature + - moles prerequisites: -- function-graph + - function-graph related: -- newtons-second-law + - newtons-second-law visualization: type: gas-box options: {} @@ -34,22 +34,22 @@ parameters: value: 25 unit: L variables: -- P -- V -- n -- R -- T + - P + - V + - n + - R + - T derivation: -- P \propto \frac{1}{V} \quad \text{(Boyle)}, \qquad V \propto T \quad \text{(Charles)}, \qquad V \propto n \quad \text{(Avogadro)} -- P \propto \frac{nT}{V} -- PV = nRT + - P \propto \frac{1}{V} \quad \text{(Boyle)}, \qquad V \propto T \quad \text{(Charles)}, \qquad V \propto n \quad \text{(Avogadro)} + - P \propto \frac{nT}{V} + - PV = nRT charts: -- domain: - - 5 - - 50 - marker: V - series: - - n*8.314*T/x + - domain: + - 5 + - 50 + marker: V + series: + - n*8.314*T/x visualization3d: type: gas-box options: {} diff --git a/content/lessons/chemistry/ionic-and-covalent-bonding/ar.md b/content/lessons/chemistry/ionic-and-covalent-bonding/ar.md index 12bba933..b790d99e 100644 --- a/content/lessons/chemistry/ionic-and-covalent-bonding/ar.md +++ b/content/lessons/chemistry/ionic-and-covalent-bonding/ar.md @@ -11,9 +11,9 @@ variables: ## Try it -1. انتقل عبر الجدول الدوري لتغيير «العدد الذري Z». راقب عدد إلكترونات التكافؤ وعائلة العنصر يتغيّران. -2. قف عند فلز من يسار الجدول، ثم عند لافلز من يمينه. لاحظ الفرق الكبير بين سالبيتيهما الكهربائيتين. -3. قف عند لافلزين متجاورين على الجدول وقارن بينهما. سالبيتاهما الكهربائيتان متقاربتان، ما يفضّل رابطة تساهمية مشتركة. +1. اضغط على الفلور (Z = 9). تظهر قراءة «الإلكترونات في كل مدار» 2 · 7 والعائلة هي الهالوجينات: سبعة إلكترونات خارجية، وينقصه واحد ليصير العدد ثمانية. +2. اضغط على الصوديوم (Z = 11)، وهو فلز في أقصى اليسار. قراءته 2 · 8 · 1 وعائلته الفلزات القلوية: عنده إلكترون خارجي واحد زائد، وهو بالضبط ما ينقص الفلور. العنصران متباعدان في الجدول، وكذلك سالبيتاهما الكهربائيتان. +3. اضغط على الكربون (Z = 6، وقراءته 2 · 4) ثم على الأكسجين (Z = 8، وقراءته 2 · 6)، وهما لافلزان متقاربان في الجدول. سالبيتاهما الكهربائيتان متقاربتان، فيميلان إلى رابطة تساهمية يتشاركان فيها الإلكترونات. ## Real-life examples @@ -25,40 +25,44 @@ variables: 1. جد الغاز النبيل الذي يُنهي الدورة الثانية. 2. جد الفلز القلوي الذي يبدأ الدورة الرابعة. -3. جد الهالوجين في مجموعة الكلور نفسها (الدورة الثالثة). +3. جد الهالوجين الذي في الدورة الثالثة، وهو الموجود في ملح الطعام. ## Intuition -انتقل عبر الجدول إلى الفلور المعروض هنا، فله سبعة إلكترونات تكافؤ، وينقصه إلكترون واحد فقط ليكتمل غلافه الخارجي المستقر بثمانية إلكترونات. وذرة مثل الصوديوم، الأكبر بغلاف كامل، لها المشكلة المعاكسة، فلديها إلكترون تكافؤ وحيد تفضّل فقدانه على الاحتفاظ به. ضع الذرتين معًا، فيسلّم الصوديوم إلكترونه ببساطة إلى الفلور. يصبح الصوديوم أيونًا موجبًا والفلور أيونًا سالبًا، والجذب الكهربائي بينهما هو الرابطة الأيونية. +اضغط في الجدول على الفلور المحدد هنا، فله سبعة إلكترونات تكافؤ، وينقصه إلكترون واحد فقط ليكتمل غلافه الخارجي المستقر بثمانية إلكترونات. وذرة مثل الصوديوم، الأكبر بغلاف كامل، لها المشكلة المعاكسة، فلديها إلكترون تكافؤ وحيد تفضّل فقدانه على الاحتفاظ به. ضع الذرتين معًا، فيسلّم الصوديوم إلكترونه ببساطة إلى الفلور. يصبح الصوديوم أيونًا موجبًا والفلور أيونًا سالبًا، والجذب الكهربائي بينهما هو الرابطة الأيونية. تخيّل الآن ذرتين تريدان الاحتفاظ بإلكتروناتهما بالقدر نفسه تقريبًا، مثل ذرتي كلور، أو الكربون والهيدروجين. لا تستطيع أي منهما الفوز بإلكترون كامل في شد الحبل بينهما، فتتشاركان بدلًا من ذلك زوجًا من الإلكترونات، كل ذرة تسهم بإلكترون واحد وتحتسبه ضمن غلافها المكتمل. وذلك الزوج المشترك، الموجود في الفراغ بين النواتين، هو الرابطة التساهمية، فالإلكترونات لا تنتمي كليًا لذرة دون الأخرى أبدًا. ## Formal -يحكم النوعين معًا قاعدة الثمانية، إذ تكون الذرات أكثر استقرارًا حين يوجد ثمانية إلكترونات (اثنان للهيدروجين والهيليوم) في غلافها الخارجي، مطابقةً أقرب غاز نبيل. يصل الترابط الأيوني إلى هذه الحالة بتحويل كامل للإلكترون، مكوّنًا أيونات مشحونة يجذب بعضها بعضًا كهربائيًا، ويصل الترابط التساهمي إليها بمشاركة أزواج من الإلكترونات، دون تحويل كامل. +يحكم النوعين معًا قاعدة الثمانية، إذ تكون الذرات أكثر استقرارًا حين يوجد ثمانية إلكترونات (اثنان للهيدروجين والهيليوم) في غلافها الخارجي، مطابقةً أقرب غاز نبيل. يصل الترابط الأيوني إلى هذه الحالة بانتقال الإلكترون كاملًا من ذرة إلى أخرى، فتتكوّن أيونات مشحونة يجذب بعضها بعضًا كهربائيًا، ويصل الترابط التساهمي إليها بمشاركة أزواج من الإلكترونات، دون انتقال كامل. -ويتنبأ فرق السالبية الكهربائية بين الذرتين، $\Delta\chi = |\chi_1 - \chi_2|$، بأي النوعين سيحدث. فرق كبير، مثل فلز من يسار الجدول مقترن بلافلز من يمينه كما في الصوديوم والفلور، يجذب الإلكترون المشترك بالكامل تقريبًا نحو ذرة واحدة، وهذا تحويل فعليًا، أي رابطة أيونية. وفرق صغير أو معدوم، كما بين لافلزين أو ذرتين متماثلتين، يترك زوج الإلكترونات مشتركًا فعلًا، أي رابطة تساهمية. +ويتنبأ فرق السالبية الكهربائية بين الذرتين، $\Delta\chi = |\chi_1 - \chi_2|$، بأي النوعين سيحدث. فرق كبير، مثل فلز من يسار الجدول مقترن بلافلز من يمينه كما في الصوديوم والفلور، يجذب الإلكترون المشترك بالكامل تقريبًا نحو ذرة واحدة، وهذا في الواقع انتقال للإلكترون، أي رابطة أيونية. وفرق صغير أو معدوم، كما بين لافلزين أو ذرتين متماثلتين، يترك زوج الإلكترونات مشتركًا فعلًا، أي رابطة تساهمية. ## Advanced -نادرًا ما تكون الروابط الحقيقية نوعًا واحدًا خالصًا، فحتى كثير من الروابط «الأيونية» فيها قدر من كثافة إلكترونية مشتركة، وكثير من الروابط «التساهمية» قطبية، إذ يقترب الزوج المشترك أكثر من الذرة الأكثر سالبية كهربائية فيمنحها طرفًا بشحنة سالبة جزئية. الأفضل النظر إلى فرق السالبية الكهربائية كمقياس متدرج، من تساهمي غير قطبي إلى تساهمي قطبي إلى أيوني، لا كثلاثة صناديق منفصلة. +نادرًا ما تكون الروابط الحقيقية نوعًا واحدًا خالصًا، فحتى كثير من الروابط «الأيونية» فيها قدر من كثافة إلكترونية مشتركة، وكثير من الروابط «التساهمية» قطبية، إذ يقترب الزوج المشترك أكثر من الذرة الأكثر سالبية كهربائية فيمنحها طرفًا بشحنة سالبة جزئية. الأفضل النظر إلى فرق السالبية الكهربائية كمقياس متدرج، من تساهمي غير قطبي إلى تساهمي قطبي إلى أيوني، لا كثلاثة أنواع منفصلة. ## Derivation 1. يحدد موضع الذرة في الجدول عدد إلكترونات تكافؤها، وبالتالي بعدها عن اكتمال الثمانية. 2. يقيس فرق السالبية الكهربائية بين ذرتين مترابطتين مدى تفاوت جذبهما لزوج الإلكترونات المشترك. -3. الفرق الكبير يفضّل التحويل الكامل (أيوني)، والفرق الصغير يفضّل المشاركة (تساهمي). +3. الفرق الكبير يؤدي إلى انتقال الإلكترون كاملًا (أيوني)، والفرق الصغير يؤدي إلى المشاركة (تساهمي). ## Real world ### لماذا يذوب ملح الطعام في الماء + يتماسك كلوريد الصوديوم بجذب أيوني قوي بين Na⁺ وCl⁻، لكن جزيئات الماء القطبية تحيط بهذين الأيونين وتفصلهما بسهولة، ولهذا يذوب الملح بيسر. ### لماذا الميثان غاز في درجة حرارة الغرفة + تُنشئ روابط C–H التساهمية في الميثان جزيئات صغيرة شبه متعادلة كهربائيًا، بينها جذب ضعيف فقط، فلا يلزم سوى طاقة قليلة لفصلها إلى غاز. ### الفلزات والسبائك + الترابط الفلزي، وهو حالة ثالثة تُشارَك فيها إلكترونات التكافؤ بين ذرات كثيرة في آن واحد لا بين ذرتين فقط، يفسّر لماذا توصّل الفلزات الكهرباء ويمكن ثنيها دون أن تتكسّر. ### أملاح الجسم وإشارات الأعصاب + تذوب المركبات الأيونية مثل كلوريد الصوديوم والبوتاسيوم في الجسم إلى أيونات حرة، وتدفق هذه الأيونات عبر أغشية الخلايا هو ما ترسل به الخلايا العصبية إشاراتها. diff --git a/content/lessons/chemistry/ionic-and-covalent-bonding/en.md b/content/lessons/chemistry/ionic-and-covalent-bonding/en.md index af5ad2de..a6dc72d8 100644 --- a/content/lessons/chemistry/ionic-and-covalent-bonding/en.md +++ b/content/lessons/chemistry/ionic-and-covalent-bonding/en.md @@ -13,9 +13,9 @@ variables: ## Try it -1. Tap through the periodic table to change «atomic number Z». Watch the valence-electron count and the element's family change. -2. Land on a metal from the left side, then a nonmetal from the right. Notice how far apart their electronegativities sit. -3. Land on two nonmetals close together on the table and compare — their electronegativities are close, favouring a shared, covalent bond. +1. Tap fluorine (Z = 9). The «electrons per shell» readout shows 2 · 7 and the family is halogens: seven outer electrons, one short of eight. +2. Tap sodium (Z = 11), a metal from the far left. It reads 2 · 8 · 1, alkali metals: one spare outer electron, exactly what fluorine is missing. The two sit far apart on the table, and so do their electronegativities. +3. Tap carbon (Z = 6, reading 2 · 4) and then oxygen (Z = 8, reading 2 · 6), two nonmetals close together on the table — their electronegativities are close, favouring a shared, covalent bond. ## Real-life examples @@ -27,7 +27,7 @@ variables: 1. Find the noble gas that ends period 2. 2. Find the alkali metal that starts period 4. -3. Find the halogen in chlorine's own group (period 3). +3. Find the halogen in period 3, the one in table salt. ## Intuition @@ -54,13 +54,17 @@ Real bonds are rarely purely one or the other; even many "ionic" bonds have some ## Real world ### Why table salt dissolves in water + Sodium chloride is held together by strong ionic attraction between Na⁺ and Cl⁻, but water's polar molecules surround and separate those ions easily, which is why salt dissolves readily. ### Why methane is a gas at room temperature + Methane's covalent C–H bonds create small, electrically near-neutral molecules with only weak attractions between them, so little energy is needed to separate them into a gas. ### Metals and alloys + Metallic bonding, a third case where valence electrons are shared across many atoms at once rather than between just two, explains why metals conduct electricity and can be bent without shattering. ### Body salts and nerve signals + Ionic compounds like sodium and potassium chloride dissolve into free ions in the body, and the flow of those ions across cell membranes is how nerve cells send signals. diff --git a/content/lessons/chemistry/moles-and-molar-mass/ar.md b/content/lessons/chemistry/moles-and-molar-mass/ar.md index b90898e3..6f9470dc 100644 --- a/content/lessons/chemistry/moles-and-molar-mass/ar.md +++ b/content/lessons/chemistry/moles-and-molar-mass/ar.md @@ -20,15 +20,15 @@ charts: ## Try it -1. حرّك منزلق «الكتلة m». راقب عدد المولات يرتفع في خط مستقيم مع زيادة الكتلة. -2. ارفع «الكتلة المولية M» بدلًا من ذلك. الكتلة نفسها على الميزان تقابل الآن عدد مولات أقل. -3. راقب الرسم البياني. عدد الجزيئات يرتفع في خط مستقيم مع الكتلة، لكن انحدار الخط يعتمد على M. +1. اجعل «الكتلة المولية M» تساوي 18 (الماء) و«الكتلة m» تساوي 18. القراءة f(x)، وهي عدد المولات، تساوي 1. اسحب m إلى 36 ثم إلى 90، فتصير f(x) تساوي 2 ثم 5، وترتفع في خط مستقيم. +2. أبقِ m عند 90 وارفع «الكتلة المولية M» إلى 180. الكتلة نفسها على الميزان تساوي الآن f(x) = 0.5 مول فقط. +3. راقب الرسم البياني. عدد الجزيئات يرتفع في خط مستقيم مع الكتلة. أعد M إلى 18 فيصير الخط أشد ميلًا بعشر مرات. ## Real-life examples 1. **كوب من الماء.** نحو 250 g من الماء، وكتلته المولية 18 g/mol، يساوي نحو 14 مولًا، أي أكثر من 8×10²⁴ جزيء. 2. **تمليح قدر ماء المعكرونة.** 30 g من ملح الطعام (كتلته المولية 58.5 g/mol) تساوي نحو نصف مول، تكفي لتتبيل قدر كبير. -3. **ملعقة صغيرة من بيكربونات الصوديوم.** 10 g من البيكربونات (كتلتها المولية 84 g/mol) تساوي أكثر قليلًا من عُشر مول، تكفي لتخمير دفعة من الكوكيز. +3. **ملعقة صغيرة من بيكربونات الصوديوم.** 10 g من البيكربونات (كتلتها المولية 84 g/mol) تساوي أكثر قليلًا من عُشر مول، تكفي لتنتفخ بها عجينة صينية من البسكويت. ## Test yourself @@ -61,13 +61,17 @@ charts: ## Real world ### وزن كمية لتفاعل كيميائي + الكيميائي الذي يحتاج بالضبط مولين من مادة متفاعلة يزن $2 \times M$ غرامًا على الميزان، دون الحاجة لعدّ الجزيئات. ### قراءة ملصق غذائي أو دوائي + كثيرًا ما تُحدَّد جرعات الأدوية وتراكيزها بالمول أو المليمول لكل لتر تحديدًا لأنها تعدّ الجزيئات لا الكتلة فقط، وهذا ما يهم في كيفية تفاعلها داخل الجسم. -### لماذا تتقارن أحجام الغازات بسهولة +### لماذا تسهل مقارنة أحجام الغازات + عند الحرارة والضغط نفسيهما، يشغل عدد متساوٍ من مولات أي غاز الحجم نفسه، وهي حقيقة لا تُفهم جيدًا إلا حين تفكر بالمولات لا بالغرامات. ### موازنة المعادلات الكيميائية + النسب الصحيحة في المعادلة الموزونة هي نسب مولات لا غرامات، ولهذا فالكتلة المولية هي الجسر بين وصفة مكتوبة بالذرات وأخرى يمكنك فعليًا قياسها. diff --git a/content/lessons/chemistry/moles-and-molar-mass/en.md b/content/lessons/chemistry/moles-and-molar-mass/en.md index 0560a088..564b51de 100644 --- a/content/lessons/chemistry/moles-and-molar-mass/en.md +++ b/content/lessons/chemistry/moles-and-molar-mass/en.md @@ -22,9 +22,9 @@ charts: ## Try it -1. Drag «mass m». Watch the number of moles rise in a straight line as you add more. -2. Raise «molar mass M» instead. The same mass on the scale now corresponds to fewer moles. -3. Watch the chart: molecules climb in a straight line with mass, but the line's steepness depends on M. +1. Set «molar mass M» to 18 (water) and «mass m» to 18. The readout f(x), the number of moles, shows 1. Drag m to 36 and then 90: f(x) shows 2 and then 5, rising in a straight line. +2. Keep m at 90 and raise «molar mass M» to 180 instead. The same mass on the scale is now only f(x) = 0.5 moles. +3. Watch the chart: molecules climb in a straight line with mass. Put M back to 18 and the line becomes ten times steeper. ## Real-life examples @@ -63,13 +63,17 @@ The mole is one of the seven SI base units, and since 2019 it is defined by fixi ## Real world ### Weighing out a reaction + A chemist who needs exactly 2 moles of a reactant weighs out $2 \times M$ grams on a balance — no counting molecules required. ### Reading a nutrition or drug label + Doses and concentrations of medicines are often specified in moles or millimoles per litre precisely because it counts molecules, not just mass, which is what matters for how they react in the body. ### Why gas volumes compare so cleanly + At the same temperature and pressure, equal numbers of moles of any gas occupy the same volume, a fact that only makes sense once you think in moles rather than grams. ### Balancing chemical equations + The whole-number ratios in a balanced equation are ratios of moles, not grams, which is why molar mass is the bridge between a recipe written in atoms and one you can actually measure out. diff --git a/content/lessons/chemistry/periodic-table/ar.md b/content/lessons/chemistry/periodic-table/ar.md index 9071c769..b9a0a9d4 100644 --- a/content/lessons/chemistry/periodic-table/ar.md +++ b/content/lessons/chemistry/periodic-table/ar.md @@ -11,9 +11,9 @@ charts: [] ## Try it -1. انقر عبر صف كامل (دورة). راقب تغيّر العنصر مع بقاء عدد الأغلفة ثابتًا. -2. انقر عبر عمود (مجموعة) بدلًا من ذلك. راقب ظهور غلاف جديد كامل مع بقاء عدد إلكترونات التكافؤ ثابتًا. -3. قارن الصوديوم والبوتاسيوم، وكلاهما في المجموعة 1. لاحظ مدى تشابه كيمياءهما رغم أن الصوديوم أصغر بغلاف كامل. +1. اضغط على الصوديوم (Z = 11)، ثم على كل عنصر عن يمينه حتى الأرجون (Z = 18). تتغير قراءة «الإلكترونات في كل مدار» من 2 · 8 · 1 إلى 2 · 8 · 8: ثلاثة أغلفة دائمًا، وإلكترون خارجي إضافي في كل خطوة. +2. انزل الآن في المجموعة 1: الهيدروجين (Z = 1) ثم الليثيوم (Z = 3) ثم الصوديوم (Z = 11). تظهر القراءة 1 ثم 2 · 1 ثم 2 · 8 · 1: غلاف جديد كامل في كل مرة، والإلكترون الخارجي واحد دائمًا. +3. قارن الفلور (Z = 9) والكلور (Z = 17)، وكلاهما في المجموعة 17. قراءتهما 2 · 7 و 2 · 8 · 7: كلاهما ينقصه إلكترون واحد ليكتمل غلافه الخارجي، ولهذا يتشابهان في تفاعلاتهما مع أن الفلور أصغر بغلاف كامل. ## Real-life examples @@ -25,40 +25,44 @@ charts: [] 1. جد الغاز النبيل الذي يُنهي الدورة الثالثة. 2. جد الهالوجين في الدورة الرابعة. -3. جد الفلز القلوي الترابي في الدورة الرابعة. +3. جد الفلز القلوي الأرضي في الدورة الرابعة. ## Intuition -انقر عبر صف كامل (دورة) وراقب تغيّر العنصر مع بقاء موضعه على الشريط الأفقي نفسه. تقابل كل دورة عدد أغلفة إلكترونية أكبر بواحد من الدورة التي فوقها، فالدورة الأولى فيها غلاف واحد فقط، والثانية غلافان، وهكذا حتى الدورة السادسة المعروضة هنا. وعند التحرك يمينًا داخل الصف يبقى عدد الأغلفة ثابتًا، لكن يُضاف إلكترون واحد إلى الغلاف الخارجي مع كل خطوة. +اضغط على عناصر صف واحد (دورة) واحدًا بعد الآخر، وراقب تغيّر العنصر مع بقائه في الصف نفسه. في كل دورة غلاف إلكتروني واحد زيادة على الدورة التي فوقها، فالدورة الأولى فيها غلاف واحد فقط، والثانية غلافان، وهكذا حتى الدورة السادسة المعروضة هنا. وعند التحرك يمينًا داخل الصف يبقى عدد الأغلفة ثابتًا، لكن يُضاف إلكترون واحد إلى الغلاف الخارجي مع كل خطوة. -انقر بدلًا من ذلك عبر عمود (مجموعة)، فيحدث أمر مختلف. يبقى عدد إلكترونات الغلاف الخارجي ثابتًا، لكن يُضاف غلاف جديد كامل تحته. ولهذا تتشابه عناصر المجموعة الواحدة في خواصها، مثل الصوديوم (Z يساوي 11) والبوتاسيوم (Z يساوي 19)، فكلاهما له إلكترون واحد فقط في غلافه الخارجي، فكلاهما يفقد هذا الإلكترون بسهولة ويكوّن مركبات متشابهة، رغم أن البوتاسيوم أكبر بغلاف كامل. +انزل الآن في عمود واحد (مجموعة)، فيحدث أمر مختلف. يبقى عدد إلكترونات الغلاف الخارجي ثابتًا، لكن يُضاف غلاف جديد كامل تحته. ولهذا تتشابه عناصر المجموعة الواحدة في خواصها، مثل الصوديوم (Z يساوي 11) والبوتاسيوم (Z يساوي 19)، فكلاهما له إلكترون واحد فقط في غلافه الخارجي، فكلاهما يفقد هذا الإلكترون بسهولة ويكوّن مركبات متشابهة، رغم أن البوتاسيوم أكبر بغلاف كامل. ## Formal -يُرتَّب الجدول حسب العدد الذري Z، لكنه مصفوف في صفوف وأعمدة بحيث تصطف العناصر المتشابهة كيميائيًا. الدورة هي صف. كل عناصرها لها العدد نفسه من الأغلفة الإلكترونية المشغولة. والمجموعة هي عمود. بالنسبة للعناصر الرئيسية (الأعمدة الطويلة في أقصى اليسار واليمين)، يملك كل عنصر فيها العدد نفسه من إلكترونات التكافؤ، وهي الإلكترونات في الغلاف الخارجي التي تشارك في الترابط. +يُرتَّب الجدول حسب العدد الذري Z، لكنه مصفوف في صفوف وأعمدة بحيث تصطف العناصر المتشابهة كيميائيًا. الدورة هي صف، وكل عناصرها لها العدد نفسه من الأغلفة الإلكترونية المشغولة. والمجموعة هي عمود. وفي عناصر المجموعات الرئيسية (الأعمدة الطويلة في أقصى اليسار واليمين)، يملك كل عنصر في العمود العدد نفسه من إلكترونات التكافؤ، وهي الإلكترونات في الغلاف الخارجي التي تشارك في الترابط. -وتُصنَّف العناصر في عائلات تشترك في بنية التكافؤ هذه، منها الفلزات القلوية (المجموعة 1، إلكترون تكافؤ واحد، شديدة التفاعل)، والفلزات القلوية الترابية (المجموعة 2)، والهالوجينات (المجموعة 17، تنقصها إلكترون واحد لاكتمال الغلاف، شديدة التفاعل أيضًا)، والغازات النبيلة (المجموعة 18، غلاف خارجي مكتمل، خاملة تقريبًا). فالتفاعلية وعدد إلكترونات الغلاف الخارجي وجهان لحقيقة واحدة. +وتُصنَّف العناصر في عائلات تشترك في بنية التكافؤ هذه، منها الفلزات القلوية (المجموعة 1، إلكترون تكافؤ واحد، شديدة التفاعل)، والفلزات القلوية الأرضية (المجموعة 2)، والهالوجينات (المجموعة 17، ينقصها إلكترون واحد لاكتمال الغلاف، شديدة التفاعل أيضًا)، والغازات النبيلة (المجموعة 18، غلاف خارجي مكتمل، خاملة تقريبًا). فالتفاعلية وعدد إلكترونات الغلاف الخارجي وجهان لحقيقة واحدة. ## Advanced -عبر الدورة الواحدة يتقلّص حجم الذرة رغم إضافة إلكترونات، لأن الشحنة النووية Z تزداد في الوقت نفسه فتجذب الإلكترونات الداخلية الحاجبة (التي يبقى عددها شبه ثابت) بقوة أكبر. أما داخل المجموعة الواحدة فيكبر الحجم لأن كل غلاف جديد أبعد عن النواة. وهذان الاتجاهان، أحدهما عبر الدورة والآخر عبر المجموعة، هما الأساس الذي تُبنى عليه بقية الاتجاهات الدورية، مثل طاقة التأين والسالبية الكهربائية، وهو ما يتناوله الدرس التالي مباشرة. +عبر الدورة الواحدة يتقلّص حجم الذرة رغم إضافة إلكترونات، لأن الشحنة النووية Z تزداد في الوقت نفسه فتجذب الإلكترونات الخارجية بقوة أكبر، بينما يبقى حجب الإلكترونات الداخلية شبه ثابت. أما داخل المجموعة الواحدة فيكبر الحجم لأن كل غلاف جديد أبعد عن النواة. وهذان الاتجاهان، أحدهما عبر الدورة والآخر عبر المجموعة، هما الأساس الذي تُبنى عليه بقية الاتجاهات الدورية، مثل طاقة التأين والسالبية الكهربائية، وهو ما يتناوله الدرس التالي مباشرة. ## Derivation 1. تتحدد هوية العنصر بعدد بروتوناته، وفي الذرة المتعادلة يساويه عدد الإلكترونات. -2. تمتلئ الأغلفة بالإلكترونات واحدًا تلو الآخر، ويبدأ اكتمال الغلاف دورة جديدة. +2. تمتلئ الأغلفة بالإلكترونات واحدًا تلو الآخر، وعند اكتمال الغلاف تبدأ دورة جديدة. 3. يحمل الغلاف الخارجي غير المكتمل إلكترونات التكافؤ التي تمنح المجموعة كيمياءها المشتركة. ## Real world ### التنبؤ بالتفاعلات قبل إجرائها + يتنبأ الكيميائيون بسلوك عنصر أو مركب جديد من موضعه في الجدول وحده، قبل اختباره في المختبر. ### قراءة الجدول كخريطة + تتجمع الفلزات في اليسار وأسفل اليسار، واللافلزات في أعلى اليمين، ويفصل بينهما سلّم قطري من أشباه الفلزات، وهذا أول دليل على التوصيل والترابط. ### لماذا يتشابه الصوديوم والبوتاسيوم في تفاعلهما + كلاهما في المجموعة 1، وإلكترون تكافؤ واحد ضعيف الارتباط يجعل كليهما فلزًا لينًا لامعًا يتفاعل بعنف مع الماء. ### اكتشاف عناصر جديدة + ترك جدول مندلييف فراغات، وكانت الاتجاهات فيه موثوقة لدرجة أنه تنبأ بخواص عناصر لم تُكتشف بعد قبل العثور عليها. diff --git a/content/lessons/chemistry/periodic-table/en.md b/content/lessons/chemistry/periodic-table/en.md index 5c7de4c8..6745750a 100644 --- a/content/lessons/chemistry/periodic-table/en.md +++ b/content/lessons/chemistry/periodic-table/en.md @@ -13,9 +13,9 @@ charts: [] ## Try it -1. Tap across a row (a period). Watch the element change while the shell count stays fixed. -2. Tap down a column (a group) instead. Watch a whole new shell appear while the valence count stays the same. -3. Compare sodium and potassium, both in group 1. Notice how alike their chemistry is despite sodium being one shell smaller. +1. Tap sodium (Z = 11), then each element to its right as far as argon (Z = 18). The «electrons per shell» readout goes from 2 · 8 · 1 to 2 · 8 · 8: always three shells, one more outer electron each step. +2. Now tap down group 1: hydrogen (Z = 1), lithium (Z = 3), sodium (Z = 11). The readout shows 1, then 2 · 1, then 2 · 8 · 1: a whole new shell each time, still one outer electron. +3. Compare fluorine (Z = 9) and chlorine (Z = 17), both in group 17. They read 2 · 7 and 2 · 8 · 7: both are one electron short of a full outer shell, so their chemistry is alike even though fluorine is one shell smaller. ## Real-life examples @@ -43,7 +43,7 @@ Elements are grouped into families that share this valence structure: the alkali ## Advanced -Across a period, atomic size shrinks even though electrons are being added, because the nuclear charge Z grows at the same time and pulls the (roughly constant) inner shielding electrons in more tightly; down a group, size grows because each new shell sits further from the nucleus. These two trends — one across, one down — are the skeleton on which every other periodic trend (ionisation energy, electronegativity) is built, and the next lesson looks at them directly. +Across a period, atomic size shrinks even though electrons are being added, because the nuclear charge Z grows at the same time and pulls the outer electrons in more tightly, while the shielding from the inner electrons stays roughly constant; down a group, size grows because each new shell sits further from the nucleus. These two trends — one across, one down — are the skeleton on which every other periodic trend (ionisation energy, electronegativity) is built, and the next lesson looks at them directly. ## Derivation @@ -54,13 +54,17 @@ Across a period, atomic size shrinks even though electrons are being added, beca ## Real world ### Predicting reactions before you run them + Chemists predict how a new element or compound will behave just from its position in the table, long before testing it in a lab. ### Reading the table like a map + Metals cluster on the left and bottom-left, nonmetals on the top right, with a diagonal staircase of metalloids between them — a first clue to conductivity and bonding. ### Why sodium and potassium react alike + Both sit in group 1: one loosely held valence electron makes both soft, shiny metals that react violently with water. ### Discovering new elements + Mendeleev's table had gaps; the trends were so reliable that he predicted the properties of undiscovered elements before they were found. diff --git a/content/lessons/chemistry/periodic-trends/ar.md b/content/lessons/chemistry/periodic-trends/ar.md index 7b9ab0d6..e9ae1700 100644 --- a/content/lessons/chemistry/periodic-trends/ar.md +++ b/content/lessons/chemistry/periodic-trends/ar.md @@ -13,14 +13,14 @@ charts: [] ## Try it -1. انقر عبر الدورة الثالثة، من الصوديوم إلى الكلور. راقب الذرة تنكمش مع ارتفاع الشحنة النووية وثبات الحجب. -2. انقر عبر مجموعة بدلًا من ذلك، مثلًا من الفلور إلى الكلور إلى البروم. راقب الذرة تكبر مع إضافة غلاف جديد. -3. قارن بين الاتجاهين. طاقة التأين والسالبية الكهربائية ترتفعان عبر الدورة وتنخفضان عبر المجموعة. +1. اضغط على الصوديوم (Z = 11)، ثم تحرك يمينًا حتى الكلور (Z = 17). تتغير قراءة «الإلكترونات في كل مدار» من 2 · 8 · 1 إلى 2 · 8 · 7: الأغلفة الثلاثة نفسها، لكن ستة بروتونات إضافية تجذبها، فتنكمش الذرة. +2. انزل الآن في المجموعة 17: الفلور (Z = 9) ثم الكلور (Z = 17) ثم البروم (Z = 35). تظهر القراءة 2 · 7 ثم 2 · 8 · 7 ثم 2 · 8 · 18 · 7: غلاف جديد في كل مرة، فتكبر الذرة. +3. اضغط الآن على الفلور (Z = 9) قرب أعلى اليمين، ثم على السيزيوم (Z = 55) في أسفل اليسار. طاقة التأين والسالبية الكهربائية ترتفعان كلما اتجهت يمينًا في الدورة وتنخفضان كلما نزلت في المجموعة، ولهذا يقع هذان العنصران في طرفين متقابلين. ## Real-life examples 1. **تفاعلية الفلور الشديدة.** أعلى سالبية كهربائية بين كل العناصر (Z يساوي 9)، يجذب بها الإلكترونات من أي ذرة أخرى يلتقيها تقريبًا. -2. **السيزيوم في الساعات الذرية.** فلز قلوي كبير سهل التأين (Z يساوي 55)، وطاقة تأينه المنخفضة جدًا من أسباب سهولة سبره والتحكم به. +2. **السيزيوم في الساعات الذرية.** فلز قلوي كبير سهل التأين (Z يساوي 55)، وطاقة تأينه المنخفضة جدًا من أسباب سهولة دراسته والتحكم به. 3. **خمول الهيليوم العنيد.** أعلى طاقة تأين أولى بين كل العناصر (Z يساوي 2)، فغلافه الصغير جدًا المرتبط بقوة لا يكاد يفرّط بإلكترون أبدًا. ## Test yourself @@ -31,15 +31,15 @@ charts: [] ## Intuition -انقر عبر الدورة الثالثة، من الصوديوم إلى الكلور المعروض هنا، وتخيّل أن النواة تكتسب بروتونًا إضافيًا مع كل خطوة بينما تبقى الأغلفة الداخلية بالحجم نفسه. يشعر كل إلكترون تكافؤ بجذب صافٍ أقوى تدريجيًا، فتنكمش الذرة، وتمسك بإلكتروناتها بقوة أكبر، ويصعب انتزاع إلكترون منها، فترتفع طاقة تأينها، ويرتفع معها جذبها للإلكترونات المشتركة في الرابطة، أي سالبيتها الكهربائية. +تحرك في الدورة الثالثة من الصوديوم إلى الكلور المحدد في الجدول، وتخيّل أن النواة تكتسب بروتونًا إضافيًا مع كل خطوة بينما تبقى الأغلفة الداخلية بالحجم نفسه. يشعر كل إلكترون تكافؤ بجذب صافٍ أقوى تدريجيًا، فتنكمش الذرة، وتمسك بإلكتروناتها بقوة أكبر، ويصعب انتزاع إلكترون منها، فترتفع طاقة تأينها، ويرتفع معها جذبها للإلكترونات المشتركة في الرابطة، أي سالبيتها الكهربائية. -قارن الآن عبر مجموعة، مثلًا من الفلور إلى الكلور إلى البروم. تضيف كل خطوة غلافًا جديدًا كاملًا أبعد عن النواة، وهذه المسافة الإضافية تفوق أثر الزيادة المتواضعة في الشحنة النووية، فتكبر الذرة، وتصبح إلكتروناتها الخارجية أقل ارتباطًا، فتنخفض طاقة التأين والسالبية الكهربائية معًا. الحجم يكبر عبر المجموعة، ويضيق عبر الدورة، والاتجاهان يسيران متعامدَين على الجدول. +قارن الآن نزولًا في مجموعة واحدة، مثلًا من الفلور إلى الكلور إلى البروم. تضيف كل خطوة غلافًا جديدًا كاملًا أبعد عن النواة، وهذه المسافة الإضافية تفوق أثر الزيادة المتواضعة في الشحنة النووية، فتكبر الذرة، وتصبح إلكتروناتها الخارجية أقل ارتباطًا، فتنخفض طاقة التأين والسالبية الكهربائية معًا. الحجم يكبر كلما نزلت في المجموعة، ويصغر كلما اتجهت يمينًا في الدورة، فالاتجاهان متعامدان على الجدول. ## Formal ينكمش نصف القطر الذري من اليسار إلى اليمين عبر الدورة، ويكبر من الأعلى إلى الأسفل عبر المجموعة. أما طاقة التأين الأولى، وهي طاقة انتزاع الإلكترون الأبعد، فتسلك العكس. ترتفع عبر الدورة (قبضة أشد، انتزاع أصعب) وتنخفض عبر المجموعة (قبضة أرخى، انتزاع أسهل)، وتبلغ ذروتها عند الغازات النبيلة في نهاية كل دورة. وللهيليوم أعلى طاقة تأين أولى بين كل العناصر، نتيجة مباشرة لغلافه الخارجي الصغير جدًا والمرتبط بقوة. -وتتبع السالبية الكهربائية، أي ميل الذرة لجذب الإلكترونات المشتركة نحوها في الرابطة، طاقة التأين عن قرب للسبب نفسه. فللفلور أعلى سالبية كهربائية بين كل العناصر، 3.98 على مقياس باولنغ، بينما تقع الفلزات القلوية الكبيرة في أسفل يسار الجدول، ومنها السيزيوم، بين الأدنى. وتجعل هاتان الاتجاهيتان معًا الزاوية العلوية اليمنى من الجدول (باستثناء الغازات النبيلة) أشد المناطق جوعًا للإلكترونات، وأسفل اليسار أكثرها سخاءً بها. +وتتبع السالبية الكهربائية، أي ميل الذرة لجذب الإلكترونات المشتركة نحوها في الرابطة، طاقة التأين عن قرب للسبب نفسه. فللفلور أعلى سالبية كهربائية بين كل العناصر، 3.98 على مقياس باولنغ، بينما تقع الفلزات القلوية الكبيرة في أسفل يسار الجدول، ومنها السيزيوم، بين الأدنى. ويجعل هذان الاتجاهان معًا الزاوية العلوية اليمنى من الجدول (باستثناء الغازات النبيلة) أشد المناطق جوعًا للإلكترونات، وأسفل اليسار أكثرها سخاءً بها. ## Advanced @@ -54,13 +54,17 @@ charts: [] ## Real world ### لماذا الفلور مؤكسِد شديد العنف + تجعل السالبية الكهربائية الشديدة للفلور يجذب الإلكترونات من أي ذرة أخرى تقريبًا، فهو من أكثر العناصر تفاعلًا على الإطلاق. ### السيزيوم في الساعات الذرية -طاقة التأين المنخفضة جدًا للسيزيوم، أي سهولة انتزاع إلكترون منه، من أسباب سهولة سبره والتحكم به، ويُستخدم تردد انتقاله لتعريف الثانية. + +طاقة التأين المنخفضة جدًا للسيزيوم، أي سهولة انتزاع إلكترون منه، من أسباب سهولة دراسته والتحكم به، ويُستخدم تردد انتقاله لتعريف الثانية. ### التنبؤ بقطبية الرابطة + معرفة موضع عنصرين على اتجاه السالبية الكهربائية تخبر الكيميائي، قبل إجراء أي تجربة، أي ذرة في الرابطة ستحمل الشحنة السالبة الجزئية. ### تطعيم أشباه الموصلات + يختار مصنّعو الرقائق ذرات التطعيم جزئيًا حسب نصف القطر الذري، ليتناسب حجم الذرة المضافة مع بنية البلورة المضيفة دون إجهاد زائد. diff --git a/content/lessons/chemistry/periodic-trends/en.md b/content/lessons/chemistry/periodic-trends/en.md index a6b90a77..0ca8ae4b 100644 --- a/content/lessons/chemistry/periodic-trends/en.md +++ b/content/lessons/chemistry/periodic-trends/en.md @@ -15,9 +15,9 @@ charts: [] ## Try it -1. Tap across period 3, from sodium to chlorine. Watch the atom shrink as nuclear charge climbs and shielding stays put. -2. Tap down a group instead, say from fluorine to chlorine to bromine. Watch the atom grow as a new shell is added. -3. Compare the two directions: ionisation energy and electronegativity rise across a period and fall down a group. +1. Tap sodium (Z = 11), then move right to chlorine (Z = 17). The «electrons per shell» readout goes from 2 · 8 · 1 to 2 · 8 · 7: the same three shells, but six more protons pulling, so the atom shrinks. +2. Tap down group 17 instead: fluorine (Z = 9), chlorine (Z = 17), bromine (Z = 35). The readout shows 2 · 7, then 2 · 8 · 7, then 2 · 8 · 18 · 7: a new shell is added each time, so the atom grows. +3. Now tap fluorine (Z = 9) near the top right, then caesium (Z = 55) at the bottom left. Ionisation energy and electronegativity rise across a period and fall down a group, so these two sit at opposite extremes. ## Real-life examples @@ -56,13 +56,17 @@ These trends are not perfectly smooth: small irregularities appear where a half- ## Real world ### Why fluorine is such a fierce oxidiser + Fluorine's extreme electronegativity means it pulls electrons out of almost any other atom, making it one of the most reactive elements known. ### Caesium in atomic clocks + Caesium's very low ionisation energy — easy to strip an electron from — is part of why it is easy to probe and manipulate, and its transition frequency defines the second. ### Predicting bond polarity + Knowing where two elements sit on the electronegativity trend tells a chemist, before running any experiment, which atom in a bond will carry the partial negative charge. ### Doping semiconductors + Chip manufacturers choose dopant atoms partly by atomic radius, so the added atom fits into the host crystal's lattice without excessive strain. diff --git a/content/lessons/chemistry/periodic-trends/lesson.yaml b/content/lessons/chemistry/periodic-trends/lesson.yaml index ea80f863..2b81805f 100644 --- a/content/lessons/chemistry/periodic-trends/lesson.yaml +++ b/content/lessons/chemistry/periodic-trends/lesson.yaml @@ -1,7 +1,7 @@ id: periodic-trends subject: chemistry difficulty: high-school -equation: "Z_{eff} = Z - S" +equation: 'Z_{eff} = Z - S' concepts: - effective-nuclear-charge - ionisation-energy @@ -27,7 +27,7 @@ variables: - Z_{eff} - S derivation: - - "Z_{eff} = Z - S" + - 'Z_{eff} = Z - S' - "\\text{across a period: } Z \\uparrow,\\ S \\approx \\text{constant} \\Rightarrow Z_{eff} \\uparrow" - "\\text{down a group: an added shell outweighs the rise in } Z_{eff} \\Rightarrow \\text{radius} \\uparrow" charts: [] diff --git a/content/lessons/chemistry/ph-scale/ar.md b/content/lessons/chemistry/ph-scale/ar.md index c737dd72..f69cd767 100644 --- a/content/lessons/chemistry/ph-scale/ar.md +++ b/content/lessons/chemistry/ph-scale/ar.md @@ -14,9 +14,9 @@ variables: ## Try it -1. اسحب المؤشر نحو الطرف الأحمر من الشريط. ينخفض pH نحو حمض المعدة، ويكتظ حشد نقاط H⁺ في الكأس. -2. اسحبه في الاتجاه الآخر، نحو الطماطم عند pH يساوي 4. يرتفع pH وتكاد الكأس تفرغ. -3. انقل pH من 3 إلى 2 وراقب الكأس — وحدة واحدة على الشريط تعني عشرة أضعاف الأيونات، وتلك بصمة اللوغاريتم. +1. اسحب المؤشر نحو الطرف الأحمر من الشريط حتى تصير القراءة pH 1.5، عند حمض المعدة. يصير [H⁺] يساوي 0.0316 mol/L وتزدحم نقاط H⁺ في الكأس حتى تبلغ نحو 32 نقطة. +2. اسحبه في الاتجاه الآخر، نحو الطماطم، حتى pH يساوي 4. يصير [H⁺] يساوي 0.0001 mol/L ولا تبقى في الكأس إلا نقطة واحدة. +3. انقل pH من 3 إلى 2 وراقب الكأس تنتقل من نقطة واحدة إلى 10 نقاط — وحدة واحدة على الشريط تعني عشرة أضعاف الأيونات، وهذه علامة اللوغاريتم. ## Real-life examples @@ -32,7 +32,7 @@ variables: ## Intuition -تخيّل عصير الليمون، وتركيز أيونات الهيدروجين فيه نحو 0.01 mol/L، بجانب القهوة السوداء التي يقل تركيزها بنحو ألف مرة. على الشاشة يجلس الاثنان على الشريط نفسه من 0 إلى 14، بجوار حمض المعدة والخل والمبيّض. اسحب المؤشر وراقب الكأس تحته: كل درجة واحدة نزولًا على الشريط تضاعف حشد نقاط H⁺ عشر مرات، بدءًا من $[\mathrm{H^+}] = 0.1$ عند الطرف الحمضي — وهكذا يغطي شريط من أربع عشرة درجة فقط مدى يفوق تريليون ضعف. +تخيّل عصير الليمون، وتركيز أيونات الهيدروجين فيه نحو 0.01 mol/L، بجانب القهوة السوداء التي يقل تركيزها بنحو ألف مرة. على الشاشة يقع الاثنان على الشريط نفسه من 0 إلى 14، بجوار حمض المعدة والخل والمبيّض. اسحب المؤشر وراقب الكأس تحته: كل درجة واحدة نزولًا على الشريط تجعل نقاط H⁺ عشرة أضعاف، بدءًا من $[\mathrm{H^+}] = 0.1$ عند الطرف الحمضي — وهكذا يغطي شريط من أربع عشرة درجة فقط مدى يفوق تريليون ضعف. ولأن المقياس لوغاريتمي، فالانتقال من pH يساوي 5 إلى pH يساوي 4 ليس تغيّرًا بسيطًا، بل يعني عشرة أضعاف عدد أيونات الهيدروجين. ومحلولان يفصل بينهما ثلاث وحدات من pH يختلفان في الحموضة بمقدار 1000 مرة، رغم أن قيمتيهما تبدوان متقاربتين على المنزلق. @@ -55,13 +55,17 @@ $\mathrm{pH} = -\log_{10}[\mathrm{H^+}]$، وبالتالي $[\mathrm{H^+}] = 10 ## Real world ### كيمياء الدم + دم الإنسان منظَّم بإحكام بين pH 7.35 و7.45، والخروج عن هذا النطاق الضيق خطير طبيًا. ### التربة والزراعة + لكل محصول نطاق pH مفضَّل في التربة، ويضيف المزارعون الجير القاعدي أو الكبريت الحمضي لتغييره. ### حمامات السباحة -تُحافَظ كيمياء حمامات السباحة قرب pH 7.4، فالحموضة الزائدة تؤكل المعدات، والقلوية الزائدة تعطّل عمل الكلور. + +يُضبط ماء حمامات السباحة قرب pH 7.4، فالحموضة الزائدة تُتلف المعدات، والقلوية الزائدة تعطّل عمل الكلور. ### تحمّض المحيطات + أدى امتصاص $\mathrm{CO_2}$ إلى خفض متوسط pH المحيطات بنحو 0.1، وهو رقم يبدو صغيرًا لكنه في الحقيقة يمثل ارتفاعًا بنحو 30% في تركيز أيونات الهيدروجين. diff --git a/content/lessons/chemistry/ph-scale/en.md b/content/lessons/chemistry/ph-scale/en.md index a835bf30..efbb06bb 100644 --- a/content/lessons/chemistry/ph-scale/en.md +++ b/content/lessons/chemistry/ph-scale/en.md @@ -13,9 +13,9 @@ variables: ## Try it -1. Drag the marker toward the red end of the strip. The pH falls toward stomach acid, and the crowd of H⁺ dots in the beaker thickens. -2. Drag it the other way, toward the tomato at pH 4. The pH climbs and the beaker almost empties. -3. Step the pH from 3 to 2 and watch the beaker — one unit along the strip means ten times the ions, the signature of a logarithm. +1. Drag the marker toward the red end of the strip until the readout shows pH 1.5, level with stomach acid. [H⁺] reads 0.0316 mol/L and the crowd of H⁺ dots in the beaker thickens to about 32. +2. Drag it the other way, toward the tomato, as far as pH 4. [H⁺] reads 0.0001 mol/L and the beaker is left with a single dot. +3. Step the pH from 3 to 2 and watch the beaker go from 1 dot to 10 — one unit along the strip means ten times the ions, the signature of a logarithm. ## Real-life examples @@ -54,13 +54,17 @@ Buffers resist pH change because they contain a reservoir of a weak acid and its ## Real world ### Blood chemistry + Human blood is buffered tightly between pH 7.35 and 7.45; drifting outside that narrow band is medically dangerous. ### Soil and agriculture + Crops have preferred soil pH ranges; farmers add lime (base) or sulfur (acid) to shift it. ### Swimming pools + Pool chemistry is kept near pH 7.4 — too acidic corrodes equipment, too basic lets chlorine stop working. ### Ocean acidification + Absorbed $\mathrm{CO_2}$ has dropped average ocean pH by about 0.1 — a seemingly small number that is really a ~30% rise in hydrogen-ion concentration. diff --git a/content/lessons/chemistry/ph-scale/lesson.yaml b/content/lessons/chemistry/ph-scale/lesson.yaml index 6cbb77bf..1c5d431e 100644 --- a/content/lessons/chemistry/ph-scale/lesson.yaml +++ b/content/lessons/chemistry/ph-scale/lesson.yaml @@ -20,7 +20,7 @@ parameters: min: 0.0001 max: 0.1 step: 0.0001 - value: 0.001 + value: 0.01 unit: mol/L variables: - "[\\mathrm{H^+}]" @@ -40,5 +40,5 @@ challenges: - check: -log10(x) target: 3 - check: -log10(x) < 1.5 - - check: x - target: 0.002 + - check: -log10(x) + target: 2.699 diff --git a/content/lessons/chemistry/reaction-rate/ar.md b/content/lessons/chemistry/reaction-rate/ar.md index ed5fbbac..d2218047 100644 --- a/content/lessons/chemistry/reaction-rate/ar.md +++ b/content/lessons/chemistry/reaction-rate/ar.md @@ -25,9 +25,9 @@ charts: ## Try it -1. حرّك نقطة الزمن «t» على المنحنى. راقب خط المماس يمثّل السرعة اللحظية، وهو أشد ما يكون انحدارًا عند البداية. -2. ارفع «درجة الحرارة T». ينهار المنحنى كله نحو الصفر بسرعة أكبر بكثير. -3. ارفع «طاقة التنشيط Ea» بدلًا من ذلك. يتباطأ التفاعل حتى عند الحرارة نفسها. +1. اسحب «الزمن t» إلى 0. تظهر القراءة f(x) = 1 والميل −0.0349، وهذا أشد ميل يبلغه خط المماس. اسحبه الآن إلى 20، فتصير f(x) = 0.4975 وينخفض الميل إلى النصف: −0.0174. +2. أعد «الزمن t» إلى 0 وارفع «درجة الحرارة T» من 300 إلى 370. يهبط المنحنى إلى الصفر خلال ثوانٍ قليلة ويصير الميل −1.3896، أي أن التفاعل صار أسرع بنحو أربعين مرة. +3. أعد T إلى 300 وارفع «طاقة التنشيط Ea» إلى 60000. يكاد المنحنى يصير خطًا أفقيًا ويصير الميل −0.0004، فالتفاعل يتباطأ كثيرًا عند الحرارة نفسها. ## Real-life examples @@ -43,9 +43,9 @@ charts: ## Intuition -تخيّل قدر شوربة ساخنة تُرك على المنضدة. يبرد بسرعة في البداية، ثم يتباطأ أكثر فأكثر كلما اقترب من حرارة الغرفة، وهو الشكل نفسه الذي يتبعه تفاعل كيميائي. في الشاشة، حرّك نقطة الزمن «t» على المنحنى. يمثّل خط المماس السرعة اللحظية، شديد الانحدار في البداية حين تكون كمية المتفاعل كبيرة، ثم يتسطّح كلما استُهلك. +تخيّل قدر شوربة ساخنة تُرك على المنضدة. يبرد بسرعة في البداية، ثم يتباطأ أكثر فأكثر كلما اقترب من حرارة الغرفة، وهو الشكل نفسه الذي يتبعه تفاعل كيميائي. على الشاشة، حرّك نقطة «الزمن t» على المنحنى. خط المماس يبيّن سرعة التفاعل في تلك اللحظة: شديد الانحدار في البداية حين تكون كمية المتفاعل كبيرة، ثم يقل انحداره كلما استُهلك المتفاعل. -حرّك الآن «درجة الحرارة T» إلى الأعلى بدلًا من ذلك. ينهار المنحنى كله نحو الصفر بسرعة أكبر بكثير رغم أن T تحرّكت قليلًا فقط، لأن T تقع داخل أُسّ متداخل في معادلة أرينيوس. ارتفاع بسيط في درجة الحرارة يضاعف ثابت السرعة k بمعامل كبير، وهذا سبب أن ارتفاع 10 درجات مئوية يمكن أن يضاعف تقريبًا كثيرًا من سرعات التفاعلات اليومية. +ارفع الآن «درجة الحرارة T». يهبط المنحنى كله نحو الصفر أسرع بكثير مع أن T تغيّرت قليلًا فقط، لأن T تقع داخل الأُس في معادلة أرينيوس. ارتفاع بسيط في درجة الحرارة يضرب ثابت السرعة k في عدد كبير، ولهذا فإن ارتفاع 10 درجات مئوية يضاعف تقريبًا سرعة كثير من التفاعلات اليومية. ## Formal @@ -66,13 +66,17 @@ charts: ## Real world ### الطبخ + تسرّع الحرارة تفاعلات ميلارد التي تُكسب الطعام لونه البني، فارتفاع T يعني ارتفاعًا كبيرًا جدًا في k. ### التبريد + يبطئ تبريد الطعام التفاعلات ونمو الميكروبات المسبب للتلف بتصغير k. ### الحفّازات الصناعية + تستخدم عملية هابر لتصنيع الأمونيا حفّازًا من الحديد لخفض $E_a$ بما يكفي لتكون العملية مجدية تجاريًا عند درجة حرارة معتدلة. ### الإنزيمات في الجسم -تجري تفاعلات درجة حرارة الجسم، التي كانت ستكون بطيئة جدًا بحيث لا تكفي لاستمرار الحياة، بسرعة لأن الإنزيمات تخفض طاقة التنشيط. + +عند درجة حرارة الجسم كانت تفاعلات كثيرة ستجري ببطء لا يكفي لاستمرار الحياة، لكنها تجري بسرعة لأن الإنزيمات تخفض طاقة التنشيط. diff --git a/content/lessons/chemistry/reaction-rate/en.md b/content/lessons/chemistry/reaction-rate/en.md index ad48fa44..515e07f9 100644 --- a/content/lessons/chemistry/reaction-rate/en.md +++ b/content/lessons/chemistry/reaction-rate/en.md @@ -27,9 +27,9 @@ charts: ## Try it -1. Drag the time point «t» along the curve. Watch the tangent line show the instantaneous rate, steepest at the start. -2. Raise «temperature T». The whole curve collapses toward zero much faster. -3. Raise «activation energy Ea» instead. The reaction slows down even at the same temperature. +1. Drag «time t» to 0: the readout shows f(x) = 1 and slope −0.0349, the steepest the tangent line gets. Now drag it to 20: f(x) = 0.4975 and the slope has halved to −0.0174. +2. Put «time t» back at 0 and raise «temperature T» from 300 to 370. The curve drops to zero within a few seconds and the slope reads −1.3896: the reaction is about forty times faster. +3. Put T back to 300 and raise «activation energy Ea» to 60000 instead. The curve is almost flat and the slope reads −0.0004: the reaction slows right down at the same temperature. ## Real-life examples @@ -45,9 +45,9 @@ charts: ## Intuition -Picture a pot of hot soup left on the counter: it cools quickly at first, then more and more slowly as it nears room temperature — the same shape a reacting chemical follows. On screen, drag the time point «t» along the curve: the tangent line shows the instantaneous rate, steep at the start when a lot of reactant is present, flattening as it gets used up. +Picture a pot of hot soup left on the counter: it cools quickly at first, then more and more slowly as it nears room temperature — the same shape a reacting chemical follows. On screen, drag the time point «time t» along the curve: the tangent line shows the instantaneous rate, steep at the start when a lot of reactant is present, flattening as it gets used up. -Now drag «temperature T» upward instead. The whole curve collapses toward zero much faster, even though T only moved a little, because T sits inside a nested exponential in the Arrhenius equation. A modest temperature rise multiplies the rate constant k by a large factor — which is why a 10°C rise can roughly double many everyday reaction rates. +Now drag «temperature T» upward instead. The whole curve collapses toward zero much faster, even though T only moved a little, because T sits inside the exponent of the Arrhenius equation. A modest temperature rise multiplies the rate constant k by a large factor — which is why a 10°C rise can roughly double many everyday reaction rates. ## Formal @@ -68,13 +68,17 @@ A catalyst provides an alternative reaction pathway with a lower $E_a$ without b ## Real world ### Cooking + Heat speeds up the Maillard browning reactions in food — higher T means dramatically larger k. ### Refrigeration + Cooling food slows the reactions and microbial growth that cause spoilage by shrinking k. ### Industrial catalysts + The Haber process for ammonia uses an iron catalyst to lower $E_a$ enough to be commercially viable at moderate temperature. ### Enzymes in the body + Body-temperature reactions that would otherwise be far too slow to sustain life proceed quickly because enzymes lower the activation energy. diff --git a/content/lessons/chemistry/titration-curve/ar.md b/content/lessons/chemistry/titration-curve/ar.md index b6c74d84..65b1c355 100644 --- a/content/lessons/chemistry/titration-curve/ar.md +++ b/content/lessons/chemistry/titration-curve/ar.md @@ -16,15 +16,15 @@ variables: ## Try it -1. حرّك منزلق «حجم القاعدة المضاف» من الصفر. راقب pH لا يكاد يتحرك في البداية. -2. استمر في التحريك نحو نقطة التكافؤ. راقب pH يقفز شبه عموديًا. -3. ارفع «حجم الحمض Vₐ» أو «تركيز الحمض Cₐ». راقب نقطة التكافؤ تنزاح أبعد على المنزلق. +1. اسحب منزلق «حجم القاعدة المضاف» من 0 إلى 20. القراءة f(x)، وهي pH، لا تكاد تتحرك: من 1 إلى نحو 1.95. +2. استمر في السحب نحو نقطة التكافؤ عند 25. ما زال pH نحو 3.7 عند 24.9 mL، لكنه يصير نحو 10.3 عند 25.1 mL: قفزة شبه عمودية. +3. ارفع «حجم الحمض Vₐ» من 25 إلى 50. تنتقل القفزة أبعد على المنزلق، إلى 50 mL. ورفع «تركيز الحمض Cₐ» ينقلها في الاتجاه نفسه. ## Real-life examples -1. **معايرة الخل مقابل قاعدة.** 25 mL من حمض الخليك بتركيز 0.1 mol/L تُعايَر بقاعدة NaOH بتركيز 0.1 mol/L، فتحتاج 25 mL من القاعدة للوصول إلى التكافؤ. -2. **عينة حمض أكثر تركيزًا.** 10 mL فقط من حمض أقوى بتركيز 0.3 mol/L تحتاج مع ذلك 30 mL من القاعدة نفسها بتركيز 0.1 mol/L، فثلاثة أضعاف التركيز يعني ثلاثة أضعاف الحجم اللازم. -3. **حمض مخفف يُعايَر بقاعدة قوية مركَّزة.** 50 mL من حمض ضعيف بتركيز 0.05 mol/L تحتاج فقط 2.5 mL من قاعدة مركَّزة بتركيز 1 mol/L للوصول إلى التكافؤ، إضافة صغيرة ودقيقة جدًا. +1. **معايرة الخل بقاعدة.** 25 mL من حمض الخليك بتركيز 0.1 mol/L تُعايَر بقاعدة NaOH بتركيز 0.1 mol/L، فتحتاج 25 mL من القاعدة للوصول إلى التكافؤ. +2. **عينة حمض أكثر تركيزًا.** 10 mL فقط من حمض أكثر تركيزًا، 0.3 mol/L، تحتاج مع ذلك 30 mL من القاعدة نفسها بتركيز 0.1 mol/L، فثلاثة أضعاف التركيز يعني ثلاثة أضعاف الحجم اللازم. +3. **حمض مخفف يُعايَر بقاعدة قوية مركَّزة.** 50 mL من حمض مخفف بتركيز 0.05 mol/L تحتاج فقط 2.5 mL من قاعدة مركَّزة بتركيز 1 mol/L للوصول إلى التكافؤ، إضافة صغيرة ودقيقة جدًا. ## Test yourself @@ -34,13 +34,13 @@ variables: ## Intuition -تخيّل معايرة 25 mL من الخل، وهو حمض ضعيف نسبيًا، بقاعدة تُضاف نقطة نقطة. لفترة طويلة لا يبدو أن شيئًا مهمًا يحدث. في الشاشة، حرّك منزلق «حجم القاعدة المضاف» من الصفر وراقب منحنى pH. في البداية لا يكاد يتحرك، لأن الحمض ما زال أكثر بكثير من القاعدة، وإضافة قليل من القاعدة لا يغيّر النسبة إلا قليلًا. +تخيّل معايرة 25 mL من الخل، وهو حمض ضعيف نسبيًا، بقاعدة تُضاف نقطة نقطة. لفترة طويلة لا يبدو أن شيئًا مهمًا يحدث. على الشاشة، حرّك منزلق «حجم القاعدة المضاف» من الصفر وراقب منحنى pH. في البداية لا يكاد يتحرك، لأن الحمض ما زال أكثر بكثير من القاعدة، وإضافة قليل من القاعدة لا يغيّر النسبة إلا قليلًا. -استمر في التحريك رغم ذلك، فقرب نقطة التكافؤ يقفز المنحنى فجأة شبه عموديًا. يحوّل حجم إضافي بسيط من القاعدة المحلول من شديد الحموضة إلى شديد القاعدية في خطوة واحدة. يحدث ذلك القفز الحاد في كل معايرة بين حمض قوي وقاعدة قوية، ومراقبة موضعه على المنزلق تخبرك بالضبط بكمية القاعدة اللازمة لمعادلة الحمض. +لكن استمر في التحريك، فقرب نقطة التكافؤ يقفز المنحنى فجأة قفزة شبه عمودية. يحوّل حجم إضافي بسيط من القاعدة المحلول من شديد الحموضة إلى شديد القاعدية في خطوة واحدة. يحدث ذلك القفز الحاد في كل معايرة بين حمض قوي وقاعدة قوية، ومراقبة موضعه على المنزلق تخبرك بالضبط بكمية القاعدة اللازمة لمعادلة الحمض. ## Formal -عند نقطة التكافؤ، يتساوى عدد مولات الحمض وعدد مولات القاعدة بالضبط، أي $C_a V_a = C_b V_{eq}$. وقبل تلك النقطة، تحدد بقية الحمض قيمة pH، وبعدها تحددها بقية القاعدة. ولأن تركيز الحمض $C_a$، بوحدة mol/L، يُضرب في حجم بالميليلتر، وتُقرأ النتيجة مجددًا كتركيز، تُلغى وحدتا المليمول لكل ميليلتر والمول لكل لتر إلى الرقم نفسه، فلا حاجة لتحويل الوحدات في منتصف الحساب. +عند نقطة التكافؤ، يتساوى عدد مولات الحمض وعدد مولات القاعدة بالضبط، أي $C_a V_a = C_b V_{eq}$. وقبل تلك النقطة، تحدد بقية الحمض قيمة pH، وبعدها تحددها بقية القاعدة. ولأن تركيز الحمض $C_a$ وتركيز القاعدة كليهما بوحدة mol/L، والحجمين كليهما بالميليلتر، تُختصر الوحدات بين الطرفين، فلا حاجة لتحويل الوحدات في منتصف الحساب. وتُوجد نقطة التكافؤ نفسها من الكميتين الابتدائيتين فقط، دون الحاجة لقياس pH إطلاقًا، أي $V_{eq} = \dfrac{C_a V_a}{C_b}$. وعمليًا، يجدها الكيميائيون تجريبيًا بدلًا من ذلك، بمراقبة التغيّر اللوني المفاجئ لصبغة دليل أو القفزة الحادة على مقياس pH، وكلاهما يحدد النقطة نفسها التي تتنبأ بها هذه الصيغة. @@ -57,13 +57,17 @@ variables: ## Real world ### معايرة محلول مجهول التركيز -معايرة حمض مجهول مقابل قاعدة معروفة التركيز بدقة هي الطريقة القياسية التي يقيس بها الكيميائيون تركيزًا لا يعرفونه بعد. + +معايرة حمض مجهول بقاعدة معروفة التركيز بدقة هي الطريقة القياسية التي يقيس بها الكيميائيون تركيزًا لا يعرفونه بعد. ### اختيار الدليل اللوني + تُختار صبغة الدليل لتغيّر لونها عند pH يقابل أشد أجزاء المنحنى انحدارًا، بحيث تجعل قطرة واحدة من القاعدة تغيّر اللون عند نقطة التكافؤ الحقيقية تقريبًا. ### فحص المياه ومياه الصرف + تُستخدم المعايرة لقياس الحموضة والعسر ومستويات الملوثات في عينات الماء، من محطات المعالجة البلدية إلى أطقم فحص أحواض السمك المنزلية. ### مراقبة الجودة في الغذاء والدواء + تفحص المعايرة محتوى الحموضة في منتجات مثل الخل وعصير الحمضيات، والتركيز الدقيق للمواد الفعالة في الأدوية السائلة. diff --git a/content/lessons/chemistry/titration-curve/en.md b/content/lessons/chemistry/titration-curve/en.md index 2180b532..c0b1bb50 100644 --- a/content/lessons/chemistry/titration-curve/en.md +++ b/content/lessons/chemistry/titration-curve/en.md @@ -18,15 +18,15 @@ variables: ## Try it -1. Drag the «volume of base added» slider from zero. Watch pH barely move at first. -2. Keep dragging toward the equivalence point. Watch pH leap almost vertically. -3. Raise «acid volume Va» or «acid concentration Ca». Watch the equivalence point shift further along the slider. +1. Drag the «volume of base added» slider from 0 to 20. The readout f(x), the pH, barely moves: from 1 to about 1.95. +2. Keep dragging toward the equivalence point at 25. The pH is still about 3.7 at 24.9 mL, but about 10.3 at 25.1 mL: an almost vertical leap. +3. Raise «acid volume Vₐ» from 25 to 50. The leap shifts further along the slider, to 50 mL. Raising «acid concentration Cₐ» moves it the same way. ## Real-life examples 1. **Standardising vinegar against a base.** 25 mL of 0.1 mol/L acetic acid titrated with 0.1 mol/L NaOH needs 25 mL of base to reach equivalence. -2. **A more concentrated acid sample.** Just 10 mL of a stronger, 0.3 mol/L acid still needs 30 mL of the same 0.1 mol/L base — three times the concentration means three times the volume needed. -3. **A dilute acid titrated with a strong, concentrated base.** 50 mL of a weak 0.05 mol/L acid needs only 2.5 mL of a concentrated 1 mol/L base to reach equivalence — a tiny, precise addition. +2. **A more concentrated acid sample.** Just 10 mL of a more concentrated, 0.3 mol/L acid still needs 30 mL of the same 0.1 mol/L base — three times the concentration means three times the volume needed. +3. **A dilute acid titrated with a strong, concentrated base.** 50 mL of a dilute 0.05 mol/L acid needs only 2.5 mL of a concentrated 1 mol/L base to reach equivalence — a tiny, precise addition. ## Test yourself @@ -42,7 +42,7 @@ Keep dragging, though, and near the equivalence point the curve suddenly shoots ## Formal -At the equivalence point, moles of acid and moles of base are exactly equal: $C_a V_a = C_b V_{eq}$. Before that point, leftover acid sets the pH; after it, leftover base does. Because the acid concentration $C_a$, in mol/L, multiplies a volume in millilitres, and the answer is again read as a concentration, the units of millimoles per millilitre and moles per litre cancel to the same number — you never need to convert units mid-calculation. +At the equivalence point, moles of acid and moles of base are exactly equal: $C_a V_a = C_b V_{eq}$. Before that point, leftover acid sets the pH; after it, leftover base does. Because the acid concentration $C_a$ and the base concentration are both in mol/L, and both volumes are in millilitres, the units cancel between the two sides — you never need to convert units mid-calculation. The equivalence point itself is found purely from the two starting amounts, with no need to measure pH at all: $V_{eq} = \dfrac{C_a V_a}{C_b}$. In practice, chemists find it experimentally instead, by watching for the sudden colour change of an indicator dye or the steep jump on a pH meter, both of which locate the same point this formula predicts. @@ -59,13 +59,17 @@ The curve is symmetric and centred on pH 7 only for a strong acid and a strong b ## Real world ### Standardising a solution of unknown concentration + Titrating an unknown acid against a base of known, precisely prepared concentration is the standard way chemists measure a concentration they don't already know. ### Choosing an indicator + An indicator dye is picked to change colour right at the pH where the curve is steepest, so a single drop of base makes the colour change happen at almost exactly the true equivalence point. ### Water and wastewater testing + Titration is used to measure acidity, hardness, and contaminant levels in water samples, from municipal treatment plants to home aquarium testing kits. ### Quality control in food and pharmaceuticals + Titration checks the acid content of products like vinegar and citrus juice, and the exact concentration of active ingredients in liquid medicines. diff --git a/content/lessons/chemistry/titration-curve/lesson.yaml b/content/lessons/chemistry/titration-curve/lesson.yaml index ec568008..46e04cff 100644 --- a/content/lessons/chemistry/titration-curve/lesson.yaml +++ b/content/lessons/chemistry/titration-curve/lesson.yaml @@ -1,7 +1,7 @@ id: titration-curve subject: chemistry difficulty: university -equation: "C_a V_a = C_b V_{eq}" +equation: 'C_a V_a = C_b V_{eq}' concepts: - titration - equivalence-point @@ -16,7 +16,7 @@ related: visualization: type: function-plot options: - expr: "x < Ca*Va/Cb ? -log10((Ca*Va - Cb*x)/(Va + x)) : (x > Ca*Va/Cb ? 14 + log10((Cb*x - Ca*Va)/(Va + x)) : 7)" + expr: 'x < Ca*Va/Cb ? -log10((Ca*Va - Cb*x)/(Va + x)) : (x > Ca*Va/Cb ? 14 + log10((Cb*x - Ca*Va)/(Va + x)) : 7)' domain: - 0 - 60 @@ -55,8 +55,8 @@ variables: - C_b - V_{eq} derivation: - - "n_a = C_a V_a" - - "n_b = C_b x" + - 'n_a = C_a V_a' + - 'n_b = C_b x' - "n_a = n_b \\Rightarrow V_{eq} = \\dfrac{C_a V_a}{C_b}" primary: x presets: diff --git a/content/lessons/computer-science/algorithms-and-complexity/ar.md b/content/lessons/computer-science/algorithms-and-complexity/ar.md index 97ba5660..cabacd7f 100644 --- a/content/lessons/computer-science/algorithms-and-complexity/ar.md +++ b/content/lessons/computer-science/algorithms-and-complexity/ar.md @@ -30,15 +30,15 @@ charts: ## Try it -1. حرّك «n» على الخط المستقيم من 1 إلى 30، وسيبقى الخط مستقيمًا طوال الطريق. -2. راقب المخطط أسفله. القيمة نفسها n تضع نقطة على ثلاثة منحنيات أخرى معًا. قارن كم تتقارب عند n=10 وكم تتباعد عند n=30. -3. ارفع «k» وسيصبح الخط أكثر انحدارًا. الضرب في k أكبر يعطي خطًّا مستقيمًا دائمًا، لا منحنى أبدًا. +1. اجعل «k» عند 1 واضبط «n» على 10، فتُظهر قراءة f(x) القيمة 10. حرّك «n» إلى 30 فتصير 30، أي ثلاثة أضعاف، ويبقى الخط مستقيمًا طوال الطريق. +2. انظر إلى المخطط أسفله. القيمة n نفسها تضع نقطة على ثلاثة منحنيات معًا. عند n=10 تكون قيمها 10 ونحو 33 و100، وعند n=30 تصير 30 ونحو 147 و900. +3. أبقِ «n» عند 30 وارفع «k» إلى 5، فترتفع القراءة إلى 150 ويصير الخط أشدّ ميلًا. الضرب في k أكبر يعطي خطًّا مستقيمًا دائمًا، لا منحنى أبدًا. ## Real-life examples - **تصحيح 30 ورقة امتحان، دقيقتان لكل ورقة.** مع n=30 ورقة وk=2 دقيقة لكل ورقة، يصل ارتفاع الخط إلى 60 دقيقة إجمالًا. تضاعف عدد الأوراق يضاعف الوقت. -- **مراجعة 10 أسماء في قائمة ضيوف، ثانية واحدة لكل اسم.** مع n=10 وk=1، يستغرق البحث نحو 10 ثوانٍ فقط، وهذا أبسط أنواع العمل وأبطؤها نموًّا. -- **التوصيل إلى 20 بيتًا، 4 دقائق بين كل توقف.** مع n=20 وk=4، تستغرق الجولة نحو 80 دقيقة، وما زال الخط مستقيمًا لكنه أكثر انحدارًا. +- **مراجعة 10 أسماء في قائمة ضيوف، ثانية واحدة لكل اسم.** مع n=10 وk=1، يستغرق البحث نحو 10 ثوانٍ فقط. كل اسم إضافي يزيد ثانية واحدة، وهذا أبسط أنواع النمو. +- **التوصيل إلى 20 بيتًا، 4 دقائق بين كل توقف.** مع n=20 وk=4، تستغرق الجولة نحو 80 دقيقة، وما زال الخط مستقيمًا لكنه أشدّ ميلًا. ## Test yourself @@ -50,7 +50,7 @@ charts: تخيّل أنك تصحّح كومة أوراق امتحان. تصحيح 10 أوراق يستغرق وقتًا معينًا، لكن تصحيح 30 ورقة، أي ثلاثة أضعاف العدد، يستغرق تقريبًا ثلاثة أضعاف الوقت. حرّك المنزلق $n$ (عدد الأوراق، من 1 إلى 30) وراقب الخط البرتقالي المستقيم يرتفع. يتحكم في انحدار الخط منزلق ثانٍ، $k$، يمثّل عدد الدقائق لكل ورقة. عند $n=10$ يكون الخط منخفضًا، وعند $n=30$ يرتفع ثلاثة أضعاف، لأن الخط المستقيم ينمو بتناسب طردي مع عدد الأوراق. -الآن يضع المخطط أسفل الرسم القيمة $n$ نفسها نقطة على ثلاثة منحنيات أخرى معًا. الأول هو الخط المستقيم نفسه، واسمه على المخطط n. الثاني اسمه n·log2(n)، ويرتفع أسرع قليلًا. الأعلى انحدارًا اسمه n²، ويتجاوز البقية بفارق كبير عند حجم مدخل 30. منحنى رابع، اسمه $2^n$، ينمو بسرعة هائلة فيخرج من أعلى المخطط قبل ذلك بكثير. تلك الفجوة بين المنحنيات، لا مَن يفوز عند مدخل صغير واحد، هي ما يخبرك هل تبقى الخوارزمية سريعة حين يكبر المدخل. +الآن يضع المخطط أسفل الرسم القيمة $n$ نفسها نقطة على ثلاثة منحنيات أخرى معًا. الأول هو الخط المستقيم نفسه، واسمه على المخطط n. الثاني اسمه n·log2(n)، ويرتفع أسرع قليلًا. الأشدّ ميلًا اسمه n²، ويتجاوز البقية بفارق كبير عند حجم مدخل 30. وفي مخطط ثانٍ يظهر بجانب n² منحنى رابع اسمه $2^n$، ينمو بسرعة هائلة، فعند n = 12 يبلغ 4096 بينما n² عند 144 فقط. تلك الفجوة بين المنحنيات، لا مَن يفوز عند مدخل صغير واحد، هي ما يخبرك هل تبقى الخوارزمية سريعة حين يكبر المدخل. ## Formal @@ -60,24 +60,28 @@ charts: ## Advanced -يُضيّق $\Theta(f(n))$ تعريف الزمن الكبير O إلى حدّ من جهتين ($c_1 f(n) \le T(n) \le c_2 f(n)$)، بينما يعطي $\Omega(f(n))$ حدًّا أدنى فقط. ومعًا يصفان نمو الخوارزمية بدقة، لا مجرد حدّها الأعلى. وتسأل مسألة P مقابل NP سؤالًا واحدًا. هل كل مسألة يمكن التحقق من حلها في زمن كثير حدود يمكن أيضًا حلها في زمن كثير حدود؟ هذا أكبر سؤال مفتوح مبني على التدوين نفسه. +يُضيّق $\Theta(f(n))$ رمز O الكبير إلى حدّ من جهتين ($c_1 f(n) \le T(n) \le c_2 f(n)$)، بينما يعطي $\Omega(f(n))$ حدًّا أدنى فقط. ومعًا يصفان نمو الخوارزمية بدقة، لا مجرد حدّها الأعلى. وتسأل مسألة P مقابل NP سؤالًا واحدًا. هل كل مسألة يمكن التحقق من حلها في زمن كثير حدود يمكن أيضًا حلها في زمن كثير حدود؟ هذا أكبر سؤال مفتوح مبني على التدوين نفسه. ## Derivation 1. عدّ العمليات مباشرة. يكلّف المرور مرة واحدة على n عنصر مقدارًا ثابتًا من العمل لكل عنصر، بالإضافة إلى تكلفة ثابتة إضافية. -2. وبمجرد أن يكبر n بما يكفي، يصبح الحدّ الثابت مهملًا أمام الحدّ المتناسب مع n. وهذا بالضبط تعريف الزمن الكبير O. +2. وبمجرد أن يكبر n بما يكفي، يصبح الحدّ الثابت مهملًا أمام الحدّ المتناسب مع n. وهذا بالضبط تعريف رمز O الكبير. 3. أسقط الثوابت والحدود الأقل رتبة. يبقى في التصنيف الحدّ الأسرع نموًّا وحده. ## Real world ### محرّكات البحث + لا تنجح فهرسة مليارات الصفحات إلا لأن البحث يكلّف O(log n) أو أفضل، لا O(n) لكل استعلام. ### توسّع الشركات الناشئة + خوارزمية O(n²) تعمل بسلاسة مع 1000 مستخدم قد تتوقف عمليًا عند مليون مستخدم. هذا تباطؤ بمقدار مليون مرة، لا ألف مرة. ### تحسين المترجمات وقواعد البيانات -الاختيار بين خوارزميات بأصناف مختلفة من الزمن الكبير O هو أهم عامل وحيد لتحسين الأداء عند الحجم الكبير. + +الاختيار بين خوارزميات بأصناف مختلفة من رمز O الكبير هو أهم عامل في تحسين الأداء عند الحجم الكبير. ### التشفير + يعتمد الأمان غالبًا على الفجوة بين خوارزميات زمنها كثير حدود وأخرى زمنها أسّي لحل المسألة نفسها. راجع النمو الأسّي مقابل النمو كثير الحدود. diff --git a/content/lessons/computer-science/algorithms-and-complexity/en.md b/content/lessons/computer-science/algorithms-and-complexity/en.md index 82b3303d..35a1c4e9 100644 --- a/content/lessons/computer-science/algorithms-and-complexity/en.md +++ b/content/lessons/computer-science/algorithms-and-complexity/en.md @@ -30,14 +30,14 @@ charts: ## Try it -1. Drag «n» along the straight line from 1 up to 30, and watch the line stay perfectly straight the whole way. -2. Look at the chart below: the same n now marks a point on three more curves at once — notice how close together they are at n=10 and how far apart by n=30. -3. Raise «k» and watch the straight line get steeper — multiplying by a bigger k still only makes a straight line, never a curve. +1. With «k» at 1, set «n» to 10: the f(x) readout shows 10. Drag «n» up to 30: it shows 30, three times as high, and the line stays perfectly straight the whole way. +2. Look at the chart below: the same n marks a point on three curves at once. At n=10 they stand at 10, about 33 and 100; by n=30 they are at 30, about 147 and 900. +3. Keep «n» at 30 and raise «k» to 5: the readout climbs to 150 and the line gets steeper — multiplying by a bigger k still only makes a straight line, never a curve. ## Real-life examples - **Grading 30 exams, 2 minutes each.** With n=30 exams and k=2 minutes per exam, the straight line shows a job that takes 60 minutes in total — double the exams, double the time. -- **Checking 10 names on a guest list, 1 second each.** With n=10 and k=1, the search takes about 10 seconds — the simplest, slowest-growing kind of work there is. +- **Checking 10 names on a guest list, 1 second each.** With n=10 and k=1, the search takes about 10 seconds — one more name, one more second, the simplest kind of growth. - **Delivering to 20 houses, 4 minutes between stops.** With n=20 and k=4, the round trip takes about 80 minutes — still a straight line, just a steeper one. ## Test yourself @@ -50,7 +50,7 @@ charts: Picture grading a stack of exams: 10 exams take some amount of time, but 30 exams — three times as many — could take three times as long, depending on how the grading works. Drag the slider labelled $n$ (how many exams, from 1 to 30) and watch the straight orange line rise. It is controlled by a second slider, $k$, which sets how steep the line climbs, like minutes spent per exam. At $n=10$ the line sits low. By $n=30$ it has climbed three times higher, because a straight line grows in direct proportion to the number of exams. -Now look at the chart underneath. The same $n$ marks a point on three more curves at once. One is the straight line itself, labelled n on the chart. Another, labelled n·log2(n) on the legend, climbs a little faster. The steepest, labelled n² there, races far above the rest by the time input size reaches 30. A fourth curve, labelled $2^n$, grows so fast it flies off the top of the chart long before then. That gap between the curves — not which curve wins for one small input — is what tells you whether an algorithm will still be fast once the input is huge. +Now look at the chart underneath. The same $n$ marks a point on three more curves at once. One is the straight line itself, labelled n on the chart. Another, labelled n·log2(n) on the legend, climbs a little faster. The steepest, labelled n² there, races far above the rest by the time input size reaches 30. A second chart sets n² beside a fourth curve, labelled $2^n$, which grows so fast that by n = 12 it has reached 4096 while n² is only at 144. That gap between the curves — not which curve wins for one small input — is what tells you whether an algorithm will still be fast once the input is huge. ## Formal @@ -71,13 +71,17 @@ $\Theta(f(n))$ tightens Big-O to a two-sided bound ($c_1 f(n) \le T(n) \le c_2 f ## Real world ### Search engines + Indexing billions of pages only works because lookup is O(log n) or better, not O(n) per query. ### Scaling a startup + An O(n²) algorithm that works fine on 1,000 users can grind to a halt at 1,000,000 — a million-times slowdown, not a thousand-times. ### Compiler and database optimisation + Choosing between algorithms with different Big-O classes is the single biggest lever for performance at scale. ### Cryptography + Security often relies on the gap between polynomial-time and exponential-time algorithms for the same problem — see exponential vs polynomial growth. diff --git a/content/lessons/computer-science/binary-numbers/ar.md b/content/lessons/computer-science/binary-numbers/ar.md index 97b5579a..5b499570 100644 --- a/content/lessons/computer-science/binary-numbers/ar.md +++ b/content/lessons/computer-science/binary-numbers/ar.md @@ -13,15 +13,15 @@ variables: ## Try it -1. اضغط على المربع الأقصى يمينًا، فيقفز الرقم العشري بمقدار 1 بالضبط، وهذه قيمته المكانية في ذلك الموضع. -2. اضغط على المربع الأقصى يسارًا بدلًا منه، فيقفز الرقم العشري بمقدار 128، أكبر قيمة يحملها بت واحد. -3. راقب القراءتين السداسية عشرية وASCII تتغيّران معًا وأنت تقلب البتّات. كل 4 بتّات تصبح رقمًا سداسيًّا واحدًا، وأي بايت بين 32 و126 يظهر كحرف قابل للطباعة. +1. تبدأ الصورة عند 42 (00101010). اضغط على المربع الأقصى يمينًا، فتزيد القراءة العشرية 1 بالضبط، وهي قيمة هذا المربع، وتصير 43. +2. اضغط الآن على المربع الأقصى يسارًا، فتقفز القراءة العشرية 128، وهي أكبر قيمة يحملها بت واحد، من 43 إلى 171. +3. اقلب البتّات حتى تقرأ المربعات 01000001 (64 + 1 = 65). تُظهر قراءة «ست عشري» 0x41 وتُظهر قراءة ASCII الحرف 'A'. كل 4 بتّات تصنع رقمًا ست عشريًّا واحدًا، وأي بايت بين 32 و126 يظهر حرفًا يمكن طباعته. ## Real-life examples -- **كتابة الحرف A.** اضغط على «A» في لوحة المفاتيح، فيُخزَّن البايت 65 (بالثنائي 01000001). هذا الرقم بالضبط هو كيف يتذكر الحاسوب أي حرف كتبته. -- **بكسل رمادي متوسط.** في صورة أبيض وأسود بعمق 8 بتّات، تمتد السطوع من 0 (أسود) إلى 255 (أبيض). البكسل عند 128 يقع تقريبًا في المنتصف، رمادي متوسط. -- **أحمر بأقصى قوته.** قناة الأحمر في صورة مضبوطة عند 255 تعني أكبر قدر من الأحمر يسعه بايت واحد، أقصى درجة حمرة ممكنة لتلك النقطة. +- **كتابة الحرف A.** اضغط على «A» في لوحة المفاتيح، فيُخزَّن البايت 65 (بالثنائي 01000001). بهذا الرقم بالضبط يتذكر الحاسوب أي حرف كتبته. +- **بكسل رمادي متوسط.** في صورة أبيض وأسود بعمق 8 بتّات، يمتد السطوع من 0 (أسود) إلى 255 (أبيض). البكسل عند 128 يقع تقريبًا في المنتصف، رمادي متوسط. +- **أحمر بأقصى قوته.** حين تبلغ قناة الأحمر في بكسل 255 فهذا أكبر قدر من الأحمر يسعه بايت واحد، أي أقصى حمرة ممكنة لذلك البكسل. ## Test yourself @@ -33,7 +33,7 @@ variables: تخيّل 8 مفاتيح إنارة في صف واحد، كل مفتاح يساوي ضعف المفتاح الذي على يمينه. المفتاح الأقصى يمينًا يساوي 1، والذي يليه 2، ثم 4، 8، 16، 32، 64، والمفتاح الأقصى يسارًا يساوي 128. هذه كلها قوى الرقم 2، وتتضاعف مع كل خطوة. اقلب المفاتيح التي تساوي 32 و8 و2، وستجد مجموع قيمها 42. على الشاشة، هذه المفاتيح هي صف المربعات الثمانية القابلة للضغط. اضغط على واحد منها، فيقفز الرقم العشري بمقدار قيمته المكانية بالضبط، وهي $2^k$، حيث k يعدّ الموضع بدءًا من 0 عند المربع الأقصى يمينًا. -كل 4 مفاتيح تتجمّع في رقم سداسي عشري واحد، فيصبح البايت كاملًا رقمين سداسيين بالضبط. مثلًا، 42 بالسداسي هو 2A، وكرمز ASCII ذلك البايت هو الحرف *. ادفع القيمة إلى 255 فتضيء المفاتيح الثمانية كلها، وهذا أكبر رقم يسعه بايت واحد. ثمانية مفاتيح، كل واحد إما مضاء أو مطفأ، تعطي $2^8$ نمطًا ممكنًا، و255 هو الأكبر بينها. +كل 4 مفاتيح تتجمّع في رقم ست عشري واحد، فيصبح البايت كاملًا رقمين ست عشريين بالضبط. مثلًا، 42 بالست عشري هو 2A، وهذا البايت في ASCII هو الرمز *. ادفع القيمة إلى 255 فتضيء المفاتيح الثمانية كلها، وهذا أكبر رقم يسعه بايت واحد. ثمانية مفاتيح، كل واحد إما مضاء أو مطفأ، تعطي $2^8$ نمطًا ممكنًا، و255 هو الأكبر بينها. ## Formal @@ -43,24 +43,28 @@ $n = \sum_{k=0}^{7} b_k \cdot 2^k$ مع كون كل $b_k \in \{0,1\}$. هذا ت ## Advanced -التجميع السداسي عشري يأخذ البتّات أربعة أربعة لأن $16=2^4$، فكل رقم سداسي عشري يرمّز نصف بايت واحد بالضبط دون تقريب. ولهذا تُكتب عناوين الذاكرة ورموز الألوان بالسداسي عشري لا العشري. الأعداد الصحيحة ذات الإشارة تعيد تفسير نمط البتّات نفسه بمتمّم الاثنين، حيث يحمل البت الأول وزن $-2^7$ بدل $+2^7$. +النظام الست عشري يأخذ البتّات أربعة أربعة لأن $16=2^4$، فكل رقم ست عشري يمثّل نصف بايت واحد بالضبط دون تقريب. ولهذا تُكتب عناوين الذاكرة ورموز الألوان بالست عشري لا العشري. الأعداد الصحيحة ذات الإشارة تعيد تفسير نمط البتّات نفسه بمتمّم الاثنين، حيث يحمل البت الأول وزن $-2^7$ بدل $+2^7$. ## Derivation -1. اكتب البايت كمجموع قيمه المكانية الثماني، بدءًا بالبت الأكثر أهمية. +1. اكتب البايت كمجموع قيمه المكانية الثماني، بدءًا بالبت صاحب أكبر قيمة. 2. المجموع نفسه مكتوب باختصار، يماثل تمامًا كيف يعطي $\sum 10^k$ القيمة المكانية العشرية. 3. كل البتّات مطفأة تعطي 0، وكلها مضاءة تعطي 255، وهذا هو المدى الكامل لبايت واحد. ## Real world ### الذاكرة والتخزين -كل ملف وصورة وبرنامج هو في النهاية سلسلة من البايتات. الثنائي هو اللغة الوحيدة التي يتحدث بها العتاد. + +كل ملف وصورة وبرنامج هو في النهاية سلسلة من البايتات. الثنائي هو اللغة الوحيدة التي تفهمها دوائر الحاسوب. ### رموز الألوان -يحزم لون ويب مثل #2A5FFF ثلاثة بايتات للأحمر والأخضر والأزرق، كل منها مكتوب برقمين سداسيّين. + +لون في صفحات الويب مثل #2A5FFF يتكوّن من ثلاثة بايتات للأحمر والأخضر والأزرق، كل منها مكتوب برقمين ست عشريين. ### الشبكات -عناوين IP وأقنعة الشبكة الفرعية وعناوين MAC كلها مجموعات من البتّات، تُعرض عادة بالعشري أو السداسي عشري للبشر. + +عناوين IP وأقنعة الشبكة الفرعية وعناوين MAC كلها مجموعات من البتّات، تُعرض للناس عادة بالعشري أو الست عشري. ### ترميز النصوص + يربط ASCII كل قيمة بايت من 0 إلى 127 بحرف. البايت 42 هو الحرف *، و65 هو A. diff --git a/content/lessons/computer-science/binary-numbers/en.md b/content/lessons/computer-science/binary-numbers/en.md index b39e83cd..a160b871 100644 --- a/content/lessons/computer-science/binary-numbers/en.md +++ b/content/lessons/computer-science/binary-numbers/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Tap the rightmost bit square: the decimal number jumps by exactly 1, its place value in that spot. -2. Tap the leftmost bit square instead: the decimal number jumps by 128, the biggest single bit there is. -3. Watch the hex and ASCII readouts change together as you flip bits — every 4 bits becomes one hex digit, and a byte between 32 and 126 shows up as a printable character. +1. The picture starts at 42 (00101010). Tap the rightmost bit square: the decimal readout jumps by exactly 1, that square's place value, and shows 43. +2. Now tap the leftmost bit square: the decimal readout jumps by 128, the biggest single bit there is, from 43 to 171. +3. Flip bits until the squares read 01000001 (64 + 1 = 65). The hexadecimal readout shows 0x41 and the ASCII readout shows 'A' — every 4 bits make one hex digit, and a byte between 32 and 126 shows up as a printable character. ## Real-life examples @@ -55,13 +55,17 @@ Hexadecimal groups bits four at a time because $16=2^4$, so each hex digit encod ## Real world ### Memory and storage + Every file, image and program is ultimately a sequence of bytes — binary is the only language the hardware speaks. ### Colour codes + A web colour like #2A5FFF packs three bytes of red, green and blue, each written as two hex digits. ### Networking + IP addresses, subnet masks and MAC addresses are all groups of bits, usually displayed in decimal or hex for humans. ### Text encoding + ASCII maps each byte value 0–127 to a character; the byte 42 is the character *, and 65 is A. diff --git a/content/lessons/computer-science/breadth-first-search/ar.md b/content/lessons/computer-science/breadth-first-search/ar.md index 8c89e5d9..3ab4beb0 100644 --- a/content/lessons/computer-science/breadth-first-search/ar.md +++ b/content/lessons/computer-science/breadth-first-search/ar.md @@ -4,7 +4,7 @@ summary: >- افحص الجيران، ثم جيران الجيران، طبقة بعد طبقة. هكذا تضمن العثور على أقصر طريق بين نقطتين. parameters: - start: البداية، العقدة الأولية + start: البداية، عقدة البداية (0 = A … 9 = J) step: الخطوة، موضع التشغيل variables: - قائمة العقد التي تنتظر الاستكشاف، الأول دخولًا أول خروجًا @@ -14,27 +14,27 @@ variables: ## Try it -1. اترك «البداية» عند العقدة 0 واضغط تشغيل. تضيء العقدة 0، ثم يضيء جيرانها المباشرون معًا كطبقة واحدة، ثم جيران هؤلاء كالطبقة التالية. -2. حرّك «الخطوة» إلى 0 ثم إلى الأمام من جديد لإعادة تشغيل الطبقات واحدة تلو الأخرى، ولاحظ أن عقدة الهدف (9) تضيء فقط بعد استكشاف كل طبقة أقرب منها. -3. غيّر «البداية» واضغط تشغيل من جديد. تُرسم الطبقات من جديد من نقطة البداية الجديدة، لكن الهدف يُكتشف دائمًا بأقل عدد ممكن من القفزات. +1. اترك «البداية» عند 0 (الدائرة A) وحرّك «الخطوة» ببطء من 0 إلى 1. تضيء الدائرة A أولًا، ثم جارتاها المباشرتان B وF طبقةً واحدة، ثم جارتاهما C وG طبقةً تالية. تنتهي قراءة ترتيب الزيارة هكذا: A B F C G D H E I J. وقراءة طول المسار، 22، هي مجموع الأرقام على الخطوط الخمسة في المسار إلى J. +2. حرّك «الخطوة» إلى 0 ثم إلى الأمام من جديد لإعادة تشغيل الطبقات واحدة تلو الأخرى، ولاحظ أن الهدف، الدائرة J، يضيء فقط بعد استكشاف كل طبقة أقرب منها. +3. اضبط «البداية» على 5 (الدائرة F) وحرّك «الخطوة» إلى النهاية مرة أخرى. تُرسم الطبقات من نقطة البداية الجديدة، ويُكتشف الهدف بعد 4 قفزات (F ثم G ثم H ثم I ثم J) بدل 5، وهذا دائمًا أقل عدد ممكن. ## Real-life examples -- **بدء البحث من نفسك.** ابدأ من العقدة 0 وشغّل الرسم المتحرك حتى نهايته. يتمدد البحث في طبقات من صديق إلى صديق حتى يصل إلى العقدة 9، ويُظهر أقل عدد تعارف يلزم للقاء ذلك الشخص. -- **البدء من شخص في المنتصف.** ابدأ من العقدة 5. يبدأ البحث من عقدة تبعد بالفعل عدة قفزات داخل الشبكة، وغالبًا يصل إلى العقدة 9 بطبقات أقل. -- **البدء من الهدف نفسه.** ابدأ من العقدة 9 وأبقِ الرسم المتحرك عند بدايته تمامًا. تضيء العقدة 9 وحدها، فمسافتها عن نفسها صفر، ولم يتمدد شيء بعد. +- **بدء البحث من نفسك.** ابدأ من 0 (الدائرة A) وحرّك «الخطوة» إلى نهايتها. يتمدد البحث في طبقات من صديق إلى صديق حتى يصل إلى J بعد 5 تعارفات، وهذا أقل عدد يلزم للقاء ذلك الشخص. +- **البدء من شخص في المنتصف.** ابدأ من 5 (الدائرة F). يبدأ البحث أقرب بقفزة واحدة، فيصل إلى J في 4 طبقات بدل 5. +- **البدء من الهدف نفسه.** ابدأ من 9 (الدائرة J) وأبقِ «الخطوة» عند 0. الدائرة J وحدها معلَّمة وبجانبها 0، فمسافتها عن نفسها صفر، ولم يتمدد شيء بعد. ## Test yourself -1. اضبط البداية على العقدة 0، ثم دع الرسم المتحرك يعمل حتى النهاية. -2. انقل البداية إلى العقدة 9، أيًّا كان موضع التشغيل. -3. اضبط البداية على العقدة 5 وشغّل الرسم حتى منتصفه على الأقل. +1. اضبط البداية على 0 (الدائرة A)، ثم حرّك «الخطوة» حتى النهاية. +2. انقل البداية إلى 9 (الدائرة J)، أيًّا كان موضع التشغيل. +3. اضبط البداية على 5 (الدائرة F) وحرّك «الخطوة» إلى المنتصف على الأقل. ## Intuition -تخيّل أنك تبحث عن زميل اسمه سامي في حفلة كبيرة، وأنت تعرف فقط من يعرفه كل شخص هناك، لا مكان سامي نفسه. تبدأ بسؤال كل من تعرفه شخصيًّا، وهذه الطبقة الأولى، وإن لم يكن أحدهم سامي تسأل كل من يعرفونه هم، وهذه الطبقة الثانية، وهكذا طبقة بعد طبقة دون تخطي أي واحدة. على الشاشة هذا مخطط من 10 دوائر مرقّمة. منزلق البداية يحدد أي دائرة تبدأ منها، والضغط على تشغيل يضيء كل طبقة من الجيران معًا قبل أن تبدأ الطبقة التالية. +تخيّل أنك تبحث عن زميل اسمه سامي في حفلة كبيرة، وأنت تعرف فقط من يعرفه كل شخص هناك، لا مكان سامي نفسه. تبدأ بسؤال كل من تعرفه شخصيًّا، وهذه الطبقة الأولى، وإن لم يكن أحدهم سامي تسأل كل من يعرفونه هم، وهذه الطبقة الثانية، وهكذا طبقة بعد طبقة دون تخطي أي واحدة. على الشاشة هذا مخطط من 10 دوائر أسماؤها من A إلى J. منزلق البداية يحدد أي دائرة تبدأ منها (0 هي A و9 هي J)، وتحريك منزلق الخطوة يضيء كل طبقة من الجيران قبل أن تبدأ الطبقة التالية. -بما أن كل طبقة تنتهي قبل أن تبدأ التالية، أول مرة تصل فيها إلى الدائرة الهدف (العقدة 9 دائمًا) لا بد أنها وصلت بأقل عدد ممكن من القفزات، إذ لا يمكن أن يكون هناك مسار أقصر تم تخطّيه، لأنه كان سيضيء في طبقة أسبق. حرّك منزلق الخطوة لإعادة تشغيل البحث عند أي نقطة، أو غيّر عقدة البداية واضغط تشغيل من جديد. تُرسم الطبقات من جديد من حيث تبدأ، لكن ضمان أقل عدد قفزات لا ينكسر أبدًا. +بما أن كل طبقة تنتهي قبل أن تبدأ التالية، أول مرة تصل فيها إلى الدائرة الهدف (الدائرة J دائمًا) لا بد أنها وصلت بأقل عدد ممكن من القفزات، إذ لا يمكن أن يكون البحث قد تخطّى مسارًا أقصر، لأنه كان سيضيء في طبقة أسبق. حرّك منزلق الخطوة لإعادة تشغيل البحث عند أي نقطة، أو غيّر عقدة البداية وحرّكه من جديد. تُرسم الطبقات من جديد من حيث تبدأ، لكن ضمان أقل عدد قفزات لا ينكسر أبدًا. ## Formal @@ -44,7 +44,7 @@ variables: ## Advanced -يعمل BFS في زمن O(V+E) على مخطط بـV رأسًا وE حافة، لأن كل رأس يُدرَج في الطابور مرة واحدة وكل حافة تُفحَص مرة واحدة. على الرسوم غير الموزونة هو خوارزمية أقصر مسار، وعلى الرسوم الموزونة يجب استبداله بخوارزمية دايكسترا، التي يُعدّ BFS حالة خاصة منها عندما يساوي وزن كل حافة 1. +يعمل BFS في زمن O(V+E) على مخطط بـV رأسًا وE حافة، لأن كل رأس يُدرَج في الطابور مرة واحدة وكل حافة تُفحَص مرة واحدة. على المخططات غير الموزونة هو خوارزمية أقصر مسار، وعلى المخططات الموزونة يجب استبداله بخوارزمية دايكسترا، التي يُعدّ BFS حالة خاصة منها عندما يساوي وزن كل حافة 1. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### الشبكات الاجتماعية + نحسب «درجات الانفصال»، أي أصدقاء الأصدقاء، بـBFS طبقة بطبقة من شخص واحد. ### توجيه GPS على خرائط غير موزونة + يجد BFS مباشرة أقل عدد من التقاطعات بين نقطتين، متجاهلًا المسافة تمامًا. -### زحف الويب -تستكشف زواحف محركات البحث الروابط غالبًا بالعرض أولًا، لأخذ عيّنة واسعة من الويب قبل التعمّق. +### تصفّح محركات البحث للويب + +تستكشف برامج محركات البحث الروابط غالبًا بالعرض أولًا، لأخذ عيّنة واسعة من الويب قبل التعمّق. ### حل الألغاز -يجد BFS أقل عدد من الحركات لحل لغز الانزلاق أو للوصول إلى حالة مكعب روبيك، على فضاء التشكيلات الممكنة. + +يجد BFS أقل عدد من الحركات لحل لعبة القطع المنزلقة أو للوصول إلى حالة مكعب روبيك، على فضاء التشكيلات الممكنة. diff --git a/content/lessons/computer-science/breadth-first-search/en.md b/content/lessons/computer-science/breadth-first-search/en.md index 5e6d2d7f..74bf8892 100644 --- a/content/lessons/computer-science/breadth-first-search/en.md +++ b/content/lessons/computer-science/breadth-first-search/en.md @@ -4,7 +4,7 @@ summary: >- This search guarantees you'll find the shortest possible path between two points, layer by layer, before checking anything farther away. parameters: - start: start — starting node + start: start — starting node (0 = A … 9 = J) step: step — play position variables: - the first-in-first-out list of nodes waiting to be explored @@ -14,27 +14,27 @@ variables: ## Try it -1. Leave «start» at node 0 and press play — watch node 0 light up, then its direct neighbours light up together as one layer, then their neighbours as the next layer. -2. Drag «step» back to 0 and forward again to replay the layers one at a time, and notice the target node (9) only lights up once every closer layer has already been explored. -3. Change «start» and press play again — the layers redraw from the new starting point, but the target is still always found in the fewest possible hops. +1. Leave «start» at 0 (circle A) and drag «step» slowly from 0 to 1 — circle A lights up first, then its direct neighbours B and F as one layer, then their neighbours C and G as the next layer. The visit order readout ends as A B F C G D H E I J, and the path length readout, 22, adds up the numbers on the 5 edges of the path to J. +2. Drag «step» back to 0 and forward again to replay the layers one at a time, and notice the goal, circle J, only lights up once every closer layer has already been explored. +3. Set «start» to 5 (circle F) and drag «step» to the end again — the layers redraw from the new starting point, and the goal is found in 4 hops (F, G, H, I, J) instead of 5, still the fewest possible. ## Real-life examples -- **Starting the search from yourself.** With start at node 0 and the animation played through, you watch the search spread outward in friend-of-friend layers until it reaches node 9, showing the fewest introductions needed to meet that person. -- **Starting from someone in the middle.** With start at node 5, the search begins from a node already several hops into the network, often reaching node 9 in fewer layers. -- **Starting right at the target.** With start at node 9 and the animation paused at the very beginning, node 9 lights up alone — its distance from itself is zero, and nothing has spread yet. +- **Starting the search from yourself.** With start at 0 (circle A) and «step» dragged to the end, you watch the search spread outward in friend-of-friend layers until it reaches J: 5 introductions, the fewest needed to meet that person. +- **Starting from someone in the middle.** With start at 5 (circle F), the search begins one hop closer and reaches J in 4 layers instead of 5. +- **Starting right at the target.** With start at 9 (circle J) and «step» at 0, only J is marked, with a 0 beside it — its distance from itself is zero, and nothing has spread yet. ## Test yourself -1. Set start to node 0, then let the animation play all the way to the end. -2. Move start to node 9, wherever the play position happens to be. -3. Set start to node 5 and play at least halfway through the animation. +1. Set start to 0 (circle A), then drag «step» all the way to the end. +2. Move start to 9 (circle J), wherever the play position happens to be. +3. Set start to 5 (circle F) and move «step» at least halfway. ## Intuition -Imagine you are looking for a classmate named Sam at a big party, and you only know who each person there knows, not where Sam is. You start by asking everyone you personally know — that's layer one — and if none of them is Sam, you ask everyone they know next — layer two — and so on, layer by layer, never skipping ahead. On screen that's the graph of 10 numbered circles: the start slider picks which circle you begin at, and pressing play lights up each layer of neighbours together before the next layer starts. +Imagine you are looking for a classmate named Sam at a big party, and you only know who each person there knows, not where Sam is. You start by asking everyone you personally know — that's layer one — and if none of them is Sam, you ask everyone they know next — layer two — and so on, layer by layer, never skipping ahead. On screen that's the graph of 10 circles lettered A to J: the start slider picks which circle you begin at (0 is A, 9 is J), and dragging the step slider lights up each layer of neighbours before the next layer starts. -Because every layer finishes before the next one begins, the very first time you reach the target circle (always node 9), it has to be by the fewest possible hops — there is no way a shorter route was skipped, since it would have lit up in an earlier layer. Drag the step slider to replay the search at any point, or change the start node and press play again: the layers redraw from wherever you begin, but the shortest-hop guarantee never breaks. +Because every layer finishes before the next one begins, the very first time you reach the target circle (always J), it has to be by the fewest possible hops — there is no way a shorter route was skipped, since it would have lit up in an earlier layer. Drag the step slider to replay the search at any point, or change the start node and drag it again: the layers redraw from wherever you begin, but the shortest-hop guarantee never breaks. ## Formal @@ -55,13 +55,17 @@ BFS runs in O(V+E) time on a graph with V vertices and E edges, since each verte ## Real world ### Social networks + "Degrees of separation" — friends of friends — is computed with BFS layer by layer from one person. ### GPS routing on unweighted maps + Finding the fewest intersections between two points (ignoring distance) is a direct BFS. ### Web crawling + Search engine crawlers often explore links breadth-first to sample a wide slice of the web before going deep. ### Puzzle solving + Finding the minimum number of moves to solve a sliding puzzle or a Rubik’s cube state is BFS over the space of configurations. diff --git a/content/lessons/computer-science/breadth-first-search/lesson.yaml b/content/lessons/computer-science/breadth-first-search/lesson.yaml index df8836d3..d14bd8e1 100644 --- a/content/lessons/computer-science/breadth-first-search/lesson.yaml +++ b/content/lessons/computer-science/breadth-first-search/lesson.yaml @@ -28,7 +28,7 @@ parameters: min: 0 max: 1 step: 0.001 - value: 1 + value: 0 variables: - queue - d diff --git a/content/lessons/computer-science/bubble-sort/ar.md b/content/lessons/computer-science/bubble-sort/ar.md index 13e47930..d50fbf72 100644 --- a/content/lessons/computer-science/bubble-sort/ar.md +++ b/content/lessons/computer-science/bubble-sort/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اضغط تشغيل وراقب. يقارن البرنامج عمودين متجاورين زوجًا واحدًا كل مرة، وكلما كان العمود الأيسر أطول تبادلا مكانيهما. -2. راقب عدّادي المقارنات والتبديلات يرتفعان مع استقرار الأعمدة في ترتيبها. -3. حرّك «n» من 8 إلى 40 واضغط تشغيل من جديد، ولاحظ كم يطول وقت استقرار الأعمدة. +1. تبدأ الصورة بـ16 عمودًا وتعمل وحدها (اضغط ▶ شغّل إن كانت متوقفة). يقارن البرنامج عمودين متجاورين زوجًا واحدًا كل مرة، وكلما كان العمود الأيسر أطول تبادلا مكانيهما. +2. راقب عدّادي المقارنات والتبديلات يرتفعان مع استقرار الأعمدة في ترتيبها. مع الأعمدة الـ16 الأولى يتوقفان عند 120 مقارنة و81 تبديلًا. +3. حرّك «n» إلى 8 ودع الترتيب يكتمل، فينتهي بعد 28 مقارنة. ثم حرّك «n» إلى 40، فيبدأ الترتيب من جديد ويحتاج 780 مقارنة حتى تستقر الأعمدة كلها. ## Real-life examples @@ -33,31 +33,34 @@ variables: تخيّل 8 أطفال يقفون بترتيب عشوائي، يقارنون كل زوج من الجيران مرارًا. إذا كان الطفل الأطول على اليسار، يتبادلان مكانيهما. بعد مرور واحد كامل على الصف، يكون الطفل الأطول قد وصل إلى نهاية الصف تمامًا، وكل تبادل يدفعه خطوة في طريقه، تمامًا كفقاعة تطفو صاعدة في الماء. على الشاشة، هؤلاء الأطفال هم الأعمدة الملوّنة. اضغط تشغيل وراقب عمودين متجاورين تجري مقارنتهما كل مرة، ويتبادلان إذا كان الأيسر أطول. -تُحصي العدّادات أعلاه المقارنات والتبديلات لحظة حدوثها. المنزلق $n$ يحدد عدد الأعمدة. كل مرور من مرورات n−1 يعيد فحص كل الجيران تقريبًا من جديد، فتتراكم المقارنات بسرعة. 8 أعمدة تحتاج 28 مقارنة، لكن 40 عمودًا يحتاج 780 مقارنة، أي نحو 30 ضعفًا مقابل 5 أضعاف فقط في عدد الأعمدة. هذا بالضبط معنى النمو التربيعي. يكبر العمل تقريبًا بمقدار مربع $n$، لا بتناسب مباشر معه. +تُحصي العدّادات تحت الصورة المقارنات والتبديلات لحظة حدوثها. المنزلق $n$ يحدد عدد الأعمدة. كل مرور من مرورات n−1 يعيد فحص كل الجيران تقريبًا من جديد، فتتراكم المقارنات بسرعة. 8 أعمدة تحتاج 28 مقارنة، لكن 40 عمودًا يحتاج 780 مقارنة، أي نحو 30 ضعفًا مقابل 5 أضعاف فقط في عدد الأعمدة. هذا بالضبط معنى النمو التربيعي. يكبر العمل تقريبًا بمقدار مربع $n$، لا بتناسب مباشر معه. ## Formal -يقوم الترتيب الفقاعي بـ$n-1$ مرورًا. المرور $i$ يقارن ويبدّل ربما كل واحد من أول $n-i$ زوجًا متجاورًا، فيعطي $\sum_{i=1}^{n-1} (n-i) = \dfrac{n(n-1)}{2}$ مقارنة في أسوأ الحالات والمتوسط. +يقوم الترتيب الفقاعي بـ$n-1$ مرورًا. المرور $i$ يقارن أول $n-i$ زوجًا متجاورًا ويبدّل ما يلزم منها، فيعطي $\sum_{i=1}^{n-1} (n-i) = \dfrac{n(n-1)}{2}$ مقارنة في أسوأ الحالات والمتوسط. -زمن أسوأ الحالات والمتوسط هو O(n²). وأفضل حالة، حين يكون العنصر مرتبًا مسبقًا مع علامة خروج مبكر، هي O(n). وهو ترتيب مستقر، فالعناصر المتساوية لا تتخطى بعضها أبدًا. +زمن أسوأ الحالات والمتوسط هو O(n²). وأفضل حالة، حين تكون القائمة مرتبة من قبل ونضيف شرط خروج مبكر، هي O(n). وهو ترتيب مستقر، فالعناصر المتساوية لا تتخطى بعضها أبدًا. ## Advanced -مقارنات الترتيب الفقاعي O(n²) تأتي من فحص كل واحد من أزواج n(n−1)/2 بطريقة غير مباشرة عبر تبديلات متجاورة متكررة. هذه نفس رتبة العمل في ترتيب الإدراج والاختيار، ولهذا لا تُستخدم أي من هذه الترتيبات التربيعية البسيطة على بيانات كبيرة عمليًا. ميزته الوحيدة هي التكيف. مع فحص خروج مبكر، يكلف المصفوف المرتب مسبقًا O(n) فقط. +مقارنات الترتيب الفقاعي O(n²) تأتي من فحص كل واحد من أزواج n(n−1)/2 بطريقة غير مباشرة عبر تبديلات متجاورة متكررة. هذه نفس رتبة العمل في ترتيب الإدراج والاختيار، ولهذا لا تُستخدم أي من هذه الترتيبات التربيعية البسيطة على بيانات كبيرة عمليًا. ميزته الوحيدة هي التكيف. مع فحص خروج مبكر، تكلّف القائمة المرتبة من قبل O(n) فقط. ## Derivation -1. يحتاج كل مرور مقارنة واحدة أقل، لأن أكبر عنصر متبقٍّ فقّع بالفعل إلى ما بعد النهاية. +1. يحتاج كل مرور مقارنة واحدة أقل، لأن أكبر عنصر متبقٍّ يكون قد وصل إلى مكانه في آخر الصف. 2. اجمع المقارنات عبر كل مرورات $n-1$، وهذا مجموع الأعداد الصحيحة الأولى $n-1$. 3. أسقط الحد الأدنى رتبة، فالنمو التربيعي يهيمن لقيم n الكبيرة. ## Real world ### تعليم الترتيب -نادرًا ما يُستخدم الترتيب الفقاعي في الإنتاج، لكنه المثال الأول المعتاد لتعليم المقارنات والتبديلات والزمن الكبير O. + +نادرًا ما يُستخدم الترتيب الفقاعي في البرامج الحقيقية، لكنه المثال الأول المعتاد لتعليم المقارنات والتبديلات والزمن الكبير O. ### البيانات شبه المرتّبة -مع علامة خروج مبكّر، يكون الترتيب الفقاعي فعّالًا تحديدًا عندما تكون البيانات شبه مرتّبة بالفعل. بعض خطوط الأنابيب الحقيقية تستغل هذا. + +مع علامة خروج مبكّر، يكون الترتيب الفقاعي فعّالًا تحديدًا عندما تكون البيانات شبه مرتّبة بالفعل. وبعض أنظمة معالجة البيانات تستغل هذا. ### الأنظمة المدمجة الصغيرة -على مدخلات صغيرة جدًّا (حفنة من قراءات الحسّاسات) قد تفوق بساطة الترتيب الفقاعي سوء تدرّجه. + +على مدخلات صغيرة جدًّا (بضع قراءات من الحسّاسات) قد تكون بساطة الترتيب الفقاعي أهم من بطئه مع القوائم الطويلة. diff --git a/content/lessons/computer-science/bubble-sort/en.md b/content/lessons/computer-science/bubble-sort/en.md index 57d67b0a..37ed7b26 100644 --- a/content/lessons/computer-science/bubble-sort/en.md +++ b/content/lessons/computer-science/bubble-sort/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Press play and watch two neighbouring bars get compared one pair at a time — whenever the left bar is taller, they swap. -2. Watch the comparisons and swaps counters climb as the bars settle into order. -3. Slide «n» from 8 up to 40 and press play again — notice how much longer it takes for all the bars to settle. +1. The picture starts with 16 bars and plays by itself (press ▶ play if it is paused). Two neighbouring bars get compared one pair at a time — whenever the left bar is taller, they swap. +2. Watch the comparisons and swaps counters climb as the bars settle into order: for the 16 starting bars they stop at 120 comparisons and 81 swaps. +3. Slide «n» to 8 and let it run: it finishes with 28 comparisons. Then slide «n» to 40: the run restarts and needs 780 comparisons before all the bars settle. ## Real-life examples @@ -34,7 +34,7 @@ variables: Picture 8 kids standing in a random order, repeatedly comparing each pair of neighbours: if the taller kid is on the left, they swap places. After one full pass down the line, the tallest kid has ended up all the way at the end — bumped along by every swap, like a bubble floating up through water. On screen those kids are the coloured bars: press play and watch two neighbouring bars get compared at a time, swapping whenever the left one is taller. -The counters above tally comparisons and swaps as they happen. The slider $n$ sets how many bars there are. Each of the n−1 passes re-checks almost every neighbour again, so comparisons pile up fast: 8 bars need 28 comparisons, but 40 bars need 780 — nearly 30 times as many for only 5 times the bars. That is what quadratic growth means: work grows roughly as the square of $n$, not in direct proportion to it. +The counters under the picture tally comparisons and swaps as they happen. The slider $n$ sets how many bars there are. Each of the n−1 passes re-checks almost every neighbour again, so comparisons pile up fast: 8 bars need 28 comparisons, but 40 bars need 780 — nearly 30 times as many for only 5 times the bars. That is what quadratic growth means: work grows roughly as the square of $n$, not in direct proportion to it. ## Formal @@ -48,17 +48,20 @@ Bubble sort's O(n²) comparisons come from checking every one of the n(n−1)/2 ## Derivation -1. Each pass needs one fewer comparison, because the largest remaining element is already bubbled past the end. +1. Each pass needs one fewer comparison, because the largest remaining element has already bubbled to its place at the end. 2. Add up the comparisons across all $n-1$ passes — a sum of the first $n-1$ integers. 3. Drop the lower-order term: quadratic growth dominates for large n. ## Real world ### Teaching sorting + Bubble sort is rarely used in production, but it is the standard first example for teaching comparisons, swaps and Big-O. ### Nearly-sorted data + With an early-exit flag, bubble sort is efficient specifically when data is already almost in order — some real pipelines exploit this. ### Small embedded systems + On tiny inputs (a handful of sensor readings) the simplicity of bubble sort can outweigh its poor scaling. diff --git a/content/lessons/computer-science/depth-first-search/ar.md b/content/lessons/computer-science/depth-first-search/ar.md index ceea2ad6..f3fe4c34 100644 --- a/content/lessons/computer-science/depth-first-search/ar.md +++ b/content/lessons/computer-science/depth-first-search/ar.md @@ -4,7 +4,7 @@ summary: >- امضِ في طريق واحد حتى نهايته، ولا ترجع إلا عند الحائط المسدود. هكذا يخرج الحاسوب من المتاهة ويفتّش ملفاتك. parameters: - start: البداية — العقدة الأولية + start: البداية — عقدة البداية (0 = A … 9 = J) step: الخطوة — موضع التشغيل variables: - قائمة العقد التالية للاستكشاف، الأخير دخولًا أول خروجًا @@ -14,54 +14,58 @@ variables: ## Try it -1. اضبط المنزلق «start» على 0، ثم حرّك «step» ببطء من 0 نحو 1. راقب مسارًا واحدًا يتلوى من العقدة 0 نحو الهدف، العقدة 9، جارًا واحدًا في كل مرة. -2. أعد «step» إلى 0، ثم اضبط «start» على 9. يبدأ المسار عند الهدف نفسه، فلا يبقى شيء ليُستكشف. -3. اضبط «start» على 4 وحرّك «step» بعد منتصف الشريط. راقب المسار يتراجع، أي يقفز إلى عقدة سابقة، مرة واحدة على الأقل قبل أن يصل إلى العقدة 9. +1. اضبط منزلق «البداية» على 0 (الدائرة A)، ثم حرّك «الخطوة» ببطء من 0 نحو 1. راقب مسارًا واحدًا يتلوّى من A نحو الهدف، الدائرة J، جارًا واحدًا في كل مرة: A ثم F ثم G ثم H ثم I ثم J. +2. أعد «الخطوة» إلى 0، ثم اضبط «البداية» على 9 (الدائرة J). يبدأ المسار عند الهدف نفسه، فتكون J أول دائرة يزورها البحث. +3. اضبط «البداية» على 3 (الدائرة D) وحرّك «الخطوة» بعد منتصف الشريط. يمضي المسار D ثم I ثم J، ولا يجد عند J جارًا جديدًا، فيتراجع: يرجع إلى الجار الآخر للدائرة I، وهو H. ## Real-life examples -- **استكشاف متاهة ذرة من بوابتها.** ابدأ من العقدة 0، البوابة، وشغّل موضع اللعب حتى النهاية (step = 1). يظهر المسار الكامل الذي يلتزم به DFS قبل أن يصل إلى العقدة 9، ويتراجع كلما فرضت المتاهة طريقًا مسدودًا. -- **الوقوف عند المخرج مسبقًا.** ابدأ من العقدة 9، وهي نفسها الهدف، وأبقِ موضع اللعب عند البداية (step = 0). ينتهي البحث فورًا، لأنه لا يبقى مكان ليُقصد. -- **البدء من منتصف المتاهة.** ابدأ من العقدة 4 وشغّل موضع اللعب حتى النهاية (step = 1). يُظهر هذا كم مرة يضطر المسار إلى الرجوع قبل أن يصل أخيرًا إلى العقدة 9. +- **استكشاف متاهة من بوابتها.** ابدأ من 0 (الغرفة A)، وهي البوابة، وحرّك «الخطوة» حتى النهاية (1). يظهر المسار الوحيد الذي يلتزم به DFS، وهو A F G H I J، ويصل إلى المخرج دون أن يصادف طريقًا مسدودًا. +- **أنت عند المخرج أصلًا.** ابدأ من 9 (الغرفة J)، وهي نفسها الهدف، وأبقِ «الخطوة» عند البداية (0). ينتهي البحث فورًا، لأنك تقف عند المخرج أصلًا. +- **البدء من منتصف المتاهة.** ابدأ من 3 (الغرفة D) وحرّك «الخطوة» حتى النهاية (1). يصل المسار إلى J بعد حركتين، ثم يرجع إلى H ليكمل استكشاف بقية الغرف. ## Test yourself -1. ابدأ البحث من العقدة 0 ودع الحركة تكتمل حتى نهايتها، وصولًا إلى الهدف. -2. انقل عقدة البداية إلى العقدة 9، فوق الهدف مباشرة، فيجد البحث الهدف فورًا. -3. ابدأ البحث من العقدة 4 وادفع موضع اللعب بعد المنتصف. التقط لحظة تراجع المسار في طريقه إلى العقدة 9. +1. ابدأ البحث من 0 (الدائرة A) وحرّك موضع التشغيل حتى نهايته. +2. انقل عقدة البداية إلى 9 (الدائرة J)، فوق الهدف مباشرة، فيجد البحث الهدف فورًا. +3. ابدأ البحث من 3 (الدائرة D) وحرّك موضع التشغيل بعد المنتصف. التقط لحظة تراجع المسار من J إلى H. ## Intuition -تخيل متاهة ذرة فيها 10 غرف مرقّمة من 0 إلى 9، ولها مخرج واحد في الغرفة 9. اضبط المنزلق «start» على 0 وحرّك «step» ببطء نحو اليمين. يخرج مسار واحد من الغرفة 0، يلتزم بباب واحد في كل مرة ويغوص بأقصى ما تسمح به المتاهة، بدل الانتشار إلى كل الغرف القريبة دفعة واحدة. فقط حين لا يبقى للغرفة الحالية باب غير مستكشَف، يرجع المسار، أي يتراجع، إلى أقرب غرفة لا يزال فيها باب لم يُجرَّب. +تخيل متاهة فيها 10 غرف أسماؤها من A إلى J، ولها مخرج واحد في الغرفة J. اضبط منزلق «البداية» على 0 (الغرفة A) وحرّك «الخطوة» ببطء نحو اليمين. يخرج مسار واحد من الغرفة A، يلتزم بباب واحد في كل مرة ويغوص بأقصى ما تسمح به المتاهة، بدل الانتشار إلى كل الغرف القريبة دفعة واحدة. فقط حين لا يبقى للغرفة الحالية باب غير مستكشَف، يرجع المسار، أي يتراجع، إلى أقرب غرفة لا يزال فيها باب لم يُجرَّب. -هذا التراجع هو بالضبط ما تفعله حين تعيد خطواتك في متاهة حقيقية بعد أن تصل إلى طريق مسدود، فأنت لا تبدأ من جديد بل ترجع إلى آخر مفترق فيه باب لم تجرّبه. حرّك «start» إلى العقدة 4 بدل 0، وراقب المسار من منتصف المتاهة يلتوي ويرجع عدة مرات قبل أن يصل أخيرًا إلى الغرفة 9، الهدف، لأن DFS يلتزم بأول مسار يجده، وغالبًا ما يكون أطول من أقصر طريق للخروج. +هذا التراجع هو بالضبط ما تفعله حين ترجع على خطواتك في متاهة حقيقية بعد أن تصل إلى طريق مسدود، فأنت لا تبدأ من جديد بل ترجع إلى آخر مفترق فيه باب لم تجرّبه. حرّك «البداية» إلى 3 (الغرفة D) بدل 0، وراقب المسار يصل إلى الغرفة J، وهي الهدف، ثم يرجع إلى H لأن J ليس فيها باب لم يُجرَّب. يحتفظ DFS بأول مسار يجده، وغالبًا ما يكون أطول من أقصر طريق للخروج: من الغرفة E (البداية = 4) يمشي مباشرة إلى J فتُظهر قراءة طول المسار 6، مع أن المرور عبر I مجموعه 5 فقط. ## Formal -يحتفظ DFS بمكدّس، صريح أو ضمني عبر التكرار. يزور عقدة، يعلّمها مزارة، ثم يتكرر إلى أول جار غير مزار. وحين لا يبقى جار غير مزار، يعود (يخرج من المكدّس) إلى العقدة السابقة. +يحتفظ DFS بمكدّس، صريح أو ضمني عبر الاستدعاء الذاتي. يزور عقدة، يعلّمها مزارة، ثم ينتقل إلى أول جار غير مزار. وحين لا يبقى جار غير مزار، يعود (يخرج من المكدّس) إلى العقدة السابقة. -على خلاف BFS، لا يضمن DFS أقصر مسار، فهو يجد مسارًا إلى الهدف وليس بالضرورة الأقصر. لكنه يستخدم ذاكرة إضافية من رتبة O(d) فقط للمسار الحالي (أو مكدّس تكراره)، حيث d أقصى عمق بلغه، مقابل طابور BFS من رتبة O(V) في أسوأ حالة. +على خلاف BFS، لا يضمن DFS أقصر مسار، فهو يجد مسارًا إلى الهدف وليس بالضرورة الأقصر. لكنه يستخدم ذاكرة إضافية من رتبة O(d) فقط للمسار الحالي (أو مكدّس الاستدعاءات)، حيث d أقصى عمق بلغه، مقابل طابور BFS من رتبة O(V) في أسوأ حالة. ## Advanced -يعمل DFS في زمن O(V+E)، وهو نفس حدّ BFS، لكن تكراره يحسب بنية إضافية مجانًا بطبيعته. أوقات الاكتشاف والإنهاء تصنّف كل حافة كحافة شجرة أو خلفية أو أمامية أو عرضية، وهذا بالضبط أساس اكتشاف الدورات والترتيب الطوبولوجي لرسم بياني موجّه لا دوري. +يعمل DFS في زمن O(V+E)، وهو نفس حدّ BFS، لكن استدعاءاته المتتالية تحسب معلومات إضافية دون كلفة. أوقات الاكتشاف والإنهاء تصنّف كل حافة كحافة شجرة أو خلفية أو أمامية أو عرضية، وهذا بالضبط أساس اكتشاف الدورات والترتيب الطوبولوجي لرسم بياني موجّه لا دوري. ## Derivation -1. ابدأ بعقدة البداية وحدها على المكدّس (أو كأول استدعاء تكراري). +1. ابدأ بعقدة البداية وحدها على المكدّس (أو كأول استدعاء ذاتي). 2. التزم دائمًا بالتعمق خطوة واحدة أخرى قبل النظر في أي بديل. 3. عند نفاد أحد الفروع، ارجع إلى أقرب عقدة لا تزال لديها خيارات. ## Real world ### توليد المتاهات وحلّها + تُبنى المتاهة أو تُحل بالطريقة نفسها. خذ دائمًا ممرًا غير مستكشَف وتراجع عند كل مأزق. هذه فكرة DFS بعينها. ### حلّالات الألغاز والألعاب + تستكشف محرّكات الشطرنج وحلّالات السودوكو خط لعب واحدًا حتى نهايته قبل التراجع، وهذا DFS مع تقليم. ### المترجمات -يعتمد كلٌّ من اكتشاف الدورات في رسوم بيانية الاعتماديات (مثل الاستيرادات الدائرية) والترتيب الطوبولوجي لخطوات البناء على DFS. + +يعتمد كلٌّ من اكتشاف الدورات في مخططات الاعتماديات (مثل الاستيرادات الدائرية) والترتيب الطوبولوجي لخطوات البناء على DFS. ### تصفّح نظام الملفات -يدخل تصفّح نظام الملفات تكراريًّا إلى كل مجلد فرعي قبل الانتقال إلى مجلد شقيق، وهذا تطبيق DFS على شجرة الدليل. + +يدخل تصفّح نظام الملفات إلى كل مجلد فرعي حتى آخره قبل الانتقال إلى مجلد شقيق، وهذا تطبيق DFS على شجرة الدليل. diff --git a/content/lessons/computer-science/depth-first-search/en.md b/content/lessons/computer-science/depth-first-search/en.md index 83c39490..e0511931 100644 --- a/content/lessons/computer-science/depth-first-search/en.md +++ b/content/lessons/computer-science/depth-first-search/en.md @@ -5,7 +5,7 @@ summary: >- puzzle by committing to one path and backing up only when it hits a dead end. parameters: - start: start — starting node + start: start — starting node (0 = A … 9 = J) step: step — play position variables: - the last-in-first-out list of nodes to explore next @@ -17,27 +17,27 @@ variables: ## Try it -1. Set the slider "start" to 0 and drag "step" slowly from 0 toward 1 — watch a single path snake from node 0 toward the target, node 9, one neighbour at a time. -2. Drag "step" back to 0, then set "start" to 9 — the path begins right on the target, so there's nowhere left to search. -3. Set "start" to 4 and slide "step" past the halfway point — watch the path backtrack, jumping back to an earlier node, at least once before it reaches node 9. +1. Set the slider "start" to 0 (circle A) and drag "step" slowly from 0 toward 1 — watch a single path snake from A toward the goal, circle J, one neighbour at a time: A, F, G, H, I, J. +2. Drag "step" back to 0, then set "start" to 9 (circle J) — the path begins right on the goal, so J is the very first circle visited. +3. Set "start" to 3 (circle D) and slide "step" past the halfway point — the path goes D, I, J, finds no new neighbour at J, and backtracks: it jumps back to I's other neighbour, H. ## Real-life examples -- **Exploring a corn maze from the gate.** Starting at node 0, the entrance, with the play position run to the end (step = 1) shows the complete path DFS commits to before it reaches node 9, backtracking wherever the maze forces a dead end. -- **Already standing at the exit.** Starting at node 9, the same node as the target, with the play position paused at the very beginning (step = 0) shows the search finishing instantly, because there is nowhere left to go. -- **Starting from the middle of the maze.** Starting at node 4 and running the play position all the way to the end (step = 1) shows how many times the path has to double back before it finally reaches node 9. +- **Exploring a corn maze from the gate.** Starting at 0 (room A), the entrance, with the play position run to the end (step = 1) shows the one path DFS commits to, A F G H I J, reaching the exit without a single dead end on the way. +- **Already standing at the exit.** Starting at 9 (room J), the same room as the goal, with the play position paused at the very beginning (step = 0) shows the search finishing instantly, because there is nowhere left to go. +- **Starting from the middle of the maze.** Starting at 3 (room D) and running the play position all the way to the end (step = 1) shows the path reach J after two moves, then double back to H to finish exploring the other rooms. ## Test yourself -1. Start the search at node 0 and let the animation play out fully, all the way to the target. -2. Move the starting node to node 9, right on top of the target itself — the search that finds it instantly. -3. Start the search at node 4 and push the play position past halfway — catch the path backtracking on its way to node 9. +1. Start the search at 0 (circle A) and drag the play position all the way to the end. +2. Move the starting node to 9 (circle J), right on top of the goal itself — the search that finds it instantly. +3. Start the search at 3 (circle D) and push the play position past halfway — catch the path backtracking from J to H. ## Intuition -Picture a corn maze with 10 numbered rooms, 0 through 9, and a single exit at room 9. Set the slider "start" to 0 and slide "step" slowly to the right: a single path snakes out from room 0, committing to one doorway at a time and diving as deep as the maze allows, instead of spreading out to every nearby room at once. Only when the current room has no unexplored doorway left does the path step back — backtrack — to the most recent room that still has one. +Picture a corn maze with 10 rooms lettered A to J, and a single exit at room J. Set the slider "start" to 0 (room A) and slide "step" slowly to the right: a single path snakes out from room A, committing to one doorway at a time and diving as deep as the maze allows, instead of spreading out to every nearby room at once. Only when the current room has no unexplored doorway left does the path step back — backtrack — to the most recent room that still has one. -That backing-up behaviour is exactly what happens when you retrace your steps in a real maze after hitting a dead end: you don't start over, you just return to the last junction with an unused turn. Move "start" to node 4 instead of 0 and watch the path from the middle of the maze twist and double back several times before finally reaching room 9, the target, because DFS commits to whichever path it finds first, which is often longer than the shortest way out. +That backing-up behaviour is exactly what happens when you retrace your steps in a real maze after hitting a dead end: you don't start over, you just return to the last junction with an unused turn. Move "start" to 3 (room D) instead of 0 and watch the path reach room J, the goal, and then double back to H because J has no unexplored doorway. DFS keeps whichever path it finds first, which is often longer than the shortest way out: from room E (start = 4) it walks straight to J and the path length readout shows 6, although going through I would add up to only 5. ## Formal @@ -58,13 +58,17 @@ DFS runs in O(V+E) time, the same bound as BFS, but its recursion naturally comp ## Real world ### Maze generation and solving + Carving or solving a maze by always taking an unexplored passage and backing up at dead ends is DFS. ### Puzzle and game solvers + Chess engines and Sudoku solvers explore one line of play to its conclusion before backtracking — DFS with pruning. ### Compilers + Detecting cycles in dependency graphs (e.g. circular imports) and topologically ordering build steps both use DFS. ### File system traversal + Recursively walking into every subfolder before moving to a sibling folder is DFS over the directory tree. diff --git a/content/lessons/computer-science/depth-first-search/lesson.yaml b/content/lessons/computer-science/depth-first-search/lesson.yaml index ad977110..74583e63 100644 --- a/content/lessons/computer-science/depth-first-search/lesson.yaml +++ b/content/lessons/computer-science/depth-first-search/lesson.yaml @@ -28,7 +28,7 @@ parameters: min: 0 max: 1 step: 0.001 - value: 1 + value: 0 variables: - stack - visited @@ -44,9 +44,9 @@ presets: step: 1 - start: 9 step: 0 - - start: 4 + - start: 3 step: 1 challenges: - check: abs(start-0)<0.5 and step>=0.99 - check: abs(start-9)<0.5 - - check: abs(start-4)<0.5 and step>0.5 + - check: abs(start-3)<0.5 and step>0.5 diff --git a/content/lessons/computer-science/dijkstra/ar.md b/content/lessons/computer-science/dijkstra/ar.md index c65bc24d..950c125d 100644 --- a/content/lessons/computer-science/dijkstra/ar.md +++ b/content/lessons/computer-science/dijkstra/ar.md @@ -4,7 +4,7 @@ summary: >- حين تختلف كلفة كل وصلة لا يكفي عدّ الخطوات. هذه طريقة الخرائط والموجّهات في اختيار أرخص مسار. parameters: - start: البداية، عقدة الانطلاق + start: البداية، عقدة الانطلاق (0 = A … 9 = J) step: الخطوة، موضع التشغيل variables: - أقصر مسافة معروفة من البداية إلى العقدة v، تتغيّر كلما اكتشفت الخوارزمية طريقًا أقصر @@ -14,27 +14,27 @@ variables: ## Try it -1. اضبط المنزلق «start» على 0 وحرّك «step» ببطء من 0 نحو 1. راقب قراءة المسافة الجارية لكل عقدة تُقفل واحدة تلو الأخرى. تبدأ الخوارزمية دائمًا بأصغر رقم غير مقفل. -2. أعد «step» إلى 0، ثم اضبط «start» على 9. الهدف صار هو نقطة البداية نفسها، فالبحث محلول قبل أن يبدأ. -3. اضبط «start» على 3 وشغّل «step» حتى النهاية. قارن حافة ثقيلة مباشرة بسلسلة أطول من حواف خفيفة على المخطط. يقفل دايكسترا دائمًا المجموع الأصغر. +1. اضبط منزلق «البداية» على 0 (الدائرة A) وحرّك «الخطوة» ببطء من 0 نحو 1. الرقم الصغير بجانب كل دائرة هو أقصر مسافة وُجدت إليها حتى الآن، والدوائر تُقفل (تصير خضراء) واحدة تلو الأخرى، وتبدأ الخوارزمية دائمًا بأصغر رقم غير مقفل. في النهاية تُظهر قراءة طول المسار A→J القيمة 15. +2. أعد «الخطوة» إلى 0، ثم اضبط «البداية» على 9 (الدائرة J). صار الهدف هو نقطة البداية نفسها، فمسافته 0 قبل أن يبدأ البحث. +3. اضبط «البداية» على 4 (الدائرة E) وحرّك «الخطوة» حتى النهاية. الخط المباشر E–J يكلّف 6، لكن السلسلة E–I–J تكلّف 2 + 3 = 5. يقفل دايكسترا المجموع الأصغر، فتُظهر قراءة طول المسار E→J القيمة 5. ## Real-life examples -- **التخطيط لرحلة برّية من المنزل.** ابدأ من العقدة 0، المنزل، وشغّل موضع اللعب حتى النهاية (step = 1). تستقر الخوارزمية على أرخص طريق إلى كل بلدة على الخريطة، حتى تصل إلى العقدة 9. -- **الوصول إلى الوجهة مسبقًا.** ابدأ من العقدة 9، وهي نفسها الهدف، وأبقِ موضع اللعب عند البداية (step = 0). النتيجة رحلة لا تكلّف شيئًا، لأنك هناك بالفعل. -- **البدء من بلدة أصغر في الطريق.** ابدأ من العقدة 3 وشغّل «step» حتى النهاية. تقارن الخوارزمية بين طريق تعرفة مكلف وقصير وطريق أطول وأرخص، ثم تستقر على أرخص وصول إلى العقدة 9. +- **التخطيط لرحلة برّية من المنزل.** ابدأ من 0 (البلدة A)، وهي المنزل، وحرّك «الخطوة» حتى النهاية (1). تستقر الخوارزمية على أرخص طريق إلى كل بلدة على الخريطة، حتى تصل إلى البلدة J بمجموع 15. +- **أنت في وجهتك أصلًا.** ابدأ من 9 (البلدة J)، وهي نفسها الهدف، وأبقِ «الخطوة» عند البداية (0). النتيجة رحلة لا تكلّف شيئًا، لأنك هناك بالفعل. +- **البدء من بلدة أصغر في الطريق.** ابدأ من 4 (البلدة E) وحرّك «الخطوة» حتى النهاية. تقارن الخوارزمية بين طريق مباشر برسوم غالية (6) وطريق أطول وأرخص يمرّ بالبلدة I (5)، ثم تستقر على أرخص وصول إلى البلدة J. ## Test yourself -1. ابدأ البحث من العقدة 0 وشغّل موضع اللعب حتى نهايته بالكامل. -2. اضبط عقدة البداية على 9، فوق الهدف مباشرة. -3. ابدأ من العقدة 3 وحرّك موضع اللعب بعد منتصف الشريط. +1. ابدأ البحث من 0 (الدائرة A) وحرّك موضع التشغيل حتى نهايته. +2. اضبط عقدة البداية على 9 (الدائرة J)، فوق الهدف مباشرة. +3. ابدأ من 4 (الدائرة E) وحرّك موضع التشغيل بعد منتصف الشريط. ## Intuition -تخيل عشر بلدات على خريطة، مرقّمة من 0 إلى 9، تربط بينها طرق تكلّف كميات مختلفة من الوقود. بعض الاختصارات طرق تعرفة غالية، وبعض الطرق الطويلة الملتفّة رخيصة. اضبط المنزلق «start» على 0 وحرّك «step» نحو اليمين. راقب قراءة المسافة الجارية لكل بلدة تُقفل واحدة تلو الأخرى، وتستقر دائمًا على أقرب بلدة غير مقفلة بعد. حين تُقفل البلدة 9، الوجهة، تكون قد وجدت أرخص طريق من المنزل. +تخيل عشر بلدات على خريطة، أسماؤها من A إلى J، تربط بينها طرق تكلّف كميات مختلفة من الوقود. بعض الاختصارات طرق برسوم غالية، وبعض الطرق الطويلة الملتفّة رخيصة. اضبط منزلق «البداية» على 0 (البلدة A) وحرّك «الخطوة» نحو اليمين. راقب الرقم بجانب كل بلدة يُقفل واحدًا تلو الآخر، والخوارزمية تختار دائمًا أقرب بلدة لم تُقفل بعد. حين تُقفل البلدة J، وهي الوجهة، تكون قد وجدت أرخص طريق من المنزل. -هذا القفل هو ما يُسمّى الخطوة الجشعة. بمجرد أن تُحدَّد أرخص تكلفة لبلدة لا تتغيّر أبدًا بعد ذلك، ولا تصح هذه الخطوة إلا لأن لا طريق فيه تكلفة سالبة، فلا يمكن لاختصار خفي أن يظهر لاحقًا بتكلفة أقل. حرّك «start» إلى العقدة 3 بدل 0، وراقب طريقًا مباشرًا غاليًا يخسر أمام سلسلة أطول من طرق رخيصة في الوصول إلى العقدة 9، تمامًا كما يختار مخطط رحلة حقيقي الطريق الملتف بلا رسوم توفيرًا للمال. +هذا القفل هو ما يُسمّى الخطوة الجشعة. بمجرد أن تُحدَّد أرخص تكلفة لبلدة لا تتغيّر أبدًا بعد ذلك، ولا تصح هذه الخطوة إلا لأنه لا يوجد طريق تكلفته سالبة، فلا يمكن لاختصار خفي أن يظهر لاحقًا بتكلفة أقل. حرّك «البداية» إلى 4 (البلدة E) بدل 0، وراقب طريقًا مباشرًا غاليًا، E–J وكلفته 6، يخسر أمام سلسلة أطول من طرق رخيصة، E–I–J وكلفتها 5، في الوصول إلى البلدة J، تمامًا كما يختار مخطط رحلة حقيقي الطريق الملتف بلا رسوم توفيرًا للمال. ## Formal @@ -44,7 +44,7 @@ variables: ## Advanced -دايكسترا حالة خاصة من خوارزمية بلمان-فورد الأعم، التي تتحمل حوافًا سالبة، لكن لا تتحمل دورات سالبة، بتكلفة زمن O(VE) لأنها ترخي كل حافة حتى V−1 مرة بدل الاعتماد على الترتيب الجشع بالأولوية. أما خوارزمية A* فتوسّع دايكسترا بتقدير إرشادي للمسافة المتبقية، فتركز البحث نحو الهدف بدل التوسع بانتظام في كل الاتجاهات. +خوارزمية بلمان-فورد الأعم تتحمل حوافًا سالبة، لكن لا تتحمل دورات سالبة، بتكلفة زمن O(VE) لأنها ترخي كل حافة حتى V−1 مرة بدل الاعتماد على الترتيب الجشع بالأولوية. أما خوارزمية A* فتوسّع دايكسترا بتقدير إرشادي للمسافة المتبقية، فتركز البحث نحو الهدف بدل التوسع بانتظام في كل الاتجاهات. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### ملاحة GPS + تعطي تطبيقات الملاحة توجيهات خطوة بخطوة. تزن كل قطعة طريق بزمن قيادتها، ثم تشغّل خوارزمية دايكسترا أو نسخة قريبة منها لتجد أقصر مسار زمنيًا. ### توجيه الشبكات + تستخدم موجّهات الإنترنت خوارزميات أقصر مسار قريبة من دايكسترا لتختار للحزم المسار الأقل تكلفة. ### تخطيط الرحلات الجوية والخدمات اللوجستية + تبحث أنظمة الحجز عن أرخص تذكرة أو أسرع اتصال عبر شبكة طرق مختلفة التكلفة. هذا في جوهره مسألة أقصر مسار موزون. -### وضع فشله +### متى يفشل + يخطئ دايكسترا في المخططات التي فيها أوزان حواف سالبة، لأنه يقفل مسافة العقدة قبل أن يتحقق من وجود مسار أرخص وأطول عبر حافة سالبة. لهذا تُستخدم بلمان-فورد بدلًا منه كلما كانت الأوزان السالبة ممكنة. diff --git a/content/lessons/computer-science/dijkstra/en.md b/content/lessons/computer-science/dijkstra/en.md index 1b8d8961..61907b60 100644 --- a/content/lessons/computer-science/dijkstra/en.md +++ b/content/lessons/computer-science/dijkstra/en.md @@ -4,7 +4,7 @@ summary: >- This is how GPS apps and network routers pick the cheapest route across a map or network where some connections cost more than others. parameters: - start: start — starting node + start: start — starting node (0 = A … 9 = J) step: step — play position variables: - >- @@ -18,27 +18,27 @@ variables: ## Try it -1. Set the slider "start" to 0 and slide "step" slowly from 0 toward 1 — watch the running-distance readout for each node lock in, one at a time, always the smallest unlocked number first. -2. Reset "step" to 0, then set "start" to 9 — the target is now the start, so the whole search is already solved before it begins. -3. Set "start" to 3 and play "step" to the end — compare a direct, heavy edge to a longer chain of light edges on the graph; Dijkstra always locks in whichever total is smaller. +1. Set the slider "start" to 0 (circle A) and slide "step" slowly from 0 toward 1 — the small number beside each circle is its best distance so far, and the circles lock in (turn green) one at a time, always the smallest unlocked number first. At the end the path length A→J readout shows 15. +2. Reset "step" to 0, then set "start" to 9 (circle J) — the goal is now the start, so its distance is 0 before the search begins. +3. Set "start" to 4 (circle E) and drag "step" to the end — the direct edge E–J costs 6, but the chain E–I–J costs 2 + 3 = 5; Dijkstra locks in the smaller total, and the path length E→J readout shows 5. ## Real-life examples -- **Planning a road trip from home.** Starting at node 0, home, with the play position run to the end (step = 1) shows the algorithm settle the cheapest route to every town on the map, ending at node 9. -- **Already at your destination.** Starting at node 9, the same node as the target, with the play position at the very start (step = 0) shows a trip that costs nothing, because you're already there. -- **Starting from a smaller town along the way.** Starting at node 3 and running "step" to the end shows the algorithm weigh a short, expensive toll road against a longer, cheaper route before it settles on the cheapest way to node 9. +- **Planning a road trip from home.** Starting at 0 (town A), home, with the play position run to the end (step = 1) shows the algorithm settle the cheapest route to every town on the map, ending at town J with a total of 15. +- **Already at your destination.** Starting at 9 (town J), the same town as the goal, with the play position at the very start (step = 0) shows a trip that costs nothing, because you're already there. +- **Starting from a smaller town along the way.** Starting at 4 (town E) and running "step" to the end shows the algorithm weigh a direct, expensive toll road (6) against a longer, cheaper route through I (5) before it settles on the cheapest way to town J. ## Test yourself -1. Start the search at node 0 and run the play position all the way to the end. -2. Set the starting node to 9, right on top of the target. -3. Start at node 3 and move the play position past the halfway point. +1. Start the search at 0 (circle A) and run the play position all the way to the end. +2. Set the starting node to 9 (circle J), right on top of the goal. +3. Start at 4 (circle E) and move the play position past the halfway point. ## Intuition -Picture ten towns on a map, numbered 0 through 9, connected by roads that cost different amounts of fuel — some short cuts are pricey toll roads, some long ways round are cheap. Set the slider "start" to 0 and slide "step" to the right: watch the running-distance readout for each town lock in, one at a time, always settling the closest not-yet-locked town next. Once town 9, the destination, locks in, you have the cheapest route from home. +Picture ten towns on a map, lettered A to J, connected by roads that cost different amounts of fuel — some short cuts are pricey toll roads, some long ways round are cheap. Set the slider "start" to 0 (town A) and slide "step" to the right: watch the number beside each town lock in, one at a time, always settling the closest not-yet-locked town next. Once town J, the destination, locks in, you have the cheapest route from home. -That locking-in step is what is called greedy: once a town's cheapest cost is fixed, it never changes again, and that's only safe because no road has a negative cost, so no hidden shortcut could undercut it later. Move "start" to node 3 instead of 0 and watch a single expensive direct road lose out to a longer chain of cheap roads on the way to node 9, exactly as a real trip planner would choose the toll-free detour to save money overall. +That locking-in step is what is called greedy: once a town's cheapest cost is fixed, it never changes again, and that's only safe because no road has a negative cost, so no hidden shortcut could undercut it later. Move "start" to 4 (town E) instead of 0 and watch a single expensive direct road, E–J at 6, lose out to a longer chain of cheap roads, E–I–J at 5, on the way to town J, exactly as a real trip planner would choose the toll-free detour to save money overall. ## Formal @@ -48,7 +48,7 @@ With a binary-heap priority queue the algorithm runs in $O((V+E)\log V)$ time; i ## Advanced -Dijkstra is a special case of the more general Bellman–Ford algorithm, which tolerates negative edges (but not negative cycles) at the cost of O(VE) time by relaxing every edge up to V−1 times instead of relying on the greedy priority order. A* extends Dijkstra with a heuristic estimate of remaining distance, focusing the search toward the target instead of expanding uniformly outward. +The more general Bellman–Ford algorithm tolerates negative edges (but not negative cycles) at the cost of O(VE) time by relaxing every edge up to V−1 times instead of relying on the greedy priority order. A* extends Dijkstra with a heuristic estimate of remaining distance, focusing the search toward the target instead of expanding uniformly outward. ## Derivation @@ -59,13 +59,17 @@ Dijkstra is a special case of the more general Bellman–Ford algorithm, which t ## Real world ### GPS navigation + Turn-by-turn directions minimising travel time weight each road segment by its drive time and run Dijkstra (or a close variant) to find the route. ### Network routing + Internet routers use shortest-path algorithms related to Dijkstra to pick the lowest-cost path for packets. ### Flight and logistics planning + Cheapest-fare or fastest-connection search across a network of routes with different costs is a weighted shortest-path problem. ### Its failure mode + Dijkstra gives wrong answers on graphs with negative edge weights, since it locks in a node's distance before checking whether a cheaper, longer path exists through a negative edge; Bellman–Ford is used instead when negative weights are possible. diff --git a/content/lessons/computer-science/dijkstra/lesson.yaml b/content/lessons/computer-science/dijkstra/lesson.yaml index 69a44237..02d38fb6 100644 --- a/content/lessons/computer-science/dijkstra/lesson.yaml +++ b/content/lessons/computer-science/dijkstra/lesson.yaml @@ -28,7 +28,7 @@ parameters: min: 0 max: 1 step: 0.001 - value: 1 + value: 0 variables: - d(v) - w(u,v) @@ -44,9 +44,9 @@ presets: step: 1 - start: 9 step: 0 - - start: 3 + - start: 4 step: 1 challenges: - check: abs(start-0)<0.5 and step>=0.99 - check: abs(start-9)<0.5 - - check: abs(start-3)<0.5 and step>0.5 + - check: abs(start-4)<0.5 and step>0.5 diff --git a/content/lessons/computer-science/exponential-vs-polynomial/ar.md b/content/lessons/computer-science/exponential-vs-polynomial/ar.md index 010783ee..c0a2d27d 100644 --- a/content/lessons/computer-science/exponential-vs-polynomial/ar.md +++ b/content/lessons/computer-science/exponential-vs-polynomial/ar.md @@ -20,27 +20,27 @@ charts: ## Try it -1. اضبط المنزلق «x» على 2. راقب المخطط، فمنحنى كثير الحدود أعلى من المنحنى الأسّي، إذ يتفوّق 8 على 4. -2. حرّك «x» إلى 10 وراقب المنحنيين يتقاطعان. يقفز المنحنى الأسّي إلى 1024 بينما لا يزال منحنى كثير الحدود عند 1000. -3. ادفع «x» حتى 12 واقرأ الفجوة. المنحنى الأسّي الآن أعلى بكثير من منحنى كثير الحدود، أكثر من ضعفه. +1. اضبط المنزلق «x» على 2. تُظهر قراءة f(x) القيمة 4 للمنحنى الأسّي، ومنحنى كثير الحدود أعلى منه في المخطط، فـ8 أكبر من 4. +2. حرّك «x» إلى 10 وراقب المنحنيين يتقاطعان. يبلغ المنحنى الأسّي 1024 (قراءة f(x)) بينما لا يزال منحنى كثير الحدود عند 1000. +3. ادفع «x» حتى 12 واقرأ الفجوة. المنحنى الأسّي عند 4096 ومنحنى كثير الحدود عند 1728، أي أقل من نصفه. ## Real-life examples -- **بعد أسبوعين من تحدّي ادخار.** اضبط «x» على 2. لا يزال المخصص المتنامي بالتكعيب متقدمًا على المخصص المتضاعف، فالتضاعف في البداية يبدو غير مثير. -- **بعد عشرة أسابيع.** اضبط «x» على 10. يتجاوز المخصص المتضاعف للتو المخصص المتنامي بالتكعيب، وهذا بالضبط الأسبوع الذي يفوز فيه الأسّي نهائيًا. -- **تحدٍّ كامل من 12 أسبوعًا.** اضبط «x» على 12. يتقدّم المخصص المتضاعف بفارق كبير، بأكثر من ضعف قيمة المخصص المتنامي بالتكعيب. +- **بعد أسبوعين من تحدّي ادخار.** اضبط «x» على 2. لا يزال المصروف الذي ينمو بالتكعيب متقدمًا على المصروف المتضاعف، فالتضاعف في البداية لا يبدو مبهرًا. +- **بعد عشرة أسابيع.** اضبط «x» على 10. يتجاوز المصروف المتضاعف للتو المصروف الذي ينمو بالتكعيب، وهذا بالضبط الأسبوع الذي يفوز فيه الأسّي نهائيًا. +- **تحدٍّ كامل من 12 أسبوعًا.** اضبط «x» على 12. يتقدّم المصروف المتضاعف بفارق كبير، بأكثر من ضعف قيمة المصروف الذي ينمو بالتكعيب. ## Test yourself 1. جد قيمة لـ«x» يكون عندها المنحنى الأسّي أكبر بالفعل من منحنى كثير الحدود. 2. جد القيمة الدقيقة لـ«x» التي يتفوّق عندها المنحنى الأسّي على منحنى كثير الحدود بفارق 2368 بالضبط. -3. جد قيمة لـ«x» في منتصف مدى المنزلق يكون عندها منحنى كثير الحدود لا يزال أكبر من المنحنى الأسّي. +3. جد قيمة «x» في منتصف مدى المنزلق التي يبلغ عندها تقدّم منحنى كثير الحدود أقصاه: 512 مقابل 256، أي بفارق 256. ## Intuition -تخيل مخصصين أسبوعيين يبدآن متساويين. أحدهما يتضاعف كل أسبوع، فبعد أسبوعين يبلغ 4 دولارات، لكن بعد عشرة أسابيع يكبر إلى $2^{10}=1024$ دولارًا. الآخر ينمو بتكعيب عدد الأسابيع، فبعد أسبوعين يبلغ 8 دولارات، متقدمًا على المتضاعف، لكن بعد عشرة أسابيع يصل فقط إلى $10^3=1000$ دولار، أي متأخر بالفعل. حرّك المنزلق «x» نحو 12 وراقب منحنى المخطط الحاد، وهو الأسّي، يتقدّم بحسم على المنحنى المتسلّق بهدوء. +تخيل مصروفين أسبوعيين يبدآن صغيرين. أحدهما يتضاعف كل أسبوع، فبعد أسبوعين يبلغ 4 دولارات، لكن بعد عشرة أسابيع يكبر إلى $2^{10}=1024$ دولارًا. الآخر ينمو بتكعيب عدد الأسابيع، فبعد أسبوعين يبلغ 8 دولارات، متقدمًا على المتضاعف، لكن بعد عشرة أسابيع يصل فقط إلى $10^3=1000$ دولار، أي متأخر بالفعل. حرّك المنزلق «x» نحو 12 وراقب منحنى المخطط الحاد، وهو الأسّي، يتقدّم بحسم على المنحنى المتسلّق بهدوء. -هذا التقاطع قرب x = 10 ليس صدفة خاصة بهذا الزوج من الأرقام. فأي منحنى أسّي يتفوّق في النهاية على أي منحنى كثير حدود، مهما علت قوة كثير الحدود أو اقترب أساس الأسّي من 1. راقب منحنيي المخطط. المنحنى الحاد هو $2^x$، يتضاعف مع كل خطوة من x. أما المنحنى الأهدأ فهو $x^3$، ينمو فقط بقوة ثابتة من x. ولهذا فإن إضافة حرف واحد إضافي إلى كلمة المرور لا يضيف أمانًا قليلًا، بل يضاعف عدد المحاولات التي يحتاجها المهاجم. +هذا التقاطع قرب x = 10 ليس صدفة خاصة بهذا الزوج من الأرقام. فأي منحنى أسّي يتفوّق في النهاية على أي منحنى كثير حدود، مهما علت قوة كثير الحدود أو اقترب أساس الأسّي من 1. راقب منحنيي المخطط. المنحنى الحاد هو $2^x$، يتضاعف مع كل خطوة من x. أما المنحنى الأهدأ فهو $x^3$، ينمو فقط بقوة ثابتة من x. ولهذا فإن إضافة حرف واحد إضافي إلى كلمة المرور لا يضيف أمانًا قليلًا، بل يضرب عدد المحاولات التي يحتاجها المهاجم، في 26 مثلًا عند إضافة حرف إنجليزي صغير واحد. ## Formal @@ -50,24 +50,28 @@ charts: ## Advanced -يكلّف البحث الشامل على فضاء مفاتيح بـn بت O(2^n)، وإضافة بت واحد تضاعف العمل. لهذا تُختار معاملات الأمان بالبتّات تحديدًا، لأن التكلفة تتصاعد أسّيًّا بينما تتصاعد تكلفة استخدام المفتاح، أي تشفير رسالة واحدة، بشكل كثير حدود في n. هذه اللاتماثلية، لا سرّية الخوارزمية، هي ما يعتمد عليه التشفير الحديث. أقوى الخوارزميات الكلاسيكية المعروفة لكسر RSA بتحليله إلى عوامل دون أسّية لكنها تبقى فوق كثيرة الحدود، أما خوارزميات الحوسبة الكمومية، مثل خوارزمية شور، فقد تجعل التحليل إلى عوامل في زمن كثير حدود، وهذا سبب تطوير التشفير ما بعد الكمّي. +يكلّف البحث الشامل على فضاء مفاتيح بـn بت O(2^n)، وإضافة بت واحد تضاعف العمل. لهذا تُختار معاملات الأمان بالبتّات تحديدًا، لأن التكلفة تتصاعد أسّيًّا بينما تتصاعد تكلفة استخدام المفتاح، أي تشفير رسالة واحدة، بشكل كثير حدود في n. هذا الفرق بين الكلفتين، لا سرّية الخوارزمية، هي ما يعتمد عليه التشفير الحديث. أقوى الخوارزميات الكلاسيكية المعروفة لكسر RSA بتحليله إلى عوامل دون أسّية لكنها تبقى فوق كثيرة الحدود، أما خوارزميات الحوسبة الكمومية، مثل خوارزمية شور، فقد تجعل التحليل إلى عوامل في زمن كثير حدود، وهذا سبب تطوير التشفير ما بعد الكمّي. ## Derivation 1. اشتقّ النسبة فيتحول البسط إلى سالب بعد قيمة معيّنة من x، وعندها تبدأ النسبة بالانخفاض. -2. كل اشتقاق يخفّض درجة كثير الحدود بمقدار واحد، بينما يعيد الأسّي إنتاج نفسه حتى ثابت. +2. كل اشتقاق يخفّض درجة كثير الحدود بمقدار واحد، بينما يبقى الأسّي كما هو مضروبًا في ثابت. 3. بعد k تطبيقات يختفي كثير الحدود ولا يبقى إلا أسّي يتقلّص، والنهاية 0. ## Real world ### قوة كلمة المرور -كل حرف أو بت إضافي في كلمة المرور يضاعف عدد المحاولات التي يحتاجها مهاجم القوة الغاشمة، لا يضيف إليها. هذا نمو أسّي لا كثير حدود في الأمان. + +كل حرف أو بت إضافي في كلمة المرور يضرب عدد المحاولات التي يحتاجها مهاجم يجرّب كل الاحتمالات، ولا يضيف إليها فقط. هذا نمو أسّي لا كثير حدود في الأمان. ### أحجام مفاتيح التشفير -لا يعني AES-256 أنه أقوى بضعفين تقريبًا من AES-128، بل هو أصعب بـ2^128 مرة على القوة الغاشمة، لأن الأمان يتصاعد أسّيًّا مع طول المفتاح. + +لا يعني AES-256 أنه أقوى بضعفين تقريبًا من AES-128، بل هو أصعب بـ2^128 مرة على من يجرّب كل المفاتيح، لأن الأمان يتصاعد أسّيًّا مع طول المفتاح. ### البحث الثنائي -يستغرق البحث في مصفوفة مرتّبة من مليار عنصر نحو 30 مقارنة فقط، لا مليارًا، لأن كل مقارنة تنصّف المدى. هذه هي الصورة اللوغاريتمية المرآتية للنمو الأسّي. + +يستغرق البحث في مصفوفة مرتّبة من مليار عنصر نحو 30 مقارنة فقط، لا مليارًا، لأن كل مقارنة تنصّف المدى. اللوغاريتم هو الصورة المعكوسة للنمو الأسّي. ### لماذا بعض الخوارزميات غير عملية -تناسب خوارزمية O(2^n) لمسألة البائع المتجوّل 10 مدن، لكنها تستحيل مع 100 مدينة. لا يسدّ أي قدر من العتاد الأسرع فجوة أسّية. + +تناسب خوارزمية O(2^n) لمسألة البائع المتجوّل 10 مدن، لكنها تستحيل مع 100 مدينة. مهما زادت سرعة الأجهزة فلن تسدّ فجوة أسّية. diff --git a/content/lessons/computer-science/exponential-vs-polynomial/en.md b/content/lessons/computer-science/exponential-vs-polynomial/en.md index fde09d54..c7ba47c7 100644 --- a/content/lessons/computer-science/exponential-vs-polynomial/en.md +++ b/content/lessons/computer-science/exponential-vs-polynomial/en.md @@ -22,9 +22,9 @@ charts: ## Try it -1. Set the slider "x" to 2. On the chart, notice the polynomial curve sitting above the exponential curve — 8 beats 4. -2. Drag "x" up to 10 and watch the two curves cross: the exponential curve rockets to 1024 while the polynomial curve is still only at 1000. -3. Push "x" all the way to 12 and read the gap: the exponential curve is now far above the polynomial one, more than twice as high. +1. Set the slider "x" to 2. The f(x) readout shows 4 for the exponential, and on the chart the polynomial curve sits above it — 8 beats 4. +2. Drag "x" up to 10 and watch the two curves cross: the exponential curve reaches 1024 (the f(x) readout) while the polynomial curve is still only at 1000. +3. Push "x" all the way to 12 and read the gap: the exponential curve is at 4096 and the polynomial one at 1728, less than half as high. ## Real-life examples @@ -36,13 +36,13 @@ charts: 1. Find a value of "x" where the exponential curve is already bigger than the polynomial curve. 2. Find the exact value of "x" where the exponential curve beats the polynomial curve by 2368. -3. Find a value of "x" in the middle of the slider's range where the polynomial curve is still bigger than the exponential curve. +3. Find the value of "x" in the middle of the slider's range where the polynomial curve has its biggest lead: 512 against 256, ahead by 256. ## Intuition -Imagine two weekly allowances that start out equal. One doubles every week: after 2 weeks it is 4 dollars, but after 10 weeks it has grown to $2^{10}=1024$ dollars. The other grows with the cube of the number of weeks: after 2 weeks it is 8 dollars, well ahead of the doubling one, but after 10 weeks it only reaches $10^3=1000$ dollars — already behind. Drag the slider "x" up toward 12 and watch the chart's steep curve, the exponential one, pull decisively ahead of the gently climbing cube. +Imagine two weekly allowances that both start out small. One doubles every week: after 2 weeks it is 4 dollars, but after 10 weeks it has grown to $2^{10}=1024$ dollars. The other grows with the cube of the number of weeks: after 2 weeks it is 8 dollars, well ahead of the doubling one, but after 10 weeks it only reaches $10^3=1000$ dollars — already behind. Drag the slider "x" up toward 12 and watch the chart's steep curve, the exponential one, pull decisively ahead of the gently climbing cube. -That crossover near x = 10 is no accident of this one pair of numbers — any exponential curve eventually beats any polynomial curve, no matter how high the polynomial's power or how close the exponential's base is to 1. Look at the chart's two curves: the steep one is $2^x$, doubling with every step of x. The gentler one is $x^3$, growing only by a fixed power of x. That is why adding a single extra character to a password does not add a little security — it doubles the number of guesses an attacker needs. +That crossover near x = 10 is no accident of this one pair of numbers — any exponential curve eventually beats any polynomial curve, no matter how high the polynomial's power or how close the exponential's base is to 1. Look at the chart's two curves: the steep one is $2^x$, doubling with every step of x. The gentler one is $x^3$, growing only by a fixed power of x. That is why adding a single extra character to a password does not add a little security — it multiplies the number of guesses an attacker needs — by 26 for one more lowercase letter. ## Formal @@ -52,7 +52,7 @@ Binary search on a sorted list of n items halves the remaining range each compar ## Advanced -A brute-force search over an n-bit key space costs O(2^n); adding one bit doubles the work, so security parameters are chosen in bits precisely because the cost scales exponentially while the cost of using the key (encrypting one message) scales polynomially in n — that asymmetry, not secrecy of the algorithm, is what modern cryptography relies on. The hardest known classical algorithms for breaking RSA (factoring) are sub-exponential but still super-polynomial, while quantum algorithms (Shor's) would make factoring polynomial-time — the reason post-quantum cryptography is being developed. +A brute-force search over an n-bit key space costs O(2^n); adding one bit doubles the work, so security parameters are chosen in bits precisely because the cost scales exponentially while the cost of using the key (encrypting one message) scales polynomially in n — that asymmetry, not secrecy of the algorithm, is what modern cryptography relies on. The fastest known classical algorithms for breaking RSA (factoring) are sub-exponential but still super-polynomial, while quantum algorithms (Shor's) would make factoring polynomial-time — the reason post-quantum cryptography is being developed. ## Derivation @@ -63,13 +63,17 @@ A brute-force search over an n-bit key space costs O(2^n); adding one bit double ## Real world ### Password strength + Each extra character (or bit) in a password multiplies, not adds to, the number of guesses a brute-force attacker needs — exponential, not polynomial, growth in security. ### Encryption key sizes + AES-256 is not "roughly twice as strong" as AES-128 — it is 2^128 times harder to brute force, because security scales exponentially with key length. ### Binary search + Searching a sorted array of a billion items takes about 30 comparisons, not a billion, because each comparison halves the range — the logarithmic mirror image of exponential growth. ### Why some algorithms are infeasible + An O(2^n) algorithm for the travelling salesman problem is fine for 10 cities and impossible for 100 — no amount of faster hardware closes an exponential gap. diff --git a/content/lessons/computer-science/exponential-vs-polynomial/lesson.yaml b/content/lessons/computer-science/exponential-vs-polynomial/lesson.yaml index bae70a79..b6f82481 100644 --- a/content/lessons/computer-science/exponential-vs-polynomial/lesson.yaml +++ b/content/lessons/computer-science/exponential-vs-polynomial/lesson.yaml @@ -56,4 +56,5 @@ challenges: - check: 2^x > x^3 - check: 2^x - x^3 target: 2368 - - check: x^3 > 2^x + - check: x^3 - 2^x + target: 256 diff --git a/content/lessons/computer-science/half-adder/ar.md b/content/lessons/computer-science/half-adder/ar.md index 494884d1..acbb3d7c 100644 --- a/content/lessons/computer-science/half-adder/ar.md +++ b/content/lessons/computer-science/half-adder/ar.md @@ -15,26 +15,26 @@ variables: ## Try it 1. اضبط المنزلق «a» على 1 و«b» على 0، ثم تفقّد القراءتين. يضيء المجموع (1 + 0 = 1) بينما يبقى النقل مطفأ. -2. اضبط الآن «a» و«b» كليهما على 1، وراقب قراءة المجموع تتحول إلى 0 بينما يضيء النقل بدلًا منه، وهذا هو النقل الثنائي، تمامًا كنقل رقم عند جمع 7 + 5. +2. اضبط الآن «a» و«b» كليهما على 1، وراقب قراءة المجموع تتحول إلى 0 بينما يضيء النقل بدلًا منه، وتُظهر قراءة A + B أن 1 + 1 = 2 = 10₂. هذا هو النقل الثنائي، تمامًا كنقل رقم عند جمع 7 + 5. 3. اضبط «a» و«b» كليهما على 0، وتأكد أن القراءتين تبقيان مطفأتين، فلا شيء لتجمعه ولا شيء لتنقله. ## Real-life examples -- **جمع 1 و0 في عمود ثنائي واحد.** حين تكون «a» = 1 و«b» = 0، يضيء المجموع كـ1 ويبقى النقل مطفأ، تمامًا كـ1 + 0 = 1 بلا نقل. +- **جمع 1 و0 في عمود ثنائي واحد.** حين تكون «a» = 1 و«b» = 0، يضيء المجموع ويساوي 1 ويبقى النقل مطفأ، تمامًا مثل 1 + 0 = 1 بلا نقل. - **جمع 1 و1، الحالة التي تفيض.** حين تكون «a» = 1 و«b» = 1، تصبح قراءة المجموع 0 ويضيء النقل، تمامًا كنقل 1 حين يصل عمود عشري إلى 10. -- **جمع بتّين صفريين.** حين تكون «a» = 0 و«b» = 0، تبقى القراءتان مطفأتين، إذ لا شيء لتجمعه ولا شيء لتنقله، تمامًا كـ0 + 0 = 0. +- **جمع بتّين صفريين.** حين تكون «a» = 0 و«b» = 0، تبقى القراءتان مطفأتين، إذ لا شيء لتجمعه ولا شيء لتنقله، تمامًا مثل 0 + 0 = 0. ## Test yourself 1. اجعل خرج النقل يضيء، وهناك تركيبة واحدة فقط من «a» و«b» تحقق ذلك. -2. اجعل خرج المجموع يضيء بينما يبقى النقل مطفأ. +2. اجعل خرج المجموع يضيء بينما يبقى النقل مطفأ، وهذه المرة بجعل «a» = 0 و«b» = 1. 3. اجعل كلًّا من المجموع والنقل مطفأين في الوقت نفسه. ## Intuition حين تجمع 7 و5 يدويًا، يعطي عمود الآحاد 12، فتكتب 2 وتنقل 1 إلى عمود العشرات. يفعل نصف الجامع الحيلة نفسها في النقل، لكن برقم ثنائي واحد، أي بت، بدل عمود عشري كامل. اضبط المنزلقين «a» و«b» كليهما على 1 أعلاه وراقب. يهبط خرج المجموع إلى 0 بينما يضيء خرج النقل، لأن $1+1=10$ بالثنائي، أي رقم مجموع 0 مع نقل 1 إلى العمود التالي، تمامًا كالـ1 الذي نقلته من عمود الآحاد أعلاه. -أزواج المدخلات الثلاثة الأخرى، وهي (0,0) و(0,1) و(1,0)، تعطي كلّها نقلًا 0 ومجموعًا يطابق الجمع العادي، بلا أي فيض إلى عمود جديد. XOR هي من تحسب المجموع لأنها تساوي 1 بالضبط عندما يختلف البتّان، وهذا هو الموقف الوحيد الذي يفيض فيه جمعهما رقمًا واحدًا، وهو (1,1). +أزواج المدخلات الثلاثة الأخرى، وهي (0,0) و(0,1) و(1,0)، تعطي كلّها نقلًا 0 ومجموعًا يطابق الجمع العادي، بلا أي فيض إلى عمود جديد. XOR هي التي تحسب المجموع لأنها تساوي 1 بالضبط عندما يختلف البتّان، وAND هي التي تحسب النقل لأن الزوج الوحيد الذي يفيض عن خانة واحدة هو (1,1). ## Formal @@ -48,20 +48,24 @@ variables: ## Derivation -1. جمع بتّين من 1 بالثنائي يفيض الرقم الواحد، تمامًا كما يفيض 9+1 رقمًا عشريًا. -2. الرقم المنخفض من تلك النتيجة يساوي 1 فقط عندما يختلف a وb، وهذه هي XOR. +1. جمع بتّين قيمة كل منهما 1 بالثنائي يفيض عن خانة واحدة، تمامًا كما يفيض 9+1 عن خانة عشرية واحدة. +2. الخانة اليمنى من تلك النتيجة يساوي 1 فقط عندما يختلف a وb، وهذه هي XOR. 3. الفيض إلى العمود التالي يحدث فقط عندما يكون كلا البتّين 1، وهذه هي AND. ## Real world ### وحدات الحساب والمنطق + يبني كل ALU داخل المعالج الجمع والطرح متعدد البتّات من سلاسل جوامع كاملة مشتقّة من نصف الجامع هذا. ### الآلات الحاسبة -حين تضغط 7+5 على أي آلة حاسبة، تتموّج العملية في النهاية عبر جوامع ثنائية عمودًا بعد عمود. + +حين تضغط 7+5 على أي آلة حاسبة، تمرّ العملية في النهاية عبر جوامع ثنائية عمودًا بعد عمود. ### مجاميع التحقق + تستخدم مجاميع التحقق لحزم الشبكة الجمع الثنائي مع النقل لاكتشاف أخطاء الإرسال. ### معالجات الإشارة الرقمية + تضرب مرشّحات الصوت والصورة أعدادًا ثنائية وتراكمها، باستخدام دارات جامعة مبنية على هذا المنطق بالضبط. diff --git a/content/lessons/computer-science/half-adder/en.md b/content/lessons/computer-science/half-adder/en.md index 56fa27cf..16de9db1 100644 --- a/content/lessons/computer-science/half-adder/en.md +++ b/content/lessons/computer-science/half-adder/en.md @@ -16,7 +16,7 @@ variables: ## Try it 1. Set slider "a" to 1 and "b" to 0, then check the readouts: the sum lights up (1 + 0 = 1) but the carry stays off. -2. Now set both "a" and "b" to 1 and watch the sum readout flip to 0 while the carry readout lights up instead — that's the binary carry, just like carrying a digit in 7 + 5. +2. Now set both "a" and "b" to 1 and watch the sum readout flip to 0 while the carry readout lights up instead, and the A + B readout shows 1 + 1 = 2 = 10₂ — that's the binary carry, just like carrying a digit in 7 + 5. 3. Set both "a" and "b" to 0 and confirm both readouts stay off — nothing to add, nothing to carry. ## Real-life examples @@ -28,14 +28,14 @@ variables: ## Test yourself 1. Make the carry output light up — there is only one combination of "a" and "b" that does it. -2. Make the sum output light up while the carry stays dark. +2. Make the sum output light up while the carry stays dark — this time with "a" at 0 and "b" at 1. 3. Make both the sum and the carry stay off at the same time. ## Intuition When you add 7 and 5 by hand, the ones column gives 12: you write down 2 and carry a 1 into the tens column. A half adder does exactly the same carrying trick, but with a single binary digit, a bit, instead of a whole decimal column. Set both sliders "a" and "b" to 1 above and watch: the sum output drops to 0 while the carry output lights up, because $1+1=10$ in binary — a sum digit of 0 with a 1 carried onward, just like the 1 you carried from the ones column above. -The other three input pairs — (0,0), (0,1), (1,0) — all give carry 0 and a sum that matches ordinary addition, with no overflow into a new column. XOR is doing the sum's job because it outputs 1 exactly when the two bits disagree, which is the only situation where adding them overflows a single digit: at (1,1). +The other three input pairs — (0,0), (0,1), (1,0) — all give carry 0 and a sum that matches ordinary addition, with no overflow into a new column. XOR is doing the sum's job because it outputs 1 exactly when the two bits disagree, and AND does the carry's job because the only pair that overflows a single digit is (1,1). ## Formal @@ -56,13 +56,17 @@ Chaining n full adders so each carry feeds the next — a ripple-carry adder — ## Real world ### Arithmetic logic units + Every ALU inside a CPU builds multi-bit addition and subtraction from chains of full adders derived from this half adder. ### Calculators + Pressing 7+5 on any calculator ultimately ripples through binary adders one bit column at a time. ### Checksums + Network packet checksums use binary addition with carries to catch transmission errors. ### Digital signal processors + Audio and image filters multiply and accumulate binary numbers using adder circuits built on exactly this logic. diff --git a/content/lessons/computer-science/half-adder/lesson.yaml b/content/lessons/computer-science/half-adder/lesson.yaml index 84ddd8d8..7ebef89a 100644 --- a/content/lessons/computer-science/half-adder/lesson.yaml +++ b/content/lessons/computer-science/half-adder/lesson.yaml @@ -48,7 +48,7 @@ presets: challenges: - check: a*b target: 1 - - check: abs(a-b) + - check: b-a target: 1 - check: a+b target: 0 diff --git a/content/lessons/computer-science/logic-gates/ar.md b/content/lessons/computer-science/logic-gates/ar.md index 93fb0ed4..1f7a89fe 100644 --- a/content/lessons/computer-science/logic-gates/ar.md +++ b/content/lessons/computer-science/logic-gates/ar.md @@ -15,8 +15,8 @@ variables: ## Try it -1. اضبط المنزلق «a» على 1 والمنزلق «b» على 0. لمبة خرج بوابة AND تبقى مطفأة. -2. ارفع «b» أيضًا إلى 1، فيصبح المفتاحان معًا مشغَّلين. اللمبة تضيء، والصف المطابق في جدول الحقيقة أدناه يتأكّد. +1. اضبط المنزلق «a» على 1 والمنزلق «b» على 0 (أو اضغط مربعَي المدخلين). لمبة خرج بوابة AND تبقى مطفأة، وقراءة AND تساوي 0. +2. ارفع «b» أيضًا إلى 1، فيصبح المفتاحان معًا مشغَّلين. اللمبة تضيء، وقراءة AND تصير 1، ويُظلَّل الصف 1 1 → 1 في جدول الحقيقة بجانب البوابة. 3. أعد «a» إلى 0 وأبقِ «b» عند 1. اللمبة تنطفئ من جديد. AND تضيء فقط حين يكون كل مدخل مشغَّلًا. ## Real-life examples @@ -28,24 +28,24 @@ variables: ## Test yourself 1. شغّل المفتاحين معًا حتى تضيء لمبة خرج بوابة AND أخيرًا. -2. شغّل مفتاحًا واحدًا فقط واترك الآخر مطفأً. لاحظ أن لمبة AND تبقى مطفأة رغم التغيير. +2. أطفئ المفتاح «a» وشغّل المفتاح «b»، فيكون مفتاح واحد فقط مشغَّلًا. لاحظ أن لمبة AND تبقى مطفأة رغم التغيير. 3. أطفئ المفتاحين معًا، وتأكّد أن لمبة الخرج تبقى مطفأة كما كانت من قبل. ## Intuition -تخيّل مفتاحي إضاءة على حائط، أحدهما باسم a والآخر باسم b، وكل واحد إما مطفأ (0) أو مشغَّل (1). هذه أربع حالات ممكنة، وأنت قلّبت مفاتيح كهذه مئات المرّات من قبل. توصل هذه الشاشة المفتاحين ببوابة AND، فاسحب المنزلق «a» إلى 1 والمنزلق «b» إلى 1 معًا. لمبة الخرج فوق البوابة تضيء، ويمتلئ الصف المطابق في جدول الحقيقة أدناه. جرّب أي تركيبة أخرى، مفتاح واحد مشغَّل أو كلاهما مطفأ، فتبقى اللمبة مطفأة لأن AND تضيء فقط حين يكون كل مدخل مشغَّلًا. +تخيّل مفتاحي إضاءة على حائط، أحدهما باسم a والآخر باسم b، وكل واحد إما مطفأ (0) أو مشغَّل (1). هذه أربع حالات ممكنة، وأنت قلّبت مفاتيح كهذه مئات المرّات من قبل. توصل هذه الشاشة المفتاحين ببوابة AND، فاسحب المنزلق «a» إلى 1 والمنزلق «b» إلى 1 معًا. لمبة الخرج على يمين البوابة تضيء، ويُظلَّل الصف المطابق في جدول الحقيقة بجانبها. جرّب أي تركيبة أخرى، مفتاح واحد مشغَّل أو كلاهما مطفأ، فتبقى اللمبة مطفأة لأن AND تضيء فقط حين يكون كل مدخل مشغَّلًا. -تخيّل المفتاحين نفسيهما موصولين ببوابة OR بدلًا من ذلك، فتضيء اللمبة إن كان أحد المفتاحين مشغَّلًا لا فقط حين يكون كلاهما كذلك. أما بوابة XOR فتضيء فقط حين يختلف المفتاحان، أحدهما مشغَّل والآخر مطفأ، وتنطفئ مجددًا حين يتفقان. NAND وNOR هما AND وOR مع عكس الخرج رأسًا على عقب. هذا العكس وحده يكفي لبناء كل بوابة أخرى، ولهذا تُبنى رقاقات الحواسيب الحقيقية بالكامل تقريبًا من بوابات NAND متكرّرة. +تخيّل المفتاحين نفسيهما موصولين ببوابة OR بدلًا من ذلك، فتضيء اللمبة إن كان أحد المفتاحين مشغَّلًا لا فقط حين يكون كلاهما كذلك. أما بوابة XOR فتضيء فقط حين يختلف المفتاحان، أحدهما مشغَّل والآخر مطفأ، وتنطفئ مجددًا حين يتفقان. NAND وNOR هما AND وOR مع قلب الخرج. هذا القلب وحده يكفي لبناء كل بوابة أخرى، ولهذا تُبنى رقاقات الحواسيب الحقيقية بالكامل تقريبًا من بوابات NAND متكرّرة. ## Formal -للجبر البوليني عمليتان ومتمم واحد، هي $a \wedge b$ أي AND، و$a \vee b$ أي OR، و$\neg a$ أي NOT، وتحقق قانونا دي مورغان $\neg(a \wedge b) = \neg a \vee \neg b$ و$\neg(a \vee b) = \neg a \wedge \neg b$. +للجبر البوليني عمليتان ومتمم واحد، هي $a \wedge b$ أي AND، و$a \vee b$ أي OR، و$\neg a$ أي NOT، وتحقق قانونَي دي مورغان $\neg(a \wedge b) = \neg a \vee \neg b$ و$\neg(a \vee b) = \neg a \wedge \neg b$. تُعرَّف XOR بأنها $a \oplus b = (a \wedge \neg b) \vee (\neg a \wedge b)$، وتكون صحيحة تمامًا عندما يختلف $a$ و$b$. وNAND $=\neg(a\wedge b)$ وNOR $=\neg(a\vee b)$ كل منهما تام وظيفيًا بمفرده. ## Advanced -يمكن كتابة أي دالة بوليانية بمدخلات عددها n بصيغة سوية فصلية عادية، أي OR لِـANDات، بحد واحد لكل صف يكون فيه الخرج 1. وهذا بالضبط كيف يتحول جدول الحقيقة الذي تملؤه مباشرة إلى دارة. ويعني الاكتمال الوظيفي لبوابة واحدة، NAND أو NOR، أن وحدة معالجة كاملة يمكن من حيث المبدأ بناؤها من مكوّن واحد مكرر. +يمكن كتابة أي دالة بولينية لها n مدخلًا بالصيغة الفصلية العادية، أي عدة بوابات AND تجمعها بوابة OR، بحدّ واحد لكل صف يكون فيه الخرج 1. وهذا بالضبط كيف يتحول جدول الحقيقة الذي تملؤه مباشرة إلى دارة. ويعني الاكتمال الوظيفي لبوابة واحدة، NAND أو NOR، أن وحدة معالجة كاملة يمكن من حيث المبدأ بناؤها من مكوّن واحد مكرر. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### وحدات المعالجة المركزية -يحزم المعالج الحديث مليارات الترانزستورات الموصولة في بوابات منطقية تجمع وتقارن وتتفرع. + +يضم المعالج الحديث مليارات الترانزستورات الموصولة في بوابات منطقية تجمع وتقارن وتتفرع. ### البحث والتصفية -استعلام قاعدة بيانات مثل «السعر < 50 وفي المخزون» هو حرفيًا AND بوليانية لشرطين. + +استعلام قاعدة بيانات مثل «السعر < 50 وفي المخزون» هو حرفيًا AND بولينية بين شرطين. ### الأقفال الرقمية + قفل لوحة المفاتيح دارة تُخرج 1، أي فتح، فقط لتركيبة واحدة محددة من المدخلات. ### البرمجة + كل `if (a && b)` أو `if (a || !b)` في الشيفرة يُترجَم في النهاية إلى هذه البوابات بالضبط. diff --git a/content/lessons/computer-science/logic-gates/en.md b/content/lessons/computer-science/logic-gates/en.md index 1a75880a..6d62501f 100644 --- a/content/lessons/computer-science/logic-gates/en.md +++ b/content/lessons/computer-science/logic-gates/en.md @@ -16,8 +16,8 @@ variables: ## Try it -1. Set slider «a» to 1 and slider «b» to 0, and watch the AND gate's output light stay off. -2. Raise «b» to 1 as well, so both switches are on, and watch the light turn on and the matching row in the truth table below get ticked. +1. Set slider «a» to 1 and slider «b» to 0 (or tap the input squares). The AND gate's output light stays off and the AND readout shows 0. +2. Raise «b» to 1 as well, so both switches are on. The light turns on, the AND readout shows 1, and the row 1 1 → 1 is highlighted in the truth table beside the gate. 3. Drop «a» back to 0 while «b» stays at 1, and see the light switch off again — AND only lights up when every input is on. ## Real-life examples @@ -29,12 +29,12 @@ variables: ## Test yourself 1. Flip both switches on so the AND gate's output light finally turns on. -2. Flip exactly one switch on and leave the other off, and notice the AND gate's light stays dark even though something changed. +2. Turn switch «a» off and switch «b» on, so exactly one switch is on, and notice the AND gate's light stays dark even though something changed. 3. Flip both switches off and confirm the output light stays dark, just as it did before. ## Intuition -Think of two light switches on a wall, one labelled a and one labelled b, each either off (0) or on (1) — four combinations in total, and you have flipped switches like these a hundred times before. This screen wires those two switches into an AND gate: drag slider «a» to 1 and slider «b» to 1 together, and the output light above the gate turns on, while the truth table below fills in the matching row. Try any other combination — one switch on, or both off — and the light stays dark, because AND only turns on when every input does. +Think of two light switches on a wall, one labelled a and one labelled b, each either off (0) or on (1) — four combinations in total, and you have flipped switches like these a hundred times before. This screen wires those two switches into an AND gate: drag slider «a» to 1 and slider «b» to 1 together, and the output light to the right of the gate turns on, while the truth table beside it highlights the matching row. Try any other combination — one switch on, or both off — and the light stays dark, because AND only turns on when every input does. Imagine the same two switches wired into an OR gate instead: now the light turns on if either switch is on, not only when both are. An XOR gate lights up only when the two switches disagree, one on and one off, and goes dark again the moment both agree. NAND and NOR are just AND and OR with the output flipped upside down, and that flip turns out to be enough on its own to build every other gate — which is why real computer chips are built almost entirely out of repeated NAND gates. @@ -57,13 +57,17 @@ Any Boolean function of n inputs can be written in disjunctive normal form — a ## Real world ### CPUs + A modern processor packs billions of transistors wired into logic gates that add, compare and branch. ### Search and filtering + A database query like "price < 50 AND in-stock" is literally a Boolean AND of two conditions. ### Digital locks + A keypad lock is a circuit that outputs 1 (unlock) only for one specific combination of inputs. ### Programming + Every `if (a && b)` or `if (a || !b)` in code compiles down to exactly these gates. diff --git a/content/lessons/computer-science/logic-gates/lesson.yaml b/content/lessons/computer-science/logic-gates/lesson.yaml index 8ce9c34d..ea1ae042 100644 --- a/content/lessons/computer-science/logic-gates/lesson.yaml +++ b/content/lessons/computer-science/logic-gates/lesson.yaml @@ -47,7 +47,7 @@ presets: challenges: - check: a*b target: 1 - - check: a+b + - check: b-a target: 1 - check: a+b target: 0 diff --git a/content/lessons/computer-science/merge-sort/ar.md b/content/lessons/computer-science/merge-sort/ar.md index 502e2ce9..c4b8688d 100644 --- a/content/lessons/computer-science/merge-sort/ar.md +++ b/content/lessons/computer-science/merge-sort/ar.md @@ -14,14 +14,14 @@ variables: ## Try it -1. اضبط n على 8 أعمدة وstep على 0، ثم اضغط تشغيل ببطء. الأعمدة تنقسم إلى مجموعتين من 4، ثم أربع مجموعات من 2، قبل أي مقارنة. -2. راقب ما يحدث بعد منتصف step. مجموعتان صغيرتان مرتّبتان تندمجان في مجموعة أكبر مرتّبة، وتُؤخَذ دائمًا مقدّمة العمود الأصغر أولًا. -3. اسحب n إلى 40 عمودًا واضغط تشغيل من جديد. عدد مستويات التقسيم يزداد بالكاد رغم أن عدد الأعمدة صار خمسة أضعافه. +1. اضبط n على 8 أعمدة ودع الترتيب يعمل (أو حرّك «الخطوة» ببطء). الصورة لا ترسم التقسيم، بل تبدأ من أصغر المجموعات. يُرتَّب العمودان 1 و2، ثم العمودان 3 و4، ثم يندمج الزوجان في مجموعة مرتّبة من 4. +2. تابع حتى تقترب «الخطوة» من نهايتها. تندمج المجموعتان المرتّبتان من 4 في مجموعة مرتّبة من 8، ويؤخذ دائمًا العمود الأصغر من مقدّمتَي المجموعتين. ينتهي الترتيب بعد 16 مقارنة. +3. اسحب n إلى 40 عمودًا ودع الترتيب يعمل. عدد مستويات التقسيم يزيد من 3 إلى 6 فقط رغم أن عدد الأعمدة صار خمسة أضعافه، وينتهي بعد 170 مقارنة بينما يحتاج الترتيب الفقاعي 780. ## Real-life examples - **ترتيب 8 أوراق لعب حسب الرتبة.** بـn = 8، يقسم ترتيب الدمج الحزمة إلى مجموعتين من 4، ثم أربعة أزواج، قبل الدمج مجددًا. 3 مستويات فقط لحزمة بهذا الصغر. -- **اصطفاف 32 زميلًا حسب الطول.** بـn = 32، يتضاعف العدد أربع مرات، ويكفي 5 مستويات تقسيم فقط، لا أربعة أضعافه. +- **اصطفاف 32 زميلًا حسب الطول.** بـn = 32، صار العدد أربعة أضعاف، ومع ذلك تكفي 5 مستويات تقسيم، لا أربعة أضعاف المستويات. - **ترتيب رفّ من 40 كتابًا أبجديًا.** بـn = 40، يكتمل الدمج في نحو 5 أو 6 مستويات فقط، ولهذا يبقى ترتيب الدمج سريعًا حتى على رفّ طويل. ## Test yourself @@ -32,36 +32,40 @@ variables: ## Intuition -تخيّل كومة فوضوية من 8 أوراق لعب تريد ترتيبها. قسّمها إلى كومتين من 4، ثم قسّم كل كومة إلى زوجين. كل كومة تصبح ورقة واحدة، وهي بداهة «مرتّبة» وحدها. اضغط تشغيل هنا وراقب الأعمدة تفعل الشيء نفسه بالضبط، إذ تنقسم إلى نصفين، ثم أرباع، ثم أعمدة مفردة، قبل أي مقارنة واحدة. مرحلة التقسيم هذه تحدّد المجموعات فقط، ولا ترتّب شيئًا. +تخيّل كومة فوضوية من 8 أوراق لعب تريد ترتيبها. قسّمها إلى كومتين من 4، ثم قسّم كل كومة إلى زوجين، وهكذا حتى تصبح كل كومة ورقة واحدة، والورقة الواحدة «مرتّبة» وحدها. الصورة هنا لا ترسم التقسيم وتبدأ من الأعمدة المفردة، لأن مرحلة التقسيم تحدّد المجموعات فقط ولا ترتّب شيئًا. اضغط تشغيل وراقب الأعمدة المتجاورة تصير أزواجًا مرتّبة، ثم تصير الأزواج رباعيات، ثم الرباعيات ثمانيات. -العمل الحقيقي يحدث في الطريق إلى الأعلى. كل خطوة دمج تسير على كومتين مرتّبتين مسبقًا جنبًا إلى جنب، وتأخذ دائمًا الورقة الأصغر في مقدّمتيهما، فتخرج الكومة المدموجة مرتّبة دون أي خلط لاحق. كل مستوى دمج يلمس كل عمود مرة واحدة بالضبط، ومضاعفة عدد الأعمدة تضيف مستوى واحدًا فقط. لهذا لا يمرّ ترتيب الدمج بيوم بطيء أبدًا، مهما كان ترتيب الأعمدة عشوائيًا في البداية. +الترتيب الحقيقي يحدث في طريق العودة. كل خطوة دمج تضع كومتين مرتّبتين جنبًا إلى جنب، وتأخذ دائمًا الورقة الأصغر من مقدّمتيهما، فتخرج الكومة المدموجة مرتّبة دون أي خلط لاحق. كل مستوى دمج يلمس كل عمود مرة واحدة بالضبط، ومضاعفة عدد الأعمدة تضيف مستوى واحدًا فقط. لهذا لا يبطؤ ترتيب الدمج أبدًا، مهما كان ترتيب الأعمدة عشوائيًا في البداية. ## Formal -يقسم ترتيب الدمج الصفيف تكراريًا إلى نصفين، يرتّب كل نصف، ثم يدمج النصفين المرتّبين في O(n) مقارنة. يُحَل التكرار $T(n) = 2T(n/2) + O(n)$ إلى $T(n) = O(n\log n)$ في كل الحالات، الأفضل والمتوسطة والأسوأ. +يقسم ترتيب الدمج المصفوفة إلى نصفين مرة بعد مرة، يرتّب كل نصف، ثم يدمج النصفين المرتّبين في O(n) مقارنة. تُحَل العلاقة $T(n) = 2T(n/2) + O(n)$ إلى $T(n) = O(n\log n)$ في كل الحالات، الأفضل والمتوسطة والأسوأ. يُعَدّ ترتيب الدمج ترتيبًا مستقرًّا، إذ تحافظ العناصر المتساوية على ترتيبها النسبي عبر الدمج، لكنه يحتاج مساحة مساعدة O(n) للخرج المدموج، على خلاف تقسيم الترتيب السريع الذي يعمل في المكان نفسه. ## Advanced -يمثّل التكرار $T(n) = 2T(n/2) + O(n)$ الحالة المدرسية لمبرهنة السيد بـ$a=2, b=2, f(n)=O(n)$. وبما أن $f(n) = \Theta(n^{\log_b a}) = \Theta(n)$ فإن الحل هو $T(n) = \Theta(n\log n)$. وأسوأ حالة مضمونة لترتيب الدمج، على خلاف الترتيب السريع، مع استقراره يجعلانه الخيار القياسي للترتيب الخارجي لبيانات أكبر من الذاكرة ولترتيب القوائم المتّصلة. +تمثّل العلاقة $T(n) = 2T(n/2) + O(n)$ المثال المعتاد للمبرهنة الرئيسية (Master theorem) بـ$a=2, b=2, f(n)=O(n)$. وبما أن $f(n) = \Theta(n^{\log_b a}) = \Theta(n)$ فإن الحل هو $T(n) = \Theta(n\log n)$. وأسوأ حالة مضمونة لترتيب الدمج، على خلاف الترتيب السريع، مع استقراره يجعلانه الخيار القياسي للترتيب الخارجي لبيانات أكبر من الذاكرة ولترتيب القوائم المتّصلة. ## Derivation -1. رتّب النصفين بالتكرار، ثم ادمجهما في زمن خطي. +1. رتّب النصفين بالطريقة نفسها، ثم ادمجهما في زمن خطي. 2. ينصّف n مرارًا حتى يصل إلى 1 بعد log₂n خطوة. 3. يدمج كل مستوى عناصر n كلها مرة واحدة، فاضرب في عدد المستويات. ## Real world ### الترتيب الخارجي + يدمج ترتيب ملف أكبر من الذاكرة، كسجل ضخم أو جدول قاعدة بيانات، قِطعًا مرتّبة من القرص. هذا هو الاستخدام الكلاسيكي لترتيب الدمج. ### الترتيب المستقرّ في جداول الواجهة + يحتاج ترتيب جدول بيانات بعمود واحد، مع الحفاظ على الترتيب السابق للمتساويات، ترتيبًا مستقرًّا كترتيب الدمج. ### ترتيب القوائم المتّصلة + لأنه لا يحتاج وصولًا عشوائيًّا أبدًا، ترتيب الدمج هو الطريقة الطبيعية لترتيب قائمة متّصلة في زمن n log n. ### الترتيب المتوازي والموزّع + يقسّم الترتيب واسع النطاق (مثل MapReduce) المدخل قطعًا، ويرتّب كل قطعة باستقلالية قبل الدمج. هذه هي فكرة التوازي بعينها. diff --git a/content/lessons/computer-science/merge-sort/en.md b/content/lessons/computer-science/merge-sort/en.md index 60a63e53..9cf2d0a9 100644 --- a/content/lessons/computer-science/merge-sort/en.md +++ b/content/lessons/computer-science/merge-sort/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Set n to 8 bars and step to 0, then press play slowly — watch the bars split into two groups of 4, then four groups of 2, before any comparing happens. -2. Keep watching as step climbs past halfway — two small sorted groups merge into one bigger sorted group, always taking whichever front bar is smaller. -3. Drag n up to 40 bars and press play again — the number of splitting levels barely grows, even with five times as many bars as before. +1. Set n to 8 bars and let it play (or drag «step» slowly). The picture does not draw the splitting; it starts from the smallest groups: bars 1 and 2 are put in order, then bars 3 and 4, then those two pairs merge into one sorted group of 4. +2. Keep watching until step is near the end — the two sorted groups of 4 merge into one sorted group of 8, always taking whichever front bar is smaller. It ends with 16 comparisons. +3. Drag n up to 40 bars and let it run — the number of splitting levels only grows from 3 to 6, even with five times as many bars as before, and it finishes after 170 comparisons where bubble sort needs 780. ## Real-life examples @@ -33,7 +33,7 @@ variables: ## Intuition -Picture a messy stack of 8 playing cards you want in order: split it into two piles of 4, then split each of those into pairs, until every pile is a single card that is trivially "in order" all by itself. Press play here and watch the bars do exactly that — splitting into halves, then quarters, then single bars — before a single comparison happens; the splitting phase only decides the groups, it does no sorting at all. +Picture a messy stack of 8 playing cards you want in order: split it into two piles of 4, then split each of those into pairs, until every pile is a single card that is trivially "in order" all by itself. The picture here skips drawing the splits and starts from single bars, because the splitting phase only decides the groups, it does no sorting at all: press play and watch neighbouring bars become sorted pairs, pairs become fours, and fours become eights. The real sorting happens on the way back up: each merge step slides two already-sorted piles side by side and always takes whichever front card is smaller, so the combined pile comes out sorted with no shuffling needed later. Every level of merging touches every single bar exactly once, and doubling the number of bars only adds one more level — which is why merge sort never has a slow day, no matter how scrambled the bars started. @@ -56,13 +56,17 @@ The recurrence $T(n) = 2T(n/2) + O(n)$ is the textbook case of the Master theore ## Real world ### External sorting + Sorting a file too large for memory (a huge log or database table) merges sorted chunks from disk — the classic use of merge sort. ### Stable sorts in UI tables + Sorting a spreadsheet by one column while preserving the previous order of ties needs a stable sort like merge sort. ### Linked-list sorting + Because it never needs random access, merge sort is the natural way to sort a linked list in n log n time. ### Parallel and distributed sorting + Splitting the input and sorting pieces independently before merging is exactly how large-scale sort (e.g. MapReduce) is parallelised. diff --git a/content/lessons/computer-science/quicksort/ar.md b/content/lessons/computer-science/quicksort/ar.md index 1c1f010a..89180e8d 100644 --- a/content/lessons/computer-science/quicksort/ar.md +++ b/content/lessons/computer-science/quicksort/ar.md @@ -2,7 +2,7 @@ title: 'الترتيب السريع' summary: >- اختر عنصرًا محورًا، ضع الأصغر في جهة والأكبر في الأخرى، وكرر داخل كل جهة. من أسرع - طرق الترتيب، إلا إذا شقي حظ المحور. + طرق الترتيب، إلا إذا كان المحور سيّئ الحظ. parameters: 'n': n، عدد العناصر step: الخطوة، موضع التشغيل @@ -14,9 +14,9 @@ variables: ## Try it -1. اضبط n على 8 أعمدة، اضغط تشغيل ببطء، وراقب عمودًا واحدًا يُعلَّم كمحور بينما يُدفَع كل عمود آخر إلى يساره أو يمينه. -2. راقب المحور بعد انتهاء الخلط. لا يتحرّك بعدها أبدًا، لأنه استقرّ فعلًا في مكانه النهائي. -3. اسحب n إلى 40 عمودًا واضغط تشغيل. محور جديد يُختار داخل كل مجموعة أصغر، مرارًا، حتى تصبح كل مجموعة عمودًا واحدًا. +1. اضبط n على 8 أعمدة ودع الترتيب يعمل (أو حرّك «الخطوة» ببطء). العمود الأخير على اليمين، وقيمته 78، هو المحور. يُقارَن به كل عمود آخر ثم يُدفَع إلى يساره أو يمينه. +2. راقب المحور حين تنتهي هذه الجولة الأولى. يقفز إلى المكان السادس ويصير أخضر، ولا يتحرّك بعدها أبدًا، لأنه استقرّ في مكانه النهائي. +3. اسحب n إلى 40 عمودًا ودع الترتيب يعمل. يُختار محور جديد داخل كل مجموعة أصغر، مرة بعد مرة، حتى تصبح كل مجموعة عمودًا واحدًا. ينتهي بعد 227 مقارنة، بينما يحتاج الترتيب الفقاعي 780. ## Real-life examples @@ -32,33 +32,36 @@ variables: ## Intuition -تخيّل 8 أطفال مصطفّين بترتيب عشوائي حسب الطول، وتريد ترتيبهم من الأقصر إلى الأطول بسرعة. اختر طفلًا واحدًا محورًا، وأرسل كل من هو أقصر منه إلى يساره وكل من هو أطول إلى يمينه. اضغط تشغيل هنا وراقب الأمر نفسه يحدث على الشاشة، إذ يُعلَّم عمود واحد كمحور، ويُقارَن به كل عمود آخر، وينتهي الخلط بالمحور مستقرًّا في مكانه النهائي بالضبط. هذا هو الضمان الوحيد الذي تقدّمه كل جولة. +تخيّل 8 أطفال مصطفّين بترتيب عشوائي حسب الطول، وتريد ترتيبهم من الأقصر إلى الأطول بسرعة. اختر طفلًا واحدًا محورًا، وأرسل كل من هو أقصر منه إلى يساره وكل من هو أطول إلى يمينه. اضغط تشغيل هنا وراقب الأمر نفسه يحدث على الشاشة، إذ يصير عمود واحد هو المحور، ويُقارَن به كل عمود آخر، وتنتهي الجولة بالمحور مستقرًّا في مكانه النهائي بالضبط. هذا هو الضمان الوحيد الذي تقدّمه كل جولة. الحيلة نفسها تتكرّر بعدها داخل كل مجموعة أصغر وحدها. محور جديد للمجموعة اليسرى، ومحور جديد للمجموعة اليمنى، أصغر فأصغر، حتى تصبح كل مجموعة عمودًا واحدًا. راقب كيف يقسم محور محظوظ الأعمدة إلى نصفين متساويين تقريبًا، بينما يترك محور سيّئ الحظ، كأن يكون دائمًا العمود الأقصر، مجموعة ضخمة وأخرى فارغة. هذا هو الفرق بين الحالة السريعة المعتادة والحالة البطيئة سيّئة الحظ. ## Formal -يقسم الترتيب السريع حول محور $p$. كل العناصر $< p$ تذهب يسارًا، وكل العناصر $> p$ تذهب يمينًا، ثم تُرتَّب كل جهة بالتكرار. في المتوسط يقسم المحور الصفيف إلى نصفين تقريبًا، فيعطي التكرار $T(n) = 2T(n/2) + O(n)$ و$T(n) = O(n\log n)$. +يقسم الترتيب السريع حول محور $p$. كل العناصر $< p$ تذهب يسارًا، وكل العناصر $> p$ تذهب يمينًا، ثم تُرتَّب كل جهة بالطريقة نفسها. في المتوسط يقسم المحور المصفوفة إلى نصفين تقريبًا، فيعطي العلاقة $T(n) = 2T(n/2) + O(n)$ و$T(n) = O(n\log n)$. -إذا كان المحور دائمًا العنصر الأصغر أو الأكبر (مثلًا محور سيّئ الاختيار على بيانات مرتّبة مسبقًا)، يصبح التكرار T(n) = T(n−1) + O(n)، ما يعطي أسوأ حالة O(n²). واختيار محور عشوائي أو بمتوسط ثلاثة يجعل هذا نادرًا عمليًّا. +إذا كان المحور دائمًا العنصر الأصغر أو الأكبر (مثلًا محور سيّئ الاختيار على بيانات مرتّبة مسبقًا)، تصبح العلاقة T(n) = T(n−1) + O(n)، ما يعطي أسوأ حالة O(n²). واختيار محور عشوائي أو وسيط ثلاثة عناصر يجعل هذا نادرًا عمليًّا. ## Advanced -يرتّب الترتيب السريع في المكان بمساحة مكدّس إضافية O(log n) في المتوسط (من التكرار)، على خلاف مصفوف ترتيب الدمج المساعد O(n). ولهذا غالبًا ما تعتمد تطبيقات الترتيب في المكتبات القياسية على متغيّر من الترتيب السريع (introsort يتحوّل إلى ترتيب الكومة إذا تعمّق التكرار كثيرًا، ليضمن أسوأ حالة O(n log n)). +يرتّب الترتيب السريع في المكان بمساحة مكدّس إضافية O(log n) في المتوسط (من التكرار)، على خلاف المصفوفة المساعدة O(n) في ترتيب الدمج. ولهذا غالبًا ما تعتمد دوال الترتيب في المكتبات القياسية على نسخة معدّلة من الترتيب السريع (introsort يتحوّل إلى ترتيب الكومة إذا تعمّق التكرار كثيرًا، ليضمن أسوأ حالة O(n log n)). ## Derivation 1. يكلّف التقسيم حول المحور O(n) مقارنة، ثم تُرتَّب الجهتان بحجم k وn−1−k بالتكرار. -2. محور عشوائي نموذجي يقسم الصفيف بالتساوي تقريبًا. +2. المحور العشوائي يقسم المصفوفة غالبًا إلى نصفين متقاربين. 3. كل مستوى من مستويات التكرار الـlog₂n ينفّذ O(n) من العمل الإجمالي عبر استدعاءاته، وهو النمط نفسه في ترتيب الدمج. ## Real world ### ترتيب المكتبات القياسية -الترتيب الافتراضي للمصفوفات في لغات كثيرة هو متغيّر من الترتيب السريع، لسرعته الممتازة في المتوسط واستخدامه الذاكرة في المكان. + +الترتيب الافتراضي للمصفوفات في لغات كثيرة هو نسخة معدّلة من الترتيب السريع، لسرعته الممتازة في المتوسط ولأنه لا يحتاج ذاكرة إضافية تُذكر. ### محرّكات استعلام قواعد البيانات + غالبًا ما يستخدم ترتيب مجموعات النتائج، قبل دمج الربط أو GROUP BY، خوارزمية من عائلة الترتيب السريع. ### خوارزميات الاختيار + تجد الفكرة نفسها في التقسيم، دون التكرار على كلا الجانبين، العنصر الأصغر رقم k في زمن متوقّع O(n) (quickselect). diff --git a/content/lessons/computer-science/quicksort/en.md b/content/lessons/computer-science/quicksort/en.md index c6199b58..40b99db4 100644 --- a/content/lessons/computer-science/quicksort/en.md +++ b/content/lessons/computer-science/quicksort/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Set n to 8 bars, press play slowly, and watch one bar get marked as the pivot while every other bar is pushed to its left or right. -2. Watch the pivot once the shuffle settles — it never moves again, because it is already sitting in its final sorted spot. -3. Drag n up to 40 bars and press play — a new pivot gets picked inside each smaller group, again and again, until every group is a single bar. +1. Set n to 8 bars and let it play (or drag «step» slowly). The last bar on the right, 78, is the pivot: every other bar is compared with it and pushed to its left or right. +2. Watch the pivot when that first round ends: it jumps into sixth place and turns green. It never moves again, because it is already sitting in its final sorted spot. +3. Drag n up to 40 bars and let it run — a new pivot gets picked inside each smaller group, again and again, until every group is a single bar. It finishes after 227 comparisons, where bubble sort would need 780. ## Real-life examples @@ -33,7 +33,7 @@ variables: ## Intuition -Picture 8 kids lined up in random height order, and you want them sorted from shortest to tallest fast: pick one kid as the pivot, and send everyone shorter than the pivot to their left and everyone taller to their right. Press play here and watch exactly that happen on screen: one bar gets marked as the pivot, every other bar is compared to it, and the shuffle ends with the pivot sitting in its exact final position — the one guarantee every round makes. +Picture 8 kids lined up in random height order, and you want them sorted from shortest to tallest fast: pick one kid as the pivot, and send everyone shorter than the pivot to their left and everyone taller to their right. Press play here and watch exactly that happen on screen: one bar gets marked as the pivot, every other bar is compared to it, and the round ends with the pivot sitting in its exact final position — the one guarantee every round makes. The same trick then repeats inside each smaller group on its own: a new pivot for the left group, a new pivot for the right group, smaller and smaller, until every group is down to one bar. Watch how a lucky pivot splits the bars into two roughly equal halves, while an unlucky pivot — say, always the shortest bar — leaves one huge group and one empty one, which is the difference between the fast, typical case and the slow, unlucky one. @@ -56,10 +56,13 @@ Quicksort sorts in place with O(log n) extra stack space on average (from the re ## Real world ### Standard library sorts + Many languages’ default array sort is a quicksort variant, chosen for its excellent average-case speed and in-place memory use. ### Database query engines + Sorting result sets before a merge join or a GROUP BY often uses a quicksort-family algorithm. ### Selection algorithms + The same partition idea, without recursing on both sides, finds the k-th smallest element in expected O(n) time (quickselect). diff --git a/content/lessons/computer-science/sorting-in-the-real-world/ar.md b/content/lessons/computer-science/sorting-in-the-real-world/ar.md index 184c9d73..9bbe15a0 100644 --- a/content/lessons/computer-science/sorting-in-the-real-world/ar.md +++ b/content/lessons/computer-science/sorting-in-the-real-world/ar.md @@ -16,27 +16,27 @@ charts: [] ## Try it -1. اترك الخوارزمية على تيم سورت واضغط تشغيل. راقبه يرتّب مقاطع قصيرة من الأعمدة أولًا، ثم يدمجها. -2. حرّك منزلق الخوارزمية إلى ترتيب الفقاعة وشغّله مرة أخرى. قارن عدّاد المقارنات في النهاية، على الأعمدة الأربعة والعشرين نفسها. -3. حرّك المنزلق إلى آخره عند الترتيب بالجذر. لا يقارن عمودين أبدًا، ومع ذلك ينتهي الصف مرتّبًا. +1. اترك الخوارزمية على تيم سورت (8) ودعه يعمل. يرتّب أولًا ثلاثة مقاطع من ثمانية أعمدة، ثم يدمجها، ويتوقف عند 102 مقارنة. +2. حرّك منزلق الخوارزمية إلى ترتيب الفقاعة (0) وشغّله مرة أخرى. على الأعمدة الأربعة والعشرين نفسها ينتهي عدّاد المقارنات عند 276 بدل 102. +3. حرّك المنزلق إلى آخره عند الترتيب بالجذر (10). لا يقارن عمودين أبدًا، ومع ذلك ينتهي الصف مرتّبًا. يتوقف العدّاد عند 48 لأنه يعدّ كل نظرة إلى عمود: 24 عمودًا، مرة لكل خانة من خانتيه. ## Real-life examples -1. **ترتيب جهات الاتصال في بايثون أو جافا.** تستعمل اللغتان تيم سورت، وهو يرتّب المقاطع القصيرة يدويًا ثم يدمجها. بيانات الحياة تصل نصف مرتّبة غالبًا، وتيم سورت ينهيها في مرور واحد تقريبًا. -2. **الترتيب داخل نواة لينكس.** تستعمل النواة الترتيب بالكومة. لا يحتاج ذاكرة إضافية ولا يبطؤ فجأة، وهذا مهم في كود لا يُسمح له بالفشل. +1. **ترتيب جهات الاتصال في بايثون أو جافا.** تستعمل اللغتان تيم سورت، وهو يرتّب المقاطع القصيرة بطريقة الإدراج ثم يدمجها. البيانات الحقيقية تصل نصف مرتّبة غالبًا، وتيم سورت ينهيها في مرور واحد تقريبًا. +2. **الترتيب داخل نواة لينكس.** تستعمل النواة الترتيب بالكومة. لا يحتاج ذاكرة إضافية ولا يبطؤ فجأة، وهذا مهم في برنامج لا يُسمح له بالفشل. 3. **ترتيب مليون رقم صغير.** لا يقارن الترتيب بالجذر رقمين أبدًا. يوزّع الأرقام على صناديق حسب آخر خانة ثم حسب التي قبلها، فيتفوق على كل طرق المقارنة حين تكون المفاتيح قصيرة. ## Test yourself -1. شغّل تيم سورت حتى النهاية واقرأ عدد المقارنات. -2. شغّل الآن الترتيب بالكومة حتى النهاية على الأعمدة نفسها. عدد مقارناته أكبر، لكنه لا يسوء كثيرًا مهما كانت البيانات. -3. شغّل الترتيب بالجذر حتى النهاية. يبقى عدّاد المقارنات عند صفر. +1. شغّل تيم سورت حتى النهاية واقرأ عدد المقارنات. ستجده 102. +2. شغّل الآن الترتيب بالكومة حتى النهاية على الأعمدة نفسها. عدد مقارناته أكبر، 147، لكنه لا يسوء كثيرًا مهما كانت البيانات. +3. شغّل الترتيب بالجذر حتى النهاية. يتوقف عدّاده عند 48، أي نظرتان إلى كل عمود، وليس فيها مقارنة واحدة بين عمودين. ## Intuition أمامك أربعة وعشرون عمودًا بترتيب عشوائي. يمشي ترتيب الفقاعة على الصف مرة بعد مرة ويبدّل كل جارين، فيحتاج مئات المقارنات. أما تيم سورت، وهو ما تستعمله بايثون وجافا، فيرتّب أولًا مقاطع من ثمانية أعمدة كما ترتّب ورق اللعب في يدك، ثم يدمج المقاطع المرتّبة اثنين اثنين. ترى الصف نفسه ينتظم بمقارنات أقل بكثير. -حرّك منزلق الخوارزمية فتتغيّر الطريقة لا الهدف. يبقي الترتيب بالكومة أكبر عمود في قمة الكومة وينقله إلى النهاية، ثم يكرر ذلك. ويقسم الترتيب السريع الصف حول عمود واحد ثم يعيد الكرّة على كل جانب. أما الترتيب بالعدّ والترتيب بالجذر فلا يقارنان عمودين أصلًا. ينظران إلى القيم نفسها، ولهذا يبقى عدّاد المقارنات عند صفر حتى النهاية. +حرّك منزلق الخوارزمية فتتغيّر الطريقة لا الهدف. يبقي الترتيب بالكومة أكبر عمود في قمة الكومة وينقله إلى النهاية، ثم يكرر ذلك. ويقسم الترتيب السريع الصف حول عمود واحد ثم يعيد الكرّة على كل جانب. أما الترتيب بالعدّ والترتيب بالجذر فلا يقارنان عمودين أصلًا. ينظران إلى القيم نفسها، ولهذا لا يعدّ العدّاد إلا النظرات إلى أعمدة مفردة: 24 في الترتيب بالعدّ و48 في الترتيب بالجذر. ## Formal @@ -57,13 +57,17 @@ charts: [] ## Real world ### قائمة جهات الاتصال في هاتفك + ترتيب الأسماء عمل يناسب تيم سورت. تبقى القائمة شبه مرتّبة بعد إضافة اسم واحد، فيكتشف تيم سورت المقاطع المرتّبة ولا يعمل إلا قليلًا. ### قواعد البيانات + ترتّب قاعدة البيانات بيانات أكبر من الذاكرة، فترتّب قطعًا منها وتكتبها على القرص ثم تدمجها، وهذا هو الترتيب بالدمج مطبّقًا على الملفات. ### الرسوميات والألعاب + يرتّب الترتيب بالجذر ملايين المثلثات حسب البعد في كل إطار، لأن المفاتيح أعداد صحيحة قصيرة ولا حاجة إلى أي مقارنة. ### الترتيب المستقر في الجداول + رتّب حسب المدينة ثم حسب العمر، فتبقى المدن مرتّبة داخل كل فئة عمرية إذا كان الترتيب مستقرًا فقط. تيم سورت والترتيب بالدمج مستقران، أما الترتيب بالكومة والترتيب السريع فليسا كذلك. diff --git a/content/lessons/computer-science/sorting-in-the-real-world/en.md b/content/lessons/computer-science/sorting-in-the-real-world/en.md index d3034c48..1a13f620 100644 --- a/content/lessons/computer-science/sorting-in-the-real-world/en.md +++ b/content/lessons/computer-science/sorting-in-the-real-world/en.md @@ -14,27 +14,27 @@ charts: [] ## Try it -1. Leave the algorithm on Timsort and press play. Watch it tidy up short stretches of bars first, then join them. -2. Slide the algorithm to Bubble sort and play again. Compare the comparison counter at the end, for the same 24 bars. -3. Slide it all the way to Radix sort. No two bars are ever compared, yet the row ends up in order. +1. Leave the algorithm on Timsort (8) and let it play. It tidies up three stretches of eight bars first, then joins them, and stops at 102 comparisons. +2. Slide the algorithm to Bubble sort (0) and play again. For the same 24 bars the comparison counter ends at 276, not 102. +3. Slide it all the way to Radix sort (10). No two bars are ever compared, yet the row ends up in order. The counter stops at 48 because it counts each look at a bar: 24 bars, once for each of their two digits. ## Real-life examples -1. **Sorting a contact list in Python or Java.** Both use Timsort, which sorts short runs by hand and then merges them. Real data often arrives half sorted already, and Timsort finishes those in almost one pass. +1. **Sorting a contact list in Python or Java.** Both use Timsort, which sorts short runs with insertion sort and then merges them. Real data often arrives half sorted already, and Timsort finishes those in almost one pass. 2. **Sorting inside the Linux kernel.** The kernel's own sort uses heap sort. It never needs extra memory and never slows to a crawl, which matters when the code runs in the kernel and cannot fail. 3. **Sorting a million small numbers.** Radix sort never compares two numbers. It buckets them by their last digit, then the next, which beats every comparison sort when the keys are short. ## Test yourself -1. Run Timsort to the end and read the number of comparisons. -2. Now run heap sort to the end on the same bars. It does more comparisons, yet it never gets much worse than this, whatever the data. -3. Run radix sort to the end. Its comparison counter stays at zero. +1. Run Timsort to the end and read the number of comparisons. It reads 102. +2. Now run heap sort to the end on the same bars. It does more comparisons, 147, yet it never gets much worse than this, whatever the data. +3. Run radix sort to the end. Its counter stops at 48, two looks at each bar, and not one of them compares two bars. ## Intuition Twenty-four bars stand in a random order. Bubble sort walks the row again and again, swapping neighbours, and needs hundreds of comparisons. Timsort, which Python and Java use, first sorts short stretches of eight bars the way you sort cards in your hand, then merges the tidy stretches two at a time. You see the same row become ordered with far fewer comparisons. -Slide the algorithm along and the strategy changes, not the goal. Heap sort keeps the largest bar on top of a heap and moves it to the end, over and over. Quicksort splits the row around one bar and repeats on each side. Counting sort and radix sort never compare two bars at all. They look at the values themselves, so the comparison counter stays at zero all the way. +Slide the algorithm along and the strategy changes, not the goal. Heap sort keeps the largest bar on top of a heap and moves it to the end, over and over. Quicksort splits the row around one bar and repeats on each side. Counting sort and radix sort never compare two bars at all. They look at the values themselves, so the counter only counts looks at single bars: 24 for counting sort and 48 for radix sort. ## Formal @@ -55,13 +55,17 @@ Real libraries mix several algorithms. C++ `std::sort` is introsort: quicksort u ## Real world ### Your phone's contact list + Sorting names is a Timsort job. The list is nearly sorted already after one new contact, and Timsort spots the ordered runs and does almost no work. ### Databases + A database sorts far more data than fits in memory, so it sorts chunks, writes them to disk and merges them, which is merge sort applied to files. ### Graphics and games + Radix sort orders millions of triangles by depth every frame, because the keys are short integers and no comparisons are needed. ### Stable sorting in spreadsheets + Sort by city, then by age, and the cities stay in order inside each age group only if the sort is stable. Timsort and merge sort are stable; heap sort and quicksort are not. diff --git a/content/lessons/cosmos/cosmic-microwave-background/ar.md b/content/lessons/cosmos/cosmic-microwave-background/ar.md index a764cd0d..e2b537bc 100644 --- a/content/lessons/cosmos/cosmic-microwave-background/ar.md +++ b/content/lessons/cosmos/cosmic-microwave-background/ar.md @@ -6,39 +6,39 @@ parameters: T: درجة الحرارة T x: الطول الموجي x variables: -- الطول الموجي الذي يبلغ عنده التوهج أقصى سطوعه -- درجة حرارة الغاز المتوهج، أو هنا الكون كله + - الطول الموجي الذي يبلغ عنده التوهج أقصى سطوعه + - درجة حرارة الغاز المتوهج، أو هنا الكون كله --- ## Try it 1. اضبط «درجة الحرارة T» على 2.725 K، وهي درجة حرارة الكون المقاسة فعلًا اليوم. -2. اسحب «الطول الموجي x» حتى يبلغ المنحنى أعلى نقطة فيه. هذا هو الطول الموجي الأقصى عند هذه الحرارة. -3. ارفع «درجة الحرارة T» أكثر، وراقب المنحنى وهو ينزاح نحو أطوال موجية أقصر ويرتفع أكثر. +2. اسحب «الطول الموجي x» حتى تقف النقطة على أعلى موضع في المنحنى، حيث تكون f(x) تساوي 1. يحدث ذلك عند x = 1.06 mm، وهذا هو طول موجة الذروة عند هذه الحرارة. +3. ارفع «درجة الحرارة T» إلى 5.8 K، وراقب المنحنى كله وهو ينزاح نحو أطوال موجية أقصر: الذروة الآن عند 0.5 mm. (الرسم يجعل ارتفاع الذروة 1 دائمًا.) ## Real-life examples 1. **إشعاع الخلفية الكونية اليوم.** عند 2.725 K يبلغ التوهج ذروته عند طول موجي قدره 1.06 mm تقريبًا، وهذا بالضبط ضمن نطاق الموجات الميكروية. -2. **كون مبكر أشد حرارة بكثير.** قبل أن تتكوّن الذرات أصلًا، كان توهج الكون أشد حرارة بكثير، عند نحو 8 على هذا المنزلق، فبلغت ذروته عند طول موجي أقصر بكثير. -3. **كون افتراضي أبرد.** عند 1.5 K فقط، يتجاوز الطول الموجي الأقصى 1.9 mm. +2. **كون أصغر عمرًا وأشد حرارة.** حين كان حجم الكون نحو ثلث حجمه اليوم، كانت حرارة توهجه قرابة 8 K، وكانت ذروته عند طول موجي أقصر، نحو 0.36 mm. +3. **كون افتراضي أبرد.** عند 1.5 K فقط، يتجاوز طول موجة الذروة 1.9 mm. ## Test yourself 1. اضبط درجة الحرارة لتطابق إشعاع الخلفية الكونية الحقيقي، نحو 2.725 K. -2. جِد الطول الموجي الذي يبلغ عنده المنحنى ذروته عند تلك الحرارة. -3. سخّن الغاز حتى ينزاح الطول الموجي الأقصى إلى نحو 0.5 mm. +2. ابحث عن الطول الموجي الذي يبلغ عنده المنحنى ذروته عند تلك الحرارة. +3. سخّن الغاز حتى ينزاح طول موجة الذروة إلى نحو 0.5 mm. ## Intuition -عام 1965، كان مهندسان في مختبرات بِل، أرنو بنزياس وروبرت ويلسون، يلتقطان همسًا خافتًا من الموجات الميكروية بهوائيهما. ظل الهمس موجودًا أيًا كان الاتجاه الذي يوجهانه إليه، ويعادل درجة حرارة نحو 3.5 درجات فوق الصفر المطلق. ظنّا في البداية أن السبب فضلات حمام على الهوائي، لكنهما في الحقيقة عثرا على توهج بقي من الكون المبكر. +عام 1965، كان فلكيان في مختبرات بِل، أرنو بنزياس وروبرت ويلسون، يلتقطان أزيزًا خافتًا من الموجات الميكروية بهوائيهما. ظل الأزيز موجودًا أيًا كان الاتجاه الذي يوجهانه إليه، ويعادل درجة حرارة نحو 3.5 درجات فوق الصفر المطلق. ظنّا في البداية أن السبب فضلات حمام على الهوائي، لكنهما في الحقيقة عثرا على توهج بقي من الكون المبكر. -اسحب «درجة الحرارة T» للأعلى على الرسم فيرتفع المنحنى وينزاح يسارًا، وتصل ذروته عند «طول موجي x» أقصر. كل جسم حار متوهج يفعل الشيء نفسه. سلك الموقد يتوهج أحمر خافتًا ثم برتقاليًا ثم أبيض كلما سخن أكثر، والقاعدة نفسها تخبرنا أن الكون برد من كرة نارية باهرة إلى همس ميكروي خافت قدره 2.725 K. +ارفع «درجة الحرارة T» فينزاح المنحنى على الرسم يسارًا، وتصل ذروته عند «طول موجي x» أقصر. كل جسم حار متوهج يفعل الشيء نفسه. سلك الموقد يتوهج أحمر خافتًا ثم برتقاليًا ثم أبيض كلما سخن أكثر، والقاعدة نفسها تخبرنا أن الكون برد من كرة نارية باهرة إلى همس ميكروي خافت قدره 2.725 K. ## Formal الجسم عند درجة حرارة $T$ يتوهج بأقصى سطوع عند طول موجي $\lambda_{max}$ يتقلص كلما ارتفعت $T$، وفق قانون فين للإزاحة، $\lambda_{max} \propto 1/T$. يحدد القياس ثابت هذا التناسب. -بضرب الطرفين في $T$ نحصل على $\lambda_{max} T = 2.898$، حين يُقاس $\lambda_{max}$ بالميليمتر و$T$ بالكلفن، فحل المعادلة لإيجاد الطول الموجي الأقصى يعطي $\lambda_{max} = 2.898/T$. +بضرب الطرفين في $T$ نحصل على $\lambda_{max} T = 2.898$، حين يُقاس $\lambda_{max}$ بالميليمتر و$T$ بالكلفن، فحل المعادلة لإيجاد طول موجة الذروة يعطي $\lambda_{max} = 2.898/T$. ## Advanced @@ -47,16 +47,19 @@ variables: ## Derivation 1. بالنسبة لجسم حار متوهج، يتقلص الطول الموجي الذي يكون عنده الضوء أسطع كلما ارتفعت درجة حرارته. -2. يحدد القياس ثابت تلك العلاقة بعد قياس الطول الموجي الأقصى بالميليمتر ودرجة الحرارة بالكلفن. -3. إعادة ترتيب المعادلة يعطي صيغة مباشرة للطول الموجي الأقصى عند أي درجة حرارة. +2. يحدد القياس ثابت تلك العلاقة بعد قياس طول موجة الذروة بالميليمتر ودرجة الحرارة بالكلفن. +3. إعادة ترتيب المعادلة يعطي صيغة مباشرة لطول موجة الذروة عند أي درجة حرارة. ## Real world ### اكتشاف بنزياس وويلسون العرضي + قاسا إشعاع الخلفية الكونية عام 1965 وهما يحاولان إزالة الضجيج عن هوائي راديو، فنالا عن ذلك جائزة نوبل في الفيزياء عام 1978. ### قمرا COBE وPlanck الصناعيان + رسمت مهمات لاحقة خريطة درجة حرارة التوهج في السماء كلها، بدقة تصل إلى أجزاء من المليون، وكشفت بذور كل مجرة ستتكوّن يومًا. ### مراقبة قطعة معدن وهي تسخن + يتوهج حديد الحداد أحمر خافتًا ثم برتقاليًا ثم أبيض كلما سخن أكثر. هذا انزياح قانون فين نفسه الذي نراه هنا، لكن عند درجات حرارة يومية. diff --git a/content/lessons/cosmos/cosmic-microwave-background/en.md b/content/lessons/cosmos/cosmic-microwave-background/en.md index b863ed6b..81b2c3d0 100644 --- a/content/lessons/cosmos/cosmic-microwave-background/en.md +++ b/content/lessons/cosmos/cosmic-microwave-background/en.md @@ -5,20 +5,20 @@ parameters: T: temperature T x: wavelength x variables: -- the wavelength where the glow's brightness peaks -- the temperature of the glowing gas or, here, the whole universe + - the wavelength where the glow's brightness peaks + - the temperature of the glowing gas or, here, the whole universe --- ## Try it 1. Set «temperature T» to 2.725 K, the universe's actual measured temperature today. -2. Drag «wavelength x» until the curve reaches its highest point — that is the peak wavelength for this temperature. -3. Raise «temperature T» further and watch the whole curve shift toward shorter wavelengths, and grow taller. +2. Drag «wavelength x» until the point sits on the curve's highest spot, where f(x) reads 1. That happens at x = 1.06 mm, the peak wavelength for this temperature. +3. Raise «temperature T» to 5.8 K and watch the whole curve shift toward shorter wavelengths: the peak is now at 0.5 mm. (The picture always scales the peak's height to 1.) ## Real-life examples 1. **Today's cosmic microwave background.** At 2.725 K, the glow peaks at about 1.06 mm, squarely in the microwave part of the spectrum. -2. **A much hotter early universe.** Long before atoms could even form, the universe's glow was far hotter, around 8 on this slider, peaking at a much shorter wavelength. +2. **A hotter, younger universe.** When the universe was about a third of its present size, its glow was near 8 K, peaking at a shorter wavelength, about 0.36 mm. 3. **A cooler hypothetical universe.** At only 1.5 K, the peak wavelength stretches out past 1.9 mm. ## Test yourself @@ -29,9 +29,9 @@ variables: ## Intuition -In 1965, two engineers at Bell Labs, Arno Penzias and Robert Wilson, kept picking up a faint microwave hiss with their antenna no matter which direction they pointed it, equivalent to a temperature of about 3.5 degrees above absolute zero. They first suspected pigeon droppings on the antenna; instead, they had stumbled onto the afterglow of the early universe. +In 1965, two radio astronomers at Bell Labs, Arno Penzias and Robert Wilson, kept picking up a faint microwave hiss with their antenna no matter which direction they pointed it, equivalent to a temperature of about 3.5 degrees above absolute zero. They first suspected pigeon droppings on the antenna; instead, they had stumbled onto the afterglow of the early universe. -Drag «temperature T» up on the picture and the curve grows taller and slides left, peaking at a shorter «wavelength x». Every hot glowing object does this — a stove element glows dull red, then orange, then white as it heats up — and the same rule that describes a stove tells us the universe itself cooled from a blinding fireball to a faint 2.725 K microwave whisper. +Drag «temperature T» up on the picture and the curve slides left, peaking at a shorter «wavelength x». Every hot glowing object does this — a stove element glows dull red, then orange, then white as it heats up — and the same rule that describes a stove tells us the universe itself cooled from a blinding fireball to a faint 2.725 K microwave whisper. ## Formal @@ -52,10 +52,13 @@ The full curve plotted here is Planck's blackbody law, and its near-perfect matc ## Real world ### Penzias and Wilson's accidental discovery + Their 1965 measurement of the microwave background, made while trying to remove noise from a radio antenna, won them the 1978 Nobel Prize in Physics. ### The COBE and Planck satellites + Later missions mapped the glow's temperature across the whole sky to within millionths of a degree, revealing the seeds of every galaxy that would ever form. ### Watching a piece of metal heat up + A blacksmith's iron glows dull red, then orange, then white as it gets hotter — the same Wien's law shift seen here, just at everyday temperatures. diff --git a/content/lessons/cosmos/cosmic-microwave-background/lesson.yaml b/content/lessons/cosmos/cosmic-microwave-background/lesson.yaml index 1aa1967f..1da513a1 100644 --- a/content/lessons/cosmos/cosmic-microwave-background/lesson.yaml +++ b/content/lessons/cosmos/cosmic-microwave-background/lesson.yaml @@ -3,24 +3,24 @@ subject: cosmos difficulty: high-school equation: \lambda_{max} = \frac{2.898}{T} concepts: -- blackbody radiation -- Wien's law -- cosmic microwave background + - blackbody radiation + - Wien's law + - cosmic microwave background prerequisites: [] related: -- expanding-universe-hubble-law -- dark-energy -- hydrogen-spectrum + - expanding-universe-hubble-law + - dark-energy + - hydrogen-spectrum visualization: type: function-plot options: expr: (x*T/2.898)^(-5)/(exp(14.388/(x*T)) - 1)*(exp(4.965) - 1) domain: - - 0.1 - - 10 + - 0.1 + - 10 range: - - 0 - - 1.2 + - 0 + - 1.2 mode: plain visualization3d: type: cmb-sky @@ -31,31 +31,31 @@ parameters: min: 1 max: 10 step: 0.025 - value: 2.725 + value: 4 unit: K x: min: 0.1 max: 10 step: 0.01 - value: 1.06 + value: 2 unit: mm variables: -- \lambda_{max} -- T + - \lambda_{max} + - T derivation: -- \lambda_{max} \propto \frac{1}{T} -- \lambda_{max} T = 2.898 -- \lambda_{max} = \frac{2.898}{T} + - \lambda_{max} \propto \frac{1}{T} + - \lambda_{max} T = 2.898 + - \lambda_{max} = \frac{2.898}{T} presets: -- T: 2.725 - x: 1.06 -- T: 8 - x: 0.4 -- T: 1.5 - x: 2 + - T: 2.725 + x: 1.06 + - T: 8 + x: 0.4 + - T: 1.5 + x: 2 challenges: -- check: abs(T - 2.725) < 0.05 -- check: abs(x - 1.06) < 0.05 -- check: 2.898/T - target: 0.5 - tol: 0.02 + - check: abs(T - 2.725) < 0.05 + - check: abs(x - 1.06) < 0.05 + - check: 2.898/T + target: 0.5 + tol: 0.02 diff --git a/content/lessons/cosmos/dark-energy/ar.md b/content/lessons/cosmos/dark-energy/ar.md index 79483304..fb6e300b 100644 --- a/content/lessons/cosmos/dark-energy/ar.md +++ b/content/lessons/cosmos/dark-energy/ar.md @@ -7,16 +7,16 @@ parameters: ol: الطاقة المظلمة ΩΛ tView: لحظة من الزمن الكوني variables: -- متوسط كثافة المادة في الكون -- الثابت الكوني، كثافة الطاقة المظلمة -- نصيب الطاقة المظلمة من طاقة الكون كلها اليوم، نحو 0.68 + - متوسط كثافة المادة في الكون + - الثابت الكوني، كثافة الطاقة المظلمة + - نصيب الطاقة المظلمة من طاقة الكون كلها اليوم، نحو 0.68 --- ## Try it -1. حمّل النموذج بقيمة Ωm تساوي 0.3 وΩΛ تساوي 0.7، ثم اسحب «لحظة من الزمن الكوني» نحو اليوم. -2. راقب منحنى a(t) وقارنه بالخط المتقطع، الذي يمثل كونًا بلا طاقة مظلمة إطلاقًا. -3. تفحّص القراءة عند الأزمنة المتأخرة. من المفترض أن تُظهر تسارع التمدد لا تباطؤه. +1. اضبط «كثافة المادة Ωm» على 0.3 و«الطاقة المظلمة ΩΛ» على 0.7، ثم اسحب «لحظة من الزمن الكوني» إلى 0.43. تُظهر القراءة حجمًا يساوي 0.99 عند 13.7 مليار سنة، وهذا هو اليوم. +2. راقب منحنى a(t) المتصل وقارنه بالخط المتقطع، الذي يمثل الكون نفسه لو لم تكن فيه طاقة مظلمة. ينتهي المنحنى المتصل فوقه. +3. اسحب «لحظة من الزمن الكوني» إلى 0.2: تقول القراءة إن التمدد يتباطأ. اسحبها إلى 0.8: الحجم 2.06 والتمدد يتسارع. ## Real-life examples @@ -26,15 +26,15 @@ variables: ## Test yourself -1. أطفئ الطاقة المظلمة تمامًا وشاهد المنحنى يهبط تحت الخط المتقطع. -2. طابق كوننا الحقيقي اليوم: نحو 30% مادة و70% طاقة مظلمة. -3. ادفع الخط الزمني نحو المستقبل البعيد. +1. أزل الطاقة المظلمة تمامًا (ΩΛ = 0) وشاهد المنحنى المتصل يهبط حتى ينطبق على الخط المتقطع. +2. طابق كوننا اليوم: Ωm = 0.3 وΩΛ = 0.7، و«لحظة من الزمن الكوني» عند 0.43 حيث يكون الحجم 1 تقريبًا. +3. ادفع الخط الزمني نحو المستقبل البعيد، إلى ما بعد 0.95. ## Intuition عام 1998، قاس فريقان من الفلكيين نحو 50 نجمًا متفجرًا بعيدًا من نوع Ia، وسطوعها الحقيقي معروف مسبقًا. فوجدوها أخفت بنسبة 10 إلى 15% تقريبًا مما توقعه كون يتباطأ تمدده. الخفوت الزائد يعني بعدًا أكبر من المتوقع، فلا بد أن التمدد يتسارع لا يتباطأ كما كان الجميع يظن. -حمّل النموذج بقيم om يساوي 0.3 وol يساوي 0.7 واسحب «لحظة من الزمن الكوني» إلى الأمام. يتبع منحنى a(t) المصمت الخط المتقطع بلا طاقة مظلمة في البداية. ثم ينحرف صاعدًا بعيدًا عنه حين تسيطر الطاقة المظلمة، وتلك هي اللحظة التي توقف فيها تمدد الكون عن السير الهادئ وبدأ يتسارع. +اضبط Ωm على 0.3 وΩΛ على 0.7 واسحب «لحظة من الزمن الكوني» إلى الأمام. يسير منحنى a(t) المتصل في البداية مع الخط المتقطع الذي يمثل كونًا بلا طاقة مظلمة. ثم ينحرف صاعدًا بعيدًا عنه حين تسيطر الطاقة المظلمة، وتلك هي اللحظة التي توقف فيها تمدد الكون عن السير الهادئ وبدأ يتسارع. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### مسوحات المستعرات العظمى عام 1998 + فريقا High-Z Supernova Search وSupernova Cosmology Project اكتشفا كل على حدة أن تمدد الكون يتسارع، وهو عمل نال جائزة نوبل في الفيزياء عام 2011. ### قياس ΩΛ من إشعاع الخلفية الكونية الميكروي + تحدد أنماط دقيقة في إشعاع الخلفية الكونية الميكروي، مع بيانات المستعرات العظمى، نصيب الطاقة المظلمة بنحو 68%. ### مصير الكون النهائي + إن بقيت الطاقة المظلمة ثابتة، فستبتعد المجرات خارج مجموعتنا المحلية أخيرًا بسرعة أعلى مما يستطيع الضوء اللحاق به، تاركة سماء أكثر خلوًا مع الوقت. ### اسم لجهلنا + «الطاقة المظلمة» اسم مؤقت لأي شيء يسبب هذا التسارع، سواء كان ثابتًا كونيًا أو حقلًا متغيرًا أو شيئًا لم يُتخيل بعد. diff --git a/content/lessons/cosmos/dark-energy/en.md b/content/lessons/cosmos/dark-energy/en.md index 2ef86c27..61157e73 100644 --- a/content/lessons/cosmos/dark-energy/en.md +++ b/content/lessons/cosmos/dark-energy/en.md @@ -6,34 +6,34 @@ parameters: ol: dark energy ΩΛ tView: point in cosmic time variables: -- the average matter density of the universe -- the cosmological constant, dark energy's density -- dark energy's share of the universe's total energy today, about 0.68 + - the average matter density of the universe + - the cosmological constant, dark energy's density + - dark energy's share of the universe's total energy today, about 0.68 --- ## Try it -1. Load the preset with Ωm at 0.3 and ΩΛ at 0.7, then drag «point in cosmic time» toward today. -2. Watch the a(t) curve: compare it against the dashed line, which shows what a universe with no dark energy would do. -3. Read the readout at late times — it should say the expansion is speeding up, not slowing down. +1. Set «matter Ωm» to 0.3 and «dark energy ΩΛ» to 0.7, then drag «point in cosmic time» to 0.43. The readout shows a size of 0.99 at 13.7 billion years: that is today. +2. Watch the solid a(t) curve: compare it against the dashed line, which shows what the same universe would do with no dark energy. The solid curve ends up above it. +3. Drag «point in cosmic time» to 0.2: the readout says the expansion is slowing down. Drag it to 0.8: the size is 2.06 and the expansion is speeding up. ## Real-life examples 1. **A universe like ours.** About 30% matter and 70% dark energy: the expansion slowed at first, then dark energy took over and it now speeds up. 2. **No dark energy, matter only.** With ΩΛ at 0, gravity from matter alone just keeps slowing the expansion down, forever. -3. **A dark-energy-dominated future.** With ΩΛ at 0.95 and matter almost gone, the expansion runs away, doubling the scale factor faster and faster. +3. **A dark-energy-dominated future.** With ΩΛ at 0.95 and matter almost gone, the expansion runs away and the scale factor grows faster and faster. ## Test yourself -1. Turn dark energy off completely and watch the curve fall below the dashed line. -2. Match today's actual universe: about 30% matter, 70% dark energy. -3. Push the timeline out toward the far future. +1. Turn dark energy off completely (ΩΛ = 0) and watch the solid curve drop onto the dashed line. +2. Match our universe today: Ωm = 0.3, ΩΛ = 0.7, and «point in cosmic time» at 0.43, where the size reads about 1. +3. Push the timeline out toward the far future, past 0.95. ## Intuition In 1998, two teams of astronomers measured about 50 distant exploding stars called type Ia supernovae, whose true brightness is known, and found them roughly 10–15% dimmer than a slowing-down universe predicted. Dimmer meant farther away than expected, so the expansion had to be speeding up, not braking, the way everyone had assumed. -Load the om-0.3, ol-0.7 preset and drag «point in cosmic time» forward. The solid a(t) curve first tracks the dashed no-dark-energy line, then peels upward and away from it as dark energy takes over — the moment the universe's expansion stopped coasting and started accelerating. +Set Ωm to 0.3 and ΩΛ to 0.7 and drag «point in cosmic time» forward. The solid a(t) curve first tracks the dashed no-dark-energy line, then peels upward and away from it as dark energy takes over — the moment the universe's expansion stopped coasting and started accelerating. ## Formal @@ -54,13 +54,17 @@ Dark energy is usually modelled as a cosmological constant, the simplest option, ## Real world ### The 1998 supernova surveys + The High-Z Supernova Search Team and the Supernova Cosmology Project independently found the universe's expansion is accelerating, work that won the 2011 Nobel Prize in Physics. ### Measuring ΩΛ from the cosmic microwave background + Tiny patterns in the CMB, combined with supernova data, pin down dark energy's share of the universe to around 68%. ### The universe's ultimate fate + If dark energy stays constant, galaxies outside our local group will eventually recede faster than light can reach us, leaving an ever emptier sky. ### A name for our ignorance + "Dark energy" is really a placeholder name for whatever is causing the acceleration — a cosmological constant, a changing field, or something not yet imagined. diff --git a/content/lessons/cosmos/dark-energy/lesson.yaml b/content/lessons/cosmos/dark-energy/lesson.yaml index 9198ba8a..9cfcb55f 100644 --- a/content/lessons/cosmos/dark-energy/lesson.yaml +++ b/content/lessons/cosmos/dark-energy/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: \left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho_m + \frac{\Lambda c^2}{3} concepts: -- dark energy -- cosmological constant -- accelerating expansion + - dark energy + - cosmological constant + - accelerating expansion prerequisites: -- expanding-universe-hubble-law + - expanding-universe-hubble-law related: -- expanding-universe-hubble-law -- cosmic-microwave-background + - expanding-universe-hubble-law + - cosmic-microwave-background visualization: type: expansion options: {} @@ -32,24 +32,24 @@ parameters: step: 0.01 value: 0.8 variables: -- \rho_m -- \Lambda -- \Omega_\Lambda + - \rho_m + - \Lambda + - \Omega_\Lambda derivation: -- \left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho_m -- \left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho_m + \frac{\Lambda c^2}{3} -- \Omega_\Lambda \approx 0.68 + - \left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho_m + - \left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho_m + \frac{\Lambda c^2}{3} + - \Omega_\Lambda \approx 0.68 presets: -- om: 0.3 - ol: 0.7 - tView: 0.8 -- om: 1 - ol: 0 - tView: 0.8 -- om: 0.05 - ol: 0.95 - tView: 0.95 + - om: 0.3 + ol: 0.7 + tView: 0.8 + - om: 1 + ol: 0 + tView: 0.8 + - om: 0.05 + ol: 0.95 + tView: 0.95 challenges: -- check: abs(ol) < 0.02 -- check: abs(om - 0.3) < 0.02 and abs(ol - 0.7) < 0.02 -- check: tView > 0.95 + - check: abs(ol) < 0.02 + - check: abs(om - 0.3) < 0.02 and abs(ol - 0.7) < 0.02 and abs(tView - 0.43) < 0.03 + - check: tView > 0.95 diff --git a/content/lessons/cosmos/dark-matter-rotation-curves/ar.md b/content/lessons/cosmos/dark-matter-rotation-curves/ar.md index 765c3f4a..ffb39d72 100644 --- a/content/lessons/cosmos/dark-matter-rotation-curves/ar.md +++ b/content/lessons/cosmos/dark-matter-rotation-curves/ar.md @@ -6,17 +6,17 @@ parameters: halo: هالة المادة المظلمة r: البعد عن المركز r variables: -- سرعة دوران نجم أو سحابة غاز عند بعد r -- ثابت الجاذبية عند نيوتن -- كل الكتلة داخل نصف القطر r، من نجوم وغاز وأي مادة خفية -- البعد عن مركز المجرة، بوحدة كيلوفرسك + - سرعة دوران نجم أو سحابة غاز عند بعد r + - ثابت الجاذبية عند نيوتن + - كل الكتلة داخل نصف القطر r، من نجوم وغاز وأي مادة خفية + - البعد عن مركز المجرة، بوحدة كيلو فرسخ فلكي (kpc) --- ## Try it -1. راقب النقاط السوداء. هي السرعات التي قاسها الفلكيون فعلًا لنجوم عند كل بعد r. -2. ارفع «هالة المادة المظلمة» من 0. يرتفع الخط البرتقالي ليلتقي بالنقاط السوداء بدل أن يهبط. -3. اسحب «البعد عن المركز r» حتى النهاية. الخط يبقى مستويًا حتى عند الأطراف البعيدة، ولا يهبط. +1. انظر إلى النقاط الكبيرة. هي السرعات التي قاسها الفلكيون فعلًا لنجوم عند كل بعد r. +2. ارفع «هالة المادة المظلمة» من 0 إلى 5. يرتفع الخط البرتقالي ليلتقي بالنقاط الكبيرة بدل أن يهبط، ويصغر البعد عن القياسات من 69.6 km/s إلى 4.0 km/s. +3. أبقِ الهالة عند 5 واسحب «البعد عن المركز r» من 5 إلى 30 kpc. المادة المرئية وحدها تهبط بالسرعة من 160 إلى 93 km/s، أما مع الهالة فتنخفض قليلًا فقط من 217 إلى 173 km/s. ## Real-life examples @@ -26,15 +26,15 @@ variables: ## Test yourself -1. جِد قوة الهالة التي تجعل الخط البرتقالي يمر فوق النقاط السوداء المقاسة تمامًا. -2. ادفع العرض حتى 25 kpc من المركز، قرب حافة المجرة. -3. أنزل الهالة تحت 0.5 وشاهد كم يبتعد الخط عن البيانات الحقيقية. +1. ابحث عن قوة الهالة التي تجعل الخط البرتقالي يمر بالنقاط الكبيرة المقاسة تمامًا. +2. اسحب «البعد عن المركز r» حتى 25 kpc، قرب حافة المجرة. +3. أنزل الهالة تحت 0.5 واسحب r حتى 30 kpc، وشاهد كم يبتعد الخط عن القياسات الحقيقية. ## Intuition تدور الشمس حول مركز درب التبانة بسرعة 220 km/s تقريبًا، على بعد 8 kpc منه. أما نبتون، البعيد في نظامنا الشمسي نفسه، فيزحف بسرعة 5 km/s فقط، لأن جذب الشمس هناك أضعف بكثير. توقع الفلكيون أن تتباطأ نجوم المجرات الأخرى بالطريقة نفسها كلما ابتعدت عن المركز. لكن قياساتهم أظهرت عكس ذلك في أغلب المجرات. -حرّك «البعد عن المركز r» إلى الخارج وراقب النقاط السوداء المقاسة: تبقى عند الارتفاع نفسه تقريبًا بدل أن تهبط. ارفع «هالة المادة المظلمة» من 0 فيرتفع الخط البرتقالي ليلتقي بها. الطريقة الوحيدة لإبقاء تلك النجوم البعيدة بهذه السرعة هي كتلة إضافية، منتشرة داخل المجرة المرئية وخارجها، لم يصورها أي تلسكوب. +تتبّع النقاط الكبيرة المقاسة من اليسار إلى اليمين، نحو r أكبر: تبقى عند الارتفاع نفسه تقريبًا بدل أن تهبط. ارفع «هالة المادة المظلمة» من 0 فيرتفع الخط البرتقالي ليلتقي بها. الطريقة الوحيدة لإبقاء تلك النجوم البعيدة بهذه السرعة هي كتلة إضافية، منتشرة داخل المجرة المرئية وخارجها، لم يصورها أي تلسكوب. ## Formal @@ -55,10 +55,13 @@ variables: ## Real world ### مجرات فيرا روبن -في السبعينيات قاست فيرا روبن وكنت فورد عشرات المجرات الحلزونية. وجدتا نجوم أطرافها تدور أسرع بكثير مما تسمح به المادة المرئية، وهذا من أول الأدلة الواضحة على المادة المظلمة. + +في السبعينيات قاست فيرا روبن وكنت فورد عشرات المجرات الحلزونية. ووجدا أن نجوم أطرافها تدور أسرع بكثير مما تسمح به المادة المرئية، وهذا من أول الأدلة الواضحة على المادة المظلمة. ### وزن مجرة دون رؤية كتلتها + يستخدم الفلكيون منحنيات كهذه لتقدير كمية المادة المظلمة حول مجرة، قبل أن يقترب أي تلسكوب من رؤية الهالة مباشرة. ### المجرات القزمة كاختبار متطرف + غالبًا ما تحمل المجرات القزمة الخافتة أقوى الأدلة، لأن مادتها المرئية أقل بكثير من أن تفسر سرعة حركة غازها. diff --git a/content/lessons/cosmos/dark-matter-rotation-curves/en.md b/content/lessons/cosmos/dark-matter-rotation-curves/en.md index 4d3480b5..0ce42cba 100644 --- a/content/lessons/cosmos/dark-matter-rotation-curves/en.md +++ b/content/lessons/cosmos/dark-matter-rotation-curves/en.md @@ -5,17 +5,17 @@ parameters: halo: dark matter halo r: distance from center r variables: -- the orbital speed of a star or gas cloud at distance r -- Newton's gravitational constant -- all the mass sitting inside radius r — stars, gas, and any hidden matter -- distance from the galaxy's center, in kiloparsecs + - the orbital speed of a star or gas cloud at distance r + - Newton's gravitational constant + - all the mass sitting inside radius r — stars, gas, and any hidden matter + - distance from the galaxy's center, in kiloparsecs --- ## Try it -1. Watch the black dots. They mark the speeds astronomers actually measured for stars at each distance r. -2. Raise «dark matter halo» from 0. The orange curve climbs to meet the black dots instead of drooping down. -3. Drag «distance from center r» all the way out. Even far from the center, the curve stays flat rather than falling. +1. Look at the large dots. They mark the speeds astronomers actually measured for stars at each distance r. +2. Raise «dark matter halo» from 0 to 5. The orange curve climbs to meet the large dots instead of drooping down, and the miss shrinks from 69.6 km/s to 4.0 km/s. +3. Keep the halo at 5 and drag «distance from center r» from 5 to 30 kpc. Visible matter alone would drop from 160 to 93 km/s; with the halo the speed only eases from 217 to 173 km/s. ## Real-life examples @@ -25,15 +25,15 @@ variables: ## Test yourself -1. Find the halo strength that makes the orange curve sit on top of the black measured points. -2. Push the view out to 25 kpc from the center, near the edge of the galaxy. -3. Turn the halo down below 0.5 and see how far short the curve falls of the real data. +1. Find the halo strength that makes the orange curve sit on top of the large measured points. +2. Drag «distance from center r» out to 25 kpc, near the edge of the galaxy. +3. Turn the halo down below 0.5 and drag r out to 30 kpc: see how far short the curve falls of the real data. ## Intuition The Sun circles the center of the Milky Way at about 220 km/s, some 8 kpc out. Neptune, far out in our own solar system, crawls at only 5 km/s, because the Sun's pull is so much weaker that far away. Stars in other galaxies should slow down the same way the farther out they sit — but when astronomers measured them, most did not. -Drag «distance from center r» outward and watch the black measured points: they stay at roughly the same height instead of dropping. Raise «dark matter halo» from 0 and the orange curve rises to meet them. The only way to keep those far-out stars moving that fast is extra mass, spread through and beyond the visible galaxy, that no telescope has ever photographed. +Follow the large measured points from left to right, toward bigger r: they stay at roughly the same height instead of dropping. Raise «dark matter halo» from 0 and the orange curve rises to meet them. The only way to keep those far-out stars moving that fast is extra mass, spread through and beyond the visible galaxy, that no telescope has ever photographed. ## Formal @@ -54,10 +54,13 @@ Fitting curves like this one across thousands of galaxies, pioneered by Vera Rub ## Real world ### Vera Rubin's galaxies + In the 1970s Vera Rubin and Kent Ford measured dozens of spiral galaxies and found their outer stars orbiting far too fast for the visible matter — one of the first clear signs of dark matter. ### Weighing a galaxy without seeing its mass + Astronomers use curves like this one to estimate how much dark matter surrounds a galaxy, long before any telescope could hope to see the halo directly. ### Dwarf galaxies as extreme test cases + Small, faint dwarf galaxies often show the strongest evidence of all, since their visible matter is far too little to explain how fast their gas moves. diff --git a/content/lessons/cosmos/dark-matter-rotation-curves/lesson.yaml b/content/lessons/cosmos/dark-matter-rotation-curves/lesson.yaml index d73b9b62..00332e10 100644 --- a/content/lessons/cosmos/dark-matter-rotation-curves/lesson.yaml +++ b/content/lessons/cosmos/dark-matter-rotation-curves/lesson.yaml @@ -3,16 +3,16 @@ subject: cosmos difficulty: high-school equation: v = \sqrt{GM(r)/r} concepts: -- dark matter -- galaxy rotation -- orbital velocity + - dark matter + - galaxy rotation + - orbital velocity prerequisites: -- universal-gravitation -- kepler-orbits + - universal-gravitation + - kepler-orbits related: -- gravitational-lensing -- dark-energy -- black-holes + - gravitational-lensing + - dark-energy + - black-holes visualization: type: rotation-curve options: {} @@ -33,24 +33,24 @@ parameters: value: 15 unit: kpc variables: -- v -- G -- M(r) -- r + - v + - G + - M(r) + - r derivation: -- \frac{GM(r)m}{r^2} = \frac{mv^2}{r} -- v = \sqrt{\frac{GM(r)}{r}} -- M(r) \propto r + - \frac{GM(r)m}{r^2} = \frac{mv^2}{r} + - v = \sqrt{\frac{GM(r)}{r}} + - M(r) \propto r presets: -- halo: 2 - r: 8 -- halo: 5 - r: 20 -- halo: 8 - r: 25 + - halo: 2 + r: 8 + - halo: 5 + r: 20 + - halo: 8 + r: 25 challenges: -- check: abs(halo - 5) < 0.6 -- check: r - target: 25 - tol: 1 -- check: halo < 0.5 + - check: abs(halo - 5) < 0.6 + - check: r + target: 25 + tol: 1 + - check: halo < 0.5 and r > 29 diff --git a/content/lessons/cosmos/exoplanet-transits/ar.md b/content/lessons/cosmos/exoplanet-transits/ar.md index b0c2d491..309c829c 100644 --- a/content/lessons/cosmos/exoplanet-transits/ar.md +++ b/content/lessons/cosmos/exoplanet-transits/ar.md @@ -13,27 +13,27 @@ variables: ## Try it -1. ابدأ بـ«نصف قطر الكوكب» = 1 و«نصف قطر النجم» = 1، فيكون كوكبًا بحجم الأرض يعبر أمام نجم بحجم الشمس. لاحظ كم هو ضحل الانخفاض في منحنى الضوء. -2. ارفع «نصف قطر الكوكب» نحو حجم المشتري (نحو 11 ضعف نصف قطر الأرض) وشاهد الانخفاض يزداد عمقًا. -3. الآن صغّر «نصف قطر النجم» نحو نجم أحمر صغير. الكوكب نفسه أصبح الآن يحجب نسبة أكبر بكثير من الضوء. +1. ابدأ بـ«نصف قطر الكوكب» = 1 و«نصف قطر النجم» = 1، فيكون كوكبًا بحجم الأرض يعبر أمام نجم بحجم الشمس. منحنى الضوء مكبَّر على الانخفاض، فاقرأ مقداره الحقيقي من القراءة: 84 ppm فقط (0.0084 %). +2. ارفع «نصف قطر الكوكب» إلى 11.2، وهو حجم المشتري. يكبر قرص الكوكب ويرتفع عمق العبور إلى 1.05 %. +3. الآن صغّر «نصف قطر النجم» إلى 0.5، وهو نجم أحمر صغير. الكوكب نفسه أصبح الآن يحجب نسبة أكبر بكثير من الضوء: 4.20 %. ## Real-life examples -1. **الأرض تعبر أمام الشمس.** كوكب بحجم الأرض أمام الشمس يخفت ضوءها بنحو 84 جزءًا من المليون فقط، وهذا انخفاض ضئيل جدًا لا يرصده إلا تلسكوب فضائي مثل كيبلر. +1. **الأرض تعبر أمام الشمس.** كوكب بحجم الأرض أمام الشمس يُنقص ضوءها بنحو 84 جزءًا من المليون فقط، وهذا انخفاض ضئيل جدًا لا يرصده إلا تلسكوب فضائي مثل كيبلر. 2. **المشتري يعبر أمام الشمس.** كوكب غازي عملاق نصف قطره نحو 11.2 ضعف نصف قطر الأرض يحجب نحو 1% من ضوء الشمس، وهذا انخفاض كبير بما يكفي لترصده حتى تلسكوبات أرضية دقيقة. -3. **كوكب بحجم الأرض حول قزم أحمر.** نظام TRAPPIST-1 فيه كواكب قريبة من حجم الأرض، لكن نجمه صغير جدًا، نصف قطره نحو 0.12 من نصف قطر الشمس فقط. هذا النجم الصغير يجعل الانخفاض بعمق نحو 0.5%، أي ستة أضعاف ما يصنعه المشتري أمام الشمس، رغم أن هذا الكوكب أصغر بكثير. +3. **كوكب بحجم الأرض حول قزم أحمر.** نظام TRAPPIST-1 فيه كواكب قريبة من حجم الأرض، لكن نجمه صغير جدًا، نصف قطره نحو 0.12 من نصف قطر الشمس فقط. هذا النجم الصغير يجعل الانخفاض بعمق نحو 0.5%، أي نحو نصف ما يصنعه المشتري العملاق أمام الشمس، وأعمق بنحو 60 مرة من انخفاض الأرض نفسها. ## Test yourself 1. اصنع انخفاضًا أعمق من 5% من ضوء النجم. -2. اصنع انخفاضًا أضحل من 100 جزء من المليون، أصعب في الرصد من عبور الأرض نفسها. -3. ابنِ كوكبًا عملاقًا يعبر أمام نجم صغير. +2. اصنع انخفاضًا أضحل من 50 جزءًا من المليون، أصعب في الرصد حتى من عبور الأرض نفسها. +3. اصنع كوكبًا عملاقًا (أكبر من 5 أضعاف نصف قطر الأرض) يعبر أمام نجم صغير (أقل من 0.15 من نصف قطر الشمس). ## Intuition ضوء النجم لا ينطفئ فجأة حين يمر كوكب أمامه. الكوكب صغير جدًا مقارنة بالنجم، فيحجب شريحة صغيرة فقط من الضوء، تمامًا كذبابة تعبر أمام كشاف ضوئي بعيد. كلما كبرت الذبابة نسبة إلى الكشاف، خفت الضوء أكثر. الكوكب العابر أمام نجمه يعمل بالطريقة نفسها تمامًا. حجم الكوكب مقارنة بحجم النجم هو ما يقرر عمق هذا الانخفاض. -اسحب «نصف قطر الكوكب» للأعلى فيزداد انخفاض منحنى الضوء وضوحًا، لأن كوكبًا أكبر يغطي جزءًا أكبر من قرص النجم. اسحب «نصف قطر النجم» للأسفل بدلًا من ذلك ويزداد الانخفاض عمقًا أيضًا. الكوكب لم يتغير، لكنه أصبح يغطي نسبة أكبر من نجم أصغر. لهذا تُعد النجوم الصغيرة الباردة من أفضل الأماكن للبحث عن كواكب صغيرة، فالانخفاض الذي تسببه أسهل في الرصد. +كبّر «نصف قطر الكوكب» فيرتفع عمق العبور في القراءة، لأن كوكبًا أكبر يغطي جزءًا أكبر من قرص النجم. صغّر «نصف قطر النجم» بدلًا من ذلك فيزداد الانخفاض عمقًا أيضًا. الكوكب لم يتغير، لكنه أصبح يغطي نسبة أكبر من نجم أصغر. لهذا تُعد النجوم الصغيرة الباردة من أفضل الأماكن للبحث عن كواكب صغيرة، فالانخفاض الذي تسببه أسهل في الرصد. ## Formal @@ -43,7 +43,7 @@ variables: ## Advanced -مدة الانخفاض نفسها تحمل معلومة إضافية أيضًا. بالنسبة لكوكب في مدار قريب وسريع يعبر قرص النجم بسرعة تقارب 130 كم/ث، تستمر لحظة العبور نحو ساعتين إلى ثلاث ساعات لنجم بحجم الشمس، لكن بضع عشرات من الدقائق فقط لقزم أحمر صغير. وبجمع العمق مع المدة والدورة المدارية، يستطيع الفلكيون تحديد حجم الكوكب ومداره، بل وتقدير كثافته أيضًا انطلاقًا من كتلة النجم ونصف قطره. +مدة الانخفاض نفسها تحمل معلومة إضافية أيضًا. بالنسبة لكوكب في مدار قريب وسريع يعبر قرص النجم بسرعة تقارب 130 km/s، يستمر العبور نحو $2R_s / v$، أي نحو ثلاث ساعات لنجم بحجم الشمس، لكن بضع عشرات من الدقائق فقط لقزم أحمر صغير. وبجمع العمق مع المدة والدورة المدارية، يستطيع الفلكيون تحديد حجم الكوكب ومداره، بل وتقدير كثافته أيضًا انطلاقًا من كتلة النجم ونصف قطره. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### تلسكوب كيبلر الفضائي + رصد كيبلر أكثر من 150 ألف نجم طوال أربع سنوات، باحثًا عن الانخفاضات الدورية الصغيرة الناتجة عن عبور الكواكب، ووجد بهذه الطريقة آلاف الكواكب الخارجية المؤكدة. ### نظام TRAPPIST-1 + نجم قزم أحمر واحد صغير يستضيف سبعة كواكب قريبة من حجم الأرض، اكتُشفت جميعها وقيست عبر عمق عبورها وتوقيته. ### قياس غلاف جوي + حين يعبر كوكب أمام نجمه، يمر بعض ضوء النجم عبر حافة غلافه الجوي. وتحليل هذا الضوء إلى ألوانه يكشف غازات مثل بخار الماء أو الميثان في هواء الكوكب. ### لماذا الحجم وحده لا يعني الصلاحية للحياة + انخفاض عميق وسهل القياس يخبرك بحجم الكوكب فقط، لا بدرجة حرارته ولا بغلافه الجوي. لهذا يحتاج الفلكيون إلى بيانات أخرى قبل أن يصفوا عالمًا بأنه شبيه بالأرض. diff --git a/content/lessons/cosmos/exoplanet-transits/en.md b/content/lessons/cosmos/exoplanet-transits/en.md index 54413c21..b3a0b53a 100644 --- a/content/lessons/cosmos/exoplanet-transits/en.md +++ b/content/lessons/cosmos/exoplanet-transits/en.md @@ -5,34 +5,34 @@ parameters: Rp: planet radius Rs: star radius variables: - - 'the transit depth: the fraction of the star''s light blocked' + - "the transit depth: the fraction of the star's light blocked" - the planet's radius, in Earth radii (R⊕) - the star's radius, in solar radii (R☉) --- ## Try it -1. Start at «planet radius» = 1 and «star radius» = 1 — an Earth-sized planet crossing a Sun-sized star. Notice how shallow the dip in the light curve is. -2. Raise «planet radius» toward Jupiter's size (about 11 Earth radii) and watch the dip deepen. -3. Now shrink «star radius» toward a small red star. The same planet now blocks a much bigger share of the light. +1. Start at «planet radius» = 1 and «star radius» = 1 — an Earth-sized planet crossing a Sun-sized star. The light curve is zoomed in on the dip, so read its true size in the readout: only 84 ppm (0.0084 %). +2. Raise «planet radius» to 11.2, Jupiter's size. The planet's disc grows and the transit depth climbs to 1.05 %. +3. Now shrink «star radius» to 0.5, a small red star. The same planet now blocks a much bigger share of the light: 4.20 %. ## Real-life examples 1. **Earth crossing the Sun.** A planet the size of Earth in front of the Sun dims its light by only about 84 parts per million — so shallow that only space telescopes like Kepler can catch it. 2. **Jupiter crossing the Sun.** A gas giant about 11.2 Earth radii wide blocks roughly 1% of the Sun's light — a dip large enough that even careful ground-based telescopes can detect it. -3. **An Earth-sized planet around a red dwarf.** The TRAPPIST-1 system has planets close to Earth's size, but its star is only about 0.12 solar radii wide. That tiny star makes the dip about 0.5% deep — six times deeper than Jupiter makes in front of the Sun, even though the planet is far smaller. +3. **An Earth-sized planet around a red dwarf.** The TRAPPIST-1 system has planets close to Earth's size, but its star is only about 0.12 solar radii wide. That tiny star makes the dip about 0.5% deep — about half of what giant Jupiter makes in front of the Sun, and almost 60 times deeper than Earth's own dip. ## Test yourself 1. Make a dip deeper than 5% of the star's light. -2. Make a dip shallower than 100 parts per million — harder to spot than Earth's own transit. -3. Build a giant planet crossing a small star. +2. Make a dip shallower than 50 parts per million — even harder to spot than Earth's own transit. +3. Build a giant planet (more than 5 Earth radii) crossing a small star (under 0.15 solar radii). ## Intuition A star's light doesn't just wink out when a planet passes — the planet is tiny compared to the star, so it blocks only a small slice of the light, like a fly crossing in front of a spotlight far away. The bigger the fly relative to the spotlight, the more the light dims. A planet crossing a star works exactly the same way: the size of the planet compared to the size of the star is what decides how deep the dip is. -Drag «planet radius» up and the light curve's dip visibly deepens, because a bigger planet covers more of the star's disc. Drag «star radius» down instead and the dip deepens too — the planet hasn't changed, but it now covers a bigger fraction of a smaller star. That's why small, cool stars are some of the best places to hunt for small planets: the dip they cause is easier to see. +Drag «planet radius» up and the transit depth in the readout climbs, because a bigger planet covers more of the star's disc. Drag «star radius» down instead and the dip deepens too — the planet hasn't changed, but it now covers a bigger fraction of a smaller star. That's why small, cool stars are some of the best places to hunt for small planets: the dip they cause is easier to see. ## Formal @@ -53,13 +53,17 @@ How long the dip lasts also carries information: for a planet on a close, fast o ## Real world ### The Kepler space telescope + Kepler stared at over 150,000 stars for four years, watching for the tiny periodic dips of transiting planets, and found thousands of confirmed exoplanets this way. ### TRAPPIST-1 + This one small red dwarf hosts seven roughly Earth-sized planets, all found and measured through the depth and timing of their transits. ### Measuring an atmosphere + When a planet transits, some starlight filters through its atmosphere's edge; splitting that light into colors reveals gases like water vapor or methane in the planet's air. ### Why size alone isn't habitability + A deep, easy-to-measure transit only tells you a planet's size — not its temperature or atmosphere — which is why astronomers still need more data before calling a world Earth-like. diff --git a/content/lessons/cosmos/exoplanet-transits/lesson.yaml b/content/lessons/cosmos/exoplanet-transits/lesson.yaml index fe3c807d..dc486bb2 100644 --- a/content/lessons/cosmos/exoplanet-transits/lesson.yaml +++ b/content/lessons/cosmos/exoplanet-transits/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: d = \frac{R_p^2}{R_s^2} concepts: -- exoplanets -- transit photometry -- light curves + - exoplanets + - transit photometry + - light curves prerequisites: [] related: -- parallax-and-distances -- life-of-a-star -- quasars + - parallax-and-distances + - life-of-a-star + - quasars visualization: type: exoplanet-transits options: {} @@ -32,21 +32,21 @@ parameters: value: 1 unit: R☉ variables: -- d -- R_p -- R_s + - d + - R_p + - R_s derivation: -- \frac{R_p}{R_s} -- \left(\frac{R_p}{R_s}\right)^2 -- d = \frac{R_p^2}{R_s^2} + - \frac{R_p}{R_s} + - \left(\frac{R_p}{R_s}\right)^2 + - d = \frac{R_p^2}{R_s^2} presets: -- Rp: 1 - Rs: 1 -- Rp: 11.2 - Rs: 1 -- Rp: 0.92 - Rs: 0.12 + - Rp: 1 + Rs: 1 + - Rp: 11.2 + Rs: 1 + - Rp: 0.92 + Rs: 0.12 challenges: -- check: (Rp*6371/(Rs*696000))^2 > 0.05 -- check: (Rp*6371/(Rs*696000))^2 < 0.0001 -- check: Rs < 0.15 and Rp > 5 + - check: (Rp*6371/(Rs*696000))^2 > 0.05 + - check: (Rp*6371/(Rs*696000))^2 < 0.00005 + - check: Rs < 0.15 and Rp > 5 diff --git a/content/lessons/cosmos/expanding-universe-hubble-law/ar.md b/content/lessons/cosmos/expanding-universe-hubble-law/ar.md index 52bf65b9..849efbf4 100644 --- a/content/lessons/cosmos/expanding-universe-hubble-law/ar.md +++ b/content/lessons/cosmos/expanding-universe-hubble-law/ar.md @@ -7,26 +7,26 @@ parameters: ol: الطاقة المظلمة ΩΛ tView: لحظة من الزمن الكوني variables: -- 'سرعة الابتعاد: مدى سرعة ابتعاد المجرة الظاهرية عنا' -- ثابت هابل، ونحو 70 km/s لكل ميغافرسك اليوم -- البعد الفعلي عن المجرة في هذه اللحظة + - 'سرعة الابتعاد: السرعة التي تبدو المجرة مبتعدة بها عنا' + - ثابت هابل، وقيمته اليوم نحو 70 km/s لكل ميغا فرسخ فلكي (Mpc) + - البعد الفعلي عن المجرة في هذه اللحظة --- ## Try it -1. اسحب «لحظة من الزمن الكوني» من اليسار إلى اليمين. راقب نقاط المجرات وهي تتباعد أكثر مع تقدم الخط الزمني. -2. اقرأ منحنى a(t) أسفل الرسم. ارتفاعه هو عامل تمدد الكون، أي كم يكبر كل شيء مقارنة باليوم. -3. تفحّص القراءة: تخبرك إن كان التمدد يتسارع أو يتباطأ في تلك اللحظة. +1. أبقِ Ωm عند 0.3 وΩΛ عند 0.7. اسحب «لحظة من الزمن الكوني» من 0.1 إلى 0.6. تتباعد نقاط المجرات أكثر، ويكبر الحجم في القراءة من 0.33 إلى 1.41. +2. اقرأ منحنى a(t) على اليمين. ارتفاعه هو عامل تمدد الكون، أي حجم كل شيء مقارنة باليوم، وحجم اليوم يُحسب 1. +3. انظر إلى القراءة: تخبرك إن كان التمدد يتسارع أو يتباطأ في تلك اللحظة. عند 0.2 يتباطأ، وعند 0.6 يتسارع. ## Real-life examples -1. **كون نموذجي من مادة فقط، اليوم.** عند Ωm يساوي 1 وΩΛ يساوي 0، تعمل جاذبية المادة العادية وحدها، فتُبطئ التمدد مع الزمن. +1. **كون نموذجي من مادة فقط.** عند Ωm يساوي 1 وΩΛ يساوي 0، تعمل جاذبية المادة العادية وحدها، فتُبطئ التمدد مع الزمن. 2. **كون فارغ يتمدد بلا تسارع.** عند Ωm وΩΛ يساويان 0 كلاهما، لا شيء يسرّع التمدد أو يبطئه، فتتباعد المجرات بمعدل ثابت فقط. 3. **كون يشبه كوننا.** نحو 30% مادة و70% طاقة مظلمة: الجاذبية أبطأت التمدد في البداية، ثم غلبت الطاقة المظلمة فعاد التمدد يتسارع. ## Test yourself -1. اضبط الخط الزمني على اليوم، في أقصى اليمين. +1. اسحب الخط الزمني إلى أقصى اليمين، إلى 1: المستقبل البعيد، بعد 31.7 مليار سنة من الانفجار العظيم. 2. اصنع كونًا بلا طاقة مظلمة إطلاقًا. 3. اصنع كونًا بلا أي مادة فيه إطلاقًا. @@ -40,11 +40,11 @@ variables: معامل هابل يقيس مدى سرعة نمو عامل تمدد الكون: $H(t) = \dot a/a$. وفي أي لحظة، يكون البعد الفعلي عن مجرة $d = a\,d_0$، حيث $d_0$ بعد مرجعي ثابت و$a$ عامل التمدد. -اشتقاق هذا البعد بالنسبة للزمن، وحسابه اليوم حين $a=1$، يعطي قانون هابل: $v = H_0 d$. فمجرة أبعد بضعفين تبتعد بسرعة ضعف السرعة، أيًا كانت المجرة التي تبدأ منها. +اشتقاق هذا البعد بالنسبة للزمن، وحسابه اليوم حين $a=1$، يعطي قانون هابل: $v = H_0 d$. فالمجرة التي تبعد ضعف المسافة تبتعد بضعف السرعة، أيًا كانت المجرة التي تبدأ منها. ## Advanced -قاس إدوين هابل هذه العلاقة عام 1929 بعشرات مجرات فقط، وبقيمة لـ$H_0$ أكبر عدة مرات من الصحيحة. أفضل التقديرات اليوم تقع بين 67 و73 km/s/Mpc، مع خلاف بسيط بين طرق القياس يُعرف بتوتر هابل. الابتعاد ليس مجرات تطير عبر الفضاء، بل الفضاء نفسه يتمدد بينها، ولهذا تُسمح سرعات أعلى من سرعة الضوء لأبعد المجرات دون أن تخالف النسبية. +قاس إدوين هابل هذه العلاقة عام 1929 بعشرات مجرات فقط، وبقيمة لـ$H_0$ أكبر عدة مرات من الصحيحة. أفضل التقديرات اليوم تقع بين 67 و73 km/s/Mpc، مع خلاف بسيط بين طرق القياس يُعرف بتوتر هابل. الابتعاد ليس مجرات تطير عبر الفضاء، بل الفضاء نفسه يتمدد بينها، ولهذا يُسمح بسرعات أعلى من سرعة الضوء لأبعد المجرات دون أن تخالف النسبية. ## Derivation @@ -55,10 +55,13 @@ variables: ## Real world ### قياس الانزياح الأحمر + يستنتج الفلكيون سرعة ابتعاد مجرة من مقدار تمدد ضوئها نحو الطرف الأحمر من الطيف، وهو أثر مباشر للتمدد. ### بناء سلّم المسافات الكوني + يتيح قانون هابل، بعد معايرته بقياسات أقرب، للفلكيين تقدير أبعاد مجرات أبعد من أن تُقاس بأي طريقة أخرى. ### تسمية تلسكوب هابل الفضائي + أُطلق التلسكوب عام 1990 وسُمي تكريمًا لإدوين هابل لهذا الاكتشاف، وقد دقق منذ ذلك الحين الثابت الذي يحمل اسمه. diff --git a/content/lessons/cosmos/expanding-universe-hubble-law/en.md b/content/lessons/cosmos/expanding-universe-hubble-law/en.md index 0bc1d1da..2290ce1a 100644 --- a/content/lessons/cosmos/expanding-universe-hubble-law/en.md +++ b/content/lessons/cosmos/expanding-universe-hubble-law/en.md @@ -6,26 +6,26 @@ parameters: ol: dark energy ΩΛ tView: point in cosmic time variables: -- 'recession speed: how fast a galaxy appears to move away' -- the Hubble constant, roughly 70 km/s per megaparsec today -- the proper distance to the galaxy right now + - 'recession speed: how fast a galaxy appears to move away' + - the Hubble constant, roughly 70 km/s per megaparsec today + - the proper distance to the galaxy right now --- ## Try it -1. Drag «point in cosmic time» from left to right. Watch the galaxy dots spread farther apart as the timeline advances. -2. Read the a(t) curve below. Its height is the universe's scale factor — how much bigger everything is compared to today. -3. Check the readout: it tells you whether the expansion is speeding up or slowing down at that moment. +1. Keep Ωm at 0.3 and ΩΛ at 0.7. Drag «point in cosmic time» from 0.1 to 0.6. The galaxy dots spread farther apart, and the size in the readout grows from 0.33 to 1.41. +2. Read the a(t) curve on the right. Its height is the universe's scale factor — how big everything is compared to today, where today counts as 1. +3. Check the readout: it tells you whether the expansion is speeding up or slowing down at that moment. At 0.2 it is slowing down; at 0.6 it is speeding up. ## Real-life examples -1. **Matter-only toy universe, today.** With Ωm at 1 and ΩΛ at 0, gravity from ordinary matter is the only thing acting, and it slows the expansion down over time. +1. **Matter-only toy universe.** With Ωm at 1 and ΩΛ at 0, gravity from ordinary matter is the only thing acting, and it slows the expansion down over time. 2. **An empty, coasting universe.** With both Ωm and ΩΛ at 0, there is nothing to speed up or slow down the expansion — galaxies just drift apart at a constant rate. 3. **A universe like ours.** About 30% matter and 70% dark energy: gravity slowed the expansion at first, then dark energy took over and it started speeding up again. ## Test yourself -1. Set the timeline to today, at the far right. +1. Drag the timeline all the way to the right, to 1: the far future, 31.7 billion years after the Big Bang. 2. Model a universe with no dark energy at all. 3. Model a universe with no matter in it at all. @@ -54,10 +54,13 @@ Edwin Hubble measured this relation in 1929 using just a few dozen galaxies and ## Real world ### Measuring redshift + Astronomers infer a galaxy's recession speed from how much its light has stretched toward the red end of the spectrum, a direct fingerprint of the expansion. ### Building the cosmic distance ladder + Hubble's law, calibrated against nearer distance measurements, lets astronomers estimate distances to galaxies far too far away to measure any other way. ### Naming the Hubble Space Telescope + The telescope launched in 1990 was named after Edwin Hubble for this discovery, and has since refined the constant that bears his name. diff --git a/content/lessons/cosmos/expanding-universe-hubble-law/lesson.yaml b/content/lessons/cosmos/expanding-universe-hubble-law/lesson.yaml index a27f7a8d..7b846ce1 100644 --- a/content/lessons/cosmos/expanding-universe-hubble-law/lesson.yaml +++ b/content/lessons/cosmos/expanding-universe-hubble-law/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: v = H_0 d concepts: -- cosmic expansion -- Hubble's law -- redshift + - cosmic expansion + - Hubble's law + - redshift prerequisites: -- exponential-growth + - exponential-growth related: -- dark-energy -- cosmic-microwave-background + - dark-energy + - cosmic-microwave-background visualization: type: expansion options: {} @@ -23,38 +23,38 @@ parameters: min: 0 max: 1 step: 0.01 - value: 1 + value: 0.3 ol: min: 0 max: 1 step: 0.01 - value: 0 + value: 0.7 tView: min: 0 max: 1 step: 0.01 value: 0.6 variables: -- v -- H_0 -- d + - v + - H_0 + - d derivation: -- H(t) = \frac{\dot a}{a} -- d = a\,d_0 -- v = \dot d = H_0 d + - H(t) = \frac{\dot a}{a} + - d = a\,d_0 + - v = \dot d = H_0 d presets: -- om: 1 - ol: 0 - tView: 1 -- om: 0 - ol: 0 - tView: 1 -- om: 0.3 - ol: 0.7 - tView: 1 + - om: 1 + ol: 0 + tView: 1 + - om: 0 + ol: 0 + tView: 1 + - om: 0.3 + ol: 0.7 + tView: 0.95 challenges: -- check: tView - target: 1 - tol: 0.02 -- check: abs(ol) < 0.02 -- check: abs(om) < 0.02 + - check: tView + target: 1 + tol: 0.02 + - check: abs(ol) < 0.02 + - check: abs(om) < 0.02 diff --git a/content/lessons/cosmos/gravitational-lensing/ar.md b/content/lessons/cosmos/gravitational-lensing/ar.md index 572a1243..6380f026 100644 --- a/content/lessons/cosmos/gravitational-lensing/ar.md +++ b/content/lessons/cosmos/gravitational-lensing/ar.md @@ -6,29 +6,29 @@ parameters: M: كتلة العدسة M offset: موضع المصدر variables: -- 'نصف قطر أينشتاين: حجم حلقة الضوء المنحني، بوحدة ثانية القوس' -- كتلة العدسة، بالوحدة التي يستخدمها الرسم -- زاوية انحناء شعاع الضوء وهو يمر قرب العدسة -- أقرب مسافة يمر بها الشعاع من مركز العدسة + - 'نصف قطر أينشتاين: حجم حلقة الضوء المنحني، مقيسًا بنصف ارتفاع الصورة' + - كتلة العدسة، بالوحدة التي يستخدمها الرسم + - زاوية انحناء شعاع الضوء وهو يمر قرب العدسة + - أقرب مسافة يمر بها الشعاع من مركز العدسة --- ## Try it -1. اسحب «موضع المصدر» نحو 0. تتجمع صور المجرة الخلفية المشوهة في حلقة واحدة. -2. ارفع «كتلة العدسة M». تكبر الحلقة، لأن العدسة الأثقل تحني الضوء بزاوية أوسع. -3. حرّك «موضع المصدر» بعيدًا عن 0 مجددًا. تنكسر الحلقة إلى قوسين منفصلين على جانبي العدسة. +1. اسحب «موضع المصدر» إلى 0. تتجمع صور المجرة الخلفية المشوهة في حلقة واحدة، وتقول القراءة «حلقة كاملة» ونصف قطر أينشتاين 0.240. +2. ارفع «كتلة العدسة M» من 4 إلى 9. تكبر الحلقة ويرتفع نصف قطر أينشتاين إلى 0.360، لأن العدسة الأثقل تحني الضوء بزاوية أوسع. +3. حرّك «موضع المصدر» إلى 0.1. تنقطع الحلقة إلى قوسين منفصلين على جانبي العدسة، وتصير القراءة «أقواس لامعة». ## Real-life examples 1. **نجم منفرد في المقدمة.** تحني عدسة خفيفة كتلتها 1 الضوء بمقدار بسيط حين يبعد المصدر الخلفي عن المركز، فتزيح صورته قليلًا (عدسة مجهرية). 2. **كوازار في محاذاة تامة.** عند موضع مصدر يساوي 0، تصنع عدسة كتلتها 4 حلقة ضوء كاملة غير منقطعة. -3. **عنقود مجري ضخم.** تمدد عدسة كتلتها 8، قريبة من المركز قليلًا، المجرات الخلفية إلى أقواس طويلة لامعة. +3. **عنقود مجري ضخم.** عدسة كتلتها 8، والمصدر منحرف قليلًا عن المركز، تمطّ المجرات الخلفية إلى أقواس طويلة لامعة. ## Test yourself -1. حاذِ المصدر مع العدسة لتصنع حلقة أينشتاين كاملة. +1. ضع المصدر خلف العدسة تمامًا لتصنع حلقة أينشتاين كاملة. 2. اضبط كتلة العدسة حتى يصبح نصف قطر الحلقة نحو 0.3. -3. ابنِ عدسة أثقل من 8 وشاهد كم تتسع حلقتها. +3. اصنع عدسة أثقل من 8 وشاهد كم تتسع حلقتها. ## Intuition @@ -48,20 +48,24 @@ variables: ## Derivation -1. شعاع ضوء يمر قرب كتلة عند أقرب مسافة ينحرف بزاوية تحددها تلك الكتلة وقرب مرور الشعاع منها. +1. شعاع ضوء يمر قرب كتلة عند أقرب مسافة ينحرف بزاوية تحددها تلك الكتلة ومدى قرب الشعاع منها. 2. حين يتحاذى المصدر والعدسة والراصد تمامًا، لا بد أن تساوي زاوية الانحناء نصف القطر الزاوي للحلقة التي يراها الراصد. -3. حل الهندسة لإيجاد ذلك النصف يعطي قاعدة بسيطة: تكبر الحلقة مع الجذر التربيعي لكتلة العدسة. +3. حساب نصف القطر هذا من هندسة المسألة يعطي قاعدة بسيطة: تكبر الحلقة مع الجذر التربيعي لكتلة العدسة. ## Real world ### عنقود الرصاصة + اصطدم عنقودان مجريان، وتُظهر خرائط عدسة الجاذبية أن معظم الكتلة يقع بعيدًا عن الغاز الساخن اللامع. هذا دليل مباشر قوي على وجود المادة المظلمة وضعف تفاعلها مع نفسها. ### وزن عناقيد المجرات + يرسم الفلكيون خرائط المادة المظلمة في العناقيد بقياس مقدار تشويهها للمجرات الواقعة خلفها بالضبط. ### البحث عن الكواكب الخارجية + قد تُضيء جاذبية نجم نجمًا خلفيًا للحظة وهو يمر أمامه. تسمى هذه الحيلة العدسة المجهرية، وقد كشفت كواكب أخفت من أن تُرى مباشرة. ### اختبار أينشتاين عام 1919 + قاست رحلة آرثر إدنجتون لرصد الكسوف انحناء ضوء النجوم حول الشمس، فأعطت النسبية العامة أول دليل رصدي قوي عليها. diff --git a/content/lessons/cosmos/gravitational-lensing/en.md b/content/lessons/cosmos/gravitational-lensing/en.md index 9c3d329a..e9817903 100644 --- a/content/lessons/cosmos/gravitational-lensing/en.md +++ b/content/lessons/cosmos/gravitational-lensing/en.md @@ -5,17 +5,17 @@ parameters: M: lens mass M offset: source position variables: -- 'the Einstein radius: how big the ring of bent light appears, in arcseconds' -- the lens mass, in the units the picture uses -- the angle a light ray bends as it passes the lens -- the closest distance the ray passes from the lens's center + - 'the Einstein radius: how big the ring of bent light appears, measured in half the height of the picture' + - the lens mass, in the units the picture uses + - the angle a light ray bends as it passes the lens + - the closest distance the ray passes from the lens's center --- ## Try it -1. Drag «source position» toward 0. The smeared images of the background galaxy pull together into a ring. -2. Raise «lens mass M». The ring grows, since a heavier lens bends light through a wider angle. -3. Move «source position» away from 0 again. The ring breaks into separate arcs on either side of the lens. +1. Drag «source position» to 0. The smeared images of the background galaxy pull together into a ring, and the readout says «a full ring» with an Einstein radius of 0.240. +2. Raise «lens mass M» from 4 to 9. The ring grows and the Einstein radius rises to 0.360, since a heavier lens bends light through a wider angle. +3. Move «source position» to 0.1. The ring breaks into separate arcs on either side of the lens, and the readout changes to «bright arcs». ## Real-life examples @@ -54,13 +54,17 @@ The full lens equation also depends on the distances between observer, lens, and ## Real world ### The Bullet Cluster + Two galaxy clusters collided, and lensing maps show most of the mass sitting apart from the glowing hot gas — strong direct evidence that dark matter exists and barely interacts with itself. ### Weighing galaxy clusters + Astronomers map dark matter in clusters by measuring exactly how much they distort the galaxies behind them. ### Hunting for exoplanets + A star's gravity can briefly brighten a background star as it passes in front, a trick called microlensing that has revealed planets too faint to see directly. ### Testing Einstein in 1919 + Arthur Eddington's eclipse expedition measured starlight bending around the Sun, giving general relativity its first strong observational proof. diff --git a/content/lessons/cosmos/gravitational-lensing/lesson.yaml b/content/lessons/cosmos/gravitational-lensing/lesson.yaml index b8828c8a..b8f8136f 100644 --- a/content/lessons/cosmos/gravitational-lensing/lesson.yaml +++ b/content/lessons/cosmos/gravitational-lensing/lesson.yaml @@ -3,16 +3,16 @@ subject: cosmos difficulty: high-school equation: \theta_E = 0.12\sqrt{M} concepts: -- gravitational lensing -- Einstein ring -- dark matter + - gravitational lensing + - Einstein ring + - dark matter prerequisites: -- universal-gravitation + - universal-gravitation related: -- dark-matter-rotation-curves -- quasars -- gravity-as-curved-spacetime -- black-holes + - dark-matter-rotation-curves + - quasars + - gravity-as-curved-spacetime + - black-holes visualization: type: lensing options: {} @@ -33,24 +33,24 @@ parameters: step: 0.01 value: 0.25 variables: -- \theta_E -- M -- \alpha -- b + - \theta_E + - M + - \alpha + - b derivation: -- \alpha = \frac{4GM}{c^2 b} -- \theta_E \approx \alpha -- \theta_E = 0.12\sqrt{M} + - \alpha = \frac{4GM}{c^2 b} + - \theta_E \approx \alpha + - \theta_E = 0.12\sqrt{M} presets: -- M: 1 - offset: 0.4 -- M: 4 - offset: 0 -- M: 8 - offset: 0.1 + - M: 1 + offset: 0.4 + - M: 4 + offset: 0 + - M: 8 + offset: 0.1 challenges: -- check: abs(offset) < 0.05 -- check: 0.12*sqrt(M) - target: 0.3 - tol: 0.02 -- check: M > 8 + - check: abs(offset) < 0.05 + - check: 0.12*sqrt(M) + target: 0.3 + tol: 0.02 + - check: M > 8 diff --git a/content/lessons/cosmos/life-of-a-star/ar.md b/content/lessons/cosmos/life-of-a-star/ar.md index 43acb189..19b15b69 100644 --- a/content/lessons/cosmos/life-of-a-star/ar.md +++ b/content/lessons/cosmos/life-of-a-star/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اضبط «كتلة النجم» على 1 (مثل الشمس) واسحب «العمر» إلى ما بعد 1.1. شاهد النجم ينتفخ إلى عملاق أحمر، ثم ينكمش إلى قزم أبيض صغير. -2. ارفع «كتلة النجم» فوق 20 واسحب «العمر» إلى أقصى اليمين. يومض النجم كمستعر أعظم ويترك خلفه ثقبًا أسود. -3. أنزل «كتلة النجم» تحت 0.5 واسحب «العمر» إلى النهاية. القزم الأحمر بالكاد يتغير. فقطع هذه المسافة يحتاج تريليونات السنين. +1. اضبط «كتلة النجم» على 1 (مثل الشمس) واسحب «العمر» ببطء من 1 إلى 1.15. عند 1.1 يكون النجم قد انتفخ إلى عملاق أحمر نصف قطره 150 ضعف نصف قطر الشمس، وعند 1.15 يكون قد انكمش إلى قزم أبيض صغير نصف قطره 0.011 R☉. +2. ارفع «كتلة النجم» فوق 20 واسحب «العمر» ببطء إلى أقصى اليمين. قرب 1.13 يومض النجم كمستعر أعظم، وعند 1.15 يكون قد ترك خلفه ثقبًا أسود. +3. أنزل «كتلة النجم» إلى 0.2 واسحب «العمر» إلى النهاية. القزم الأحمر لا يتغير، وتبقى المرحلة «الاحتراق الرئيسي»، فعمره في القراءة 559.02 مليار سنة. ## Real-life examples @@ -25,15 +25,15 @@ variables: ## Test yourself -1. ابنِ نجمًا ثقيلًا بما يكفي ليترك خلفه ثقبًا أسود. -2. ابنِ قزمًا أحمر سيبقى مشتعلًا بعد أن تنطفئ كل نجوم الكون تقريبًا. -3. قدّم الزمن لنجم ثقيل حتى لحظة انهيار قلبه إلى نجم نيوتروني. +1. اصنع نجمًا ثقيلًا بما يكفي (فوق 20 M☉) ليترك خلفه ثقبًا أسود. +2. اصنع قزمًا أحمر (تحت 0.5 M☉) سيبقى مشتعلًا بعد أن تنطفئ كل نجوم الكون تقريبًا. +3. قدّم الزمن لنجم ثقيل (من 8 إلى 20 M☉) حتى تصير المرحلة «نجم نيوتروني»، عند عمر أكبر من 1.12. ## Intuition النجم ساحة صراع دائم بين الجاذبية التي تحاول سحقه باستمرار، وضغط الاندماج النووي في قلبه الذي يدفع بعكس اتجاهها. النجم الثقيل يحتاج أن يندمج الهيدروجين بسرعة أكبر بكثير ليحمل وزنه الزائد، فيحترق بشراسة وينهي عمره بسرعة. أما النجم الخفيف فيأخذ وقته، يرشف وقوده ببطء لعصور طويلة. هذه الحقيقة الواحدة، أن الكتلة تحدد الإيقاع، هي التي تقرر كل شيء آخر في حياة النجم. -اسحب «كتلة النجم» للأعلى فيصبح النجم في النموذج أسخن وأزرق اللون أكثر، لأن قلب النجم الثقيل يعمل بحرارة أعلى ليسند الوزن الإضافي فوقه. اسحب «العمر» للأمام فتقدّم الزمن عبر حياة النجم كاملة، من فترة هادئة طويلة تُسمى الاحتراق الرئيسي، إلى نهاية قصيرة ودراماتيكية تعتمد كليًا على مقدار الكتلة التي بدأ بها النجم. +زِد «كتلة النجم» فيصبح النجم في النموذج أسخن وأكثر زرقة، لأن قلب النجم الثقيل يعمل بحرارة أعلى ليسند الوزن الإضافي فوقه. اسحب «العمر» إلى الأمام فتقدّم الزمن عبر حياة النجم كاملة، من فترة هادئة طويلة تُسمى الاحتراق الرئيسي، إلى نهاية قصيرة وعنيفة تعتمد كليًا على مقدار الكتلة التي بدأ بها النجم. ## Formal @@ -43,7 +43,7 @@ variables: ## Advanced -حدود الكتلة التي تفصل مصائر النجوم تقريبية لكنها راسخة علميًا. تحت نحو 0.5 M☉ يبقى القزم الأحمر على الاحتراق الرئيسي مدة أطول من عمر الكون الحالي. بين نحو 0.5 و8 M☉ ينتفخ النجم إلى عملاق أحمر، ثم يتخلص من طبقاته الخارجية ويترك خلفه قزمًا أبيض بحجم الأرض تقريبًا. وفوق نحو 8 M☉ يستمر الاندماج في قلب النجم حتى يصل إلى الحديد الذي لا يمكن أن يطلق طاقة أكثر منه. فينهار القلب في أقل من ثانية، وينفجر النجم كمستعر أعظم، تاركًا نجمًا نيوترونيًا (تحت نحو 20 M☉) أو ثقبًا أسود (فوق ذلك). +حدود الكتلة التي تفصل مصائر النجوم تقريبية لكنها راسخة علميًا. تحت نحو 0.5 M☉ يبقى القزم الأحمر على الاحتراق الرئيسي مدة أطول من عمر الكون الحالي. بين نحو 0.5 و8 M☉ ينتفخ النجم إلى عملاق أحمر، ثم يتخلص من طبقاته الخارجية ويترك خلفه قزمًا أبيض بحجم الأرض تقريبًا. وفوق نحو 8 M☉ يستمر الاندماج في قلب النجم حتى يصل إلى الحديد، والحديد لا يعطي اندماجه طاقة. فينهار القلب في أقل من ثانية، وينفجر النجم كمستعر أعظم، تاركًا نجمًا نيوترونيًا (تحت نحو 20 M☉) أو ثقبًا أسود (فوق ذلك). ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### المستعر الأعظم 1987A -في فبراير 1987 شاهد الفلكيون عملاقًا أزرق فائقًا كتلته نحو 20 ضعف كتلة الشمس ينفجر في مجرة مجاورة. كان أقرب مستعر أعظم يُرصد منذ قرون، وأول مرة تُكتشف فيها نيوترينوات صادرة من انهيار قلب نجمي على الأرض. + +في فبراير 1987 شاهد الفلكيون عملاقًا أزرق فائقًا كتلته نحو 20 ضعف كتلة الشمس ينفجر في مجرة مجاورة. كان أقرب مستعر أعظم يُرصد منذ قرون، وأول مرة تلتقط فيها أجهزة على الأرض نيوترينوات صادرة من انهيار قلب نجم. ### تأريخ عناقيد النجوم + يقدّر الفلكيون عمر عنقود نجمي بإيجاد النجوم التي غادرت الاحتراق الرئيسي بالفعل. أثقل نجم ما يزال على الاحتراق الرئيسي يحدد عمرًا أقصى للعنقود، لأن أي نجم أثقل منه كان سيرحل بالفعل. ### من أين تأتي العناصر الثقيلة -تصنع المستعرات الأعظم وتنثر عناصر أثقل من الحديد، ومنها معظم الذهب والفضة واليورانيوم الموجود على الأرض. فموت نجم ثقيل بعنف يزرع بذور الكواكب القادمة. + +تصنع المستعرات العظمى وتنثر عناصر أثقل من الحديد، ومنها معظم الذهب والفضة واليورانيوم الموجود على الأرض. فموت نجم ثقيل بعنف يزرع بذور الكواكب القادمة. ### الأقزام البيضاء كساعات كونية + لأن الأقزام البيضاء تبرد بمعدل ثابت معروف، فقياس مدى برودة أحدها يخبر الفلكيين منذ متى مات النجم الذي جاء منه. diff --git a/content/lessons/cosmos/life-of-a-star/en.md b/content/lessons/cosmos/life-of-a-star/en.md index 2652522a..fe8de873 100644 --- a/content/lessons/cosmos/life-of-a-star/en.md +++ b/content/lessons/cosmos/life-of-a-star/en.md @@ -12,9 +12,9 @@ variables: ## Try it -1. Set «star's mass» to 1 (the Sun) and drag «age» past 1.1. Watch the star swell into a red giant, then shrink to a small white dwarf. -2. Push «star's mass» above 20 and drag «age» to the far right. The star flashes as a supernova and leaves a black hole behind. -3. Drop «star's mass» below 0.5 and drag «age» all the way across. A red dwarf barely changes — it would take trillions of years to get this far. +1. Set «star's mass» to 1 (the Sun) and drag «age» slowly from 1 to 1.15. At 1.1 the star has swollen into a red giant 150 times the Sun's radius; at 1.15 it has shrunk to a small white dwarf of 0.011 R☉. +2. Push «star's mass» above 20 and drag «age» slowly to the far right. Near 1.13 the star flashes as a supernova, and at 1.15 it has left a black hole behind. +3. Drop «star's mass» to 0.2 and drag «age» all the way across. The red dwarf does not change and the stage stays «main sequence» — its lifetime reads 559.02 billion years. ## Real-life examples @@ -24,9 +24,9 @@ variables: ## Test yourself -1. Build a star massive enough that it will leave a black hole behind. -2. Build a red dwarf that will keep shining long after the universe's stars have all gone dark. -3. Fast-forward a massive star to the moment its core collapses into a neutron star. +1. Build a star massive enough (above 20 M☉) that it will leave a black hole behind. +2. Build a red dwarf (below 0.5 M☉) that will keep shining long after the universe's stars have all gone dark. +3. Fast-forward a massive star (8 to 20 M☉) until the stage reads «neutron star», at an age above 1.12. ## Intuition @@ -53,13 +53,17 @@ The mass thresholds that split a star's fate are approximate but well establishe ## Real world ### Supernova 1987A + In February 1987, astronomers watched a blue supergiant about 20 times the Sun's mass explode in a nearby galaxy — the nearest supernova seen in centuries, and the first time neutrinos from a collapsing core were detected on Earth. ### Dating star clusters + Astronomers estimate a star cluster's age by finding which stars have already left the main sequence: the heaviest surviving main-sequence star sets a maximum age, since anything heavier would already be gone. ### Where heavy elements come from + Supernovae forge and scatter elements heavier than iron — including much of the gold, silver, and uranium on Earth — so a massive star's violent death seeds the next generation of planets. ### White dwarfs as cosmic clocks + Because white dwarfs cool at a known, steady rate, measuring how cool one has become tells astronomers how long ago its parent star died. diff --git a/content/lessons/cosmos/life-of-a-star/lesson.yaml b/content/lessons/cosmos/life-of-a-star/lesson.yaml index aa3552cd..ee8697aa 100644 --- a/content/lessons/cosmos/life-of-a-star/lesson.yaml +++ b/content/lessons/cosmos/life-of-a-star/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: t = 10\,M^{-2.5} concepts: -- stellar evolution -- main-sequence lifetime -- supernova + - stellar evolution + - main-sequence lifetime + - supernova prerequisites: [] related: -- dark-matter-rotation-curves -- quasars -- cosmic-microwave-background + - dark-matter-rotation-curves + - quasars + - cosmic-microwave-background visualization: type: stellar-evolution options: {} @@ -31,21 +31,21 @@ parameters: step: 0.01 value: 0.5 variables: -- t -- M -- L + - t + - M + - L derivation: -- L = M^{3.5} -- t = \frac{M}{L} -- t = 10\,M^{-2.5} + - L = M^{3.5} + - t = \frac{M}{L} + - t = 10\,M^{-2.5} presets: -- mass: 0.12 - age: 0.5 -- mass: 1 - age: 0.46 -- mass: 18 - age: 1.09 + - mass: 0.12 + age: 0.5 + - mass: 1 + age: 0.46 + - mass: 18 + age: 1.09 challenges: -- check: mass > 20 -- check: mass < 0.5 -- check: age > 1.1 and mass >= 8 and mass < 20 + - check: mass > 20 + - check: mass < 0.5 + - check: age > 1.12 and mass >= 8 and mass < 20 diff --git a/content/lessons/cosmos/parallax-and-distances/ar.md b/content/lessons/cosmos/parallax-and-distances/ar.md index 22dbffdd..76e14e9d 100644 --- a/content/lessons/cosmos/parallax-and-distances/ar.md +++ b/content/lessons/cosmos/parallax-and-distances/ar.md @@ -7,33 +7,33 @@ parameters: baseline: عرض خط الأساس variables: - المسافة إلى النجم، بوحدة الفرسخ الفلكي (parsec) - - 'خط الأساس: المسافة بين نقطتي الرصد، بوحدة الوحدة الفلكية (AU)' + - 'خط الأساس: المسافة بين نقطتي الرصد، بالوحدات الفلكية (AU)' - 'زاوية التزيح: نصف الانزياح الظاهري السنوي للنجم، بوحدة ثانية القوس' --- ## Try it -1. اضبط «زاوية التزيح» على 0.768 ثانية قوس مع «عرض خط الأساس» = 1 وحدة فلكية. هذا هو الانزياح الحقيقي لأقرب نجم إلى الشمس. اقرأ بُعده. -2. صغّر «زاوية التزيح» نحو 0.01. يجب أن يكون النجم أبعد بكثير ليصنع انزياحًا بهذا الصِّغر. -3. الآن ارفع «عرض خط الأساس» نحو 30 وحدة فلكية، كأن مدار الأرض بعرض مدار نبتون. الانزياح الصغير نفسه يصل الآن إلى نجم يبعد آلاف الفرسخات. +1. اضبط «زاوية التزيح» على 0.768 ثانية قوس مع «عرض خط الأساس» = 1 وحدة فلكية. هذا هو الانزياح الحقيقي لأقرب نجم إلى الشمس. اقرأ بُعده: 1.30 فرسخ، أي 4.25 سنة ضوئية. +2. صغّر «زاوية التزيح» إلى 0.01. لا بد أن النجم أبعد بكثير ليصنع انزياحًا بهذا الصِّغر: 100 فرسخ. +3. الآن ارفع «عرض خط الأساس» إلى 30 وحدة فلكية، كأن مدار الأرض بعرض مدار نبتون. الانزياح الصغير نفسه يصل الآن إلى نجم يبعد 3000 فرسخ. ## Real-life examples 1. **بروكسيما قنطورس.** بخط أساس الأرض نفسه (1 وحدة فلكية)، يُظهر أقرب نجم إلى الشمس تزيحًا مقداره 0.768 ثانية قوس، فيقع على بُعد 1.30 فرسخ، أي نحو 4.25 سنة ضوئية. 2. **61 قيقنوس.** عام 1838 قاس فريدريش بسل انزياحًا ضئيلًا لهذا النجم مقداره 0.286 ثانية قوس، فكان أول إنسان يقيس بُعد نجم مباشرة، وهو 3.50 فرسخ، أي نحو 11.4 سنة ضوئية. -3. **نجم أبعد من طاقة مدار الأرض.** تزيح مقداره 0.01 ثانية قوس فقط أصغر من أن يُقاس بثقة من خط أساس الأرض ذي الوحدة الفلكية الواحدة. لكن مسبارًا يدور بعيدًا بقدر مدار نبتون، مستخدمًا خط أساس 30 وحدة فلكية، يستطيع تثبيت الزاوية الصغيرة نفسها لنجم يبعد 3000 فرسخ، أي نحو 9800 سنة ضوئية تقريبًا. +3. **نجم أبعد من أن يقيسه مدار الأرض.** تزيح مقداره 0.01 ثانية قوس فقط أصغر من أن يُقاس بثقة من خط أساس الأرض ذي الوحدة الفلكية الواحدة. لكن مسبارًا يدور بعيدًا بقدر مدار نبتون، مستخدمًا خط أساس 30 وحدة فلكية، يستطيع تثبيت الزاوية الصغيرة نفسها لنجم يبعد 3000 فرسخ، أي نحو 9800 سنة ضوئية. ## Test yourself -1. أعد إنتاج بُعد بروكسيما قنطورس الحقيقي، نحو 1.3 فرسخ. +1. اضبط القيم حتى تحصل على بُعد بروكسيما قنطورس الحقيقي، نحو 1.3 فرسخ. 2. قِس بُعد نجم يزيد على 1000 فرسخ. -3. قِس بُعد نجم قريب مستخدمًا مدار الأرض وحده (1 وحدة فلكية). +3. قِس بُعد نجم قريب (تزيحه أكبر من 0.5 ثانية قوس) مستخدمًا مدار الأرض وحده (1 وحدة فلكية). ## Intuition ارفع إصبعك على مسافة ذراع وأغمض عينًا ثم الأخرى. سترى إصبعك يقفز أمام الخلفية. الأشياء القريبة تقفز أكثر من البعيدة. تخيّل الآن أن هذه «القفزة» ليست بين عينيك، بل بين موقعي الأرض على طرفي مدارها، بفارق ستة أشهر. النجوم القريبة تبدو وكأنها تنزاح قليلًا أمام النجوم الأبعد بكثير خلفها، راسمةً حلقة صغيرة على مدار السنة. -اسحب «زاوية التزيح» للأسفل فيجب أن يكون النجم أبعد بكثير ليصنع انزياحًا بهذا الصغر. فتكبر المسافة في الرسم بشدة. اسحب «عرض خط الأساس» للأعلى بدلًا من ذلك، فيصبح الانزياح نفسه يقابل مسافة أكبر أيضًا، لأن «تباعد عينين» أوسع يستطيع قياس الزاوية الصغيرة نفسها من مسافة أبعد. +صغّر «زاوية التزيح»، فلا بد أن النجم أبعد بكثير ليصنع انزياحًا بهذا الصغر. فتكبر المسافة في القراءة بشدة. كبّر «عرض خط الأساس» بدلًا من ذلك، فيصبح الانزياح نفسه يقابل مسافة أكبر أيضًا، لأن «تباعد عينين» أوسع يستطيع قياس الزاوية الصغيرة نفسها من مسافة أبعد. ## Formal @@ -43,7 +43,7 @@ variables: ## Advanced -تقتصر قياسات التزيح من سطح الأرض على دقة نحو 0.01 ثانية قوس بسبب تشويش الغلاف الجوي للضوء، مما يحدّ المسافات الموثوقة بضع مئات من الفرسخات فقط. أما التلسكوبات الفضائية فتتجنب هذا التشويش تمامًا. يقيس مسبار غايا التزيح بدقة عشرات الملايين من جزء ثانية القوس، فيصل إلى نجوم تبعد عشرات آلاف الفرسخات، ويرسم خريطة ثلاثية الأبعاد لأكثر من مليار نجم. +تقتصر قياسات التزيح من سطح الأرض على دقة نحو 0.01 ثانية قوس بسبب تشويش الغلاف الجوي للضوء، فلا تتجاوز المسافات الموثوقة بضع مئات من الفرسخات. أما التلسكوبات الفضائية فتتجنب هذا التشويش تمامًا. يقيس مسبار غايا التزيح بدقة تبلغ بضع عشرات من جزء من المليون من ثانية القوس، فيصل إلى نجوم تبعد عشرات آلاف الفرسخات، ويرسم خريطة ثلاثية الأبعاد لأكثر من مليار نجم. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### وحدة الفرسخ الفلكي نفسها + اخترع الفلكيون وحدة الفرسخ خصيصًا لتبقى هذه المعادلة بسيطة. فالفرسخ الواحد هو المسافة التي ينتج عندها خط أساس بطول وحدة فلكية واحدة تزيحًا مقداره ثانية قوس واحدة بالضبط. ### تلسكوب غايا الفضائي + قاس غايا مسافات التزيح لأكثر من مليار نجم، فبنى أدق خريطة ثلاثية الأبعاد لمجرة درب التبانة أُنجزت حتى الآن. ### الدرجة الأولى في سُلّم المسافات + لا يصل التزيح مباشرة إلا إلى النجوم القريبة، لكن الفلكيين يستخدمونه لمعايرة طرق قياس مسافات أخرى، مثل سطوع نوع معين من النجوم النابضة، تصل بعد ذلك إلى أبعاد أكبر بكثير في الكون. ### محاولات قديمة فشلت + بحث الفلكيون اليونانيون القدامى عن تزيح النجوم ولم يجدوه، فاستنتجوا بشكل صحيح أنه لا بد أن يكون أصغر من أن تراه العين المجردة. وهذا دليل، كما أدركوا، على أن النجوم بعيدة بشكل هائل. diff --git a/content/lessons/cosmos/parallax-and-distances/en.md b/content/lessons/cosmos/parallax-and-distances/en.md index 52b9ac16..b5c18369 100644 --- a/content/lessons/cosmos/parallax-and-distances/en.md +++ b/content/lessons/cosmos/parallax-and-distances/en.md @@ -7,14 +7,14 @@ parameters: variables: - distance to the star, in parsecs - 'the baseline: how far apart the two viewpoints are, in astronomical units (AU)' - - 'the parallax angle: half the star''s apparent yearly shift, in arcseconds' + - "the parallax angle: half the star's apparent yearly shift, in arcseconds" --- ## Try it -1. Set «parallax angle» to 0.768 arcseconds with «baseline width» = 1 AU — that's the real shift of the nearest star beyond the Sun. Read off its distance. -2. Shrink «parallax angle» toward 0.01. The star has to be much farther away to shift by such a tiny amount. -3. Now raise «baseline width» toward 30 AU, as if Earth's orbit were as wide as Neptune's. The same tiny shift now reaches a star thousands of parsecs away. +1. Set «parallax angle» to 0.768 arcseconds with «baseline width» = 1 AU — that's the real shift of the nearest star beyond the Sun. Read off its distance: 1.30 parsecs, or 4.25 light-years. +2. Shrink «parallax angle» to 0.01. The star has to be much farther away to shift by such a tiny amount: 100 parsecs. +3. Now raise «baseline width» to 30 AU, as if Earth's orbit were as wide as Neptune's. The same tiny shift now reaches a star 3000 parsecs away. ## Real-life examples @@ -26,13 +26,13 @@ variables: 1. Reproduce Proxima Centauri's real distance of about 1.3 parsecs. 2. Measure a star more than 1,000 parsecs away. -3. Measure a nearby star using only Earth's own 1 AU orbit. +3. Measure a nearby star (parallax above 0.5 arcseconds) using only Earth's own 1 AU orbit. ## Intuition Hold a finger up at arm's length and close one eye, then the other — your finger seems to jump against the background. Close things jump more than far things. Now imagine that "jump" isn't your two eyes but Earth itself, seen from opposite sides of its orbit six months apart: nearby stars appear to shift slightly against the far more distant stars behind them, tracing out a tiny loop over a year. -Drag «parallax angle» down and the star has to sit much farther away to produce such a small shift — the picture's distance grows sharply. Drag «baseline width» up instead, and the same shift now corresponds to a much bigger distance too, because a wider "eye separation" can measure the same tiny angle from farther out. +Drag «parallax angle» down and the star has to sit much farther away to produce such a small shift — the distance in the readout grows sharply. Drag «baseline width» up instead, and the same shift now corresponds to a much bigger distance too, because a wider "eye separation" can measure the same tiny angle from farther out. ## Formal @@ -53,13 +53,17 @@ Ground-based parallax measurements are limited to roughly 0.01 arcsecond precisi ## Real world ### The parsec itself + Astronomers invented the parsec specifically so this formula stays simple: 1 parsec is defined as the distance at which a 1 AU baseline produces exactly 1 arcsecond of parallax. ### The Gaia space telescope + Gaia has measured parallax distances for over a billion stars, building the most precise 3D map of the Milky Way ever made. ### The first rung of the distance ladder + Parallax only reaches nearby stars directly, but astronomers use it to calibrate other distance methods — like the brightness of certain pulsating stars — that then reach much farther across the universe. ### Ancient attempts that failed + Ancient Greek astronomers looked for stellar parallax and found none, correctly reasoning it must be too small to see with the naked eye — evidence, they realized, that the stars were staggeringly far away. diff --git a/content/lessons/cosmos/parallax-and-distances/lesson.yaml b/content/lessons/cosmos/parallax-and-distances/lesson.yaml index 63d78590..95129825 100644 --- a/content/lessons/cosmos/parallax-and-distances/lesson.yaml +++ b/content/lessons/cosmos/parallax-and-distances/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: d = \frac{B}{p} concepts: -- stellar parallax -- distance ladder -- triangulation + - stellar parallax + - distance ladder + - triangulation prerequisites: [] related: -- exoplanet-transits -- expanding-universe-hubble-law -- the-scale-of-the-universe + - exoplanet-transits + - expanding-universe-hubble-law + - the-scale-of-the-universe visualization: type: parallax-and-distances options: {} @@ -32,23 +32,23 @@ parameters: value: 1 unit: AU variables: -- d -- B -- p + - d + - B + - p derivation: -- \tan p \approx p -- B = d\,p -- d = \frac{B}{p} + - \tan p \approx p + - B = d\,p + - d = \frac{B}{p} presets: -- p: 0.768 - baseline: 1 -- p: 0.286 - baseline: 1 -- p: 0.01 - baseline: 30 + - p: 0.768 + baseline: 1 + - p: 0.286 + baseline: 1 + - p: 0.01 + baseline: 30 challenges: -- check: baseline/p - target: 1.3 - tol: 0.05 -- check: baseline/p > 1000 -- check: p > 0.5 and baseline < 2 + - check: baseline/p + target: 1.3 + tol: 0.05 + - check: baseline/p > 1000 + - check: p > 0.5 and baseline < 2 diff --git a/content/lessons/cosmos/quark-confinement/ar.md b/content/lessons/cosmos/quark-confinement/ar.md index bfa16c09..0460b0e7 100644 --- a/content/lessons/cosmos/quark-confinement/ar.md +++ b/content/lessons/cosmos/quark-confinement/ar.md @@ -5,21 +5,21 @@ summary: >- parameters: d: التباعد d variables: -- الطاقة الكامنة المخزنة في المجال بين الكواركين -- 'توتر الوتر: الطاقة لكل وحدة طول من ذلك المجال المشدود' -- التباعد بين زوج الكواركات المسحوب + - الطاقة الكامنة المخزنة في المجال بين الكواركين + - 'توتر الوتر: الطاقة لكل وحدة طول من ذلك المجال المشدود' + - التباعد بين زوج الكواركات المسحوب --- ## Try it -1. اسحب «التباعد d» ببطء من 0.1 fm. يبقى الزوج متصلًا، كأنه شريط مطاطي يتمدد. -2. استمر في السحب بعد نحو 1.2 fm. ينقطع الاتصال، ويظهر جسيمان جديدان عند نقطة الانقطاع. -3. اسحب المنزلق حتى 2 fm وشاهد أن الكواركات لا تبقى وحيدة أبدًا. كل طرف منقطع أصبح جزءًا من زوج جديد. +1. اسحب «التباعد d» ببطء من 0.1 fm إلى 1 fm. يبقى الزوج متصلًا، كأنه شريط مطاطي يتمدد، وترتفع الطاقة في الوتر من 0.10 إلى 1.00 GeV. +2. استمر في السحب إلى ما بعد 1.2 fm، حتى 1.21 fm. ينقطع الاتصال، ويظهر جسيمان جديدان عند نقطة الانقطاع. +3. اسحب المنزلق حتى 2 fm وشاهد أن الكواركات لا تبقى وحيدة أبدًا. كل طرف منقطع أصبح جزءًا من زوج جديد، وتقول النتيجة «انقطع إلى جسيمين». ## Real-life examples 1. **شد خفيف.** عند تباعد 0.3 fm، أصغر من البروتون نفسه، يبقى الشد بين الكواركين معتدلًا. -2. **عند نقطة الانقطاع بالضبط.** عند 1.2 fm، تكون الطاقة المخزنة قد كبرت بما يكفي لتقطع الاتصال إلى جسيمين جديدين. +2. **عند نقطة الانقطاع بالضبط.** عند 1.2 fm يخزن الوتر 1.20 GeV ويوشك أن ينقطع. وبخطوة واحدة أخرى، عند 1.21 fm، ينقطع إلى جسيمين جديدين. 3. **منفصلان تمامًا لكن ليسا وحيدين أبدًا.** عند 1.8 fm، يكون الوتر قد انقطع بالفعل، ولكل كوارك أصلي شريك جديد الآن. ## Test yourself @@ -30,13 +30,13 @@ variables: ## Intuition -قطر البروتون كله لا يتجاوز 0.84 fm. ومع ذلك، بحلول اللحظة التي تسحب فيها زوج الكواركات إلى نحو 1.2 fm، وهي مسافة أكبر من البروتون نفسه، يكون الشد بينهما قد خزّن طاقة كافية. هذه الطاقة تكفي لخلق زوج جسيمات جديد كليًا من العدم. +نصف قطر البروتون نحو 0.84 fm فقط. ومع ذلك، حين تسحب زوج الكواركات إلى نحو 1.2 fm، وهي مسافة أكبر قليلًا من نصف القطر هذا، يكون الشد بينهما قد خزّن طاقة كافية. هذه الطاقة تكفي لصنع زوج جسيمات جديد كليًا. -اسحب «التباعد d» إلى الخارج على الرسم فيتمدد المجال بين الكواركين كشريط مطاطي، لا كالفراغ المتسع بين مغناطيسين. بعد نقطة الانقطاع، تتحول طاقة الشريط المخزنة إلى كتلة كواركين جديدين، فلا تنتهي أبدًا وأنت تمسك كواركًا وحيدًا فقط. +اسحب «التباعد d» إلى الخارج على الرسم فيتمدد المجال بين الكواركين كشريط مطاطي، لا كالفراغ المتسع بين مغناطيسين. بعد نقطة الانقطاع، تتحول طاقة الشريط المخزنة إلى كتلة كواركين جديدين، فلا تحصل أبدًا على كوارك وحيد. ## Formal -على عكس الجاذبية أو الجذب الكهربائي، لا تضعف القوة اللاصقة بين كواركين مع المسافة. تتصاعد الطاقة الكامنة باطراد وفق $V(d) = \sigma d$، حيث $\sigma$ توتر الوتر، ونحو 1 GeV لكل فيمتومتر. +على عكس الجاذبية أو الجذب الكهربائي، لا تضعف القوة اللاصقة بين كواركين مع المسافة. تتصاعد الطاقة الكامنة باطراد وفق $V(d) = \sigma d$، حيث $\sigma$ توتر الوتر، وقيمته نحو 1 GeV لكل فيمتومتر. حين تكبر $V(d)$ بما يكفي لتساوي طاقة سكون زوج كواركات جديد، يصبح خلق ذلك الزوج أرخص من تمديد المجال أكثر، فينقطع الوتر عند $d_{max}$، حيث $V(d_{max}) \approx 2 m_q c^2$. @@ -53,10 +53,13 @@ variables: ## Real world ### النفثات في مصادم الهادرونات الكبير -حين تقذف الاصطدامات الكواركات بعيدًا، لا تعثر الكواشف أبدًا على كوارك منفرد. بل ترى رشاشًا ضيقًا، أو نفثة، من جسيمات جديدة ولدت من عملية الانقطاع هذه بالضبط. + +حين تقذف الاصطدامات الكواركات بعيدًا، لا تعثر الكواشف أبدًا على كوارك منفرد. بل ترى رذاذًا ضيقًا، أو نفثة، من جسيمات جديدة ولدت من عملية الانقطاع هذه بالضبط. ### لماذا لم يُرَ كوارك وحيد قط + كل تجربة بُنيت يومًا لعزل كوارك واحد أنتجت بدلًا منه أزواج جسيمات جديدة، وهذا دليل غير مباشر قوي على الحبس. ### الحرية المقاربة + أثبت فيزيائيون أن القوة النووية الشديدة تضعف فعلًا عند مسافات قصيرة جدًا، فتترك الكواركات تتحرك بحرية شبه تامة داخل البروتون. هذا عمل نال جائزة نوبل في الفيزياء عام 2004. diff --git a/content/lessons/cosmos/quark-confinement/en.md b/content/lessons/cosmos/quark-confinement/en.md index 3a81e7fe..158e0c81 100644 --- a/content/lessons/cosmos/quark-confinement/en.md +++ b/content/lessons/cosmos/quark-confinement/en.md @@ -4,21 +4,21 @@ summary: Try to pull a quark out on its own and you can't — the effort just cr parameters: d: separation d variables: -- the potential energy stored in the field between the two quarks -- 'string tension: the energy per unit length of that stretched field' -- the separation between the pulled quark pair + - the potential energy stored in the field between the two quarks + - 'string tension: the energy per unit length of that stretched field' + - the separation between the pulled quark pair --- ## Try it -1. Drag «separation d» up slowly from 0.1 fm. Notice the pair stays connected, like a stretching rubber band. -2. Keep pulling past about 1.2 fm. The connection snaps, and two new particles appear where it broke. -3. Pull the slider all the way to 2 fm and see that the quarks are still never alone — each broken end is now part of its own pair. +1. Drag «separation d» up slowly from 0.1 fm to 1 fm. The pair stays connected, like a stretching rubber band, while the energy in the string climbs from 0.10 to 1.00 GeV. +2. Keep pulling past 1.2 fm, to 1.21 fm. The connection snaps, and two new particles appear where it broke. +3. Pull the slider all the way to 2 fm and see that the quarks are still never alone — each broken end is now part of its own pair, and the result reads «it snapped into two particles». ## Real-life examples 1. **A gentle tug.** At 0.3 fm apart, smaller than a proton itself, the pull between the quarks is still mild. -2. **Right at the breaking point.** At 1.2 fm, the stored energy has grown enough to snap the connection into two fresh particles. +2. **Right at the breaking point.** At 1.2 fm the string stores 1.20 GeV and is about to break. One step further, at 1.21 fm, it snaps into two fresh particles. 3. **Fully separated, but never alone.** At 1.8 fm, the string has already broken, and each original quark now has a brand-new partner. ## Test yourself @@ -29,7 +29,7 @@ variables: ## Intuition -A whole proton is only about 0.84 fm across, yet by the time you have pulled a quark pair apart to roughly 1.2 fm — already bigger than a proton — the tug between them has stored enough energy to conjure a whole new particle pair out of nowhere. +A proton's radius is only about 0.84 fm, yet by the time you have pulled a quark pair apart to roughly 1.2 fm — a little more than that radius — the tug between them has stored enough energy to create a whole new particle pair. Drag «separation d» outward on the picture and the field between the quarks stretches like a rubber band, not like the widening space between two magnets. Past the snapping point, the band's stored energy turns into the mass of two new quarks, so you never end up holding just one quark alone. @@ -52,10 +52,13 @@ This behaviour, called confinement, is why free single quarks have never been ob ## Real world ### Jets at the Large Hadron Collider + When collisions fling quarks apart, detectors never see a lone quark — instead they see a tight spray, or jet, of new particles born from exactly this snapping process. ### Why no one has ever seen a lone quark + Every experiment ever built to isolate a single quark has instead produced new particle pairs, strong indirect evidence for confinement. ### Asymptotic freedom + Physicists showed the strong force actually weakens at very short distances, letting quarks move nearly freely inside a proton — work that won the 2004 Nobel Prize in Physics. diff --git a/content/lessons/cosmos/quark-confinement/lesson.yaml b/content/lessons/cosmos/quark-confinement/lesson.yaml index 0f5d1eb2..1109b175 100644 --- a/content/lessons/cosmos/quark-confinement/lesson.yaml +++ b/content/lessons/cosmos/quark-confinement/lesson.yaml @@ -3,13 +3,13 @@ subject: cosmos difficulty: high-school equation: V(d) = \sigma d concepts: -- quark confinement -- strong force -- color charge + - quark confinement + - strong force + - color charge prerequisites: -- quarks-and-protons + - quarks-and-protons related: -- quarks-and-protons + - quarks-and-protons visualization: type: quark-builder options: @@ -27,18 +27,18 @@ parameters: value: 0.5 unit: fm variables: -- V(d) -- \sigma -- d + - V(d) + - \sigma + - d derivation: -- V(d) = \sigma d -- V(d_{max}) = 2 m_q c^2 -- d_{max} \approx 1.2\ \text{fm} + - V(d) = \sigma d + - V(d_{max}) = 2 m_q c^2 + - d_{max} \approx 1.2\ \text{fm} presets: -- d: 0.3 -- d: 1.2 -- d: 1.8 + - d: 0.3 + - d: 1.2 + - d: 1.8 challenges: -- check: abs(d - 1.2) < 0.05 -- check: d > 1.5 -- check: d < 0.3 + - check: abs(d - 1.2) < 0.05 + - check: d > 1.5 + - check: d < 0.3 diff --git a/content/lessons/cosmos/quarks-and-protons/ar.md b/content/lessons/cosmos/quarks-and-protons/ar.md index dc42708d..9e14309f 100644 --- a/content/lessons/cosmos/quarks-and-protons/ar.md +++ b/content/lessons/cosmos/quarks-and-protons/ar.md @@ -7,17 +7,17 @@ parameters: q2: الكوارك الثاني q3: الكوارك الثالث variables: -- الشحنة الكهربائية الكلية للبروتون، بوحدة e، وهي مقدار شحنة الإلكترون -- شحنة الكوارك العلوي، وقدرها 2/3+ e -- شحنة الكوارك السفلي، وقدرها 1/3− e -- كتلة البروتون + - الشحنة الكهربائية الكلية للبروتون، بوحدة e، وهي مقدار شحنة الإلكترون + - شحنة الكوارك العلوي، وقدرها 2/3+ e + - شحنة الكوارك السفلي، وقدرها 1/3− e + - كتلة البروتون --- ## Try it -1. افحص الفتحات الثلاث. كل واحدة تحمل كواركًا: علويًا (2/3+ e) أو سفليًا (1/3− e) أو غريبًا (1/3− e). -2. اضبط المنزلقات الثلاثة لتبني بروتونًا: كواركان علويان وكوارك سفلي. تفحّص الشحنة الكلية الظاهرة. -3. غيّر منزلقًا واحدًا في كل مرة وراقب الشحنة الكلية وهي تتغير معه. +1. انظر إلى الخانات الثلاث. كل واحدة تحمل كواركًا: علويًا (2/3+ e) أو سفليًا (1/3− e) أو غريبًا (1/3− e). في كل منزلق 0 يعني علويًا و1 سفليًا و2 غريبًا، ويمكنك أيضًا النقر على الأزرار في الرسم. +2. اضبط المنزلقات الثلاثة لتبني بروتونًا: كواركان علويان وكوارك سفلي. تظهر الشحنة الكلية: +⅔ +⅔ −⅓ = +1. +3. غيّر منزلقًا واحدًا في كل مرة وراقب الشحنة الكلية وهي تتغير معه. بدّل كواركًا علويًا بسفلي: تهبط الشحنة إلى 0 ويقول الرسم إنه نيوترون. ## Real-life examples @@ -45,24 +45,28 @@ variables: ## Advanced -جزء صغير فقط من كتلة البروتون، $m_p c^2 \approx 938$ MeV، يأتي من كتلة سكون كواركاته الثلاثة، التي لا يتجاوز وزنها معًا بضعة MeV. أغلب تلك الكتلة طاقة القوة النووية الشديدة الرابطة بينها، وهذه نتيجة مباشرة للعلاقة $E=mc^2$. +جزء صغير فقط من كتلة البروتون، $m_p c^2 \approx 938$ MeV، يأتي من كتلة سكون كواركاته الثلاثة، التي يبلغ وزنها معًا نحو 9 MeV فقط. أغلب تلك الكتلة طاقة القوة النووية الشديدة الرابطة بينها، وهذه نتيجة مباشرة للعلاقة $E=mc^2$. ## Derivation 1. شحنة البروتون الكلية هي مجموع شحنات الكواركات الثلاثة المكونة له: كواركان علويان وكوارك سفلي. 2. جمع ثلثين وثلثين وسالب ثلث يعطي وحدة شحنة موجبة كاملة بالضبط. -3. لا يأتي من الكواركات نفسها إلا القليل من تلك الكتلة، فمعظمها طاقة ربط، لأن الكواركات الثلاثة وحدها أخف بكثير من البروتون كله. +3. لا يأتي من الكواركات نفسها إلا القليل من كتلة البروتون، فمعظمها طاقة ربط، لأن الكواركات الثلاثة وحدها أخف بكثير من البروتون كله. ## Real world ### داخل كل ذرة + يتكوّن كل بروتون ونيوترون في كل نواة ذرية لمستها يومًا من كواركات علوية وسفلية بهذا النمط بالضبط. ### اكتشاف الكواركات في SLAC + كشفت تجارب التشتت غير المرن العميق عام 1968 الكواركات داخل البروتونات، وقادت إلى جائزة نوبل في الفيزياء عام 1990. ### الطريق الثماني + نظّم موراي جل-مان عشرات الجسيمات، ومنها جسيمات غريبة كالذي تبنيه هنا، في عائلات مرتبة قبل سنوات من رصد الكواركات مباشرة. ### النجوم النيوترونية + إن ضُغطت نيوترونات كثيرة معًا بالجاذبية، يظن بعض الفيزيائيين أن كواركاتها قد تتحرر للحظة في خليط يسمى مادة الكواركات. diff --git a/content/lessons/cosmos/quarks-and-protons/en.md b/content/lessons/cosmos/quarks-and-protons/en.md index ac9c1e9b..2399d895 100644 --- a/content/lessons/cosmos/quarks-and-protons/en.md +++ b/content/lessons/cosmos/quarks-and-protons/en.md @@ -6,17 +6,17 @@ parameters: q2: quark 2 q3: quark 3 variables: -- the proton's total electric charge, in units of e, the size of the electron's charge -- the up quark's charge, +2/3 e -- the down quark's charge, −1/3 e -- the proton's mass + - the proton's total electric charge, in units of e, the size of the electron's charge + - the up quark's charge, +2/3 e + - the down quark's charge, −1/3 e + - the proton's mass --- ## Try it -1. Look at the three slots. Each holds a quark: up (+2/3 e), down (−1/3 e), or strange (−1/3 e). -2. Set all three sliders to build a proton: two up quarks and one down quark. Check the total charge shown. -3. Change one slider at a time and watch the total charge change with it. +1. Look at the three slots. Each holds a quark: up (+2/3 e), down (−1/3 e), or strange (−1/3 e). On each slider 0 means up, 1 means down and 2 means strange; you can also click the buttons in the picture. +2. Set all three sliders to build a proton: two up quarks and one down quark. The total charge reads +⅔ +⅔ −⅓ = +1. +3. Change one slider at a time and watch the total charge change with it. Switch one up quark to down: the charge drops to 0 and the picture says neutron. ## Real-life examples @@ -44,24 +44,28 @@ Since $q_u = +2/3\,e$ and $q_d = -1/3\,e$, adding them gives $Q_p = 2/3 + 2/3 - ## Advanced -Only a tiny fraction of the proton's mass, $m_p c^2 \approx 938$ MeV, comes from the rest mass of its three quarks, which together weigh only a few MeV; almost all of it is the energy of the strong force binding them together, a direct consequence of $E=mc^2$. +Only a tiny fraction of the proton's mass, $m_p c^2 \approx 938$ MeV, comes from the rest mass of its three quarks, which together weigh only about 9 MeV; almost all of it is the energy of the strong force binding them together, a direct consequence of $E=mc^2$. ## Derivation 1. A proton's total charge is the sum of the charges of the three quarks that make it up: two up quarks and one down quark. 2. Adding two-thirds, two-thirds, and minus one-third gives exactly one full unit of positive charge. -3. Almost none of that mass comes from the quarks themselves — nearly all of it is binding energy, since the three quarks alone weigh far less than the whole proton. +3. Almost none of the proton's mass comes from the quarks themselves — nearly all of it is binding energy, since the three quarks alone weigh far less than the whole proton. ## Real world ### Inside every atom + Every proton and neutron in every atomic nucleus you have ever touched is built from up and down quarks in exactly this pattern. ### Discovering quarks at SLAC + The 1968 deep inelastic scattering experiments that revealed quarks inside protons led to the 1990 Nobel Prize in Physics. ### The eightfold way + Murray Gell-Mann organised dozens of particles, including strange ones like the one you can build here, into neat families years before quarks were directly observed. ### Neutron stars + Crush enough neutrons together under gravity and some physicists think their quarks may briefly break free into a soup called quark matter. diff --git a/content/lessons/cosmos/quarks-and-protons/lesson.yaml b/content/lessons/cosmos/quarks-and-protons/lesson.yaml index b1072b1c..87f89273 100644 --- a/content/lessons/cosmos/quarks-and-protons/lesson.yaml +++ b/content/lessons/cosmos/quarks-and-protons/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: high-school equation: Q_p = q_u + q_u + q_d concepts: -- quarks -- proton structure -- electric charge + - quarks + - proton structure + - electric charge prerequisites: -- atomic-structure + - atomic-structure related: -- quark-confinement -- mass-energy-equivalence + - quark-confinement + - mass-energy-equivalence visualization: type: quark-builder options: @@ -34,33 +34,33 @@ parameters: min: 0 max: 2 step: 1 - value: 1 + value: 0 variables: -- Q_p -- q_u -- q_d -- m_p + - Q_p + - q_u + - q_d + - m_p derivation: -- Q_p = \tfrac{2}{3} + \tfrac{2}{3} - \tfrac{1}{3} -- Q_p = 1 -- m_p c^2 \gg m_u c^2 + m_u c^2 + m_d c^2 + - Q_p = \tfrac{2}{3} + \tfrac{2}{3} - \tfrac{1}{3} + - Q_p = 1 + - m_p c^2 \gg m_u c^2 + m_u c^2 + m_d c^2 presets: -- q1: 0 - q2: 0 - q3: 1 -- q1: 1 - q2: 1 - q3: 0 -- q1: 0 - q2: 1 - q3: 2 + - q1: 0 + q2: 0 + q3: 1 + - q1: 1 + q2: 1 + q3: 0 + - q1: 0 + q2: 1 + q3: 2 challenges: -- check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) - target: 1 - tol: 0.05 -- check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) - target: 0 - tol: 0.05 -- check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) - target: -1 - tol: 0.05 + - check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) + target: 1 + tol: 0.05 + - check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) + target: 0 + tol: 0.05 + - check: (q1==0?2/3:-1/3)+(q2==0?2/3:-1/3)+(q3==0?2/3:-1/3) + target: -1 + tol: 0.05 diff --git a/content/lessons/cosmos/quasars/ar.md b/content/lessons/cosmos/quasars/ar.md index 279c6845..9c8d12d9 100644 --- a/content/lessons/cosmos/quasars/ar.md +++ b/content/lessons/cosmos/quasars/ar.md @@ -6,34 +6,34 @@ parameters: eta: الكفاءة η x: المادة المبتلعة كل سنة variables: -- سطوع الكوازار، بوحدة تريليونات أضعاف سطوع الشمس -- 'الكفاءة: نسبة طاقة الكتلة الساقطة التي تفلت كضوء' -- 'معدل التراكم: كمية الكتلة الساقطة كل سنة، بوحدة كتلة شمسية في السنة' + - سطوع الكوازار، بوحدة تريليونات أضعاف سطوع الشمس + - 'الكفاءة: نسبة طاقة الكتلة الساقطة التي تفلت كضوء' + - 'معدل التراكم: كمية الكتلة الساقطة كل سنة، بوحدة كتلة شمسية في السنة' --- ## Try it -1. اسحب «المادة المبتلعة كل سنة» للأعلى. كلما زادت وجبة الثقب الأسود، ارتفع المنحنى أكثر. -2. ارفع «الكفاءة η» بدلًا من ذلك. يتوهج المعدل نفسه الآن بسطوع أكبر. -3. ادفع المنزلقين معًا للأعلى واقرأ السطوع. بعض الكوازارات الحقيقية تبلغ عشرات التريليونات من سطوع الشمس. +1. أبقِ «الكفاءة η» عند 0.1 وارفع «المادة المبتلعة كل سنة» من 1 إلى 5. تصعد النقطة على الخط وترتفع f(x)، وهي السطوع، من 1.48 إلى 7.4 تريليون ضعف سطوع الشمس. +2. الآن ارفع «الكفاءة η» إلى 0.3. معدل الابتلاع نفسه يعطي ثلاثة أضعاف السطوع: 22.2 تريليون ضعف سطوع الشمس. +3. ارفع المنزلقين إلى أعلى قيمتيهما واقرأ السطوع: 59.2 تريليون ضعف سطوع الشمس. وبعض الكوازارات الحقيقية تبلغ فعلًا عشرات التريليونات من سطوع الشمس. ## Real-life examples 1. **كوازار كـ3C 273.** يبتلع نحو كتلتين شمسيتين سنويًا بكفاءة 10%، فيبقى أسطع من مجرة كاملة. -2. **ثقب أسود هادئ يتغذى ببطء.** عند 0.3 كتلة شمسية سنويًا فقط وكفاءة منخفضة، يكاد التوهج لا يرتفع عن الخط الأساسي. +2. **ثقب أسود هادئ يتغذى ببطء.** عند 0.3 كتلة شمسية سنويًا فقط وكفاءة منخفضة، يكاد التوهج لا يرتفع عن الصفر. 3. **كوازار بالغ السطوع من الكون المبكر.** يبتلع 8 كتل شمسية سنويًا بكفاءة عالية قدرها 30%، فيفوق هذا الوحش سطوع مجرته المضيفة أضعافًا كثيرة. ## Test yourself 1. طابق سطوع كوازار لامع، نحو 40 تريليون ضعف سطوع الشمس. -2. ادفع الكفاءة نحو أعلى قيمة ممكنة لها تقريبًا. +2. ارفع الكفاءة إلى قرب أعلى قيمة ممكنة لها. 3. اصنع ثقبًا أسود هادئًا يبتلع أقل من نصف كتلة شمسية سنويًا. ## Intuition اكتُشف الكوازار 3C 273 عام 1963، ويبعد نحو 2.4 مليار سنة ضوئية. ومع ذلك يبدو كنقطة خافتة عبر تلسكوب صغير، لأنه يفوق سطوع مجرته المضيفة كلها، متوهجًا بنحو 4 تريليون ضعف سطوع الشمس من منطقة أصغر من نظامنا الشمسي. -اسحب «المادة المبتلعة كل سنة» للأعلى على الرسم فيرتفع المنحنى بحدة. الغاز والغبار المنجذبان في دوامة نحو ثقب أسود يسخنان ويتوهجان بشدة قبل أن يعبرا نقطة اللاعودة. ارفع «الكفاءة η» أيضًا، فتنتج الكتلة الساقطة نفسها ضوءًا أكثر، لأن نصيبًا أكبر من طاقتها يفلت كإشعاع. +ارفع «المادة المبتلعة كل سنة» فتصعد النقطة على الخط في الرسم. الغاز والغبار المنجذبان في دوامة نحو ثقب أسود يسخنان ويتوهجان بشدة قبل أن يعبرا نقطة اللاعودة. ارفع «الكفاءة η» أيضًا، فتنتج الكتلة الساقطة نفسها ضوءًا أكثر، لأن نصيبًا أكبر من طاقتها يفلت كإشعاع. ## Formal @@ -43,7 +43,7 @@ variables: ## Advanced -كفاءات نموذجية بين 5% و30%، يحددها مدى قرب دوران الثقب الأسود الذي يتيح للمادة الساقطة أن تدور قبل أن تنزلق للداخل. وهذه الكفاءات تفوق بالفعل كفاءة الاندماج النووي داخل النجوم، البالغة نحو 0.7% فقط. لهذا يُعد التراكم حول ثقب أسود أكفأ طريقة معروفة لتحويل الكتلة إلى ضوء. +تتراوح الكفاءات المعتادة بين 5% و30%، ويحددها مقدار اقتراب المادة الساقطة من الثقب الأسود وهي تدور حوله قبل أن تهوي فيه، وهذا يتوقف على سرعة دوران الثقب نفسه. وهذه الكفاءات تفوق كثيرًا كفاءة الاندماج النووي داخل النجوم، البالغة نحو 0.7% فقط. لهذا يُعد التراكم حول ثقب أسود أكفأ طريقة معروفة لتحويل الكتلة إلى ضوء. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### أول كوازار، 3C 273 + حدده مارتن شميت عام 1963. كشف انزياحه الأحمر الكبير المحيّر أنه يبعد مليارات السنين الضوئية، وهو أسطع بكثير مما تسمح به تفسيرات عادية عند ذلك البعد. ### الكوازارات كمنارات كونية + لأنها بالغة السطوع، تتيح الكوازارات للفلكيين دراسة غاز في مجرات تبعد مليارات السنين الضوئية، باستخدام ضوئها كإضاءة خلفية. -### Sagittarius A*، عملاقنا الهادئ +### الرامي A* (Sagittarius A*)، عملاقنا الهادئ + يتغذى الثقب الأسود الهائل في مركز مجرتنا اليوم ببطء شديد، فهو أخفت بملايين المرات من كوازار نموذجي. ### تشكيل نمو المجرات + قد يطرد إشعاع الكوازار ورياحه الخارجة الغاز الذي تحتاجه مجرة لتكوين نجوم جديدة، فيربط نمو الثقب الأسود بمصير مجرته. diff --git a/content/lessons/cosmos/quasars/en.md b/content/lessons/cosmos/quasars/en.md index 8c9268ee..90dcd3df 100644 --- a/content/lessons/cosmos/quasars/en.md +++ b/content/lessons/cosmos/quasars/en.md @@ -5,16 +5,16 @@ parameters: eta: efficiency η x: matter swallowed per year variables: -- the quasar's luminosity, in trillions of times the Sun's brightness -- 'efficiency: the fraction of infalling mass-energy that escapes as light' -- 'the accretion rate: how much mass falls in each year, in Suns per year' + - the quasar's luminosity, in trillions of times the Sun's brightness + - 'efficiency: the fraction of infalling mass-energy that escapes as light' + - 'the accretion rate: how much mass falls in each year, in Suns per year' --- ## Try it -1. Drag «matter swallowed per year» up. The brighter the feeding, the higher the curve climbs. -2. Raise «efficiency η» instead. Even the same feeding rate now shines far brighter. -3. Push both sliders high together and read the luminosity — some real quasars reach tens of trillions of Suns. +1. Keep «efficiency η» at 0.1 and drag «matter swallowed per year» from 1 to 5. The point climbs the line and f(x), the luminosity, rises from 1.48 to 7.4 trillion Suns. +2. Now raise «efficiency η» to 0.3. The same feeding rate shines three times brighter: 22.2 trillion Suns. +3. Push both sliders to their highest values and read the luminosity: 59.2 trillion Suns. Some real quasars do reach tens of trillions of Suns. ## Real-life examples @@ -32,7 +32,7 @@ variables: 3C 273, discovered in 1963, sits about 2.4 billion light-years away yet still looks like a faint dot through a small telescope — because it outshines its entire host galaxy, blazing at roughly 4 trillion times the Sun's brightness from a region smaller than our solar system. -Drag «matter swallowed per year» up on the picture and the curve climbs steeply — gas and dust spiralling into a black hole heats up and glows fiercely before it ever crosses the point of no return. Raise «efficiency η» as well, and the same infalling matter now yields even more light, since a bigger share of its mass-energy manages to escape as radiation. +Drag «matter swallowed per year» up on the picture and the point climbs the line — gas and dust spiralling into a black hole heats up and glows fiercely before it ever crosses the point of no return. Raise «efficiency η» as well, and the same infalling matter now yields even more light, since a bigger share of its mass-energy manages to escape as radiation. ## Formal @@ -53,13 +53,17 @@ Typical efficiencies of 5–30%, set by how close a black hole's spin lets infal ## Real world ### The first quasar, 3C 273 + Identified in 1963 by Maarten Schmidt, its puzzlingly large redshift revealed it was billions of light-years away, far too bright for its distance under ordinary explanations. ### Quasars as cosmic lighthouses + Because they are so bright, quasars let astronomers study gas in galaxies billions of light-years away, using their light as a backlight. ### Sagittarius A*, our own quiet giant + The supermassive black hole at our galaxy's center feeds so slowly today that it is millions of times fainter than a typical quasar. ### Shaping galaxy growth + A quasar's radiation and outflowing wind can blow away the gas a galaxy needs to form new stars, linking a black hole's growth to its galaxy's fate. diff --git a/content/lessons/cosmos/quasars/lesson.yaml b/content/lessons/cosmos/quasars/lesson.yaml index 3ac6d404..b7e74500 100644 --- a/content/lessons/cosmos/quasars/lesson.yaml +++ b/content/lessons/cosmos/quasars/lesson.yaml @@ -3,25 +3,25 @@ subject: cosmos difficulty: high-school equation: L = \eta \dot M c^2 concepts: -- quasars -- supermassive black holes -- accretion + - quasars + - supermassive black holes + - accretion prerequisites: [] related: -- dark-matter-rotation-curves -- gravitational-lensing -- black-holes -- mass-energy-equivalence + - dark-matter-rotation-curves + - gravitational-lensing + - black-holes + - mass-energy-equivalence visualization: type: function-plot options: expr: 14.8*eta*x domain: - - 0 - - 10 + - 0 + - 10 range: - - 0 - - 60 + - 0 + - 60 mode: plain visualization3d: type: orbit @@ -40,23 +40,23 @@ parameters: value: 1 unit: M☉/yr variables: -- L -- \eta -- \dot M + - L + - \eta + - \dot M derivation: -- E = mc^2 -- L = \eta \dot M c^2 -- L \approx 14.8\,\eta\,\dot M + - E = mc^2 + - L = \eta \dot M c^2 + - L \approx 14.8\,\eta\,\dot M presets: -- eta: 0.1 - x: 2 -- eta: 0.05 - x: 0.3 -- eta: 0.3 - x: 8 + - eta: 0.1 + x: 2 + - eta: 0.05 + x: 0.3 + - eta: 0.3 + x: 8 challenges: -- check: 14.8*eta*x - target: 40 - tol: 2 -- check: eta > 0.35 -- check: x < 0.5 + - check: 14.8*eta*x + target: 40 + tol: 2 + - check: eta > 0.35 + - check: x < 0.5 diff --git a/content/lessons/cosmos/the-scale-of-the-universe/ar.md b/content/lessons/cosmos/the-scale-of-the-universe/ar.md index 10bcb97b..41786cbc 100644 --- a/content/lessons/cosmos/the-scale-of-the-universe/ar.md +++ b/content/lessons/cosmos/the-scale-of-the-universe/ar.md @@ -8,24 +8,24 @@ variables: - المسافة إلى الجسم، بالسنين الضوئية - 'سرعة الضوء: هي التي تُعرّف السنة الضوئية، أي المسافة التي يقطعها الضوء في سنة واحدة' - زمن انتقال الضوء، بالسنين - - أس العشرة على مقياس السحب، بحيث تكون المسافة عشرة مرفوعة لهذا الأس + - أس العشرة على المنزلق، بحيث تكون المسافة عشرة مرفوعة لهذا الأس --- ## Try it -1. اسحب «الأس العشري» للأسفل إلى نحو −7.4. وصلت إلى القمر. يستغرق ضوءه نحو 1.3 ثانية ليصلنا. -2. اسحبه للأعلى إلى نحو 6.4. وصلت إلى مجرة أندروميدا، على بُعد 2.5 مليون سنة ضوئية. غادرها ضوؤها قبل وجود البشر. -3. ادفعه إلى أقصى اليمين، بعد 10.6. وصلت إلى حافة الكون المرصود، على بُعد 46.5 مليار سنة ضوئية. +1. أنزل «الأس العشري» إلى −7.4. وصلت إلى القمر. تُظهر القراءة 1.26 ثانية ضوئية، أي أن ضوءه يستغرق نحو 1.3 ثانية ليصلنا. +2. ارفعه إلى 6.4. وصلت إلى مجرة أندروميدا، على بُعد 2.5 مليون سنة ضوئية. غادرها ضوؤها قبل وجود البشر. +3. ارفعه إلى 10.65، قرب أقصى اليمين. وصلت إلى حافة الكون المرصود، على بُعد 46.5 مليار سنة ضوئية. ## Real-life examples -1. **القمر.** يستغرق ضوء القمر نحو 1.3 ثانية ليصل إلينا. وهذه مسافة قريبة بما يكفي جعلت رواد أبولو يستطيعون عكس شعاع ليزر عن مرآة تركوها هناك وقياس زمن ذهابه وعودته. +1. **القمر.** يستغرق ضوء القمر نحو 1.3 ثانية ليصل إلينا. وهو قريب إلى حد أن العلماء ما زالوا يعكسون شعاع ليزر عن مرايا تركها رواد أبولو هناك ويقيسون زمن ذهابه وعودته. 2. **مجرة أندروميدا.** على بُعد 2.5 مليون سنة ضوئية، هي أبعد جسم يستطيع معظم الناس رؤيته بالعين المجردة. وضوؤها بدأ رحلته قبل أن يمشي أي إنسان على الأرض. 3. **حافة الكون المرصود.** لم يصلنا بعد أي ضوء من أبعد من نحو 46.5 مليار سنة ضوئية، لأن الكون نفسه ظل يتمدد طوال الـ13.8 مليار سنة التي قضاها ذلك الضوء في رحلته. ## Test yourself -1. اضبط المقياس على بُعد القمر بالضبط. +1. اضبط المنزلق على بُعد القمر، أي على أس يساوي −7.4 تقريبًا. 2. اضبطه ليتجاوز مليار سنة ضوئية، في الطريق نحو حافة الكون المرصود. 3. اضبطه على مكان داخل النظام الشمسي، أقرب من دقائق الضوء التي تفصلنا عن الشمس. @@ -33,7 +33,7 @@ variables: مسطرة بتدرجات متساوية لا تنفع هنا. القفزة من القمر إلى الشمس أكبر بنحو 400 مرة من القفزة بينك وبين القمر، والقفزة من الشمس إلى أقرب نجم أكبر بمئات آلاف المرات مرة أخرى. كل خطوة على هذه المسطرة تضرب المسافة في عشرة بدلًا من أن تضيف مقدارًا ثابتًا، وهذه هي الطريقة الوحيدة لوضع ثانية ضوئية ومليار سنة ضوئية في الصورة نفسها. -اسحب «الأس العشري» درجة واحدة فقط، وتكبر المسافة الحقيقية التي يمثلها أو تصغر بمقدار عشرة أضعاف. فمن القمر (ثانية ضوئية وقليل) إلى الشمس (نحو 8 دقائق ضوئية) هناك بالفعل سبع درجات من هذا النوع. هكذا تنفجر المسافات بسرعة بمجرد مغادرة النظام الشمسي. +اسحب «الأس العشري» درجة واحدة فقط، وتكبر المسافة الحقيقية التي يمثلها أو تصغر بمقدار عشرة أضعاف. فمن القمر (ثانية ضوئية وقليل) إلى الشمس (نحو 8 دقائق ضوئية) نحتاج إلى درجتين ونصف فقط تقريبًا، أما من الشمس إلى أقرب نجم فنحتاج إلى أكثر من خمس درجات. هكذا تتضخم المسافات بسرعة بمجرد مغادرة النظام الشمسي. ## Formal @@ -49,18 +49,22 @@ variables: 1. المسافة التي يقطعها الضوء هي ببساطة سرعته مضروبة في زمن انتقاله. 2. هذه العلاقة نفسها هي تعريف السنة الضوئية أصلًا، وهي المسافة التي يقطعها الضوء في سنة واحدة بالضبط. -3. كتابة المسافة كعشرة مرفوعة لقيمة مقياس واحد يحوّل مدى يمتد من ثوانٍ ضوئية إلى عشرات مليارات السنين الضوئية إلى مقبض واحد متصل. +3. كتابة المسافة كعشرة مرفوعة لقيمة مقياس واحد يحوّل مدى يمتد من ثوانٍ ضوئية إلى عشرات مليارات السنين الضوئية إلى منزلق واحد متصل. ## Real world -### مسباري فوييجر -لا يزال مسبار فوييجر 1، أبعد مركبة صنعها الإنسان، على بُعد نحو 22 ساعة ضوئية فقط من الأرض بعد قرابة 50 عامًا من الرحلة. وهذا تذكير بمدى اتساع الفضاء وخوائه حتى في الجوار «القريب». +### مسبارا فوييجر + +لا يزال مسبار فوييجر 1، أبعد مركبة صنعها الإنسان، على بُعد نحو يوم ضوئي واحد فقط من الأرض بعد قرابة 50 عامًا من الرحلة. وهذا تذكير بمدى اتساع الفضاء وخوائه حتى في الجوار «القريب». ### الضوء كآلة زمن + بما أن الضوء يستغرق وقتًا ليصل، فالنظر إلى مكان بعيد يعني دائمًا النظر إلى الماضي. مجرة أندروميدا التي نراها الليلة تُظهر لنا ضوءًا عمره 2.5 مليون سنة. ### لماذا للكون حافة نستطيع رؤيتها -رغم أن الكون قد يكون لانهائيًا، لا نستطيع رؤية إلا الجزء الذي أتاح ضوؤه وقتًا كافيًا ليصلنا منذ أن أصبح الكون شفافًا، أي بعد نحو 380 ألف سنة من الانفجار العظيم. + +رغم أن الكون قد يكون لانهائيًا، لا نستطيع رؤية إلا الجزء الذي وجد ضوؤه وقتًا كافيًا ليصلنا منذ أن أصبح الكون شفافًا، أي بعد نحو 380 ألف سنة من الانفجار العظيم. ### رسم خريطة الشبكة الكونية + يستخدم الفلكيون الانزياح الأحمر بدلًا من المسطرة لتحديد بُعد المجرات الصحيح على هذا السُّلّم، فيبنون خرائط ثلاثية الأبعاد تمتد إلى معظم الطريق نحو حافة الكون المرصود. diff --git a/content/lessons/cosmos/the-scale-of-the-universe/en.md b/content/lessons/cosmos/the-scale-of-the-universe/en.md index aae29ce0..dbacadfe 100644 --- a/content/lessons/cosmos/the-scale-of-the-universe/en.md +++ b/content/lessons/cosmos/the-scale-of-the-universe/en.md @@ -12,19 +12,19 @@ variables: ## Try it -1. Drag «power of ten» down to about −7.4. You've reached the Moon: its light takes only 1.3 seconds to arrive. -2. Drag it up to about 6.4. You've reached the Andromeda Galaxy, 2.5 million light-years away — its light left before humans existed. -3. Push it to the far right, past 10.6. You've reached the edge of the observable universe, 46.5 billion light-years away. +1. Drag «power of ten» down to −7.4. You've reached the Moon: the readout shows 1.26 light-seconds, so its light takes only about 1.3 seconds to arrive. +2. Drag it up to 6.4. You've reached the Andromeda Galaxy, 2.5 million light-years away — its light left before humans existed. +3. Push it up to 10.65, close to the far right. You've reached the edge of the observable universe, 46.5 billion light-years away. ## Real-life examples -1. **The Moon.** Light from the Moon takes about 1.3 seconds to reach us — close enough that Apollo astronauts could bounce a laser off a mirror they left there and time the round trip. +1. **The Moon.** Light from the Moon takes about 1.3 seconds to reach us — close enough that scientists still bounce a laser off mirrors the Apollo astronauts left there and time the round trip. 2. **The Andromeda Galaxy.** At 2.5 million light-years, it's the most distant object most people can see with the naked eye — and its light started traveling long before any humans walked the Earth. 3. **The edge of the observable universe.** No light from farther than about 46.5 billion light-years has ever had time to reach us, because the universe itself has been expanding for the entire 13.8 billion years that light has been traveling. ## Test yourself -1. Dial the slider to the Moon's exact distance. +1. Dial the slider to the Moon's distance, a power of about −7.4. 2. Dial past a billion light-years — well on the way to the edge of the observable universe. 3. Dial to somewhere inside the solar system, closer than the Sun's own light-minutes. @@ -32,7 +32,7 @@ variables: A ruler with even marks doesn't work here: the jump from the Moon to the Sun is already about 400 times bigger than the jump from you to the Moon, and the jump from the Sun to the nearest star is hundreds of thousands of times bigger again. Each step of this ruler multiplies the distance by ten instead of adding a fixed amount, which is the only way to fit both a light-second and a billion light-years on the same picture. -Drag «power of ten» just one notch and the real distance it represents grows or shrinks by a factor of ten — from the Moon (a light-second and a bit) to the Sun (about 8 light-minutes) is already seven such notches. That's how fast distances explode once you leave the solar system. +Drag «power of ten» just one notch and the real distance it represents grows or shrinks by a factor of ten — from the Moon (a light-second and a bit) to the Sun (about 8 light-minutes) takes only about two and a half such notches, while from the Sun to the nearest star takes more than five. That's how fast distances explode once you leave the solar system. ## Formal @@ -53,13 +53,17 @@ The "edge of the observable universe" isn't simply 13.8 billion light-years away ## Real world ### The Voyager probes -Voyager 1, humanity's most distant spacecraft, is only about 22 light-hours from Earth after nearly 50 years of flight — a reminder of how empty and vast even "nearby" space is. + +Voyager 1, humanity's most distant spacecraft, is only about one light-day from Earth after nearly 50 years of flight — a reminder of how empty and vast even "nearby" space is. ### Light as a time machine + Because light takes time to arrive, looking far away always means looking back in time: the Andromeda Galaxy we see tonight is showing us light 2.5 million years old. ### Why the universe has an edge we can see + Even though the universe may be infinite, we can only ever see the part whose light has had time to reach us since the universe became transparent, about 380,000 years after the Big Bang. ### Mapping the cosmic web + Astronomers use redshift, not a ruler, to place galaxies at their proper distance on this ladder, building 3D maps that stretch most of the way to the edge of the observable universe. diff --git a/content/lessons/cosmos/the-scale-of-the-universe/lesson.yaml b/content/lessons/cosmos/the-scale-of-the-universe/lesson.yaml index 011d008d..bae9ff2b 100644 --- a/content/lessons/cosmos/the-scale-of-the-universe/lesson.yaml +++ b/content/lessons/cosmos/the-scale-of-the-universe/lesson.yaml @@ -3,14 +3,14 @@ subject: cosmos difficulty: beginner equation: d = 10^{m} concepts: -- cosmic distance scale -- light-year -- logarithmic scale + - cosmic distance scale + - light-year + - logarithmic scale prerequisites: [] related: -- parallax-and-distances -- expanding-universe-hubble-law -- cosmic-microwave-background + - parallax-and-distances + - expanding-universe-hubble-law + - cosmic-microwave-background visualization: type: the-scale-of-the-universe options: {} @@ -21,23 +21,23 @@ parameters: max: 11 step: 0.05 value: 0 - unit: "" + unit: '' variables: -- d -- c -- t -- m + - d + - c + - t + - m derivation: -- d = c\,t -- 1\ \text{ly} = c \cdot 1\ \text{yr} -- d = 10^{m}\ \text{ly} + - d = c\,t + - 1\ \text{ly} = c \cdot 1\ \text{yr} + - d = 10^{m}\ \text{ly} presets: -- mag: -7.39 -- mag: 6.4 -- mag: 10.67 + - mag: -7.39 + - mag: 6.4 + - mag: 10.67 challenges: -- check: mag - target: -7.39 - tol: 0.2 -- check: mag > 9 -- check: mag < -5 + - check: mag + target: -7.39 + tol: 0.2 + - check: mag > 9 + - check: mag < -5 diff --git a/content/lessons/cryptography/block-ciphers-and-aes/ar.md b/content/lessons/cryptography/block-ciphers-and-aes/ar.md index f141917c..5f271ea9 100644 --- a/content/lessons/cryptography/block-ciphers-and-aes/ar.md +++ b/content/lessons/cryptography/block-ciphers-and-aes/ar.md @@ -17,18 +17,18 @@ variables: ## Try it 1. انظر إلى العمودين من المربعات الصغيرة، A على اليسار وB على اليمين. يبدآن ككتلة واحدة من 16 بتًا، باستثناء بت واحد مقلوب. -2. حرّك «rounds» من 0 إلى 4 وراقب عدد المربعات المختلفة بين A وB في الصف الأخير. -3. حرّك «flip» لتغيير أي بت مدخل يختلف، وستلاحظ النمط نفسه من الانتشار مهما كان البت الذي اخترته. +2. أبقِ «flip» على 0 وغيّر «rounds» إلى 0 ثم 1 ثم 2 ثم 3 ثم 4. تُظهر قراءة «البتات المختلفة» 1 ثم 3 ثم 9 ثم 5 ثم 5 من 16: بت واحد مقلوب ينتشر في الكتلة كلها. +3. و«rounds» على 4، اضبط «flip» على 8 ثم على 15. يختلف الآن بت آخر من المدخل، وتُظهر القراءة 7 / 16 ثم 6 / 16. ينتشر التغيير مهما كان البت الذي اخترته. ## Real-life examples 1. **إرسال كتلة بلا أي جولة.** «rounds» = 0 يتخطى كل خلط. A وB متطابقتان إلا في بت مدخل واحد، فيبقى الفرق بينهما مربعًا واحدًا بالضبط في الأسفل، تمامًا كبيانات غير مخلوطة إطلاقًا. -2. **رسالة ممزوجة جزئيًا.** «rounds» = 2 يترك ذلك الفرق ببت واحد ينتشر جزءًا فقط من الكتلة، كما تفعل شفرة ضعيفة ومخفّفة. +2. **رسالة ممزوجة جزئيًا.** «rounds» = 2 ينشر ذلك الفرق من بت واحد إلى 9 مربعات من 16، لكن النمط بعد جولتين فقط ما زال سهل التوقع، كما في شيفرة ضعيفة. 3. **رسالة ممزوجة بالكامل، من بت مختلف.** «rounds» = 4 مع «flip» = 8 يُظهر أن بتًا مختلفًا في البداية ينتهي أيضًا بخلط نحو نصف الكتلة، تمامًا كما تفعل عشر جولات AES الحقيقية بكتلة كاملة من 128 بتًا. ## Test yourself -1. ادفع «rounds» إلى 4، أقصى ما تقدّمه هذه الشفرة المصغّرة. +1. ادفع «rounds» إلى 4، أقصى ما تقدّمه هذه الشيفرة المصغّرة. 2. ادفع «flip» إلى 15، آخر بت في المدخل. 3. اضبط «rounds» على 4 وأعد «flip» إلى 0، وعُدّ كم من المربعات الـ16 في الأسفل يختلف بين A وB. @@ -40,13 +40,13 @@ variables: ## Formal -تشفّر شفرة الكتلة كتلة ثابتة الحجم دفعة واحدة، $C = E_K(M)$، حيث $E_K$ إجراء خلط ثابت وقابل للعكس يتحكم فيه المفتاح $K$ وحده. وفك التشفير يطبّق الإجراء المعاكس المطابق له. +تشفّر شيفرة الكتلة كتلة ثابتة الحجم دفعة واحدة، $C = E_K(M)$، حيث $E_K$ إجراء خلط ثابت وقابل للعكس يتحكم فيه المفتاح $K$ وحده. وفك التشفير يطبّق الإجراء المعاكس المطابق له. -تمزج كل جولة الارتباك، أي إخفاء العلاقة بين المفتاح والنص المشفر عبر خطوة استبدال، مع الانتشار، أي نشر أثر كل بت مدخل على بتّات ناتج كثيرة عبر خطوة إعادة ترتيب. وتكرار الاثنين معًا عدة مرات هو ما يحوّل تغيّر بت مدخل واحد إلى خلط شبه متساوٍ للناتج. +تمزج كل جولة الإرباك، أي إخفاء العلاقة بين المفتاح والنص المشفر عبر خطوة استبدال، مع الانتشار، أي نشر أثر كل بت مدخل على بتّات ناتج كثيرة عبر خطوة إعادة ترتيب. وتكرار الاثنين معًا عدة مرات هو ما يحوّل تغيّر بت مدخل واحد إلى خلط شبه متساوٍ للناتج. ## Advanced -يعمل معيار التشفير المتقدم AES على كتل من 128 بتًا بعدد جولات 10 أو 12 أو 14 حسب طول المفتاح، 128 أو 192 أو 256 بتًا، وتجري كل جولة حقيقية أربع خطوات: الاستبدال عبر جدول ثابت، وإعادة ترتيب الصفوف ومزج الأعمدة للانتشار، وإضافة مفتاح الجولة المشتق حديثًا لتلك الجولة. وهي المكونات الثلاثة نفسها، الاستبدال وإعادة الترتيب ومزج المفتاح، التي تُظهرها جولات هذه الشفرة المصغّرة بالفعل على نطاق يمكن رؤيته كاملًا. +يعمل معيار التشفير المتقدم AES على كتل من 128 بتًا بعدد جولات 10 أو 12 أو 14 حسب طول المفتاح، 128 أو 192 أو 256 بتًا، وتجري كل جولة حقيقية أربع خطوات: الاستبدال عبر جدول ثابت، وإعادة ترتيب الصفوف ومزج الأعمدة للانتشار، وإضافة مفتاح الجولة المشتق حديثًا لتلك الجولة. وهي المكونات الثلاثة نفسها، الاستبدال وإعادة الترتيب ومزج المفتاح، التي تُظهرها جولات هذه الشيفرة المصغّرة بالفعل على نطاق يمكن رؤيته كاملًا. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### تشفير واي فاي + يشفّر معيارا WPA2 وWPA3 اللذان يحميان شبكة واي فاي المنزلية كل حزمة بيانات باستخدام AES. ### اتصالات HTTPS + بعد اتفاق المتصفح والموقع على مفتاح مشترك، تُحمى معظم البيانات المشفرة خلف أيقونة القفل باستخدام AES. ### تشفير الهواتف والأقراص + تُشفّر أدوات تخزين الهاتف والقرص الكامل كل ملف باستخدام AES، فتصبح البيانات غير مقروءة بلا مفتاح الجهاز. ### معايير الحكومات والبنوك + تعتمد الحكومة الأمريكية AES لحماية معلومات سرية للغاية، وتعتمد عليه البنوك في أنظمة الدفع بالبطاقات والتحويلات. diff --git a/content/lessons/cryptography/block-ciphers-and-aes/en.md b/content/lessons/cryptography/block-ciphers-and-aes/en.md index 643ae9af..90da99f8 100644 --- a/content/lessons/cryptography/block-ciphers-and-aes/en.md +++ b/content/lessons/cryptography/block-ciphers-and-aes/en.md @@ -15,13 +15,13 @@ variables: ## Try it 1. Look at the two towers of small squares, A on the left and B on the right: they start as the same 16-bit block, except for one flipped bit. -2. Drag «rounds» from 0 up to 4 and watch how many squares differ between A and B by the bottom row. -3. Drag «flip» to change which single input bit differs, and watch the same spreading pattern happen no matter which bit you pick. +2. Keep «flip» at 0 and step «rounds» through 0, 1, 2, 3, 4. The "bits different" readout goes 1, 3, 9, 5, 5 out of 16: one flipped bit spreads over the block. +3. With «rounds» at 4, set «flip» to 8, then to 15. A different input bit now differs, and the readout shows 7 / 16, then 6 / 16 — the change spreads no matter which bit you pick. ## Real-life examples 1. **Sending a block with zero rounds.** «rounds» = 0 skips all mixing, so A and B — identical except for one input bit — still differ by exactly that one square at the bottom, just like plain, unshuffled data. -2. **A partly-mixed message.** «rounds» = 2 lets that one-bit difference spread only part-way through the block, the way a weak, watered-down cipher would leave it. +2. **A partly-mixed message.** «rounds» = 2 already spreads that one-bit difference to 9 of the 16 squares, but after so few rounds the pattern is still easy to predict, the way a weak, watered-down cipher would leave it. 3. **A fully-mixed message, from a different bit.** «rounds» = 4 with «flip» = 8 shows a different starting bit still ending up scrambling roughly half the block, just as real AES's 10 rounds do to a full 128-bit block. ## Test yourself @@ -55,13 +55,17 @@ The Advanced Encryption Standard operates on 128-bit blocks with 10, 12 or 14 ro ## Real world ### Wi-Fi encryption + The WPA2 and WPA3 standards that protect home Wi-Fi traffic both encrypt every packet with AES. ### HTTPS connections + Once a browser and a website agree on a shared key, most of the actual encrypted traffic behind the padlock icon is protected with AES. ### Encrypted phones and disks + Phone storage and full-disk encryption tools scramble every file with AES so the data is unreadable without the device's key. ### Government and banking standards + AES is approved by the U.S. government for protecting even top-secret information, and banks rely on it throughout card payment and transfer systems. diff --git a/content/lessons/cryptography/block-ciphers-and-aes/lesson.yaml b/content/lessons/cryptography/block-ciphers-and-aes/lesson.yaml index 7af76947..73073465 100644 --- a/content/lessons/cryptography/block-ciphers-and-aes/lesson.yaml +++ b/content/lessons/cryptography/block-ciphers-and-aes/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: C = E_K(M) concepts: -- block-cipher -- aes -- confusion-and-diffusion -- substitution-permutation-network + - block-cipher + - aes + - confusion-and-diffusion + - substitution-permutation-network prerequisites: -- xor-and-one-time-pad -- binary-numbers + - xor-and-one-time-pad + - binary-numbers related: -- hash-functions -- digital-signatures + - hash-functions + - digital-signatures visualization: type: toy-spn options: {} @@ -33,29 +33,29 @@ parameters: step: 1 value: 14996 variables: -- C -- E -- K -- M + - C + - E + - K + - M derivation: -- '\text{each round: mix in the key, substitute every 4-bit group through a fixed S-box, then shuffle all 16 bits}' -- \text{repeat the same round several times, each one spreading the change of a single bit further} -- \text{after enough rounds, one flipped input bit has changed roughly half of the 16 output bits} + - '\text{each round: mix in the key, substitute every 4-bit group through a fixed S-box, then shuffle all 16 bits}' + - \text{repeat the same round several times, each one spreading the change of a single bit further} + - \text{after enough rounds, one flipped input bit has changed roughly half of the 16 output bits} charts: [] primary: rounds presets: -- rounds: 0 - flip: 0 - key: 14996 -- rounds: 2 - flip: 0 - key: 14996 -- rounds: 4 - flip: 8 - key: 14996 + - rounds: 0 + flip: 0 + key: 14996 + - rounds: 2 + flip: 0 + key: 14996 + - rounds: 4 + flip: 8 + key: 14996 challenges: -- check: rounds - target: 4 -- check: flip - target: 15 -- check: rounds == 4 and flip == 0 + - check: rounds + target: 4 + - check: flip + target: 15 + - check: rounds == 4 and flip == 0 diff --git a/content/lessons/cryptography/caesar-cipher/ar.md b/content/lessons/cryptography/caesar-cipher/ar.md index 29530fde..7fc24971 100644 --- a/content/lessons/cryptography/caesar-cipher/ar.md +++ b/content/lessons/cryptography/caesar-cipher/ar.md @@ -12,8 +12,8 @@ variables: ## Try it 1. اضبط منزلق الإزاحة على 3. قارن النص المشفر بالرسالة النموذجية بجانبه، فكل حرف فيه تقدّم ثلاث خطوات. -2. ارفع الإزاحة إلى ما فوق 20. يتغيّر النص المشفر بالكامل، لكن الرسالة الأصلية تحته تبقى كما هي. -3. ادفع الإزاحة إلى ما بعد 25، قرب نهاية مداها. لا تتوقف العجلة عند الحد الأقصى، بل تلتف إلى 0 من جديد. +2. اضبط الإزاحة على 23. تصبح MEET الآن JBBQ، أي نصًّا مختلفًا تمامًا، أما النص الأصلي في القراءات فلم يتغيّر. +3. اسحب العجلة الداخلية دورة كاملة. بعد 25 لا تتوقف الإزاحة، بل تعود إلى 0، وعند 0 يصبح النص المشفر هو الرسالة نفسها. ## Real-life examples @@ -29,9 +29,9 @@ variables: ## Intuition -تخيل رسالة تمر بين جنرالين رومان: MEET ME AT NOON. تقدّم كل حرف فيها ثلاث خطوات، فيصبح M حرف P وE حرف H. أدر العجلة على الشاشة حتى تصل الإزاحة إلى 3. شاهد الرسالة النموذجية على اليمين تتغيّر حرفًا حرفًا، فتتحول MEET إلى PHHW، ورقم الإزاحة يبقى ظاهرًا على المنزلق طوال الوقت. +تخيل رسالة بين قائدين رومانيين: MEET ME AT NOON. تقدّم كل حرف فيها ثلاث خطوات، فيصبح M حرف P وE حرف H. أدر العجلة على الشاشة حتى تصل الإزاحة إلى 3. شاهد الرسالة النموذجية على اليمين تتغيّر حرفًا حرفًا، فتتحول MEET إلى PHHW، ورقم الإزاحة يبقى ظاهرًا على المنزلق طوال الوقت. -تُظهر لك القراءات المفتاح والنص الأصلي والنص المشفر معًا، جنبًا إلى جنب. وترى بينها رقمًا آخر، 26، وهو عدد كل المفاتيح الممكنة. هذا الرقم هو نقطة ضعف الشيفرة بالكامل، فمن يعترض PHHW ME AT NOON يستطيع تجربة أوضاع العجلة الـ26 كلها في ثوانٍ، ويختار الوضع الذي يعطي كلمات حقيقية. +تُظهر لك القراءات المفتاح والنص الأصلي والنص المشفر معًا، جنبًا إلى جنب. وترى بينها رقمًا آخر، 26، وهو عدد كل المفاتيح الممكنة. هذا الرقم هو نقطة ضعف الشيفرة بالكامل، فمن يعترض PHHW PH DW QRRQ يستطيع تجربة أوضاع العجلة الـ26 كلها في ثوانٍ، ويختار الوضع الذي يعطي كلمات حقيقية. ## Formal @@ -52,13 +52,17 @@ variables: ## Real world ### ROT13 + شيفرة قيصر بإزاحة 13 تُستخدم في المنتديات لإخفاء حرق الأحداث أو النكتة. ليست للسرية، فأي أحد يستطيع فك تشفيرها، بل فقط لمنع العين من قراءتها عرضًا. ### الاستخدام العسكري القديم + يُروى أن يوليوس قيصر استخدم شيفرة إزاحة 3 لرسائله إلى قادته. كانت كافية لإيقاف قارئ عابر، لا قارئًا مصممًا. ### لماذا يهم حجم المفتاح + فضاء مفاتيح من 26 صغير بما يكفي ليُبحث يدويًا. أما الشيفرات الحقيقية فتستخدم مفاتيح احتمالاتها أكثر من عدد ذرات الكون المنظور، وهذا ما يحمي الرسالة فعلًا. ### تحليل التكرار + كل شيفرة تحوّل الحرف نفسه إلى الحرف المشفر نفسه دائمًا تكشف نمط تكرار اللغة الأصلية، لا شيفرة قيصر وحدها. لهذا تتجنب الشيفرات الحديثة هذا التطابق الثابت تمامًا. diff --git a/content/lessons/cryptography/caesar-cipher/en.md b/content/lessons/cryptography/caesar-cipher/en.md index d5f6031b..4db4e6ea 100644 --- a/content/lessons/cryptography/caesar-cipher/en.md +++ b/content/lessons/cryptography/caesar-cipher/en.md @@ -12,8 +12,8 @@ variables: ## Try it 1. Set the shift slider to 3 and compare the cipher text next to the sample message — every letter has moved three places forward. -2. Raise the shift past 20 and notice the cipher text changes completely, even though the message underneath never does. -3. Push the shift past 25, toward the top of its range, and notice the wheel simply wraps back around to 0 instead of stopping. +2. Set the shift to 23. MEET now reads JBBQ, a completely different scramble, while the plain text readout has not changed at all. +3. Drag the inner wheel all the way around. After 25 the shift does not stop: it goes back to 0, and at 0 the cipher text is the same as the message. ## Real-life examples @@ -31,7 +31,7 @@ variables: Picture a note passed between two Roman generals: MEET ME AT NOON, with every letter pushed three places forward so M becomes P and E becomes H. Turn the wheel on screen until the shift reads 3 and watch that same swap happen — the sample message on the right updates letter by letter, so MEET turns into PHHW while the shift number stays visible on the slider the whole time. -The readouts list the key, the plain text and the cipher text side by side, plus one more number: 26, the count of every possible key. That number is the whole weakness of this cipher — whoever intercepts PHHW ME AT NOON can try all 26 wheel positions in seconds and read off the one that turns into real words. +The readouts list the key, the plain text and the cipher text side by side, plus one more number: 26, the count of every possible key. That number is the whole weakness of this cipher — whoever intercepts PHHW PH DW QRRQ can try all 26 wheel positions in seconds and read off the one that turns into real words. ## Formal @@ -52,13 +52,17 @@ With only 26 possible keys, a computer can decrypt an intercepted message by bru ## Real world ### ROT13 + A shift-13 Caesar cipher used on forums to hide spoilers or punchlines — not for secrecy, since anyone can decode it, just to stop the eye from reading it by accident. ### Ancient military use + Julius Caesar reportedly used a shift-3 cipher for messages to his generals; it was enough to stop a casual reader, though not a determined one. ### Why key size matters + A keyspace of 26 is small enough to search by hand; real ciphers use keys with more possibilities than atoms in the observable universe, which is what actually keeps a message safe. ### Frequency analysis + Any cipher that always maps the same plain letter to the same cipher letter — not just Caesar's — leaks the frequency pattern of the underlying language, which is why modern ciphers avoid that fixed mapping entirely. diff --git a/content/lessons/cryptography/caesar-cipher/lesson.yaml b/content/lessons/cryptography/caesar-cipher/lesson.yaml index 236aa671..a12a1396 100644 --- a/content/lessons/cryptography/caesar-cipher/lesson.yaml +++ b/content/lessons/cryptography/caesar-cipher/lesson.yaml @@ -3,14 +3,14 @@ subject: cryptography difficulty: beginner equation: c = (p + k) \bmod 26 concepts: -- cryptography -- substitution-cipher -- modular-arithmetic -- key + - cryptography + - substitution-cipher + - modular-arithmetic + - key prerequisites: [] related: -- modular-arithmetic -- permutations + - modular-arithmetic + - permutations visualization: type: cipher-wheel options: @@ -20,13 +20,13 @@ parameters: min: 0 max: 25 step: 1 - value: 3 + value: 1 variables: -- \bmod + - \bmod derivation: -- p = \text{index of the plain letter } (A=0,\dots,Z=25) -- c = (p + k) \bmod 26 -- p = (c - k) \bmod 26 + - p = \text{index of the plain letter } (A=0,\dots,Z=25) + - c = (p + k) \bmod 26 + - p = (c - k) \bmod 26 charts: [] primary: shift presets: diff --git a/content/lessons/cryptography/confusion-and-diffusion/ar.md b/content/lessons/cryptography/confusion-and-diffusion/ar.md index d942aa54..9e2d07c6 100644 --- a/content/lessons/cryptography/confusion-and-diffusion/ar.md +++ b/content/lessons/cryptography/confusion-and-diffusion/ar.md @@ -13,37 +13,37 @@ variables: ## Try it -1. والجولات على 1، اقلب البتّ 0 وقارن الصفوف الثلاثة: شيفرة المفتاح وحده تغيّر بتًّا واحدًا بالضبط، وصف صندوق الإحلال يغيّر بتّات متجاورة قليلة، وصف الإحلال والخلط ينتشر أبعد منذ الآن. -2. ارفع الجولات إلى 4 وراقب المقياس السفلي: عدد البتّات المتغيرة يتسلق إلى نحو 8 من 16 — نصف الكتلة، النقطة التي يبدو عندها الخرجان بلا صلة. -3. حرّك المفتاح: الصفوف العليا تتزحزح بشكل متوقع، أما خرج الشيفرة السفلى فيضطرب كليًّا — بصمات المفتاح في كل مكان ولا مكان. +1. اضبط الجولات على 1 والبتّ المقلوب على 0 وقارن الصفوف الثلاثة: شيفرة المفتاح وحده تغيّر بتًّا واحدًا بالضبط، وصف صندوق الإحلال يغيّر 3 بتّات متجاورة، وصف الإحلال والخلط يغيّر 3 بتّات فقط أيضًا، لكن الخلط أبعدها بعضها عن بعض. +2. ارفع الجولات خطوة خطوة إلى 4 وراقب المقياس السفلي: عدد البتّات المتغيرة يقرأ 3 ثم 10 ثم 10 ثم 7 من 16 — نحو نصف الكتلة، النقطة التي يبدو عندها الخرجان بلا صلة. +3. حرّك المفتاح: الصفوف العليا تتغير بشكل متوقع، أما خرج الشيفرة السفلى فيتغير كله — أثر المفتاح في كل البتّات، ولا تستطيع أن تحدد أين. ## Real-life examples - **جولة واحدة كسولة.** بجولة واحدة لا يلمس البتّ المقلوب إلا جزءًا من الكتلة — مفكّك شيفرة يقارن رسالتين شبه متطابقتين ما يزال يرى أين تختلفان. -- **أربع جولات وافية.** عند الجولة 4 يتشبع الضرر عند نحو نصف البتّات، ويصبح الخرجان غريبين إحصائيًّا. -- **زاوية أخرى، مفتاح آخر.** قلبُ البتّ الأخير تحت مفتاح جديد ينتشر بالقدر نفسه — يجب أن ينجح الانهيار مع كل بتّ وكل مفتاح، لا مع محظوظ واحد. +- **أربع جولات وافية.** عند الجولة 4 يتشبع الضرر عند نحو نصف البتّات، ويصبح الخرجان بلا صلة ظاهرة بينهما. +- **زاوية أخرى، مفتاح آخر.** قلبُ البتّ الأخير تحت مفتاح جديد ينتشر بالقدر نفسه — يجب أن ينجح الانهيار مع كل بتّ وكل مفتاح، لا مع حالة محظوظة واحدة. ## Test yourself -1. ادفع الجولات إلى 4 وتأكد أن الصف السفلي يتجاوز علامة المنتصف. -2. انقل البتّ المقلوب إلى الموضع 15، أقصى طرف الكتلة، وتأكد أن الانهيار ما يزال يبلغ كل مكان. -3. ارجع إلى جولة واحدة وجد الصف الذي يرسب في اختبار المنتصف. +1. ادفع الجولات إلى 4 وتأكد أن الصف السفلي يقترب من علامة المنتصف. +2. انقل البتّ المقلوب إلى الموضع 15، أقصى طرف الكتلة، واقرأ الصف السفلي: مع المفتاح 58 وأربع جولات تتغير 4 بتّات فقط، وهي حالة سيئة الحظ في هذه اللعبة الصغيرة. غيّر المفتاح إلى 200 فتصبح 7. +3. ارجع إلى جولة واحدة ولاحظ أن الصفوف الثلاثة كلها تبقى بعيدة تحت علامة المنتصف. ## Intuition كل شيفرة مكسورة في هذا المتحف ماتت بالداءين نفسيهما، وفي عام 1949 سمّى كلود شانون الدواءين. داء قيصر: المفتاح يعمل ببساطة مفرطة — زوج حروف واحد معروف يكشف المفتاح كله. والدواء هو الإرباك: أن يعتمد كل بتّ من الخرج على المفتاح بتشابك لا تفكّه معادلة أقصر من تجربة المفاتيح. الصف العلوي على الشاشة هو الداء في صورته النقية — امزج المفتاح بعملية XOR، فيقلب بتُّ الرسالة المقلوب بتًّا واحدًا بالضبط من الشيفرة، فيدل المهاجم بدقة على موضع اختلاف الرسالتين. -وداء التبديل كان العكس: الحروف تتحرك ولا تتغير، فتنجو الأنماط من الخلط. والدواء هو الانتشار: بتٌّ مقلوب واحد في المدخل يجب أن يعدي نحو نصف بتّات الخرج، فتُشفَّر الرسائل شبه المتطابقة إلى كتل تبدو بلا قرابة. الصف الأوسط يُري الإحلال وحده يلطّخ التغيير داخل صندوقه ذي الأربعة بتّات فقط؛ أما الصف السفلي فيناوب إحلالًا وخلطًا، وبحلول الجولة 4 يكون القلب قد تسلسل عبر الكتلة كلها — أثر الانهيار، الصورة الوحيدة التي تفسّر لماذا يكرر AES جولاته عشر مرات. +وداء التبديل كان العكس: الحروف تتحرك ولا تتغير، فتنجو الأنماط من الخلط. والدواء هو الانتشار: بتٌّ مقلوب واحد في المدخل يجب أن يغيّر نحو نصف بتّات الخرج، فتُشفَّر الرسائل شبه المتطابقة إلى كتل تبدو بلا صلة. الصف الأوسط يُظهر أن الإحلال وحده يُبقي التغيير داخل صندوقه ذي الأربعة بتّات فقط. أما الصف السفلي فيكرر إحلالًا ثم خلطًا، وعند الجولة 4 يكون التغيير قد انتشر في الكتلة كلها — أثر الانهيار، الصورة الوحيدة التي تفسّر لماذا يكرر AES جولاته عشر مرات. ## Formal لكتلة من $n$ بتًّا، يطلب معيار الانهيار أن يغيّر قلبُ أي بتّ واحد في المدخل كلَّ بتّ في الخرج باحتمال النصف — أي نحو $\frac{n}{2}$ بتًّا إجمالًا، في المتوسط على الرسائل والمفاتيح. والطرفان كلاهما رسوب: أقل من النصف بكثير يعني أن التغيير بقي قابلًا للتتبع، وأكثر منه بانتظام نمطٌ بحد ذاته. -ولا يعمل أي من المكوّنين وحده. صندوق الإحلال لاخطّي (إرباك) لكنه محلي: لا يخلط إلا البتّات القليلة التي بداخله. والخلط شامل (انتشار) لكنه خطّي: ينقل البتّات دون تغييرها، والتحويلات الخطية تسقط أمام جبر بسيط. أما المناوبة بينهما — إحلال، خلط، مزج مفتاح، ثم التكرار — فتراكم المحليةَ انتشارًا كاملًا، وهذه بالضبط شبكة الإحلال والتبديل التي تشغّلها هذه الصفحة ويصنّعها AES. +ولا يعمل أي من المكوّنين وحده. صندوق الإحلال لاخطّي (إرباك) لكنه محلي: لا يخلط إلا البتّات القليلة التي بداخله. والخلط شامل (انتشار) لكنه خطّي: ينقل البتّات دون تغييرها، والتحويلات الخطية تسقط أمام جبر بسيط. أما المناوبة بينهما — إحلال، خلط، مزج مفتاح، ثم التكرار — فتراكم المحليةَ انتشارًا كاملًا، وهذه بالضبط شبكة الإحلال والتبديل التي تشغّلها هذه الصفحة ويطبّقها AES على نطاق واسع. ## Advanced -في AES للدورين اسمان: SubBytes هو الإرباك (صندوق إحلال لاخطّي على كل بايت)، وShiftRows مع MixColumns هما الانتشار (تسافر البايتات عبر الأعمدة وتمتزج داخلها). جولتان تكفيان نظريًّا للانتشار الكامل؛ لكن AES يدير 10 إلى 14 لأن المهاجمين يقشّرون جولات جزئية بالتحليل التفاضلي والخطي — وهي تقنيات تقيس الإحصاءات نفسها التي تعرضها هذه اللعبة. ودوال الهاش تطارد الهدف نفسه من الجهة الأخرى: انهيار SHA-256 هو سبب أن تغيير حرف واحد في ملف يعيد كتابة البصمة كلها. +في AES للدورين اسمان: SubBytes هو الإرباك (صندوق إحلال لاخطّي على كل بايت)، وShiftRows مع MixColumns هما الانتشار (تسافر البايتات عبر الأعمدة وتمتزج داخلها). جولتان تكفيان نظريًّا للانتشار الكامل؛ لكن AES يدير 10 إلى 14 لأن المهاجمين يقشّرون جولات جزئية بالتحليل التفاضلي والخطي — وهي تقنيات تقيس الإحصاءات نفسها التي تعرضها هذه اللعبة. ودوال التجزئة تسعى إلى الهدف نفسه من الجهة الأخرى: انهيار SHA-256 هو سبب أن تغيير حرف واحد في ملف يعيد كتابة البصمة كلها. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### بنية جولة AES + SubBytes وShiftRows وMixColumns وAddRoundKey — إرباك، انتشار، انتشار، مزج مفتاح — تتكرر 10 إلى 14 مرة على كل كتلة من 128 بتًّا يشفّرها هاتفك. ### اختبار الانهيار + يجري مصممو الشيفرات هذه التجربة نفسها على نطاق واسع: اقلب كل بتّ مدخل عبر ملايين المفاتيح العشوائية وتحقق أن كل بتّ خرج ينقلب نصف المرات. ### التحليل التفاضلي + الهجوم الذي يعكس هذه الصورة — تغذية أزواج مختارة من المدخلات وتتبع انتقال الفروق — أجبر الشيفرات الحديثة على إثبات هوامش انهيارها جولة جولة. ### لماذا لا تكفي جولة واحدة أبدًا + أدار DES ست عشرة جولة، وAES لا يقل عن عشر: النسخ المنقوصة الجولات من كليهما تسقط سريعًا، لأن انتشارًا ينقصه جولة يترك جزرًا هادئة قابلة للقياس. diff --git a/content/lessons/cryptography/confusion-and-diffusion/en.md b/content/lessons/cryptography/confusion-and-diffusion/en.md index b00d01ff..7de23fd8 100644 --- a/content/lessons/cryptography/confusion-and-diffusion/en.md +++ b/content/lessons/cryptography/confusion-and-diffusion/en.md @@ -14,8 +14,8 @@ variables: ## Try it -1. With rounds at 1, flip bit 0 and compare the three rows: the key-only cipher changes exactly 1 bit, the S-box row changes a few neighbouring bits, and the substitute-and-shuffle row already spreads further. -2. Raise rounds to 4 and watch the bottom meter: the changed-bit count climbs to around 8 of 16 — half the block, the point where the two outputs look unrelated. +1. Set rounds to 1 and flip to 0, and compare the three rows: the key-only cipher changes exactly 1 bit, the S-box row changes 3 neighbouring bits, and the substitute-and-shuffle row also changes only 3, though the shuffle has already moved them apart. +2. Raise rounds one step at a time to 4 and watch the bottom meter: the changed-bit count reads 3, 10, 10, then 7 of 16 — around half the block, the point where the two outputs look unrelated. 3. Slide the key around: the top rows shift predictably, but the bottom cipher's output churns completely — the key's fingerprints are everywhere and nowhere. ## Real-life examples @@ -26,9 +26,9 @@ variables: ## Test yourself -1. Push rounds up to 4 and check the bottom row crosses the halfway marker. -2. Move the flipped bit to position 15, the far end of the block, and confirm the avalanche still reaches everywhere. -3. Drop back to a single round and find the row that fails the halfway test. +1. Push rounds up to 4 and check the bottom row comes close to the halfway marker. +2. Move the flipped bit to position 15, the far end of the block, and read the bottom row: with key 58 and 4 rounds only 4 bits change, an unlucky case in this tiny toy; change the key to 200 and it is 7. +3. Drop back to a single round and see that all three rows now stay far below the halfway marker. ## Intuition @@ -55,13 +55,17 @@ In AES the two roles have names: SubBytes is the confusion (a nonlinear S-box on ## Real world ### AES round structure + SubBytes, ShiftRows, MixColumns, AddRoundKey — confusion, diffusion, diffusion, key mixing — repeated 10 to 14 times on every 128-bit block your phone encrypts. ### Avalanche testing + Cipher designers run exactly this experiment at scale: flip each input bit across millions of random keys and verify every output bit flips half the time. ### Differential cryptanalysis + The attack that bends this picture backwards — feeding chosen pairs of inputs and tracking how differences propagate — forced modern ciphers to prove their avalanche margins round by round. ### Why one round is never enough + DES ran 16 rounds, AES runs at least 10: reduced-round versions of both fall quickly, because diffusion a round short leaves measurable islands of calm. diff --git a/content/lessons/cryptography/confusion-and-diffusion/lesson.yaml b/content/lessons/cryptography/confusion-and-diffusion/lesson.yaml index 598c4191..1e73acb5 100644 --- a/content/lessons/cryptography/confusion-and-diffusion/lesson.yaml +++ b/content/lessons/cryptography/confusion-and-diffusion/lesson.yaml @@ -3,17 +3,17 @@ subject: cryptography difficulty: high-school equation: \text{changed bits} \approx \frac{n}{2} concepts: -- confusion -- diffusion -- avalanche-effect -- shannon + - confusion + - diffusion + - avalanche-effect + - shannon prerequisites: -- caesar-cipher -- xor-and-one-time-pad + - caesar-cipher + - xor-and-one-time-pad related: -- block-ciphers-and-aes -- hash-functions -- transposition-ciphers + - block-ciphers-and-aes + - hash-functions + - transposition-ciphers visualization: type: confusion-diffusion options: {} @@ -27,18 +27,18 @@ parameters: min: 1 max: 4 step: 1 - value: 1 + value: 2 key: min: 0 max: 255 step: 1 value: 58 variables: -- n + - n derivation: -- '\text{confusion: the key''s effect on each output bit is tangled, not a simple shift}' -- '\text{diffusion: each input bit must spread its influence to about half the output bits}' -- \text{one pass is never enough, so repeat substitute} \to \text{shuffle, round after round} + - '\text{confusion: the key''s effect on each output bit is tangled, not a simple shift}' + - '\text{diffusion: each input bit must spread its influence to about half the output bits}' + - \text{one pass is never enough, so repeat substitute} \to \text{shuffle, round after round} charts: [] primary: rounds presets: diff --git a/content/lessons/cryptography/diffie-hellman/ar.md b/content/lessons/cryptography/diffie-hellman/ar.md index 9a89697b..e7f29805 100644 --- a/content/lessons/cryptography/diffie-hellman/ar.md +++ b/content/lessons/cryptography/diffie-hellman/ar.md @@ -14,14 +14,14 @@ variables: ## Try it 1. اضبط g على 5 وa على 6: تمزج أليس الطلاء العلني بصبغتها الخاصة وتصل إلى اللون العلني A = 8، الذي يعبر القناة أمام أعين الجميع. -2. حرّك b جيئة وذهابًا وراقب جانب بوب: مهما اختار، يستقر الصندوقان في الأسفل على اللون نفسه تمامًا — سرّ لم يُرسل قط. -3. الآن حرّك a مع تثبيت كل شيء آخر: يتغير اللون السفلي في الجانبين معًا، ومع ذلك لا يعبر المنتصف شيء جديد سوى المزيجين العلنيين. +2. اضبط b على 9 وراقب جانب بوب: لونه العلني B = 11، ويستقر الصندوقان في الأسفل على اللون نفسه تمامًا، 9 — سرّ لم يُرسل قط. جرّب قيمًا أخرى لـb: الصندوقان متطابقان دائمًا. +3. الآن اضبط a على 3 مع تثبيت كل شيء آخر: يتغير اللون السفلي إلى 20 في الجانبين معًا، ومع ذلك لا يعبر المنتصف شيء جديد سوى المزيجين العلنيين. ## Real-life examples - **التبادل المحسوب.** مع g = 5 وسرّ أليس 6 وسرّ بوب 9: ترسل أليس 8 ويرسل بوب 11، ويمزج كلٌّ منهما في الخفاء وصولًا إلى السرّ المشترك نفسه، 9. -- **سرّان مختلفان، الحيلة نفسها.** غيّر السرّين إلى a = 3 وb = 7: يتغير الرقمان العلنيان كليًّا، لكن الصندوقين السفليين ما يزالان متطابقين تمامًا. -- **أساس ضعيف.** اضبط g على 2 مع a = 11 فينهار اللون العلني إلى 1 — الأنظمة الحقيقية تختار g وp بعناية حتى لا يحدث شيء بهذه القابلية للتوقع أبدًا. +- **سرّان مختلفان، الحيلة نفسها.** غيّر السرّين إلى a = 3 وb = 7: يتغير الرقمان العلنيان إلى 10 و17، لكن الصندوقين السفليين ما يزالان متطابقين تمامًا، وكلاهما 14. +- **أساس ضعيف.** اضبط g على 2 مع a = 11 فينهار اللون العلني إلى 1 — الأنظمة الحقيقية تختار g وp بعناية حتى لا تخرج نتيجة يسهل توقعها هكذا. ## Test yourself @@ -54,13 +54,17 @@ variables: ## Real world ### HTTPS وTLS + كلما أظهر المتصفح قفل الأمان، فالأرجح أنه أجرى للتو نسخة من هذا التبادل ليتفق مع الخادم على مفتاح الجلسة. ### الشبكات الافتراضية الخاصة + تفتح شبكات VPN نفقها المشفر بالاتفاق أولًا على سرّ مشترك بهذه الطريقة نفسها، دون إرساله مباشرة أبدًا. ### سيغنال وتطبيقات التراسل المشفر -التطبيقات التي تَعِد بالتشفير من الطرف إلى الطرف تستخدم سليلًا من هذا البروتوكول للاتفاق على مفاتيح كل محادثة، وغالبًا لكل رسالة. + +التطبيقات التي تَعِد بالتشفير من الطرف إلى الطرف تستخدم نسخة مطوّرة من هذا البروتوكول للاتفاق على مفاتيح كل محادثة، وغالبًا لكل رسالة. ### السرية الأمامية التامة + لأن الأسس السرّية الجديدة تُرمى بعد الاستعمال، فإن تسجيل حركة اليوم لا يتيح لأحد فك تشفيرها حتى لو اختُرق الجهاز لاحقًا. diff --git a/content/lessons/cryptography/diffie-hellman/en.md b/content/lessons/cryptography/diffie-hellman/en.md index 3dcd52fc..8eebb1d9 100644 --- a/content/lessons/cryptography/diffie-hellman/en.md +++ b/content/lessons/cryptography/diffie-hellman/en.md @@ -15,13 +15,13 @@ variables: ## Try it 1. Set g to 5 and a to 6: Alice mixes the public paint with her private pigment and lands on the public colour A = 8, which crosses the channel for everyone to see. -2. Slide b back and forth and watch Bob's side: whatever he picks, the two boxes at the bottom always settle on the exact same colour — a secret that was never sent. -3. Now wiggle a with everything else fixed: the bottom colour changes on both sides at once, yet nothing new ever crosses the middle except the two public mixes. +2. Set b to 9 and watch Bob's side: his public colour is B = 11, and the two boxes at the bottom settle on the exact same colour, 9 — a secret that was never sent. Try other values of b: the two boxes always match. +3. Now set a to 3 with everything else fixed: the bottom colour changes to 20 on both sides at once, yet nothing new ever crosses the middle except the two public mixes. ## Real-life examples - **The worked exchange.** With g = 5, Alice's secret 6 and Bob's secret 9: Alice sends 8, Bob sends 11, and both privately mix their way to the same shared secret, 9. -- **Different secrets, same trick.** Change the secrets to a = 3 and b = 7: the public numbers change completely, but the two bottom boxes still match perfectly. +- **Different secrets, same trick.** Change the secrets to a = 3 and b = 7: the public numbers change to 10 and 17, but the two bottom boxes still match perfectly, both at 14. - **A weak base.** Set g to 2 with a = 11 and the public colour collapses to 1 — real systems choose g and p carefully precisely so that nothing this predictable can happen. ## Test yourself @@ -55,13 +55,17 @@ An eavesdropper who records $g=5$, $p=23$, $A=8$ and $B=11$ still cannot get the ## Real world ### HTTPS and TLS + Every time a browser shows a secure padlock icon, it likely just ran a version of this exchange to agree on a session key with the server. ### VPNs + Virtual private networks establish an encrypted tunnel by first agreeing on a shared secret this same way, without ever transmitting it directly. ### Signal and encrypted messaging + Apps that promise end-to-end encryption use a descendant of this protocol to agree on keys for every conversation, and often for every message. ### Perfect forward secrecy + Because fresh secret exponents can be thrown away after use, recording today's traffic does not let anyone decrypt it even if a device is later compromised. diff --git a/content/lessons/cryptography/diffie-hellman/lesson.yaml b/content/lessons/cryptography/diffie-hellman/lesson.yaml index 42ed2854..96ffb21a 100644 --- a/content/lessons/cryptography/diffie-hellman/lesson.yaml +++ b/content/lessons/cryptography/diffie-hellman/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: s = g^{ab} \bmod p concepts: -- key-exchange -- discrete-logarithm -- shared-secret -- cryptography + - key-exchange + - discrete-logarithm + - shared-secret + - cryptography prerequisites: -- modular-arithmetic -- one-way-functions + - modular-arithmetic + - one-way-functions related: -- rsa-encryption -- stream-ciphers + - rsa-encryption + - stream-ciphers visualization: type: diffie-hellman options: @@ -27,18 +27,18 @@ parameters: min: 1 max: 11 step: 1 - value: 6 + value: 4 b: min: 1 max: 11 step: 1 - value: 9 + value: 7 variables: -- \bmod + - \bmod derivation: -- A = g^{a} \bmod p = 5^{6} \bmod 23 = 8 -- B = g^{b} \bmod p = 5^{9} \bmod 23 = 11 -- s = B^{a} \bmod p = A^{b} \bmod p = 9 + - A = g^{a} \bmod p = 5^{6} \bmod 23 = 8 + - B = g^{b} \bmod p = 5^{9} \bmod 23 = 11 + - s = B^{a} \bmod p = A^{b} \bmod p = 9 charts: [] primary: a presets: diff --git a/content/lessons/cryptography/digital-signatures/ar.md b/content/lessons/cryptography/digital-signatures/ar.md index fdf9829e..86003019 100644 --- a/content/lessons/cryptography/digital-signatures/ar.md +++ b/content/lessons/cryptography/digital-signatures/ar.md @@ -18,9 +18,9 @@ variables: ## Try it -1. أبقِ p = 5 وq = 11 وm = 7 وtamper = 0 وتتبّع الرحلة: العقد يُهرَس إلى البصمة 50، ومفتاح أليس الخاص d = 27 يطبع عليها الختم 30، وفحص بوب يفتح الختم فيعود إلى 50 — أخضر، فالعقد عقدها ولم يُمَس. +1. أبقِ p = 5 وq = 11 وtamper = 0، واضبط m = 7، وتتبّع الرحلة: العقد يُختصَر إلى البصمة 50، ومفتاح أليس الخاص d = 27 يطبع عليها الختم 30، وفحص بوب يفتح الختم فيعود إلى 50 — أخضر، فالعقد عقدها ولم يُمَس. 2. الآن حرّك tamper إلى 1: يصل العقد 8 وبصمته 10، لكن الختم ما يزال يُفتح إلى 50 — عدم التطابق يقلب الحكم أحمر، ويُكشف التزوير. -3. أعد tamper إلى 0 وحرّك m بدلًا منه: كل عقد يأخذ ختمًا مختلفًا من الخاتم نفسه، ويبقى الفحص أخضر — أليس تستطيع إعادة التوقيع على أي شيء، أما المزوِّر فلا يستطيع أبدًا. +3. أعد tamper إلى 0 واضبط m على 10: تصبح البصمة 46 والختم 51. كل عقد يأخذ ختمًا مختلفًا من الخاتم نفسه، ويبقى الفحص أخضر — أليس تستطيع إعادة التوقيع على أي شيء، أما المزوِّر فلا يستطيع أبدًا. ## Real-life examples @@ -30,21 +30,21 @@ variables: ## Test yourself -1. اضبط توقيعة الكتاب المدرسي — p = 5 وq = 11 وm = 7 مع tamper عند 0 — واقرأ الختم s = 30. +1. اضبط أرقام الكتاب المدرسي — p = 5 وq = 11 وm = 7 مع tamper عند 0 — واقرأ الختم s = 30. 2. العب دور المزوِّر: ارفع tamper فوق الصفر وراقب حكم بوب ينقلب أحمر. 3. أعطِ أليس أكبر خاتم هنا — p = 13 مع q = 11 وtamper عند 0 — وأبقِ الحكم أخضر. ## Intuition -كان الملوك يطبعون خاتمًا في شمع ساخن: يستطيع أي أحد تمييز الطبعة، ولا يملك الخاتم أحد سواهم. على الشاشة تفعل أليس النسخة الرقمية. عقدها هو العدد الملوّن على اليسار؛ يُهرَس إلى بصمة قصيرة، ثم يطبع مفتاحها الخاص ختمًا على تلك البصمة. يسافر العقد المختوم بعدها إلى بوب — ومنزلق tamper يتيح لمزوِّر أن يزيد العدد في الطريق، لترى بنفسك ما يحدث للختم. +كان الملوك يطبعون خاتمًا في شمع ساخن: يستطيع أي أحد تمييز الطبعة، ولا يملك الخاتم أحد سواهم. على الشاشة تفعل أليس الشيء نفسه رقميًّا. عقدها هو العدد الملوّن على اليسار. يُختصَر إلى بصمة قصيرة، ثم يطبع مفتاحها الخاص ختمًا على تلك البصمة. يسافر العقد المختوم بعدها إلى بوب — ومنزلق tamper يتيح لمزوِّر أن يزيد العدد في الطريق، لترى بنفسك ما يحدث للختم. -الختم هو RSA معكوسًا. التشفير يقفل بالمفتاح العلني فلا يفتحه إلا الخاص؛ أما التوقيع فيفعل العكس — تقفل أليس البصمة بمفتاحها الخاص، $s = h^{d} \bmod n$، فيستطيع أي أحد فتحه بالمفتاح العلني. تسقط من الختم البصمة $h$ التي ختمتها أليس؛ ويعيد بوب حساب بصمة العقد الذي وصل فعلًا ويقارن الاثنتين. تغيير العقد سهل — أما طبع ختم جديد مطابق فلا، لأنه يحتاج $d$. +الختم هو RSA معكوسًا. التشفير يقفل بالمفتاح العلني فلا يفتحه إلا الخاص؛ أما التوقيع فيفعل العكس — تقفل أليس البصمة بمفتاحها الخاص، $s = h^{d} \bmod n$، فيستطيع أي أحد فتحه بالمفتاح العلني. فتخرج من الختم البصمة $h$ التي ختمتها أليس. ويعيد بوب حساب بصمة العقد الذي وصل فعلًا ويقارن الاثنتين. تغيير العقد سهل — أما طبع ختم جديد مطابق فلا، لأنه يحتاج $d$. ## Formal لتوقيع رسالة، جزّئها أولًا إلى بصمة قصيرة $h = H(m)$، ثم ارفع البصمة إلى الأس الخاص: $s = h^{d} \bmod n$. وللتحقق، يحسب أي أحد $s^{e} \bmod n$ بالمفتاح العلني ويختبر أنه يساوي بصمة الرسالة التي وصلت فعلًا — فلا يستطيع إنتاج $s$ ناجح سوى الموقِّع، لأن طبعه يحتاج $d$. -بالأرقام نفسها في المحاكاة: عددا أليس الأوليان $p=5$ و$q=11$ يعطيان $n=55$ و$\varphi(n)=40$، فيكون مفتاحاها $e=3$ و$d=27$. العقد $m=7$ يُهرَس إلى البصمة $h = (7^{2} + 1) \bmod 55 = 50$، والختم هو $s = 50^{27} \bmod 55 = 30$، وفتحه يعطي $30^{3} \bmod 55 = 50$ — البصمة من جديد، فالختم سليم. +بالأرقام نفسها في المحاكاة: عددا أليس الأوليان $p=5$ و$q=11$ يعطيان $n=55$ و$\varphi(n)=40$، فيكون مفتاحاها $e=3$ و$d=27$. العقد $m=7$ يُختصَر إلى البصمة $h = (7^{2} + 1) \bmod 55 = 50$، والختم هو $s = 50^{27} \bmod 55 = 30$، وفتحه يعطي $30^{3} \bmod 55 = 50$ — البصمة من جديد، فالختم سليم. ## Advanced @@ -52,20 +52,24 @@ variables: ## Derivation -1. اهرس العقد إلى بصمته القصيرة بالقاعدة العلنية؛ العقد الافتراضي $7$ يصبح $50$. +1. اختصر العقد إلى بصمته القصيرة بالقاعدة العلنية. العقد $7$ يصبح $50$. 2. اطبع الختم: ارفع البصمة إلى الأس الخاص وخذ الباقي على $n$، فيخرج $50^{27} \bmod 55 = 30$. 3. يستطيع أي أحد فتح الختم بالأس العلني، $30^{3} \bmod 55 = 50$، فيعود إلى البصمة — قارنها ببصمة ما وصل، يثبت أن العقد لم يُمَس. ## Real world ### التحقق من تحديثات البرامج + ترفض أنظمة التشغيل تثبيت أي تحديث ما لم يجتز توقيعه الرقمي الفحص، فتمنع تحديثات مزوَّرة أو مُتلاعَبًا بها قبل أن تعمل. ### التوقيعات الإلكترونية الملزمة قانونًا + تعترف دول كثيرة بالتوقيع الرقمي على العقود بوصفه معادلًا قانونيًا للتوقيع اليدوي، ويستند ذلك إلى هذه الرياضيات بالذات. ### معاملات العملات المشفرة + تُوقَّع كل معاملة في العملات المشفرة بمفتاح المرسل الخاص، فيستطيع أي شخص في الشبكة التحقق من صدورها عن الحساب الصحيح دون أن يرى ذلك المفتاح أبدًا. ### شهادات المواقع وتوقيع البرمجيات + توقّع جهات إصدار الشهادات رقميًا الشهادات التي تتيح للمتصفحات تأكيد هوية موقع، أو برنامج مُنزَّل، كما يدّعي تمامًا. diff --git a/content/lessons/cryptography/digital-signatures/en.md b/content/lessons/cryptography/digital-signatures/en.md index 59935125..0c3dc26d 100644 --- a/content/lessons/cryptography/digital-signatures/en.md +++ b/content/lessons/cryptography/digital-signatures/en.md @@ -19,9 +19,9 @@ variables: ## Try it -1. Keep p = 5, q = 11, m = 7 and tamper = 0 and follow the journey: the contract squashes to the fingerprint 50, Alice's private key d = 27 presses the seal 30 onto it, and Bob's check opens the seal back to 50 — green, the contract is hers and untouched. +1. Keep p = 5, q = 11 and tamper = 0, set m = 7, and follow the journey: the contract squashes to the fingerprint 50, Alice's private key d = 27 presses the seal 30 onto it, and Bob's check opens the seal back to 50 — green, the contract is hers and untouched. 2. Now slide tamper to 1: the contract arrives as 8 with fingerprint 10, but the seal still opens to 50 — the mismatch flips the verdict red, and the forgery is caught. -3. Put tamper back to 0 and slide m instead: every contract gets a different seal from the same ring, and the check stays green — Alice can re-sign anything, the forger never can. +3. Put tamper back to 0 and set m to 10 instead: the fingerprint becomes 46 and the seal 51. Every contract gets a different seal from the same ring, and the check stays green — Alice can re-sign anything, the forger never can. ## Real-life examples @@ -53,20 +53,24 @@ Signing the fingerprint instead of the full contract keeps signing fast even for ## Derivation -1. Squash the contract into its short fingerprint with the public rule; the default contract $7$ becomes $50$. +1. Squash the contract into its short fingerprint with the public rule; the contract $7$ becomes $50$. 2. Press the seal: raise the fingerprint to the private exponent and reduce modulo $n$, giving $50^{27} \bmod 55 = 30$. 3. Anyone can open the seal with the public exponent, $30^{3} \bmod 55 = 50$, and land back on the fingerprint — compare it with the fingerprint of what arrived, and the contract is proven untouched. ## Real world ### Software update verification + Operating systems refuse to install an update unless its digital signature checks out, blocking tampered or fake updates before they run. ### Legally binding electronic signatures + Many countries recognize digital signatures on contracts as legally equivalent to a handwritten signature, backed by exactly this math. ### Cryptocurrency transactions + Every cryptocurrency transaction is signed by the sender's private key, letting anyone on the network verify it came from the right account without ever seeing that key. ### Website and code-signing certificates + Certificate authorities digitally sign the certificates that let browsers confirm a website, or a piece of downloaded software, is who it claims to be. diff --git a/content/lessons/cryptography/digital-signatures/lesson.yaml b/content/lessons/cryptography/digital-signatures/lesson.yaml index e630712d..2b738538 100644 --- a/content/lessons/cryptography/digital-signatures/lesson.yaml +++ b/content/lessons/cryptography/digital-signatures/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: s = h^{d} \bmod n concepts: -- digital-signature -- rsa -- hash-function -- authentication + - digital-signature + - rsa + - hash-function + - authentication prerequisites: -- rsa-encryption -- hash-functions + - rsa-encryption + - hash-functions related: -- elliptic-curve-cryptography -- block-ciphers-and-aes + - elliptic-curve-cryptography + - block-ciphers-and-aes visualization: type: digital-signature parameters: @@ -30,38 +30,38 @@ parameters: min: 2 max: 20 step: 1 - value: 7 + value: 9 tamper: min: 0 max: 5 step: 1 value: 0 variables: -- s -- h -- d -- n -- \bmod + - s + - h + - d + - n + - \bmod derivation: -- h = (m^{2} + 1) \bmod n = (49 + 1) \bmod 55 = 50 -- s = h^{d} \bmod n = 50^{27} \bmod 55 = 30 -- s^{e} \bmod n = 30^{3} \bmod 55 = 50 = h + - h = (m^{2} + 1) \bmod n = (49 + 1) \bmod 55 = 50 + - s = h^{d} \bmod n = 50^{27} \bmod 55 = 30 + - s^{e} \bmod n = 30^{3} \bmod 55 = 50 = h charts: [] primary: tamper presets: -- p: 5 - q: 11 - m: 7 - tamper: 0 -- p: 5 - q: 11 - m: 7 - tamper: 1 -- p: 13 - q: 11 - m: 12 - tamper: 0 + - p: 5 + q: 11 + m: 7 + tamper: 0 + - p: 5 + q: 11 + m: 7 + tamper: 1 + - p: 13 + q: 11 + m: 12 + tamper: 0 challenges: -- check: abs(p-5)<0.5 and abs(q-11)<0.5 and abs(m-7)<0.5 and tamper<0.5 -- check: tamper>0.5 -- check: abs(p-13)<0.5 and abs(q-11)<0.5 and tamper<0.5 + - check: abs(p-5)<0.5 and abs(q-11)<0.5 and abs(m-7)<0.5 and tamper<0.5 + - check: tamper>0.5 + - check: abs(p-13)<0.5 and abs(q-11)<0.5 and tamper<0.5 diff --git a/content/lessons/cryptography/elliptic-curve-cryptography/ar.md b/content/lessons/cryptography/elliptic-curve-cryptography/ar.md index c9ed67d3..ad99fc0b 100644 --- a/content/lessons/cryptography/elliptic-curve-cryptography/ar.md +++ b/content/lessons/cryptography/elliptic-curve-cryptography/ar.md @@ -15,15 +15,15 @@ variables: ## Try it -1. انظر إلى المنحنى على شكل حرف S. حرّك «px» و«qx» لتحريك النقطتين المسمّاتين P وQ في أي مكان عليه. -2. راقب الخط المتقطع المرسوم خلال P وQ، والنقطة التي يقطع عندها المنحنى للمرة الثالثة، منعكسة تحت المحور لتصبح النقطة المسمّاة P + Q. -3. حرّك «a» و«b» وراقب شكل المنحنى كله يتغيّر، وأحيانًا ينكمش إلى نقطة حادة يتعطل عندها قانون الجمع. +1. انظر إلى المنحنى الأملس. حرّك «px» و«qx» لتحريك النقطتين P وQ على نصفه العلوي. +2. اضبط «px» على -1 و«qx» على 1. الخط المتقطع المار بـP وQ أفقي، ويقطع المنحنى مرة ثالثة عند (0, 1). اقلب هذه النقطة تحت المحور تحصل على P + Q، وتُظهر القراءة (0, -1). +3. اضبط «a» على 0 و«b» على 0. ينكمش المنحنى إلى نقطة حادة ويظهر تنبيه: هنا يتعطل قانون الجمع. ## Real-life examples 1. **منحنى ضحل كالمستخدم في أنظمة حقيقية، مبسّط.** عند «a» = -1 و«b» = 1 و«px» = -1 و«qx» = 0.5، هذا هو الشكل الذي تستخدمه بقية هذه الصفحة. 2. **منحنى أكثر انحدارًا، بنقطتين متباعدتين.** «a» = 1 و«b» = 3 و«px» = 0 و«qx» = 1 تمدّان المنحنى وتفصلان النقطتين. -3. **منحنى ممدود قرب حد انحنائه.** «a» = -3 و«b» = 5 و«px» = 1 و«qx» = 2 تدفعان الشكل قريبًا من الحد الذي يتوقف عنده قانون الجمع عن العمل. +3. **منحنى ما زال سليمًا.** «a» = -3 و«b» = 5 و«px» = 1 و«qx» = 2 تعطي منحنى أملس واحدًا. أنزل «b» إلى 2 مع «a» نفسها فيقطع المنحنى نفسه، وهنا يتوقف قانون الجمع عن العمل. ## Test yourself @@ -45,7 +45,7 @@ variables: ## Advanced -تكرار قانون الجمع هذا $k$ مرة، $P + P + \dots + P = kP$، سريع الحساب حتى لقيم $k$ هائلة باستخدام حيلة مضاعفة شبيهة بالأس السريع، لكن استرجاع $k$ بمعرفة $P$ وَ $kP$ فقط، وهي مسألة اللوغاريتم المنفصل على المنحنى الإهليلجي، لا طريقة فعالة معروفة لها، وتُعدّ أصعب بكثير من تحليل عدد RSA بحجم مماثل. ونتيجة لذلك، يُعدّ مفتاح منحنى إهليلجي من 256 بتًا مكافئًا في صعوبة كسره لمفتاح RSA من نحو 3072 بتًا، ما يتيح لأنظمة المنحنى الإهليلجي استخدام مفاتيح أقصر بكثير، ونطاقًا أقل، وحوسبة أقل، لمستوى الأمان نفسه. +تكرار قانون الجمع هذا $k$ مرة، $P + P + \dots + P = kP$، سريع الحساب حتى لقيم $k$ هائلة باستخدام حيلة مضاعفة شبيهة بالأس السريع، لكن استرجاع $k$ بمعرفة $P$ وَ $kP$ فقط، وهي مسألة اللوغاريتم المتقطع على المنحنى الإهليلجي، لا طريقة فعالة معروفة لها، وتُعدّ أصعب بكثير من تحليل عدد RSA بحجم مماثل. ونتيجة لذلك، يُعدّ مفتاح منحنى إهليلجي من 256 بتًا مكافئًا في صعوبة كسره لمفتاح RSA من نحو 3072 بتًا، ما يتيح لأنظمة المنحنى الإهليلجي استخدام مفاتيح أقصر بكثير، وبيانات أقل على الشبكة، وحسابًا أقل، لمستوى الأمان نفسه. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### البيتكوين والعملات المشفرة الأخرى + يوقّع البيتكوين كل معاملة بمفاتيح منحنى إهليلجي على منحنى محدد يُدعى secp256k1. ### تطبيقات المراسلة الآمنة + يستخدم سيجنال وكثير من تطبيقات المراسلة المشفرة تبادل مفاتيح ديفي-هيلمان على منحنى إهليلجي للاتفاق على مفتاح مشترك لكل محادثة. ### اتصالات HTTPS + تتفاوض معظم المواقع الآمنة الحديثة على مفتاح الاتصال بنسخة من ديفي-هيلمان على منحنى إهليلجي، لسرعتها وصغر حجم مفاتيحها. ### البطاقات الذكية وجوازات السفر + تملك بطاقات الهوية والجوازات ذات الشرائح قدرة حوسبة محدودة، فتفضّل مفاتيح المنحنى الإهليلجي التي تمنح أمانًا قويًا بمعالجة أقل. diff --git a/content/lessons/cryptography/elliptic-curve-cryptography/en.md b/content/lessons/cryptography/elliptic-curve-cryptography/en.md index 4f3471bd..0f738b1c 100644 --- a/content/lessons/cryptography/elliptic-curve-cryptography/en.md +++ b/content/lessons/cryptography/elliptic-curve-cryptography/en.md @@ -13,15 +13,15 @@ variables: ## Try it -1. Look at the S-shaped curve. Drag «px» and «qx» to slide the points labeled P and Q anywhere along it. -2. Watch the dashed line drawn through P and Q, and the point where it crosses the curve a third time, reflected below the axis to become the point labeled P + Q. -3. Drag «a» and «b» and watch the whole curve change shape, sometimes pinching into a sharp point where the addition rule breaks down. +1. Look at the smooth curve. Drag «px» and «qx» to slide the points labeled P and Q along its upper half. +2. Set «px» to -1 and «qx» to 1. The dashed line through P and Q is flat; it crosses the curve a third time at (0, 1), and that point reflected below the axis is P + Q: the readout shows (0, -1). +3. Set «a» to 0 and «b» to 0. The curve pinches into a sharp point and a warning appears: there the addition rule breaks down. ## Real-life examples 1. **A shallow curve like those used in real systems, simplified.** With «a» = -1, «b» = 1, «px» = -1 and «qx» = 0.5, this is the shape most of this page uses. 2. **A steeper curve, with points spread far apart.** «a» = 1, «b» = 3, «px» = 0 and «qx» = 1 stretch the curve and separate the two points. -3. **A curve stretched near its bending limit.** «a» = -3, «b» = 5, «px» = 1 and «qx» = 2 push the shape close to where the addition rule would stop working. +3. **A curve that is still safe.** «a» = -3, «b» = 5, «px» = 1 and «qx» = 2 give one smooth curve; lower «b» to 2 with the same «a» and the curve crosses itself, the place where the addition rule would stop working. ## Test yourself @@ -54,13 +54,17 @@ Repeating this addition rule $k$ times, $P + P + \dots + P = kP$, is fast to com ## Real world ### Bitcoin and other cryptocurrencies + Bitcoin signs every transaction using elliptic-curve keys on a specific curve called secp256k1. ### Secure messaging apps + Signal and many other end-to-end encrypted messengers use elliptic-curve Diffie-Hellman to agree on a shared key for every conversation. ### HTTPS connections + Most modern secure websites negotiate their connection key using an elliptic-curve version of Diffie-Hellman, prized for being both fast and compact. ### Smart cards and passports + Chip-based ID cards and passports have limited computing power, so they favor elliptic-curve keys, which give strong security without much processing. diff --git a/content/lessons/cryptography/elliptic-curve-cryptography/lesson.yaml b/content/lessons/cryptography/elliptic-curve-cryptography/lesson.yaml index b07ae7d0..58128773 100644 --- a/content/lessons/cryptography/elliptic-curve-cryptography/lesson.yaml +++ b/content/lessons/cryptography/elliptic-curve-cryptography/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: y^2 = x^3 + ax + b concepts: -- elliptic-curve -- point-addition -- discrete-logarithm -- public-key-cryptography + - elliptic-curve + - point-addition + - discrete-logarithm + - public-key-cryptography prerequisites: -- one-way-functions -- rsa-encryption + - one-way-functions + - rsa-encryption related: -- diffie-hellman -- digital-signatures + - diffie-hellman + - digital-signatures visualization: type: elliptic-curve options: {} @@ -38,30 +38,30 @@ parameters: step: 0.01 value: 0.5 variables: -- a -- b + - a + - b derivation: -- \lambda = \dfrac{y_Q - y_P}{x_Q - x_P} = \dfrac{1 - 1}{1 - (-1)} = 0 -- x_R = \lambda^{2} - x_P - x_Q = 0 - (-1) - 1 = 0 -- y_{P+Q} = \lambda(x_P - x_R) - y_P = 0 - 1 = -1 + - \lambda = \dfrac{y_Q - y_P}{x_Q - x_P} = \dfrac{1 - 1}{1 - (-1)} = 0 + - x_R = \lambda^{2} - x_P - x_Q = 0 - (-1) - 1 = 0 + - y_{P+Q} = \lambda(x_P - x_R) - y_P = 0 - 1 = -1 charts: [] primary: px presets: -- a: -1 - b: 1 - px: -1 - qx: 0.5 -- a: 1 - b: 3 - px: 0 - qx: 1 -- a: -3 - b: 5 - px: 1 - qx: 2 + - a: -1 + b: 1 + px: -1 + qx: 0.5 + - a: 1 + b: 3 + px: 0 + qx: 1 + - a: -3 + b: 5 + px: 1 + qx: 2 challenges: -- check: a - target: 0 -- check: b - target: 5 -- check: px == qx + - check: a + target: 0 + - check: b + target: 5 + - check: px == qx diff --git a/content/lessons/cryptography/enigma-machine/ar.md b/content/lessons/cryptography/enigma-machine/ar.md index 9a75c6e3..7c1c96dd 100644 --- a/content/lessons/cryptography/enigma-machine/ar.md +++ b/content/lessons/cryptography/enigma-machine/ar.md @@ -15,9 +15,9 @@ variables: ## Try it -1. والدوّارات الثلاثة على A، انقر الحرف A في عمود لوحة المفاتيح وتتبع السلك: عبر ثلاثة دوّارات، ارتداد عن العاكس، ثم عودة إلى المصباح الذي يضيء. -2. انقر حرف المصباح بدلًا منه — تسلك الإشارة المسار نفسه بالضبط معكوسًا وتضيء حرفك الأصلي: الآلة تفكّ نفسها بنفسها. -3. الآن غيّر أي دوّار خطوة واحدة واضغط الحرف السابق نفسه: يتغير المسار كله ويضيء مصباح مختلف. +1. اضبط الدوّارات الثلاثة على A، ثم انقر الحرف A في عمود لوحة المفاتيح وتتبع السلك: يمرّ بالدوّارات الثلاثة، يرتد عن العاكس، ثم يعود إلى المصباح الذي يضيء، وهو U. +2. انقر الآن حرف المصباح U. تسلك الإشارة المسار نفسه بالعكس وتضيء حرفك الأصلي A: الآلة تفكّ ما شفّرته بنفسها. +3. حرّك الآن الدوّار الأيمن خطوة واحدة إلى B واضغط A من جديد: يتغير المسار كله ويضيء مصباح مختلف، B بدل U. ## Real-life examples @@ -33,7 +33,7 @@ variables: ## Intuition -عجلة قيصر تخلط الأبجدية بطريقة ثابتة واحدة؛ وفيجينير يدور على حفنة من الخلطات. أخذت إنيغما الفكرة إلى أقصاها الميكانيكي: كل دوّار من الثلاثة خلطة ثابتة مصبوبة في أسلاك نحاسية، لكن الدوّارات تقف في مواضع قابلة للتغيير، والدوّار الأيمن يدور فعليًّا بعد كل ضغطة. اضغط الحرف نفسه ثلاث مرات فتضيء ثلاثة مصابيح مختلفة — شيفرة متعددة الأبجديات تتبدل أبجديتها مع كل حرف، بدورة تقارب 17000 ضغطة بدل خمس فيجينير أو ستّه. +عجلة قيصر تخلط الأبجدية بطريقة ثابتة واحدة، وشيفرة فيجنير تتنقل بين عدد قليل من الخلطات. أخذت إنيغما الفكرة إلى أبعد حد تستطيعه آلة: كل دوّار من الثلاثة خلطة ثابتة مصنوعة من أسلاك نحاسية، لكن الدوّارات تقف في مواضع قابلة للتغيير، والدوّار الأيمن يدور فعليًّا بعد كل ضغطة. اضغط الحرف نفسه ثلاث مرات فتضيء ثلاثة مصابيح مختلفة — شيفرة متعددة الأبجديات تتبدل أبجديتها مع كل حرف، بدورة تقارب 17000 ضغطة بدل خمسة حروف أو ستة في شيفرة فيجنير. العاكس في الطرف البعيد هو ما جعل الآلة عملية وما قتلها أيضًا. فلأن التيار يرتد عائدًا عبر الدوّارات، يشفّر الإعدادُ نفسه ويفكّ — اضبط الدوّارات، اكتب النص المشفر، اقرأ الأصل. لكن الإشارة المرتدة لا يمكن أن تخرج من السلك الذي دخلت منه، فلا يُشفَّر حرف إلى نفسه أبدًا: يقينٌ صغير، كان مفكّكو الشيفرات يُزلقون كلمة مخمَّنة على طول النص المشفر ويستبعدون كل موضع يطابق فيه أي حرف نفسه — وهذا هو الشقّ الذي سمح لآلات بلتشلي بارك أن تفتّش الإعدادات الباقية آليًّا. @@ -45,24 +45,28 @@ variables: ## Advanced -لوحة التوصيل (غير مرسومة هنا) كانت تبادل حتى عشرة أزواج من الحروف قبل الدوّارات وبعدها، فتضاعف فضاء المفاتيح هائلًا — لكنها هي الأخرى مبادلة أزواج، فأبقت على عيب «لا تشفير إلى الذات» القاتل. كسر فريق ماريان ريفسكي البولندي إنيغما المبكرة بنظرية الزمر الخالصة عام 1932؛ وصنّعت آلات تورنغ البحثَ باستخدام عبارات مخمَّنة مثل WETTERBERICHT (نشرة الطقس) المرسلة في الساعة نفسها يوميًّا. والدرس الأعمق نجا من الحرب: يجب أن تصمد الشيفرة أمام مهاجم يعرف الآلة كلها ويخمّن جزءًا من الرسالة — فلا مسكن للأمان إلا المفتاح. +لوحة التوصيل (غير مرسومة هنا) كانت تبادل حتى عشرة أزواج من الحروف قبل الدوّارات وبعدها، فتضاعف فضاء المفاتيح هائلًا — لكنها هي الأخرى مبادلة أزواج، فأبقت على عيب «لا تشفير إلى الذات» القاتل. كسر فريق ماريان ريفسكي البولندي إنيغما المبكرة بنظرية الزمر الخالصة عام 1932؛ وصنّعت آلات تورنغ البحثَ باستخدام عبارات مخمَّنة مثل WETTERBERICHT (نشرة الطقس) المرسلة في الساعة نفسها يوميًّا. والدرس الأعمق نجا من الحرب: يجب أن تصمد الشيفرة أمام مهاجم يعرف الآلة كلها ويخمّن جزءًا من الرسالة — فالأمان يجب أن يكون في المفتاح وحده. ## Derivation -1. كل دوّار سلكٌ ثابت، لكن إدارته تزيح السلك عن الأبجدية، فتعطي 26 خلطة لكل دوّار. +1. كل دوّار توصيلاته ثابتة، لكن إدارته تزيح هذه التوصيلات عن الأبجدية، فتعطي 26 خلطة لكل دوّار. 2. العاكس يقرن الحروف أزواجًا، فتُلغي رحلةُ العودة رحلةَ الذهاب بالإعدادات نفسها — التشفير والفكّ عملية واحدة. 3. عاكس مقترن لا يمكنه إعادة الحرف الداخل نفسه، فلا يتطابق المشفر والأصل أبدًا — وهذا هو اليقين الذي استغله مفكّكو الشيفرات. ## Real world ### بلتشلي بارك + عمل في كسر إنيغما حتى 9000 شخص؛ وينسب المؤرخون إلى استخباراتها، المسماة ألترا، تقصير الحرب في أوروبا سنوات. ### آلة البومب + اختبرت آلات تورنغ وويلتشمان الكهروميكانيكية إعدادات الدوّارات ضد عبارة مخمَّنة، مستبعدة التناقضات في دقائق — كسرُ آلةٍ أجابت عنه آلةُ بحث. ### خطأ المشغّل + سقطت أقوى آلة أمام العادات: مفاتيح رسائل مكررة، وإعدادات يومية معادة، وتحيات متوقعة قدّمت العبارات المخمَّنة التي بدأ بها كل كسر. ### آلات الدوّارات بعد إنيغما + آلة SIGABA الأمريكية جعلت خطوَ دوّاراتها عشوائيًّا فلم تُكسر في الخدمة قط — دليل أن فكرة الدوّار سليمة، وأن الخطو والعاكس كانا عيبي إنيغما الحقيقيين. diff --git a/content/lessons/cryptography/enigma-machine/en.md b/content/lessons/cryptography/enigma-machine/en.md index 5d497ce5..b5800608 100644 --- a/content/lessons/cryptography/enigma-machine/en.md +++ b/content/lessons/cryptography/enigma-machine/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. With all three rotors at A, click the letter A on the keyboard column and follow the wire: through three rotors, off the reflector, and back out to the lamp that lights. -2. Click the lamp's letter instead — the signal threads the exact same path backwards and lights your original letter: the machine undoes itself. -3. Now change any rotor by one step and press the same letter as before: the whole path reroutes and a different lamp lights. +1. Set all three rotors to A, click the letter A on the keyboard column and follow the wire: through three rotors, off the reflector, and back out to the lamp that lights, U. +2. Click the lamp's letter, U, instead — the signal threads the exact same path backwards and lights your original letter, A: the machine undoes itself. +3. Now move the right rotor one step, to B, and press A again: the whole path reroutes and a different lamp lights, B instead of U. ## Real-life examples @@ -57,13 +57,17 @@ The plugboard (not drawn here) swapped up to ten letter pairs before and after t ## Real world ### Bletchley Park + Up to 9,000 people worked the Enigma break; historians credit the intelligence, codenamed Ultra, with shortening the war in Europe by years. ### The bombe + Turing and Welchman's electromechanical bombes tested rotor settings against a guessed phrase, discarding contradictions in minutes — machine-breaking answered by machine-searching. ### Operator error + The strongest machine fell to habits: repeated message keys, reused daily settings and predictable salutations gave the cribs that made every break start. ### Rotor machines after Enigma + America's SIGABA randomised its rotor stepping and was never broken in service — proof that the rotor idea was sound and the stepping and reflector were Enigma's real flaws. diff --git a/content/lessons/cryptography/enigma-machine/lesson.yaml b/content/lessons/cryptography/enigma-machine/lesson.yaml index bd0d9e95..152e6619 100644 --- a/content/lessons/cryptography/enigma-machine/lesson.yaml +++ b/content/lessons/cryptography/enigma-machine/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: c = \sigma^{-1}\!\left(U(\sigma(p))\right) concepts: -- rotor-machine -- enigma -- polyalphabetic -- cryptanalysis + - rotor-machine + - enigma + - polyalphabetic + - cryptanalysis prerequisites: -- vigenere-cipher + - vigenere-cipher related: -- frequency-analysis -- xor-and-one-time-pad -- caesar-cipher + - frequency-analysis + - xor-and-one-time-pad + - caesar-cipher visualization: type: enigma-machine options: {} @@ -21,29 +21,29 @@ parameters: min: 0 max: 25 step: 1 - value: 0 + value: 11 r2: min: 0 max: 25 step: 1 - value: 0 + value: 4 r3: min: 0 max: 25 step: 1 - value: 0 + value: 21 letter: min: 0 max: 25 step: 1 value: 0 variables: -- \sigma -- U + - \sigma + - U derivation: -- \sigma = \text{three rotors in a row; each press turns them, so the path changes with every letter} -- U = \text{the reflector bounces the signal back through all three rotors} -- c = \sigma^{-1}(U(\sigma(p))) \Rightarrow \text{the same setting decrypts its own message} + - \sigma = \text{three rotors in a row; each press turns them, so the path changes with every letter} + - U = \text{the reflector bounces the signal back through all three rotors} + - c = \sigma^{-1}(U(\sigma(p))) \Rightarrow \text{the same setting decrypts its own message} charts: [] primary: letter presets: diff --git a/content/lessons/cryptography/frequency-analysis/ar.md b/content/lessons/cryptography/frequency-analysis/ar.md index 493a991f..c0e4fefc 100644 --- a/content/lessons/cryptography/frequency-analysis/ar.md +++ b/content/lessons/cryptography/frequency-analysis/ar.md @@ -14,27 +14,27 @@ variables: ## Try it -1. انظر إلى الأعمدة الزرقاء الطويلة. كل عمود يعدّ عدد مرات ظهور حرف في الرسالة السرية أدناه، بعد إزاحتها بمقدار تخمينك الحالي. -2. حرّك «guess» من 0 إلى 25. تتبدّل العلامات البرتقالية القصيرة، وهي تكرار الحروف الحقيقي في الإنجليزية، مقارنةً بالأعمدة الزرقاء في كل مرة. -3. راقب النص المفكوك أسفل الصفحة. يتحول إلى اللون الأخضر ويصبح إنجليزية مفهومة بالضبط حين تتطابق الأعمدة الزرقاء مع العلامات البرتقالية. +1. انظر إلى الأعمدة البرتقالية الطويلة. كل عمود يعدّ عدد مرات ظهور حرف في الرسالة السرية أعلى الصورة، بعد إزاحتها بمقدار تخمينك الحالي. +2. اضبط «guess» على 0 ثم على 13. العلامات الزرقاء القصيرة هي تكرار الحروف الحقيقي في الإنجليزية، والأعمدة البرتقالية لا تصيبها في المرتين، وقراءة التطابق تبقى منخفضة: 3.86 ثم 3.74. +3. اضبط «guess» على 7. تقف الأعمدة البرتقالية الآن على العلامات الزرقاء، وتقفز قراءة التطابق إلى 6.85، ويتحول النص المفكوك في الأسفل إلى الأخضر ويُقرأ: FREQUENCY ANALYSIS BREAKS SIMPLE CIPHERS. ## Real-life examples -1. **محاولة الكندي الأولى: افترض عدم وجود إزاحة.** أبسط تخمين يمكن أن يجربه محلل شفرات في القرن التاسع، «guess» = 0، يعطي أعمدة زرقاء لا تشبه النمط الإنجليزي البرتقالي إلا قليلًا. +1. **محاولة الكندي الأولى: افترض عدم وجود إزاحة.** أبسط تخمين يمكن أن يجربه محلل شيفرات في القرن التاسع، «guess» = 0، يعطي أعمدة زرقاء لا تشبه النمط الإنجليزي الأزرق إلا قليلًا. 2. **تخمين شائع اليوم: ROT13.** يخفي كثيرون حرق الأحداث على الإنترنت بإزاحة 13 حرفًا. جرّب «guess» = 13 هنا وسيبقى النص المفكوك بلا معنى. -3. **المفتاح الصحيح، بالعدّ.** عند «guess» = 7 تتطابق الأعمدة الزرقاء أخيرًا مع العلامات البرتقالية، ويصبح النص أدناه إنجليزية حقيقية. +3. **المفتاح الصحيح، بالعدّ.** عند «guess» = 7 تتطابق الأعمدة البرتقالية أخيرًا مع العلامات الزرقاء، ويصبح النص أدناه إنجليزية حقيقية. ## Test yourself 1. حرّك «guess» إلى 7 وراقب النص المفكوك أدناه يتحول إلى الأخضر ويصبح مقروءًا. 2. جرّب «guess» = 13، إزاحة ROT13 الشائعة، وستراه ما زال بلا معنى. -3. اختر أي تخمين غير 0 و7، ولاحظ كم تبدو الأعمدة الزرقاء مسطحة وغير متطابقة مع العلامات البرتقالية. +3. اختر أي تخمين غير 0 و7، ولاحظ كم تبدو الأعمدة البرتقالية مسطحة وغير متطابقة مع العلامات الزرقاء. ## Intuition -تخيّل جاسوسًا يعترض رسالة ولا يعرف عنها سوى أن كل حرف فيها أُزيح بالمقدار الثابت نفسه، رقم ما بين 0 و25. على الشاشة، تعدّ الأعمدة الزرقاء الطويلة كم مرة يظهر كل حرف من الحروف الـ26 في تلك الرسالة المعترَضة بعد إزاحتها بمنزلق «guess». والعلامات البرتقالية القصيرة فوقها تُظهر مدى شيوع كل حرف فعليًا في الإنجليزية العادية، إذ يتفوق E وT بفارق كبير على حروف نادرة مثل Q وZ. حرّك «guess» عبر المواضع الـ26 كلها وراقب أفق الأعمدة الزرقاء ينزلق جانبيًا تحت العلامات البرتقالية الثابتة، باحثًا عن الموضع الذي يتطابقان فيه. +تخيّل جاسوسًا يعترض رسالة ولا يعرف عنها سوى أن كل حرف فيها أُزيح بالمقدار الثابت نفسه، رقم ما بين 0 و25. على الشاشة، تعدّ الأعمدة البرتقالية الطويلة كم مرة يظهر كل حرف من الحروف الـ26 في تلك الرسالة المعترَضة بعد إزاحتها بمنزلق «guess». والعلامات الزرقاء القصيرة تُظهر مدى شيوع كل حرف فعليًا في الإنجليزية العادية، إذ يتفوق E وT بفارق كبير على حروف نادرة مثل Q وZ. حرّك «guess» عبر المواضع الـ26 كلها وراقب الأعمدة البرتقالية تنزلق جانبًا أمام العلامات الزرقاء الثابتة، حتى تجد الموضع الذي تتطابقان فيه. -في اللحظة التي تتطابق فيها الأعمدة الزرقاء مع العلامات البرتقالية أفضل تطابق، يتحول النص أسفل الصفحة إلى الأخضر ويُقرأ كإنجليزية حقيقية بدل الهراء. ذلك التخمين الأفضل تطابقًا هو المفتاح المخفي، وعكسه يستعيد الرسالة، $M = (C - g) \bmod 26$، حيث $g$ هو تخمينك الحالي. +في اللحظة التي تتطابق فيها الأعمدة البرتقالية مع العلامات الزرقاء أفضل تطابق، يتحول النص أسفل الصفحة إلى الأخضر ويصبح إنجليزية مفهومة بدل حروف بلا معنى. ذلك التخمين الأفضل تطابقًا هو المفتاح المخفي، وعكسه يستعيد الرسالة، $M = (C - g) \bmod 26$، حيث $g$ هو تخمينك الحالي. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### مخطوطة الكندي في القرن التاسع -حمل أول توثيق مكتوب لهذه الطريقة جداول تكرار الحروف العربية، واستُخدمت لكسر شفرات الاستبدال البسيطة. + +حمل أول توثيق مكتوب لهذه الطريقة جداول تكرار الحروف العربية، واستُخدمت لكسر شيفرات الاستبدال البسيطة. ### ألغاز الجرائد المشفرة + الحيلة نفسها في عدّ الحروف تتيح لهواة الألغاز حل أعمدة «الاقتباس المشفر» التي تُنشر يوميًا في الصحف. -### كسر الشفرات العسكري في مطلع القرن العشرين -وسّع محللو الشفرات العسكريون عدّ الحروف من الحرف الواحد إلى أزواج وثلاثيات من الحروف لكسر شفرات أعقد بكثير. +### كسر الشيفرات العسكري في مطلع القرن العشرين + +وسّع محللو الشيفرات العسكريون عدّ الحروف من الحرف الواحد إلى أزواج وثلاثيات من الحروف لكسر شيفرات أعقد بكثير. ### أدوات اللغة اليوم + تعتمد مرشِّحات البريد المزعج والتصحيح التلقائي وأدوات كشف اللغة على الفكرة نفسها. فللغة الحقيقية بصمة إحصائية مميزة يمكن عدّها. diff --git a/content/lessons/cryptography/frequency-analysis/en.md b/content/lessons/cryptography/frequency-analysis/en.md index 984dfe89..f66dc725 100644 --- a/content/lessons/cryptography/frequency-analysis/en.md +++ b/content/lessons/cryptography/frequency-analysis/en.md @@ -12,27 +12,27 @@ variables: ## Try it -1. Look at the tall blue bars: each one counts how often a letter appears in the secret message below, once shifted by your current guess. -2. Drag «guess» from 0 to 25. The short orange marks, showing true English letter frequencies, line up differently against the blue bars each time. -3. Watch the decoded text at the bottom. It turns green and starts reading like real English exactly when the blue bars best match the orange marks. +1. Look at the tall orange bars: each one counts how often a letter appears in the secret message at the top, once shifted by your current guess. +2. Set «guess» to 0, then to 13. The short blue marks show true English letter frequencies; the orange bars miss them both times, and the match readout stays low: 3.86, then 3.74. +3. Set «guess» to 7. The orange bars now sit on the blue marks, the match readout jumps to 6.85, and the decoded text at the bottom turns green and reads FREQUENCY ANALYSIS BREAKS SIMPLE CIPHERS. ## Real-life examples -1. **Al-Kindi's first try: assume no shift at all.** A 9th-century codebreaker's simplest guess, «guess» = 0, gives blue bars that barely resemble the orange English pattern. +1. **Al-Kindi's first try: assume no shift at all.** A 9th-century codebreaker's simplest guess, «guess» = 0, gives orange bars that barely resemble the blue English pattern. 2. **A common modern guess: ROT13.** People online often scramble spoilers with a 13-letter shift; try «guess» = 13 here and the decoded text is still nonsense. -3. **The correct key, found by counting.** At «guess» = 7 the blue bars finally match the orange marks, and the text below reads as real English. +3. **The correct key, found by counting.** At «guess» = 7 the orange bars finally match the blue marks, and the text below reads as real English. ## Test yourself 1. Slide «guess» to 7 and watch the decoded text below turn green and readable. 2. Try «guess» = 13, the popular ROT13 shift, and see that it still looks like nonsense. -3. Pick any guess other than 0 and 7, and notice how flat and mismatched the blue bars look against the orange marks. +3. Pick any guess other than 0 and 7, and notice how flat and mismatched the orange bars look against the blue marks. ## Intuition -Suppose a spy intercepts a message and knows only that every letter was shifted by the same fixed amount, somewhere between 0 and 25. On screen, the tall blue bars count how many times each of the 26 letters shows up in that intercepted message once you shift your guess with the «guess» slider; the short orange marks above them show how often each letter really appears in ordinary English, where E and T tower over rare letters like Q and Z. Slide «guess» through all 26 positions and watch the blue skyline slide sideways underneath the fixed orange marks, hunting for the one position where the two line up. +Suppose a spy intercepts a message and knows only that every letter was shifted by the same fixed amount, somewhere between 0 and 25. On screen, the tall orange bars count how many times each of the 26 letters shows up in that intercepted message once you shift your guess with the «guess» slider; the short blue marks show how often each letter really appears in ordinary English, where E and T tower over rare letters like Q and Z. Slide «guess» through all 26 positions and watch the orange skyline slide sideways past the fixed blue marks, hunting for the one position where the two line up. -The moment the blue bars and the orange marks match best, the text at the bottom flips to green and reads as real English instead of nonsense — that best-matching «guess» is the hidden key, and reversing it recovers the message, $M = (C - g) \bmod 26$, where $g$ is your current guess. +The moment the orange bars and the blue marks match best, the text at the bottom flips to green and reads as real English instead of nonsense — that best-matching «guess» is the hidden key, and reversing it recovers the message, $M = (C - g) \bmod 26$, where $g$ is your current guess. ## Formal @@ -53,13 +53,17 @@ The earliest known description of frequency analysis comes from Al-Kindi, a 9th- ## Real world ### Al-Kindi's 9th-century manuscript + The technique's first written record already used tables of Arabic letter frequency to unravel simple substitution ciphers. ### Newspaper cryptogram puzzles + The same letter-counting trick lets casual puzzle solvers crack the "cryptoquote" columns printed in newspapers every day. ### Early 20th-century codebreaking + Military cryptanalysts extended frequency counting from single letters to pairs and triples of letters to break far more complex ciphers. ### Language tools today + Spam filters, autocorrect and language-detection tools all lean on the same idea: real language has a distinctive, countable statistical fingerprint. diff --git a/content/lessons/cryptography/frequency-analysis/lesson.yaml b/content/lessons/cryptography/frequency-analysis/lesson.yaml index 17e77e70..3525bea7 100644 --- a/content/lessons/cryptography/frequency-analysis/lesson.yaml +++ b/content/lessons/cryptography/frequency-analysis/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: beginner equation: M = (C - g) \bmod 26 concepts: -- frequency-analysis -- cryptanalysis -- caesar-cipher -- letter-statistics + - frequency-analysis + - cryptanalysis + - caesar-cipher + - letter-statistics prerequisites: -- caesar-cipher -- modular-arithmetic + - caesar-cipher + - modular-arithmetic related: -- vigenere-cipher -- xor-and-one-time-pad + - vigenere-cipher + - xor-and-one-time-pad visualization: type: frequency-analysis options: {} @@ -23,23 +23,23 @@ parameters: step: 1 value: 0 variables: -- M -- C -- g -- \bmod + - M + - C + - g + - \bmod derivation: -- \text{count how often each letter appears in the intercepted ciphertext} -- \text{compare that shifted count, using guess } g \text{, to normal English letter frequencies} -- M = (C - g) \bmod 26 \quad \text{(the best-matching guess reveals the message)} + - \text{count how often each letter appears in the intercepted ciphertext} + - \text{compare that shifted count, using guess } g \text{, to normal English letter frequencies} + - M = (C - g) \bmod 26 \quad \text{(the best-matching guess reveals the message)} charts: [] primary: guess presets: -- guess: 0 -- guess: 13 -- guess: 7 + - guess: 0 + - guess: 13 + - guess: 7 challenges: -- check: guess - target: 7 -- check: guess - target: 13 -- check: guess > 0 and guess != 7 + - check: guess + target: 7 + - check: guess + target: 13 + - check: guess > 0 and guess != 7 diff --git a/content/lessons/cryptography/hash-functions/ar.md b/content/lessons/cryptography/hash-functions/ar.md index 4055eef0..eccf6b52 100644 --- a/content/lessons/cryptography/hash-functions/ar.md +++ b/content/lessons/cryptography/hash-functions/ar.md @@ -14,13 +14,13 @@ variables: ## Try it 1. انظر إلى الشبكتين من المربعات الصغيرة، 256 مربعًا في كل واحدة. إحداهما بصمة النص «hello world»، والأخرى بصمة نسخة منه تغيّر فيها حرف واحد. -2. حرّك «pos» لاختيار أي حرف من «hello world» يتغيّر، من الحرف الأول إلى الأخير. -3. راقب المربعات المحاطة بإطار أحمر. يتقلّب لون نحو نصف المربعات الـ256 تقريبًا، أيًا كان الحرف الواحد الذي غيّرته. +2. اضبط «pos» على 0. يتغيّر الحرف الأول فتصبح النسخة «iello world»، وتُظهر قراءة «البتات التي تغيّرت» 126 / 256. +3. اضبط «pos» على 10. تصبح النسخة «hello worle»، ويحيط الإطار الأحمر بـ140 مربعًا من 256. ينقلب نحو نصف المربعات دائمًا، أيًّا كان الحرف الذي غيّرته. ## Real-life examples -1. **فحص ملف منزَّل.** تغيير الحرف الأول، «pos» = 0، يحاكي بايتًا واحدًا فاسدًا في بداية التنزيل. ومع ذلك تخرج البصمة كاملة غير قابلة للتعرف عليها. -2. **التحقق من رسالة نصية.** «pos» = 5 يغيّر حرفًا في منتصف النص، كما لو غُيّرت كلمة في وسط رسالة. +1. **فحص ملف منزَّل.** تغيير الحرف الأول، «pos» = 0، يحاكي بايتًا واحدًا فاسدًا في بداية التنزيل. ومع ذلك تتغيّر البصمة كلها حتى لا تشبه الأصل في شيء. +2. **التحقق من رسالة نصية.** «pos» = 5 يحوّل المسافة في منتصف النص إلى شَرطة سفلية، كما لو حدث تعديل صغير في وسط رسالة. 3. **حزمة تحديث برمجي.** «pos» = 10 يغيّر الحرف الأخير فقط، ليُظهر أن تغييرًا في الطرف البعيد يُشوّش البصمة بالقدر نفسه تمامًا. ## Test yourself @@ -54,13 +54,17 @@ variables: ## Real world ### التحقق من سلامة الملفات + تنشر برامج التنزيل بصمة SHA-256 بجانب الملف، ليتأكد أي شخص من أن شيئًا لم يفسد أو يُتلاعب به أثناء النقل. ### معرّفات الحِفظ في جِت + يُسمَّى كل حِفظ في مستودع جِت بتجزئة محتواه، فتغيير حرف واحد من الشيفرة ينتج معرّف حِفظ مختلفًا تمامًا. ### تعدين البيتكوين + يتسابق معدِّنو البيتكوين لإيجاد مدخل تبدأ بصمة SHA-256 له بعدد كبير من الأصفار، بحث لا يوجد له اختصار أسرع من تجربة أعداد هائلة من المرشحين. ### الأدلة الجنائية الرقمية + يحسب المحققون بصمة ملفات الأدلة فور جمعها، فيصبح أي تغيير لاحق فيها، ولو ببت واحد، قابلًا للكشف فورًا. diff --git a/content/lessons/cryptography/hash-functions/en.md b/content/lessons/cryptography/hash-functions/en.md index 4253af45..4928e311 100644 --- a/content/lessons/cryptography/hash-functions/en.md +++ b/content/lessons/cryptography/hash-functions/en.md @@ -12,13 +12,13 @@ variables: ## Try it 1. Look at the two grids of small squares, 256 of them each: one is the fingerprint of "hello world", the other belongs to a copy with a single letter changed. -2. Drag «pos» to choose which letter of "hello world" gets changed, from the first letter to the last. -3. Watch the squares outlined in red. Roughly half of all 256 squares flip color, no matter which single letter you changed. +2. Set «pos» to 0. The first letter changes, so the copy reads "iello world", and the "bits changed" readout shows 126 / 256. +3. Set «pos» to 10. Now the copy reads "hello worle" and 140 of the 256 squares are outlined in red. Roughly half of all the squares flip, no matter which single letter you changed. ## Real-life examples 1. **Checking a downloaded file.** Changing the very first letter, «pos» = 0, mimics a single corrupted byte at the start of a download — the whole fingerprint still comes out unrecognizable. -2. **Verifying a text message.** «pos» = 5 changes a letter in the middle of the text, the way a word altered mid-message would. +2. **Verifying a text message.** «pos» = 5 changes the space in the middle of the text into an underscore, the way a small edit mid-message would. 3. **A software update package.** «pos» = 10 changes only the very last letter, showing that even a change at the far end scrambles the fingerprint just as completely. ## Test yourself @@ -52,13 +52,17 @@ SHA-256 belongs to the SHA-2 family, standardized by the U.S. National Institute ## Real world ### File integrity checks + Software downloads publish a SHA-256 fingerprint alongside the file so anyone can confirm nothing was corrupted or tampered with in transit. ### Git commit identifiers + Every commit in a Git repository is named by the hash of its contents, so changing even one character of code produces an entirely different commit id. ### Bitcoin mining + Bitcoin miners race to find an input whose SHA-256 hash happens to start with many zero bits, a search with no shortcut faster than trying huge numbers of candidates. ### Digital forensics + Investigators hash evidence files the moment they collect them, so any later change to the file — even one bit — is instantly detectable. diff --git a/content/lessons/cryptography/hash-functions/lesson.yaml b/content/lessons/cryptography/hash-functions/lesson.yaml index 46328383..bd5af278 100644 --- a/content/lessons/cryptography/hash-functions/lesson.yaml +++ b/content/lessons/cryptography/hash-functions/lesson.yaml @@ -3,15 +3,15 @@ subject: cryptography difficulty: high-school equation: H(M) = h concepts: -- hash-function -- sha-256 -- avalanche-effect -- data-integrity + - hash-function + - sha-256 + - avalanche-effect + - data-integrity prerequisites: -- one-way-functions + - one-way-functions related: -- password-salting -- digital-signatures + - password-salting + - digital-signatures visualization: type: hash-avalanche options: @@ -22,24 +22,24 @@ parameters: min: 0 max: 10 step: 1 - value: 0 + value: 2 variables: -- M -- H -- h + - M + - H + - h derivation: -- \text{feed the message } M \text{ into SHA-256, a fixed public procedure} -- H(M) = h \quad \text{(a 256-bit fingerprint, always the same length)} -- \text{change one letter of } M \text{ and about half of the 256 bits of } h \text{ flip} + - \text{feed the message } M \text{ into SHA-256, a fixed public procedure} + - H(M) = h \quad \text{(a 256-bit fingerprint, always the same length)} + - \text{change one letter of } M \text{ and about half of the 256 bits of } h \text{ flip} charts: [] primary: pos presets: -- pos: 0 -- pos: 5 -- pos: 10 + - pos: 0 + - pos: 5 + - pos: 10 challenges: -- check: pos - target: 0 -- check: pos - target: 10 -- check: pos >= 3 and pos <= 7 + - check: pos + target: 0 + - check: pos + target: 10 + - check: pos >= 3 and pos <= 7 diff --git a/content/lessons/cryptography/lattice-cryptography/ar.md b/content/lessons/cryptography/lattice-cryptography/ar.md index 61188fd1..d0f679d6 100644 --- a/content/lessons/cryptography/lattice-cryptography/ar.md +++ b/content/lessons/cryptography/lattice-cryptography/ar.md @@ -15,9 +15,9 @@ variables: ## Try it -1. والأساس الجيد مختار، اسحب الهدف أينما شئت: تقريب إحداثياته يطوّق دائمًا أقرب نقطة شبكة إليه، ويبقى الخط المتقطع قصيرًا. -2. بدّل الأساس إلى 1 — لم تتحرك الشبكة، بل تغيّر السهمان الواصفان لها فقط — وراقب التقريب يطوّق نقطة بعيدة بينما الأقرب الحقيقي محوَّط في مكان آخر. -3. اسحب الهدف إلى (4, 3.5)، في قلب المنتصف بين السهمين الرديئين: يصبح الخطأ مسرحيًّا، أبعد بأضعاف من الجواب الصادق. +1. والأساس الجيد مختار (basis = 0)، ضع الهدف عند (3.25, 2.5): تقريب إحداثياته يحدد نقطة الشبكة (3, 3)، وقراءتا «المسافة التي وجدناها» و«أقرب مسافة ممكنة» كلتاهما 0.56. +2. بدّل الأساس إلى 1 — لم تتحرك الشبكة، بل تغيّر السهمان اللذان يصفانها فقط — فيحدد التقريب الآن النقطة (5, 4): تقفز «المسافة التي وجدناها» إلى 2.30، و«أقرب مسافة ممكنة» ما زالت 0.56. +3. اسحب الهدف إلى (4, 3.5): يصبح الخطأ كبيرًا جدًّا، مسافة 5.32 مقابل أقرب مسافة ممكنة 1.12، أي أبعد بأضعاف من الجواب الصحيح. ## Real-life examples @@ -33,36 +33,40 @@ variables: ## Intuition -كل شيء في هذه الصفحة يجري على شبيكة: خذ سهمين، فتكون الشبكة كلَّ نقطة تبلغها بمقادير صحيحة من كل سهم. وللشبكة الواحدة أوصاف كثيرة — زوج قصير شبه متعامد من الأسهم، أو زوج طويل شبه متوازٍ — والرسم يتيح لك التقليب بين وصفين لشبكة واحدة متطابقة. أسقط الآن نقطة في أي مكان واسأل السؤال البريء: أي نقطة شبكة هي الأقرب؟ بالسهمين الجيدين تكتب الهدف بإحداثيات السهمين، تقرّب إلى أعداد صحيحة، وانتهى الأمر. وبالسهمين المائلين تهبط بك الوصفة نفسها بالضبط بعيدًا، لأن خطأ تقريب صغيرًا على طول سهم طويل يجرّك عبر الخريطة. +كل شيء في هذه الصفحة يجري على شبيكة: خذ سهمين، فتكون الشبكة كلَّ نقطة تبلغها بمقادير صحيحة من كل سهم. وللشبكة الواحدة أوصاف كثيرة — زوج قصير شبه متعامد من الأسهم، أو زوج طويل شبه متوازٍ — والرسم يتيح لك التقليب بين وصفين لشبكة واحدة متطابقة. أسقط الآن نقطة في أي مكان واسأل سؤالًا بسيطًا: أي نقطة شبكة هي الأقرب؟ بالسهمين الجيدين تكتب الهدف بإحداثيات السهمين، تقرّب إلى أعداد صحيحة، وانتهى الأمر. وبالسهمين المائلين تهبط بك الوصفة نفسها بالضبط بعيدًا، لأن خطأ تقريب صغيرًا على طول سهم طويل يجرّك عبر الخريطة. -هذا اللاتناظر بابٌ سرّي تراه بعينك. الشبكة علنية؛ الأساس الجيد هو المفتاح الخاص، والمائل هو المفتاح العلني. من يمسك السهمين الجيدين يقفز إلى أقرب نقطة في خطوة — ومن لا يملك إلا الرديئين يواجه مسألة المتجه الأقرب، وهي لعبة في بعدين لكنها في خمسمئة بعد تهزم كل خوارزمية معروفة. واللفتة الأخيرة هي سبب وجود هذه الصفحة: خوارزمية شور الكمومية تهدم التحليل إلى عوامل واللوغاريتمات المتقطعة — أي RSA وديفي–هيلمان — لكن لا اختصار كموميًّا معروفًا لنقاط الشبيكة القريبة في الأبعاد العالية. +هذا الفرق بين الوصفين بابٌ خفي تراه بعينك. الشبكة علنية؛ الأساس الجيد هو المفتاح الخاص، والمائل هو المفتاح العلني. من يمسك السهمين الجيدين يقفز إلى أقرب نقطة في خطوة — ومن لا يملك إلا الرديئين يواجه مسألة المتجه الأقرب، وهي لعبة في بعدين لكنها في خمسمئة بعد تهزم كل خوارزمية معروفة. واللفتة الأخيرة هي سبب وجود هذه الصفحة: خوارزمية شور الكمومية تهدم التحليل إلى عوامل واللوغاريتمات المتقطعة — أي RSA وديفي–هيلمان — لكن لا اختصار كموميًّا معروفًا لنقاط الشبيكة القريبة في الأبعاد العالية. ## Formal -الشبيكة هي مجموعة النقاط $a\,u + b\,v$ لأعداد صحيحة $a, b$ — وعمومًا، كل التركيبات الصحيحة لـ$n$ متجه أساس مستقل. ومسألة المتجه الأقرب (CVP) تطلب نقطة الشبيكة الأقرب إلى هدف $t$؛ وخوارزمية بابای للتقريب تكتب $t$ بإحداثيات الأساس وتقرّب كلًّا منها إلى أقرب عدد صحيح، وخطؤها محكوم بمدى تعامد الأساس. +الشبيكة هي مجموعة النقاط $a\,u + b\,v$ لأعداد صحيحة $a, b$ — وعمومًا، كل التركيبات الصحيحة لـ$n$ متجه أساس مستقل. ومسألة المتجه الأقرب (CVP) تطلب نقطة الشبيكة الأقرب إلى هدف $t$؛ وخوارزمية باباي للتقريب تكتب $t$ بإحداثيات الأساس وتقرّب كلًّا منها إلى أقرب عدد صحيح، وخطؤها محكوم بمدى تعامد الأساس. -الأساسان هنا يولّدان الشبيكة المتطابقة، ومع ذلك ينجح التقريب بأحدهما ويفشل بالآخر — إنشاء المفتاح العلني كله في صورة واحدة. يخفي التشفيرُ الرسالةَ نقطةً قرب نقطة شبيكة (والإزاحة ضجيج مقصود)؛ فالأساس الخاص شبه المتعامد ينزع الضجيج بالتقريب، بينما يترك الأساسُ العلني المائل المهاجمَ أمام CVP في مئات الأبعاد، حيث تنفد أعمارُ الكون قبل أفضل الخوارزميات المعروفة. +الأساسان هنا يولّدان الشبيكة المتطابقة، ومع ذلك ينجح التقريب بأحدهما ويفشل بالآخر — إنشاء المفتاح العلني كله في صورة واحدة. يخفي التشفيرُ الرسالةَ نقطةً قرب نقطة شبيكة (والإزاحة ضجيج مقصود)؛ فالأساس الخاص شبه المتعامد ينزع الضجيج بالتقريب، بينما يترك الأساسُ العلني المائل المهاجمَ أمام CVP في مئات الأبعاد، حيث تحتاج أفضل الخوارزميات المعروفة زمنًا أطول من عمر الكون. ## Advanced -تستبدل المخططات الحقيقية بهندسة الصورة جبرًا: التعلم مع الأخطاء (LWE) يخفي سرًّا داخل أنظمة معادلات خطية ملوَّثة عمدًا بضجيج صغير، وهي مسألة شبيكة متنكرة. وحّدت NIST أولى خوارزميات ما بعد الكم عام 2024 — ML-KEM (كايبر) لتبادل المفاتيح وML-DSA (ديليثيوم) للتوقيعات، وكلاهما شبيكي — والمتصفحات تشغّل منذ الآن تبادلات هجينة تمزج المنحنيات التقليدية بـML-KEM. وللاستعجال اسم: احصد الآن وفُكّ لاحقًا — الحركة المسجلة اليوم قد يفتحها حاسوب كمومي بعد سنوات، فلا يمكن للهجرة انتظار ولادة الآلة. +تستبدل المخططات الحقيقية بهندسة الصورة جبرًا: التعلم مع الأخطاء (LWE) يخفي سرًّا داخل أنظمة معادلات خطية ملوَّثة عمدًا بضجيج صغير، وهي مسألة شبيكة متنكرة. اعتمدت NIST أولى معايير خوارزميات ما بعد الكم عام 2024 — ML-KEM (كايبر) لتبادل المفاتيح وML-DSA (ديليثيوم) للتوقيعات، وكلاهما شبيكي — والمتصفحات تشغّل منذ الآن تبادلات هجينة تمزج المنحنيات التقليدية بـML-KEM. وللاستعجال اسم: احصد الآن وفُكّ لاحقًا — الحركة المسجلة اليوم قد يفتحها حاسوب كمومي بعد سنوات، فلا يمكن تأجيل الانتقال إلى أن تُصنع تلك الآلة. ## Derivation 1. سهمان يفرشان شبكة: كل نقطة شبيكة وصفةٌ بأعداد صحيحة من الزوج، وأزواج كثيرة تصف الشبكة نفسها. 2. التقريب في أساس شبه متعامد يرتكب أخطاء صغيرة، فتوجد أقرب نقطة شبيكة في خطوة واحدة. -3. التقريب في أساس مائل يضخّم الأخطاء عبر الخريطة، وفي الأبعاد العالية لا تُعرف خوارزمية — تقليدية أو كمومية — تتعافى منها. +3. التقريب في أساس مائل يضخّم الأخطاء عبر الخريطة، وفي الأبعاد العالية لا تُعرف خوارزمية — تقليدية أو كمومية — تصحّح هذه الأخطاء. ## Real world ### ML-KEM في متصفحك + تغلّف المتصفحات والخوادم الكبرى تبادل مفاتيح TLS منذ الآن بهجين من المنحنيات الإهليلجية وML-KEM، فتبقى الحركة المسجلة آمنة حتى لو وصلت الحواسيب الكمومية. ### احصد الآن وفُكّ لاحقًا -يُفترض أن أجهزة الاستخبارات تخزّن الحركة المشفرة بالجملة؛ فهجرة ما بعد الكم تسابق أفقَ فكّ التشفير، لا بيانَ الحاسوب الكمومي الصحفي. + +يُفترض أن أجهزة الاستخبارات تخزّن الحركة المشفرة بالجملة؛ فالانتقال إلى تشفير ما بعد الكم يسابق اليوم الذي تُفكّ فيه هذه التسجيلات، لا يوم الإعلان عن حاسوب كمومي. ### توقيعات لقرن كمومي -وُحّد ML-DSA وSLH-DSA القائم على الهاش جنبًا إلى جنب مع ML-KEM عام 2024 ليحلّا محل توقيعات RSA والمنحنيات حيث يجب أن تبقى الوثائق قابلة للتحقق عقودًا. -### التشفير المتماثل الكامل +اعتُمد ML-DSA وSLH-DSA القائم على دوال التجزئة مع ML-KEM عام 2024 ليحلّا محل توقيعات RSA والمنحنيات حيث يجب أن تبقى الوثائق قابلة للتحقق عقودًا. + +### التشفير الهومومورفي الكامل + ضجيج الشبيكة نفسه الذي يهزم المهاجمين يمكن ترويضه حتى يحسب خادمٌ على بيانات مشفرة دون فكّها أبدًا — الشبيكات فتحت ذلك الباب أيضًا. diff --git a/content/lessons/cryptography/lattice-cryptography/en.md b/content/lessons/cryptography/lattice-cryptography/en.md index 990114ab..a248c752 100644 --- a/content/lessons/cryptography/lattice-cryptography/en.md +++ b/content/lessons/cryptography/lattice-cryptography/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. With the good basis selected, drag the target anywhere: rounding its coordinates always rings the grid point nearest to it, and the dashed line stays short. -2. Switch the basis to 1 — the grid has not moved, only the arrows describing it — and watch the rounding ring a point far away while the true closest sits circled elsewhere. -3. Drag the target to (4, 3.5), dead centre between the bad arrows: the miss becomes dramatic, several times farther than the honest answer. +1. With the good basis selected (basis = 0), put the target at (3.25, 2.5): rounding its coordinates rings the grid point (3, 3), and "distance found" and "closest possible" both read 0.56. +2. Switch the basis to 1 — the grid has not moved, only the arrows describing it — and the rounding now rings (5, 4): "distance found" jumps to 2.30 while "closest possible" is still 0.56. +3. Drag the target to (4, 3.5): the miss becomes dramatic, a distance of 5.32 against a closest possible 1.12, several times farther than the honest answer. ## Real-life examples @@ -58,13 +58,17 @@ Real schemes replace the picture's geometry with algebra: Learning With Errors ( ## Real world ### ML-KEM in your browser + Major browsers and servers already wrap their TLS key exchange in a hybrid of elliptic curves and ML-KEM, so recorded traffic stays safe even if quantum computers arrive. ### Harvest now, decrypt later + Intelligence agencies are assumed to store encrypted traffic in bulk; post-quantum migration is racing the decryption horizon, not the quantum computer's press release. ### Signatures for a quantum century + ML-DSA and the hash-based SLH-DSA were standardised alongside ML-KEM in 2024 to replace RSA and elliptic-curve signatures where documents must stay verifiable for decades. ### Fully homomorphic encryption + The same lattice noise that defeats attackers can be managed so a server computes on encrypted data without ever decrypting it — lattices opened that door too. diff --git a/content/lessons/cryptography/lattice-cryptography/lesson.yaml b/content/lessons/cryptography/lattice-cryptography/lesson.yaml index 21953f39..2bb9bda3 100644 --- a/content/lessons/cryptography/lattice-cryptography/lesson.yaml +++ b/content/lessons/cryptography/lattice-cryptography/lesson.yaml @@ -3,15 +3,15 @@ subject: cryptography difficulty: advanced equation: t \approx a\,u + b\,v concepts: -- lattice -- closest-vector-problem -- post-quantum -- ml-kem + - lattice + - closest-vector-problem + - post-quantum + - ml-kem prerequisites: -- diffie-hellman -- rsa-encryption + - diffie-hellman + - rsa-encryption related: -- elliptic-curve-cryptography + - elliptic-curve-cryptography visualization: type: lattice-crypto options: {} @@ -32,13 +32,13 @@ parameters: step: 1 value: 0 variables: -- u, v -- t -- a, b + - u, v + - t + - a, b derivation: -- \text{the lattice is every point } a\,u + b\,v \text{ with whole numbers } a, b -- '\text{good basis: round } a \text{ and } b \text{ to whole numbers and land on the closest point}' -- '\text{bad basis: the same rounding lands far away, and no quantum shortcut is known}' + - \text{the lattice is every point } a\,u + b\,v \text{ with whole numbers } a, b + - '\text{good basis: round } a \text{ and } b \text{ to whole numbers and land on the closest point}' + - '\text{bad basis: the same rounding lands far away, and no quantum shortcut is known}' charts: [] primary: basis presets: diff --git a/content/lessons/cryptography/modular-arithmetic/ar.md b/content/lessons/cryptography/modular-arithmetic/ar.md index b82a5ba9..6d031e4e 100644 --- a/content/lessons/cryptography/modular-arithmetic/ar.md +++ b/content/lessons/cryptography/modular-arithmetic/ar.md @@ -15,8 +15,8 @@ variables: ## Try it 1. اضبط حجم الساعة «n» على 12، ثم اضغط الرقم 9 على وجه الساعة لتحديد البداية a. -2. اسحب «b»، عدد خطوات المشي، إلى ما بعد 5 خطوات، وراقب المؤشر يتجاوز قمة الساعة ويلتف عائدًا إلى الأسفل. -3. واصل رفع b وتابع قراءة «الدورات الكاملة». فهي تعدّ بالضبط كم مرة أكملت لفة حول الساعة. +2. اضبط «b»، عدد خطوات المشي، على 5. يتجاوز المشي قمة الساعة، وتُظهر القراءات a + b = 14 و(a + b) mod 12 = 2 ودورة كاملة واحدة. +3. ارفع b إلى 27. الآن a + b = 36، وينتهي المشي عند 0، وتُظهر قراءة «الدورات الكاملة» الرقم 3، أي عدد المرات التي أكملت فيها لفة حول الساعة. ## Real-life examples @@ -55,13 +55,17 @@ variables: ## Real world ### معرفة الوقت + ساعة الاثنتي عشرة ساعة استخدام يومي للحساب المعياري: 9 زائد 5 ساعات تعطي 2، لا 14. ### يوم الأسبوع + إضافة الأيام تلتف كل 7 أيام: إن كان اليوم هو اليوم 3 من الأسبوع، فبعد 10 أيام يصبح اليوم $(3+10) \bmod 7$، لا اليوم 13. ### جداول التجزئة + يوزّع البرنامج البيانات على عدد ثابت من الخانات بحساب المفتاح $\bmod$ (عدد الخانات)، فيعيد استخدام المجموعة الصغيرة نفسها من الخانات مهما كبر المفتاح. ### كل شيفرة في هذا المقرر + شيفرة قيصر تلفّ بمعيار 26، وألعاب الأرقام خلف ديفي-هيلمان وRSA تلفّ بمعيار $n$ مختار، الفكرة نفسها لكن على مقياس أكبر بكثير. diff --git a/content/lessons/cryptography/modular-arithmetic/en.md b/content/lessons/cryptography/modular-arithmetic/en.md index 5b4197c9..3e92c757 100644 --- a/content/lessons/cryptography/modular-arithmetic/en.md +++ b/content/lessons/cryptography/modular-arithmetic/en.md @@ -16,8 +16,8 @@ variables: ## Try it 1. Set the clock size "n" to 12, then tap the number 9 on the clock face to set the start, a. -2. Drag "b", how many steps to walk forward, up past 5 steps and watch the marker sail past the top of the clock and loop back around to the bottom. -3. Keep dragging b higher and check the "full turns" readout — it counts exactly how many times you lapped the clock. +2. Set "b", how many steps to walk forward, to 5. The walk passes the top of the clock: the readouts show a + b = 14, (a + b) mod 12 = 2 and 1 full turn. +3. Raise b to 27. Now a + b = 36, the walk lands on 0, and the "full turns" readout shows 3 — exactly how many times you lapped the clock. ## Real-life examples @@ -56,13 +56,17 @@ This single idea of wrapping is what every cipher in this course is built on. A ## Real world ### Telling time + A 12-hour clock is modular arithmetic in daily use: 9 o'clock plus 5 hours is 2 o'clock, not 14 o'clock. ### Day of the week + Adding days wraps every 7: if today is day 3 of the week, 10 days from now is day $(3+10) \bmod 7$, not day 13. ### Hash tables + A program spreads data across a fixed number of storage slots by computing key $\bmod$ (number of slots), reusing the same small set of buckets no matter how large the key is. ### Every cipher in this course + Caesar shifts wrap mod 26; the number games behind Diffie–Hellman and RSA wrap mod a chosen $n$ — the same clock idea at a much larger scale. diff --git a/content/lessons/cryptography/modular-arithmetic/lesson.yaml b/content/lessons/cryptography/modular-arithmetic/lesson.yaml index a60deda6..09362101 100644 --- a/content/lessons/cryptography/modular-arithmetic/lesson.yaml +++ b/content/lessons/cryptography/modular-arithmetic/lesson.yaml @@ -3,14 +3,14 @@ subject: cryptography difficulty: beginner equation: a \equiv b \;(\bmod n) concepts: -- modular-arithmetic -- remainder -- congruence -- cryptography + - modular-arithmetic + - remainder + - congruence + - cryptography prerequisites: [] related: -- caesar-cipher -- one-way-functions + - caesar-cipher + - one-way-functions visualization: type: mod-clock options: @@ -32,12 +32,12 @@ parameters: step: 1 value: 8 variables: -- \bmod -- \equiv + - \bmod + - \equiv derivation: -- a \bmod n = b \bmod n -- a - b = kn \text{ for some integer } k -- a \equiv b \;(\bmod n) + - a \bmod n = b \bmod n + - a - b = kn \text{ for some integer } k + - a \equiv b \;(\bmod n) charts: [] primary: n presets: diff --git a/content/lessons/cryptography/one-way-functions/ar.md b/content/lessons/cryptography/one-way-functions/ar.md index 97523c1e..6dc59533 100644 --- a/content/lessons/cryptography/one-way-functions/ar.md +++ b/content/lessons/cryptography/one-way-functions/ar.md @@ -13,8 +13,8 @@ variables: ## Try it -1. اضبط a على 5 وn على 23، ثم اسحب k من 1 إلى 3، واقرأ القائمة المتنامية $a^1, a^2, a^3$ بمعيار 23. -2. واصل سحب k حتى 8. لا تزداد القائمة صعوبة في البناء، فكل مدخلة جديدة تحتاج ضربًا واحدًا وأخذ الباقي فقط. +1. اضبط a على 5 وn على 23، ثم اسحب k من 1 إلى 3، واقرأ القائمة المتنامية $a^1, a^2, a^3$ بمعيار 23: تظهر 5 ← 2 ← 10. +2. واصل سحب k حتى 8. تكبر القائمة إلى 5 ← 2 ← 10 ← 4 ← 20 ← 8 ← 17 ← 16، ولا يزداد بناؤها صعوبة، فكل قيمة جديدة تحتاج ضربًا واحدًا وأخذ الباقي فقط. 3. حاول أن تخمّن قيمة k التي أنتجت الرقم الأخير في القائمة، بالنظر إليه وحده. لن تجد اختصارًا، فعليك إعادة السير خطوة خطوة من البداية. ## Real-life examples @@ -27,7 +27,7 @@ variables: 1. بتثبيت a عند 5 وn عند 23، جد قيمة k التي تجعل المؤشر يقف على 10. 2. ادفع k إلى أعلى قيمة يتيحها المنزلق، وهي 12. -3. اضبط الأساس a على 0 وحجم الدائرة n قرب 30. تحقق لماذا تقف كل قوة عند الموضع نفسه بالضبط، وهو اختيار سيئ لقفل حقيقي. +3. اضبط الأساس a على 0 وحجم الدائرة n على 30. تحقق لماذا تقف كل قوة عند الموضع نفسه بالضبط، وهو اختيار سيئ لقفل حقيقي. ## Intuition @@ -43,7 +43,7 @@ variables: ## Advanced -تخيّلها قفلًا: يستطيع أي شخص إغلاقه بنقرة واحدة، لكن فتحه بلا مفتاح يحتاج جهدًا حقيقيًا. تُشبه بابًا مفخخًا، يسهل السقوط منه في اتجاه ويصعب تسلّقه في الاتجاه المعاكس، ولهذا تسمى «دالة الفخ». يقوم التشفير بالضبط على هذا التفاوت. تتيح الدالة أحادية الاتجاه للجميع أن يحسبوا في الاتجاه الأمامي بحرية، بينما لا يستطيع عكسها إلا من يملك معلومة إضافية، كالأس نفسه أو تحليل عدد أولي أو ما شابه. وهذه هي الفكرة الأولى وراء تبادل مفاتيح ديفي-هيلمان وRSA معًا. +تخيّلها قفلًا: يستطيع أي شخص إغلاقه بنقرة واحدة، لكن فتحه بلا مفتاح يحتاج جهدًا حقيقيًا. تُشبه بابًا في أرضية الغرفة، يسهل السقوط منه ويصعب التسلّق منه عائدًا، ولهذا تسمى «دالة الباب الخفي». يقوم التشفير بالضبط على هذا التفاوت. تتيح الدالة أحادية الاتجاه للجميع أن يحسبوا في الاتجاه الأمامي بحرية، بينما لا يستطيع عكسها إلا من يملك معلومة إضافية، كالأس نفسه أو العوامل الأولية لعدد كبير أو ما شابه. وهذه هي الفكرة الأولى وراء تبادل مفاتيح ديفي-هيلمان وRSA معًا. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### تبادل مفاتيح ديفي-هيلمان + ينشر طرفان رقمين مبنيين بهذه الطريقة، ثم يجمعانهما في سر مشترك لا يستطيع من يعترض الرقمين العلنيين إعادة بنائه. ### التشفير بالمنحنيات الإهليلجية + تستخدم معظم اتصالات HTTPS الحديثة نسخة هندسية من الفكرة أحادية الاتجاه نفسها، اختيرت لأنها تبلغ الأمان نفسه بمفاتيح أقصر بكثير. ### تخزين كلمات المرور + تخزّن المواقع تحويلاً أحادي الاتجاه لكلمة المرور بدل كلمة المرور نفسها، فسرقة قاعدة البيانات لا تكشف كلمات المرور الأصلية مباشرة. ### التوقيع الرقمي + تعتمد أنظمة التوقيع الرقمي على عمليات يسهل التحقق منها ويصعب تزييفها، وهذا هو الشكل نفسه الذي يظهر في اللوغاريتم المتقطع، سهل تقدمًا وصعب عكسًا. diff --git a/content/lessons/cryptography/one-way-functions/en.md b/content/lessons/cryptography/one-way-functions/en.md index 1b0329f2..54535ad7 100644 --- a/content/lessons/cryptography/one-way-functions/en.md +++ b/content/lessons/cryptography/one-way-functions/en.md @@ -15,8 +15,8 @@ variables: ## Try it -1. Set a to 5 and n to 23, then drag k from 1 up to 3 and read the growing list $a^1, a^2, a^3$ mod 23. -2. Keep dragging k up to 8. Notice the list is no harder to build — each new entry costs one more multiply-and-wrap. +1. Set a to 5 and n to 23, then drag k from 1 up to 3 and read the growing list $a^1, a^2, a^3$ mod 23: it shows 5 → 2 → 10. +2. Keep dragging k up to 8. The list grows to 5 → 2 → 10 → 4 → 20 → 8 → 17 → 16, and it is no harder to build — each new entry costs one more multiply-and-wrap. 3. Try to guess, just by looking at the last number on the list, which value of k produced it. Notice there's no shortcut — you'd have to retrace the whole climb. ## Real-life examples @@ -29,7 +29,7 @@ variables: 1. With a fixed at 5 and n fixed at 23, find the value of k that makes the widget land on 10. 2. Push k all the way up to 12, the highest exponent the slider allows. -3. Set the base a to 0 and the clock size n close to 30, and see why every single power lands on the same spot — a bad choice for a real lock. +3. Set the base a to 0 and the clock size n to 30, and see why every single power lands on the same spot — a bad choice for a real lock. ## Intuition @@ -56,13 +56,17 @@ Think of it as a padlock: anyone can click it shut in an instant, but opening it ## Real world ### Diffie–Hellman key exchange + Two people publish numbers built this way and combine them into a shared secret that an eavesdropper, seeing only the public numbers, cannot reconstruct. ### Elliptic-curve cryptography + Modern HTTPS mostly uses a geometric cousin of this same one-way idea, chosen because it reaches the same security with much shorter keys. ### Password storage + Sites store a one-way transformation of a password rather than the password itself, so a stolen database does not hand out the originals directly. ### Digital signatures + Signing schemes rely on operations that are easy to check but hard to forge — the same easy-forward, hard-backward shape as a discrete logarithm. diff --git a/content/lessons/cryptography/one-way-functions/lesson.yaml b/content/lessons/cryptography/one-way-functions/lesson.yaml index cb1dcefc..ab3240df 100644 --- a/content/lessons/cryptography/one-way-functions/lesson.yaml +++ b/content/lessons/cryptography/one-way-functions/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: c = a^{k} \bmod n concepts: -- one-way-function -- discrete-logarithm -- trapdoor -- cryptography + - one-way-function + - discrete-logarithm + - trapdoor + - cryptography prerequisites: -- modular-arithmetic -- exponents-and-powers + - modular-arithmetic + - exponents-and-powers related: -- diffie-hellman -- logarithms + - diffie-hellman + - logarithms visualization: type: mod-clock options: @@ -34,11 +34,11 @@ parameters: step: 1 value: 8 variables: -- \bmod + - \bmod derivation: -- c = a^{k} \bmod n -- \text{finding } k \text{ from } a, c, n \text{ (the discrete logarithm) has no known fast general method} -- \log_a c \text{ inverts an ordinary power instantly; the mod hides the pattern that log needs} + - c = a^{k} \bmod n + - \text{finding } k \text{ from } a, c, n \text{ (the discrete logarithm) has no known fast general method} + - \log_a c \text{ inverts an ordinary power instantly; the mod hides the pattern that log needs} charts: [] primary: k presets: diff --git a/content/lessons/cryptography/password-salting/ar.md b/content/lessons/cryptography/password-salting/ar.md index cb0f2d3c..a483674d 100644 --- a/content/lessons/cryptography/password-salting/ar.md +++ b/content/lessons/cryptography/password-salting/ar.md @@ -17,8 +17,8 @@ variables: ## Try it 1. انظر إلى التسميتين فوق الشبكتين. تعرضان كلمة المرور نفسها «sunshine1»، لكن برقم مختلف ملحق بها، وهو الملح. -2. حرّك «s1»، ملح المستخدم الأول، وراقب بصمته الكاملة المكوّنة من 256 مربعًا تعيد ترتيب نفسها. -3. قارنها بالشبكة الثانية، باستخدام الملح «s2». رغم أن الاثنين كتبا «sunshine1»، تشترك البصمتان في القليل جدًا. +2. اضبط «s1»، ملح المستخدم الأول، على 17 واضبط «s2» على 742. تصبح التسميتان «sunshine1#17» و«sunshine1#742»، وتُظهر قراءة «البتات التي تغيّرت» 117 / 256. كتب الاثنان «sunshine1»، ومع ذلك يختلف نحو نصف المربعات. +3. اضبط الآن «s2» على 17 أيضًا. تتطابق الشبكتان تمامًا وتنزل القراءة إلى 0 / 256. بالملح نفسه تنكشف كلمة المرور المتكررة بسهولة. ## Real-life examples @@ -30,13 +30,13 @@ variables: 1. أعد «s1» إلى 17، الملح المستخدم في المثال الأول أعلاه. 2. اضبط «s2» على 742، شريكه في المثال نفسه. -3. قرّب «s1» و«s2» حتى يصبح الفرق بينهما أقل من 5، ولاحظ أن البصمتين ما زالتا مختلفتين تمامًا. +3. قرّب «s1» و«s2» حتى يصبح الفرق بينهما أقل من 5 دون أن يتساويا، ولاحظ أن البصمتين ما زالتا مختلفتين تمامًا. ## Intuition لنفترض أن زميلين اختارا كلمة المرور «sunshine1» نفسها لمنتدى مدرسي واحد، بملح 17 لأحدهما و742 للآخر. على الشاشة، تعرض التسمية اليسرى بالضبط ما يُجزَّأ فعليًا، أي كلمة المرور ملصقة برقم الملح العشوائي. والشبكة تحتها هي البصمة الناتجة من 256 بتًا، مربع صغير لكل بت. حرّك «s1» فتعيد الشبكة اليسرى ترتيب نفسها بالكامل، رغم أن نص كلمة المرور نفسه لا يتغيّر أبدًا. فقط الرقم الملصق في نهايته هو ما يتغيّر. -قارن الشبكة اليسرى بالشبكة اليمنى، المحسوبة بالطريقة نفسها من «s2». رغم انطلاق الاثنتين من كلمة المرور نفسها بالضبط، تشترك البصمتان في مربعات قليلة جدًا، تمامًا كما لو جُزّئت كلمتا مرور مختلفتان كليًا. تُكتب هذه القاعدة $h = H(P \Vert s)$. جزّئ كلمة المرور $P$ ملصقة بملح $s$، وحتى تغيير صغير في $s$ يرسل $h$ إلى مكان مختلف تمامًا. +قارن الشبكة اليسرى بالشبكة اليمنى، المحسوبة بالطريقة نفسها من «s2». رغم انطلاق الاثنتين من كلمة المرور نفسها بالضبط، تختلف البصمتان في نحو نصف مربعاتهما، تمامًا كما لو جُزّئت كلمتا مرور مختلفتان كليًا. تُكتب هذه القاعدة $h = H(P \Vert s)$. جزّئ كلمة المرور $P$ ملصقة بملح $s$، وحتى تغيير صغير في $s$ يرسل $h$ إلى مكان مختلف تمامًا. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### هجمات جداول قوس قزح + وُجد التمليح تحديدًا لإبطال جداول البحث المحسوبة مسبقًا لبصمات كلمات المرور، فيضطر المهاجم لمهاجمة كل حساب على حدة. ### تسريب لينكدإن عام 2012 + خزّن لينكدإن يومًا بصمات كلمات مرور بلا ملح، فكسر المهاجمون ملايين الحسابات دفعة واحدة بجداول جاهزة من قبل التسريب. ### تجزئة كلمات المرور الحديثة + يعتمد الأسلوب الأفضل اليوم دوال بطيئة ومملَّحة مثل bcrypt أو Argon2 بدل تجزئة سريعة واحدة، ما يجعل التخمين الواسع أغلى بكثير. ### مديرو كلمات المرور + بما أن التمليح يحمي البصمة المخزَّنة فقط، يبقى تكرار كلمة مرور واحدة في كل مكان خطِرًا. ومدير كلمات المرور يمنح كل حساب كلمة قوية ومنفردة. diff --git a/content/lessons/cryptography/password-salting/en.md b/content/lessons/cryptography/password-salting/en.md index ff8dcdf1..3a39f580 100644 --- a/content/lessons/cryptography/password-salting/en.md +++ b/content/lessons/cryptography/password-salting/en.md @@ -15,8 +15,8 @@ variables: ## Try it 1. Look at the two labels above the grids: both show the same password, "sunshine1", but a different number attached to it — the salt. -2. Drag «s1», the first user's salt, and watch their entire 256-square fingerprint reshuffle. -3. Compare it with the second grid, using salt «s2». Even though both users typed "sunshine1", the two fingerprints share almost nothing in common. +2. Set «s1», the first user's salt, to 17 and «s2» to 742. The labels read "sunshine1#17" and "sunshine1#742", and "bits changed" shows 117 / 256: even though both users typed "sunshine1", about half the squares differ. +3. Now set «s2» to 17 as well. The two grids become identical and "bits changed" drops to 0 / 256 — with the same salt, the same password is easy to spot. ## Real-life examples @@ -28,13 +28,13 @@ variables: 1. Set «s1» back to 17, the salt used in the first example above. 2. Set «s2» to 742, its matching partner from that same example. -3. Push «s1» and «s2» to within 5 of each other and notice the two fingerprints still look nothing alike. +3. Push «s1» and «s2» to within 5 of each other, but not equal, and notice the two fingerprints still look nothing alike. ## Intuition Suppose two classmates both choose the password "sunshine1" for the same school forum, salt 17 for one and salt 742 for the other. On screen, the left label shows exactly what actually gets hashed: the password glued to that random salt number, and the grid beneath it is the resulting 256-bit fingerprint, one small square per bit. Drag «s1» and the left grid reshuffles completely, even though the password text itself never changes — only the number stuck onto the end of it does. -Compare the left grid with the right one, computed the same way from «s2»: despite both starting from the identical password, the two fingerprints share almost no squares in common, exactly as if two completely different passwords had been hashed. That is written $h = H(P \Vert s)$: hash the password $P$ joined to a salt $s$, and even a small change in $s$ sends $h$ somewhere entirely unrelated. +Compare the left grid with the right one, computed the same way from «s2»: despite both starting from the identical password, the two fingerprints differ in about half of their squares, exactly as if two completely different passwords had been hashed. That is written $h = H(P \Vert s)$: hash the password $P$ joined to a salt $s$, and even a small change in $s$ sends $h$ somewhere entirely unrelated. ## Formal @@ -55,13 +55,17 @@ Without salting, an attacker can precompute a single "rainbow table" mapping mil ## Real world ### Rainbow table attacks + Salting exists specifically to defeat precomputed password-hash lookup tables, forcing an attacker to attack each account separately. ### The 2012 LinkedIn breach + LinkedIn once stored password hashes without salt, so attackers cracked millions of accounts at once using tables built long before the breach. ### Modern password hashing + Current best practice uses slow, salted functions like bcrypt or Argon2 instead of a single fast hash, making large-scale guessing far more expensive. ### Password managers + Because salting only protects the stored hash, reusing one password everywhere is still risky — a password manager lets every account get its own strong, unique one. diff --git a/content/lessons/cryptography/password-salting/lesson.yaml b/content/lessons/cryptography/password-salting/lesson.yaml index 0eeb0546..e29ac0ad 100644 --- a/content/lessons/cryptography/password-salting/lesson.yaml +++ b/content/lessons/cryptography/password-salting/lesson.yaml @@ -3,15 +3,15 @@ subject: cryptography difficulty: high-school equation: h = H(P \Vert s) concepts: -- salting -- password-storage -- rainbow-table -- hash-function + - salting + - password-storage + - rainbow-table + - hash-function prerequisites: -- hash-functions + - hash-functions related: -- digital-signatures -- one-way-functions + - digital-signatures + - one-way-functions visualization: type: hash-avalanche options: @@ -22,34 +22,34 @@ parameters: min: 0 max: 999 step: 1 - value: 17 + value: 250 s2: min: 0 max: 999 step: 1 - value: 742 + value: 600 variables: -- P -- s -- H -- h -- \Vert + - P + - s + - H + - h + - \Vert derivation: -- \text{two users both pick the password } P = \text{'sunshine1'} -- h_1 = H(P \Vert s_1), \quad h_2 = H(P \Vert s_2) -- \text{different salts } s_1 \ne s_2 \text{ give completely unrelated fingerprints } h_1, h_2 + - \text{two users both pick the password } P = \text{'sunshine1'} + - h_1 = H(P \Vert s_1), \quad h_2 = H(P \Vert s_2) + - \text{different salts } s_1 \ne s_2 \text{ give completely unrelated fingerprints } h_1, h_2 charts: [] primary: s1 presets: -- s1: 17 - s2: 742 -- s1: 100 - s2: 900 -- s1: 5 - s2: 995 + - s1: 17 + s2: 742 + - s1: 100 + s2: 900 + - s1: 5 + s2: 995 challenges: -- check: s1 - target: 17 -- check: s2 - target: 742 -- check: abs(s1 - s2) < 5 + - check: s1 + target: 17 + - check: s2 + target: 742 + - check: abs(s1 - s2) < 5 diff --git a/content/lessons/cryptography/rsa-encryption/ar.md b/content/lessons/cryptography/rsa-encryption/ar.md index faf98554..65535f15 100644 --- a/content/lessons/cryptography/rsa-encryption/ar.md +++ b/content/lessons/cryptography/rsa-encryption/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. أبقِ p = 5 وq = 11 وm = 7 وتتبّع الرحلة: القفل المفتوح (n = 55, e = 3) يسافر إلى أليس، ورسالتها تغادر صندوقًا مقفلًا c = 13، ومفتاح بوب الخاص d = 27 يعيد فتحه إلى 7 بالضبط. -2. حرّك m صعودًا وهبوطًا وراقب: الصندوق المقفل وحده يتغير — القفل والمفتاح لا يتحركان، لأن قفلًا واحدًا يكفي كل الرسائل. -3. الآن اسحب q نزولًا حتى يستقر على العدد الأولي نفسه الذي عند p: تتوقف الصورة مع تحذير، لأن قفلًا مبنيًّا من مربّع عدد أولي واحد يفضح عامليه فورًا. +1. أبقِ p = 5 وq = 11، واضبط m = 7، وتتبّع الرحلة: القفل المفتوح (n = 55, e = 3) يسافر إلى أليس، ورسالتها تغادر صندوقًا مقفلًا c = 13، ومفتاح بوب الخاص d = 27 يعيد فتحه إلى 7 بالضبط. +2. اضبط m على 9 وراقب: الصندوق المقفل وحده يتغير ويصبح c = 14 — أما القفل (n = 55, e = 3) والمفتاح d = 27 فلا يتغيران، لأن قفلًا واحدًا يكفي كل الرسائل. +3. الآن اسحب q نزولًا إلى 5، وهو العدد الأولي نفسه عند p: تتوقف الصورة مع تحذير، لأن قفلًا مبنيًّا من مربّع عدد أولي واحد يفضح عامليه فورًا. ## Real-life examples @@ -25,8 +25,8 @@ variables: ## Test yourself -1. اضبط تشغيلة الكتاب المدرسي — p = 5 وq = 11 والرسالة m = 7 — واقرأ c = 13 على الصندوق المقفل. -2. اكسر القفل عمدًا: اسحب p وq إلى العدد الأولي نفسه واقرأ ما يقوله التحذير. +1. اضبط أرقام الكتاب المدرسي — p = 5 وq = 11 والرسالة m = 7 — واقرأ c = 13 على الصندوق المقفل. +2. اكسر القفل عمدًا: اضبط p وq على العدد الأولي نفسه، مثلًا كليهما على 11، واقرأ ما يقوله التحذير. 3. ابنِ أكبر قفل تسمح به هذه المنزلقات: p = 13 مع q = 11. ## Intuition @@ -39,7 +39,7 @@ variables: يعطي RSA كل مستخدم مفتاحًا علنيًّا، $(n,e)$، يُشفَّر به، ومفتاحًا خاصًّا، $d$، يُفكّ به: التشفير هو $c = m^{e} \bmod n$ وفكّه هو $m = c^{d} \bmod n$. العدد $n$ هو حاصل ضرب عددين أوليين كبيرين، ويُختار $e$ و$d$ بحيث يعيدك الرفعُ إلى القوة $e$ ثم إلى القوة $d$ إلى حيث بدأت بالضبط. -بالأرقام الصغيرة: اختر $p=5$ و$q=11$، فيكون $n=pq=55$ و$\varphi(n)=(p-1)(q-1)=40$. خذ $e=3$ وحُلّ عن $d$ في $ed \equiv 1 \bmod \varphi(n)$: يصلح $d=27$ لأن $3\times27=81=2\times40+1$. +بالأرقام الصغيرة: اختر $p=5$ و$q=11$، فيكون $n=pq=55$ و$\varphi(n)=(p-1)(q-1)=40$. خذ $e=3$ وأوجد $d$ من العلاقة $ed \equiv 1 \bmod \varphi(n)$: يصلح $d=27$ لأن $3\times27=81=2\times40+1$. ## Advanced @@ -47,20 +47,24 @@ variables: ## Derivation -1. اختر عددين أوليين، اضربهما لتحصل على المقياس، واحسب منهما دالة أويلر. -2. اختر الأسّ العلني وحُلّ عن الأسّ الخاص الذي يعكسه بترديد المقياس. +1. اختر عددين أوليين، اضربهما لتحصل على المعيار n، واحسب منهما دالة أويلر. +2. اختر الأسّ العلني، ثم أوجد الأسّ الخاص الذي يعكسه عند أخذ الباقي على دالة أويلر. 3. ارفع الرسالة إلى الأسّ العلني لتشفّرها، وإلى الأسّ الخاص لتفكّها، فيعود العدد الأصلي. ## Real world ### قفل HTTPS + تستخدم المتصفحات غالبًا RSA (أو قريبه القائم على اللوغاريتم المتقطع) للاتفاق على المفاتيح عند ظهور قفل الموقع الآمن، لحماية إعداد الاتصال المشفر. ### تطبيقات التراسل + تستخدم تطبيقات التشفير من الطرف إلى الطرف أنظمة المفتاح العلني مثل RSA ليتفق هاتفان لم يلتقيا قط على طريقة حماية المحادثة. ### البطاقات البنكية والشرائح + توقّع شرائح الدفع المعاملات بمفتاح خاص لا يغادر البطاقة أبدًا، بينما تتحقق أجهزة الدفع بالمفتاح العلني المقابل. ### تخزين كلمات السر + حتى حيث لا يُستخدم RSA نفسه، فإن الفصل ذاته بين العلني والخاص هو ما يتيح للخوادم إثبات هويتها دون كشف السر الذي يشغّلها. diff --git a/content/lessons/cryptography/rsa-encryption/en.md b/content/lessons/cryptography/rsa-encryption/en.md index ad795851..f851ce0f 100644 --- a/content/lessons/cryptography/rsa-encryption/en.md +++ b/content/lessons/cryptography/rsa-encryption/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Keep p = 5, q = 11 and m = 7 and follow the journey left to right: the open padlock (n = 55, e = 3) travels to Alice, her message leaves as the locked box c = 13, and Bob's private key d = 27 opens it back to exactly 7. -2. Slide m up and down and watch only the locked box change — the padlock and the key never move, because one lock serves every message. -3. Now drag q down until it sits on the same prime as p: the picture stops with a warning, because a lock built from one prime squared gives its factors away instantly. +1. Keep p = 5 and q = 11, set m = 7, and follow the journey left to right: the open padlock (n = 55, e = 3) travels to Alice, her message leaves as the locked box c = 13, and Bob's private key d = 27 opens it back to exactly 7. +2. Set m to 9 and watch only the locked box change, to c = 14 — the padlock (n = 55, e = 3) and the key d = 27 never move, because one lock serves every message. +3. Now drag q down to 5, the same prime as p: the picture stops with a warning, because a lock built from one prime squared gives its factors away instantly. ## Real-life examples @@ -27,7 +27,7 @@ variables: ## Test yourself 1. Set the textbook run — p = 5, q = 11 and the message m = 7 — and read c = 13 off the locked box. -2. Break the lock on purpose: drag p and q onto the same prime and read what the warning says. +2. Break the lock on purpose: set p and q to the same prime, for example both to 11, and read what the warning says. 3. Build the biggest padlock these sliders allow: p = 13 with q = 11. ## Intuition @@ -55,13 +55,17 @@ Encrypt the message $m=7$: $c = m^{e} \bmod n = 7^{3} \bmod 55 = 13$. Decrypt it ## Real world ### HTTPS padlock + Browsers often use RSA (or a discrete-log cousin) to agree on keys when a secure site's padlock appears, protecting the setup of the encrypted connection. ### Messaging apps + End-to-end encrypted apps use public-key systems like RSA to let two phones that have never met agree on how to protect a conversation. ### Bank cards and chips + Payment chips sign transactions with a private key that never leaves the card, while terminals verify with the matching public key. ### Password storage + Even where RSA itself isn't used, the same public/private split underlies how servers prove identity without ever exposing the secret that makes it work. diff --git a/content/lessons/cryptography/rsa-encryption/lesson.yaml b/content/lessons/cryptography/rsa-encryption/lesson.yaml index 484cf138..4c72b811 100644 --- a/content/lessons/cryptography/rsa-encryption/lesson.yaml +++ b/content/lessons/cryptography/rsa-encryption/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: university equation: c = m^{e} \bmod n concepts: -- rsa -- public-key-cryptography -- factoring -- modular-arithmetic + - rsa + - public-key-cryptography + - factoring + - modular-arithmetic prerequisites: -- diffie-hellman -- exponential-vs-polynomial + - diffie-hellman + - exponential-vs-polynomial related: -- one-way-functions -- digital-signatures + - one-way-functions + - digital-signatures visualization: type: rsa-lock options: {} @@ -31,13 +31,13 @@ parameters: min: 2 max: 20 step: 1 - value: 7 + value: 9 variables: -- \bmod + - \bmod derivation: -- \text{choose } p=5,\ q=11,\ n=pq=55,\ \varphi(n)=(p-1)(q-1)=40 -- \text{pick } e=3; \text{ solve } ed \equiv 1 \bmod \varphi(n) \Rightarrow d=27 \text{ since } 3\times27=81=2\times40+1 -- c = m^{e} \bmod n = 7^{3} \bmod 55 = 13, \qquad c^{d} \bmod n = 13^{27} \bmod 55 = 7 + - \text{choose } p=5,\ q=11,\ n=pq=55,\ \varphi(n)=(p-1)(q-1)=40 + - \text{pick } e=3; \text{ solve } ed \equiv 1 \bmod \varphi(n) \Rightarrow d=27 \text{ since } 3\times27=81=2\times40+1 + - c = m^{e} \bmod n = 7^{3} \bmod 55 = 13, \qquad c^{d} \bmod n = 13^{27} \bmod 55 = 7 charts: [] primary: m presets: diff --git a/content/lessons/cryptography/secret-sharing/ar.md b/content/lessons/cryptography/secret-sharing/ar.md index a607d7d0..4de2485e 100644 --- a/content/lessons/cryptography/secret-sharing/ar.md +++ b/content/lessons/cryptography/secret-sharing/ar.md @@ -16,13 +16,13 @@ variables: ## Try it 1. والعتبة على 3، اكشف حصتين وانظر إلى المنحنيات الشبحية: تسعة منحنيات مختلفة تمرّ بالنقطتين المكشوفتين، واحد لكل سرّ ممكن — الحصتان لم تقولا شيئًا. -2. اكشف حصة ثالثة وراقب الأشباح تتلاشى إلا واحدًا: يثبت المنحنى في مكانه ويُقرأ السر على المحور. -3. ارفع العتبة إلى 4 والحصص المكشوفة كما هي فتعود الأشباح — عتبة أعلى تعني أن على عدد أكبر من الحائزين أن يتعاونوا. +2. اكشف حصة ثالثة وراقب الأشباح تتلاشى إلا واحدًا: يثبت المنحنى في مكانه وتتغير قراءة السر من «?» إلى 5. +3. ارفع العتبة إلى 4 والحصص الثلاث المكشوفة كما هي فتعود الأشباح — عتبة أعلى تعني أن على عدد أكبر من حاملي الحصص أن يتعاونوا. ## Real-life examples - **اثنان من ثلاثة، وما زالا أعميين.** بعتبة 3 وحصتين مكشوفتين، كل سرّ مرشّح يلائم تمامًا — هذا هو المعنى الرياضي لعبارة «لا يعرفان شيئًا». -- **الحصة الثالثة تحطّ.** الإعداد نفسه وثلاث حصص مكشوفة: يثبت المنحنى وتُفتح الخزنة. +- **الحصة الثالثة تصل.** الإعداد نفسه وثلاث حصص مكشوفة: يثبت المنحنى وتُفتح الخزنة. - **قاعدة الأربعة.** عتبة 4 مع كشف الحصص الخمس كلها — ضياع حصة واحدة ما كان ليضرّ، لكن أيّ ثلاثة متآمرين وحدهم كانوا سيبقون خارج الباب. ## Test yourself @@ -33,36 +33,40 @@ variables: ## Intuition -خبّئ السر مكانًا لا عددًا: ارسم منحنى يقطع المحور الرأسي عند السر بالضبط، ثم سلّم كل واحد من خمسة أشخاص نقطة واحدة من المنحنى. نقطتان تكفيان لرسم مستقيم، وثلاث لتثبيت قطع مكافئ — فمع قطع مكافئ، يستطيع أيّ ثلاثة حائزين إعادة رسم المنحنى كله وقراءة نقطة العبور، بينما يمسك أيّ اثنين سؤالًا له تسعة أجوبة متساوية الاحتمال. المنحنيات الشبحية على الشاشة هي تلك الأجوبة، وكل واحد منها يمرّ ببراءة بالنقاط المكشوفة. +خبّئ السر مكانًا لا عددًا: ارسم منحنى يقطع المحور الرأسي عند السر بالضبط، ثم سلّم كل واحد من خمسة أشخاص نقطة واحدة من المنحنى. نقطتان تكفيان لرسم مستقيم، وثلاث لتثبيت قطع مكافئ — فمع قطع مكافئ، يستطيع أيّ ثلاثة من حاملي الحصص إعادة رسم المنحنى كله وقراءة نقطة تقاطعه مع المحور، أما أيّ اثنين فيبقى أمامهما سؤال له تسعة أجوبة متساوية الاحتمال. المنحنيات الشبحية على الشاشة هي تلك الأجوبة، وكل واحد منها يمرّ بالنقاط المكشوفة. وما يميّز هذا عن كل شيء آخر في هذه القاعة: لا شيفرة هنا لتُكسر. لصٌّ معه حصتان وحاسوب بحجم مجرّة لا يستطيع مع ذلك تفضيل شبح على آخر، لأن التسعة كلها تلائم الأدلة تمامًا — فالأمان معلوماتيّ نظريّ، مثل أمان دفتر المرة الواحدة، ولا يغيّره أي حاسوب قادم، كموميًّا كان أو غيره. والطريق الوحيد إلى الداخل اجتماعيّ: اجمع ما يكفي من الحصص. ## Formal -لتقسيم سرّ $s$ بعتبة $k$، اختر $k-1$ معاملًا عشوائيًّا وكوّن $f(x) = s + a_1 x + \dots + a_{k-1}\,x^{k-1}$، وهو كثير حدود من الدرجة $k-1$ حدُّه الثابت هو السر، أي $f(0) = s$. الحصة رقم $j$ هي النقطة $(j, f(j))$؛ والأنظمة الحقيقية تحسب كل شيء بترديد عدد أولي حتى يكون لكلمة «عشوائي» معنى مضبوط. +لتقسيم سرّ $s$ بعتبة $k$، اختر $k-1$ معاملًا عشوائيًّا وكوّن $f(x) = s + a_1 x + \dots + a_{k-1}\,x^{k-1}$، وهو كثير حدود من الدرجة $k-1$ حدُّه الثابت هو السر، أي $f(0) = s$. الحصة رقم $j$ هي النقطة $(j, f(j))$؛ والأنظمة الحقيقية تحسب كل شيء بأخذ الباقي على عدد أولي حتى يكون لكلمة «عشوائي» معنى مضبوط. -أيّ $k$ نقاط تحدد كثير حدود من الدرجة $k-1$ تحديدًا وحيدًا — استيفاء لاغرانج يعيد بناءه فيسقط $f(0)$ في اليد. وأيّ $k-1$ نقطة لا تفعل: فلكل سرّ مرشّح كثيرُ حدود واحد بالضبط يمرّ بالحصص المعلومة وبذلك المرشح، فلا تكشف الحصص عن $s$ أي شيء حرفيًّا. +أيّ $k$ نقاط تحدد كثير حدود من الدرجة $k-1$ تحديدًا وحيدًا — استيفاء لاغرانج يعيد بناءه فتظهر قيمة $f(0)$. وأيّ $k-1$ نقطة لا تفعل: فلكل سرّ مرشّح كثيرُ حدود واحد بالضبط يمرّ بالحصص المعلومة وبذلك المرشح، فلا تكشف الحصص عن $s$ أي شيء حرفيًّا. ## Advanced -نشر شامير هذا المخطط عام 1979، وهو يحمل خاصية لا يقدّمها أي شيء حسابي: سرية تامة تحت العتبة. تعتمد عليه الأنظمة الحديثة بكثافة — حفظُ العملات المشفرة يقسم مفاتيح المحافظ بين مديرين وخزائن، وسلطات الشهادات تقسم مفاتيح توقيعها الجذرية، وبروتوكولات التوقيع العتبي تمدّ الفكرة حتى توقّع الأطراف معًا دون أن يُجمَع المفتاح في مكان واحد قط. وثمة تحذير يُظهره المنحنى أيضًا: مشاركة شامير البسيطة تثق بأمانة الحائزين، إذ تعيد نقطةٌ فاسدة رسمَ المنحنى إلى سرّ خاطئ — والمخططات القابلة للتحقق تضيف فحوصًا فوقها. +نشر شامير هذا المخطط عام 1979، وهو يحمل خاصية لا يقدّمها أي شيء حسابي: سرية تامة تحت العتبة. تعتمد عليه الأنظمة الحديثة بكثافة — حفظُ العملات المشفرة يقسم مفاتيح المحافظ بين مديرين وخزائن، وسلطات الشهادات تقسم مفاتيح توقيعها الجذرية، وبروتوكولات التوقيع العتبي تمدّ الفكرة حتى توقّع الأطراف معًا دون أن يُجمَع المفتاح في مكان واحد قط. وثمة تحذير يُظهره المنحنى أيضًا: مشاركة شامير البسيطة تثق بأمانة حاملي الحصص، إذ تعيد نقطةٌ فاسدة رسمَ المنحنى إلى سرّ خاطئ — والمخططات القابلة للتحقق تضيف فحوصًا فوقها. ## Derivation 1. يختبئ السر في الحد الثابت للمنحنى، والمعاملات العشوائية تجعل كل ملمح آخر فيه بلا معنى. -2. يحصل كل حائز على عيّنة واحدة من المنحنى، عديمة النفع وحدها وقويّة مجتمعة. +2. يحصل كل حامل حصة على عيّنة واحدة من المنحنى، عديمة النفع وحدها وقويّة مجتمعة. 3. الاستيفاء هو المفتاح: باكتمال العتبة يصير المنحنى وحيدًا، وبنقص نقطة واحدة يصير منحنى أيّ أحد. ## Real world ### حفظ محافظ العملات المشفرة + تقسم المنصات المفتاح الرئيسي لمحافظ التخزين البارد بمخططات عتبية، فلا يستطيع موظف واحد — ولا سطو واحد — تحريك الأموال. ### مراسم المفاتيح الجذرية + المفاتيح التي توقّع جذر DNS للإنترنت مقسومة بين أعضاء موثوقين عبر القارات؛ ولا بد من نصاب يجتمع فعليًّا لاستخدامها. ### قاعدة الشخصين على طريقة إطلاق الصواريخ + كل تحكّم «مفتاحان، شخصان» هو مخطط عتبي في العتاد؛ وشامير حوّل الفكرة رياضياتٍ تعمل مع أيّ n وأيّ k. ### التوقيعات العتبية + تتيح البروتوكولات الحديثة لـk من n خادمًا إنتاج توقيع واحد معًا دون إعادة تركيب المفتاح الخاص في أي مكان — تقاسمُ سرٍّ نما حتى صار آلة توقيع. diff --git a/content/lessons/cryptography/secret-sharing/en.md b/content/lessons/cryptography/secret-sharing/en.md index 4c33b06e..ce8b7cbb 100644 --- a/content/lessons/cryptography/secret-sharing/en.md +++ b/content/lessons/cryptography/secret-sharing/en.md @@ -17,8 +17,8 @@ variables: ## Try it 1. With the threshold at 3, reveal 2 shares and look at the ghost curves: nine different curves pass through both revealed points, one for every possible secret — the two shares have said nothing. -2. Reveal a third share and watch every ghost but one vanish: the curve snaps into place and the secret is read off the axis. -3. Raise the threshold to 4 with the same shares revealed and the ghosts return — a higher threshold means more holders must cooperate. +2. Reveal a third share and watch every ghost but one vanish: the curve snaps into place and the secret readout changes from "?" to 5. +3. Raise the threshold to 4 with the same 3 shares revealed and the ghosts return — a higher threshold means more holders must cooperate. ## Real-life examples @@ -57,13 +57,17 @@ Shamir published this scheme in 1979, and it carries a property nothing computat ## Real world ### Crypto wallet custody + Exchanges split the master key of cold-storage wallets with threshold schemes, so no single employee — and no single burglary — can move the funds. ### Root key ceremonies + The keys that sign the internet's DNS root are split among trusted community members across continents; a quorum must physically assemble to use them. ### Missile-launch style two-person rules + Any "two keys, two people" control is a threshold scheme in hardware; Shamir turned the idea into mathematics with any n and any k. ### Threshold signatures + Modern protocols let k of n servers jointly produce one signature without reconstructing the private key anywhere — secret sharing grown into a signing machine. diff --git a/content/lessons/cryptography/secret-sharing/lesson.yaml b/content/lessons/cryptography/secret-sharing/lesson.yaml index 2cec697d..7eaea008 100644 --- a/content/lessons/cryptography/secret-sharing/lesson.yaml +++ b/content/lessons/cryptography/secret-sharing/lesson.yaml @@ -3,14 +3,14 @@ subject: cryptography difficulty: high-school equation: f(x) = s + a_1 x + \dots + a_{k-1}\,x^{k-1} concepts: -- secret-sharing -- threshold -- polynomial-interpolation -- information-theoretic-security + - secret-sharing + - threshold + - polynomial-interpolation + - information-theoretic-security prerequisites: [] related: -- xor-and-one-time-pad -- digital-signatures + - xor-and-one-time-pad + - digital-signatures visualization: type: secret-sharing options: {} @@ -29,15 +29,15 @@ parameters: min: 0 max: 5 step: 1 - value: 2 + value: 1 variables: -- s -- k -- a_1, \dots, a_{k-1} + - s + - k + - a_1, \dots, a_{k-1} derivation: -- \text{hide the secret as } f(0) = s \text{ and pick } k-1 \text{ random coefficients} -- \text{share } j \text{ is the point } (j,\ f(j)) -- k \text{ points fix the curve exactly; } k-1 \text{ points fit every possible secret} + - \text{hide the secret as } f(0) = s \text{ and pick } k-1 \text{ random coefficients} + - \text{share } j \text{ is the point } (j,\ f(j)) + - k \text{ points fix the curve exactly; } k-1 \text{ points fit every possible secret} charts: [] primary: shown presets: diff --git a/content/lessons/cryptography/stream-ciphers/ar.md b/content/lessons/cryptography/stream-ciphers/ar.md index fcc283cf..a133182b 100644 --- a/content/lessons/cryptography/stream-ciphers/ar.md +++ b/content/lessons/cryptography/stream-ciphers/ar.md @@ -16,13 +16,13 @@ variables: ## Try it 1. انظر إلى الرسالة 1: كل حرف يلتقي بايتًا واحدًا من سيل المفتاح، يندمجان بعملية XOR، فيسقط بايت الشيفرة تحتهما — وألوان السيل تتغير كليًّا إذا حركت المفتاح قليلًا. -2. حرّك الرقم الخاص الثاني والأول ثابت عند 7: ما دام الرقمان مختلفين يبقى الصف السفلي صامتًا ولا يتشارك النصان المشفران شيئًا. -3. الآن اضبط الرقم الخاص الثاني على 7 بالضبط، مثل الأول — يتطابق السيلان، ويضيء الصف السفلي بالرسالتين مدموجتين إحداهما في الأخرى، بلا حاجة إلى أي مفتاح. +2. أبقِ الرقم الخاص الأول عند 7 واضبط الثاني على 8 ثم على 50: ما دام الرقمان مختلفين تقول القراءة الأخيرة «لا تكرار» ولا يتشارك النصان المشفران شيئًا. +3. الآن اضبط الرقم الخاص الثاني على 7 بالضبط، مثل الأول — يتطابق السيلان، وتتحول القراءة إلى الأحمر وتُظهر التسريب 13 11 00 08 11 0E: الرسالتان مدموجتان إحداهما في الأخرى، بلا حاجة إلى أي مفتاح. ## Real-life examples - **رسالتان سليمتان.** المفتاح نفسه مع الرقمين 7 و8 يعطي سيلين لا صلة بينهما — هكذا بالضبط يشفّر هاتفك كل حزمة بالمفتاح نفسه مع عدّاد جديد. -- **كارثة التكرار.** المفتاح نفسه مع الرقم 7 مرتين: يدمج المتنصت النصين المشفرين بعملية XOR فيُلغى السيل، وتبقى ATTACK ⊕ RETIRE عارية على السلك. +- **كارثة التكرار.** المفتاح نفسه مع الرقم 7 مرتين: يدمج المتنصت النصين المشفرين بعملية XOR فيُلغى السيل، وتبقى ATTACK ⊕ RETIRE مكشوفة على السلك. - **مفتاح جديد كليًّا.** المفتاح 200 مع رقمين متباعدين — حتى مع معرفة الحركة القديمة، لا يقول سيلُ الأمس شيئًا عن سيل اليوم. ## Test yourself @@ -33,19 +33,19 @@ variables: ## Intuition -انتهى درس دفتر المرة الواحدة بخبر سيّئ: السرية التامة تحتاج مفتاحًا عشوائيًّا حقًّا بطول كل رسالة سترسلها يومًا. شيفرة السيل هي الجواب العملي — آلة صغيرة $G$ تلتهم مفتاحًا قصيرًا مع رقم خاص (رقم يُستخدم مرة واحدة) وتزفر سيلًا لا ينتهي من بايتات تشبه المفتاح. على الشاشة، يلتقي كل حرف من الرسالة بايتَه الخاص من السيل فيندمجان بعملية XOR في بايت شيفرة — حركة دفتر المرة الواحدة نفسها، لكن بدفترٍ مُصنَّع. +انتهى درس دفتر المرة الواحدة بخبر سيّئ: السرية التامة تحتاج مفتاحًا عشوائيًّا حقًّا بطول كل رسالة سترسلها يومًا. شيفرة السيل هي الجواب العملي — آلة صغيرة $G$ تأخذ مفتاحًا قصيرًا مع رقم خاص (رقم يُستخدم مرة واحدة) وتُخرج سيلًا لا ينتهي من بايتات تشبه المفتاح. على الشاشة، يلتقي كل حرف من الرسالة بايتَه الخاص من السيل فيندمجان بعملية XOR في بايت شيفرة — حركة دفتر المرة الواحدة نفسها، لكن بدفترٍ مُصنَّع. -العقد كله يسكن في كلمة «واحدة». ادمج بعملية XOR النصين المشفرين لرسالتين تشاركتا سيلًا واحدًا فيُلغي السيل نفسه بنفسه — ويتبقى رسالة مدموجة بالأخرى، ولا مفتاح في الدنيا له علاقة بعدها. تعرض الشاشة ذلك الانهيار لحظة يتفق الرقمان: صف المهاجم في الأسفل يصبح فجأة الأصل 1 ⊕ الأصل 2، وتخمينٌ كتخمين الكلمات المتقاطعة يفكّكه في دقائق. +الشرط كله في كلمة «واحدة». ادمج بعملية XOR النصين المشفرين لرسالتين تشاركتا سيلًا واحدًا فيُلغي السيل نفسه بنفسه — ويتبقى رسالة مدموجة بالأخرى، ولا يبقى للمفتاح أي دور بعدها. تعرض الشاشة ذلك الانهيار لحظة يتفق الرقمان: صف المهاجم في الأسفل يصبح فجأة الأصل 1 ⊕ الأصل 2، وتخمينٌ كتخمين الكلمات المتقاطعة يفكّكه في دقائق. ## Formal تبني شيفرة السيل سيل المفتاح $k_i = G(\text{key}, \text{nonce}, i)$ بمولّد حتمي $G$، ثم تشفّر بالعلاقة $c_i = p_i \oplus k_i$ وتفكّ بالعملية نفسها، لأن تكرار XOR بالبايت نفسه يلغيه. لا يحتاج المستقبِل إلا المفتاح القصير والرقم الخاص — الذي يسافر مكشوفًا — ليعيد بناء السيل المطابق. -التكرار هو الخطيئة القاتلة الوحيدة: إذا تشاركت رسالتان سيلًا واحدًا كان $c_i \oplus c'_i = p_i \oplus p'_i$، فيمسك المهاجم دمج النصين الأصليين دون أن يلمس المفتاح. فالأمان إذن يقف على ساقين — يجب أن يكون $G$ غير قابل للتنبؤ دون المفتاح، ويجب ألا يتكرر الزوج (المفتاح، الرقم الخاص) أبدًا. +التكرار هو الخطأ القاتل الوحيد: إذا تشاركت رسالتان سيلًا واحدًا كان $c_i \oplus c'_i = p_i \oplus p'_i$، فيمسك المهاجم دمج النصين الأصليين دون أن يلمس المفتاح. فالأمان إذن يقوم على شرطين — يجب أن يكون $G$ غير قابل للتنبؤ دون المفتاح، ويجب ألا يتكرر الزوج (المفتاح، الرقم الخاص) أبدًا. ## Advanced -النسخة الحقيقية هي ChaCha20 التي صممها دانيال بيرنشتاين: مفتاح من 256 بتًّا ورقم خاص من 96 بتًّا وعدّاد كتل من 32 بتًّا تغذّي خلطة من عمليات جمع وXOR ودورانات بتّات تُخرج السيل 64 بايتًا دفعة واحدة. وهي تشفّر حصة وافرة من حركة الويب اليوم — TLS على معظم الهواتف، وشبكات WireGuard — لأنها تعمل بسرعة في البرمجيات الخالصة. وخطرها هو خطر اللعبة نفسه: كرّر رقمًا خاصًّا تحت المفتاح نفسه فينهار الدفتر، ولهذا تربط المعايير الرقم الخاص بعدّاد، ولهذا تُدرَّس هجمات RC4 وكارثة توقيع بلايستيشن 3 تحذيرًا. +النسخة الحقيقية هي ChaCha20 التي صممها دانيال بيرنشتاين: مفتاح من 256 بتًّا ورقم خاص من 96 بتًّا وعدّاد كتل من 32 بتًّا تغذّي خلطة من عمليات جمع وXOR ودورانات بتّات تُخرج السيل 64 بايتًا دفعة واحدة. وهي تشفّر حصة وافرة من حركة الويب اليوم — TLS على معظم الهواتف، وشبكات WireGuard — لأنها سريعة حتى بلا عتاد خاص بالتشفير. وخطرها هو خطر اللعبة نفسه: كرّر رقمًا خاصًّا تحت المفتاح نفسه فينهار الدفتر، ولهذا تربط المعايير الرقم الخاص بعدّاد، ولهذا تُدرَّس هجمات RC4 وكارثة توقيع بلايستيشن 3 تحذيرًا. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### ChaCha20 في TLS + حين يفتح هاتف معظم المواقع الآمنة، تتولى ChaCha20-Poly1305 تشفير الحركة — شيفرة سيل بأقصى سرعة، مع عدّاد يجعل رقم كل كتلة فريدًا. ### شبكات WireGuard + بروتوكول VPN الحديث يشفّر كل حزمة بـChaCha20، معتمدًا على انضباط صارم في العدّ يمنع أي سيل من التكرار. ### اختراق فينونا + أُعيد استخدام دفاتر المرة الواحدة السوفييتية تحت ضغط الحرب في الأربعينيات؛ فدمج المحللون الأمريكيون النصوص المتطابقة بعملية XOR وقرؤوا آلاف الرسائل — الهجوم نفسه الذي يعرضه هذا الدرس. ### WEP المكسور في الواي فاي + استخدم تشفير الواي فاي القديم RC4 برقم خاص من 24 بتًّا، فكانت الشبكات المزدحمة تكرر الأرقام خلال ساعات؛ وأتمتت الأدواتُ هجومَ تكرار السيل فهُجر WEP نهائيًّا. diff --git a/content/lessons/cryptography/stream-ciphers/en.md b/content/lessons/cryptography/stream-ciphers/en.md index f5054b72..6674d4b3 100644 --- a/content/lessons/cryptography/stream-ciphers/en.md +++ b/content/lessons/cryptography/stream-ciphers/en.md @@ -17,8 +17,8 @@ variables: ## Try it 1. Look at message 1: each letter meets one keystream byte, they XOR together, and the cipher byte drops out below — the keystream colours change completely if you nudge the key. -2. Slide the second nonce around while the first stays at 7: as long as the two differ, the bottom row stays quiet and the two ciphertexts share nothing. -3. Now set the second nonce to exactly 7, the same as the first — the keystreams match, and the bottom row lights up with the two messages XORed into each other, no key needed. +2. Keep the first nonce at 7 and set the second to 8, then to 50: as long as the two differ, the last readout says "no reuse" and the two ciphertexts share nothing. +3. Now set the second nonce to exactly 7, the same as the first — the keystreams match, and the readout turns red with the leak 13 11 00 08 11 0E: the two messages XORed into each other, no key needed. ## Real-life examples @@ -46,7 +46,7 @@ Reuse is the one fatal sin: if two messages share a keystream, then $c_i \oplus ## Advanced -The real thing is ChaCha20, designed by Daniel Bernstein: a 256-bit key, a 96-bit nonce and a 32-bit block counter feed a scramble of additions, XORs and bit-rotations that outputs the keystream 64 bytes at a time. It encrypts a good share of today's web traffic — TLS on most phones, WireGuard VPNs — because it runs fast in pure software. Its menace is the same as the toy's: repeat a nonce under the same key and the pad collapses, which is why standards bind the nonce to a counter and why the 2008 Windows XP-era RC4 attacks and the PlayStation 3 signing disaster are taught as warnings. +The real thing is ChaCha20, designed by Daniel Bernstein: a 256-bit key, a 96-bit nonce and a 32-bit block counter feed a scramble of additions, XORs and bit-rotations that outputs the keystream 64 bytes at a time. It encrypts a good share of today's web traffic — TLS on most phones, WireGuard VPNs — because it runs fast in pure software. Its menace is the same as the toy's: repeat a nonce under the same key and the pad collapses, which is why standards bind the nonce to a counter and why the attacks on RC4 and the PlayStation 3 signing disaster are taught as warnings. ## Derivation @@ -57,13 +57,17 @@ The real thing is ChaCha20, designed by Daniel Bernstein: a 256-bit key, a 96-bi ## Real world ### ChaCha20 in TLS + When a phone opens most secure websites, ChaCha20-Poly1305 encrypts the traffic — a stream cipher at full speed, with a counter making every block's nonce unique. ### WireGuard VPNs + The modern VPN protocol encrypts every packet with ChaCha20, trusting a strict counter discipline to keep any keystream from ever repeating. ### The Venona break + Soviet one-time pads were reused under wartime pressure in the 1940s; American analysts XORed matching ciphertexts and read thousands of messages — the exact attack this lesson shows. ### Wi-Fi's broken WEP + The old Wi-Fi encryption used RC4 with a 24-bit nonce, so busy networks repeated nonces within hours; tools automated the keystream-reuse attack and WEP had to be abandoned. diff --git a/content/lessons/cryptography/stream-ciphers/lesson.yaml b/content/lessons/cryptography/stream-ciphers/lesson.yaml index ebbf1e32..ccd4f7fa 100644 --- a/content/lessons/cryptography/stream-ciphers/lesson.yaml +++ b/content/lessons/cryptography/stream-ciphers/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: high-school equation: c_i = p_i \oplus k_i concepts: -- stream-cipher -- keystream -- nonce -- chacha20 + - stream-cipher + - keystream + - nonce + - chacha20 prerequisites: -- xor-and-one-time-pad + - xor-and-one-time-pad related: -- block-ciphers-and-aes -- vigenere-cipher -- diffie-hellman + - block-ciphers-and-aes + - vigenere-cipher + - diffie-hellman visualization: type: stream-cipher options: @@ -35,13 +35,13 @@ parameters: step: 1 value: 8 variables: -- p_i -- c_i -- k_i + - p_i + - c_i + - k_i derivation: -- k_i = G(\text{key},\ \text{nonce},\ i) -- c_i = p_i \oplus k_i, \qquad p_i = c_i \oplus k_i -- c_i \oplus c'_i = p_i \oplus p'_i \text{ when the same keystream is used twice} + - k_i = G(\text{key},\ \text{nonce},\ i) + - c_i = p_i \oplus k_i, \qquad p_i = c_i \oplus k_i + - c_i \oplus c'_i = p_i \oplus p'_i \text{ when the same keystream is used twice} charts: [] primary: nonce2 presets: diff --git a/content/lessons/cryptography/transposition-ciphers/ar.md b/content/lessons/cryptography/transposition-ciphers/ar.md index 57238320..0850623f 100644 --- a/content/lessons/cryptography/transposition-ciphers/ar.md +++ b/content/lessons/cryptography/transposition-ciphers/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اضبط السكك على 3 واقرأ الصفوف في الأسفل: الرسالة WE ARE DISCOVERED RUN تخرج WECRU ERDSOEEDN AIVD — الحروف الثمانية عشر نفسها، ملتقطة صفًّا صفًّا. +1. اضبط السكك على 3 واقرأ الصفوف في الأسفل: الرسالة WE ARE DISCOVERED RUN تخرج WECRU ERDSOEERN AIVD — الحروف الثمانية عشر نفسها، ملتقطة صفًّا صفًّا. 2. انقر الصورة لتتبع الحروف واحدًا واحدًا وراقب أين يحطّ كل حرف: نزولًا على السكك، ارتداد، صعودًا، ثم ارتداد من جديد. -3. ارفع السكك إلى 6 وشاهد التعرج يتمدد: النمط لا يتكرر الآن إلا كل 10 حروف، والصفوف تبعثر الرسالة أبعد فأبعد. +3. ارفع السكك إلى 6 وشاهد التعرج يتمدد: النمط لا يتكرر الآن إلا كل 10 حروف، ويصبح النص المشفر WV EOE ACR RSEN EIDU DR. ## Real-life examples @@ -31,7 +31,7 @@ variables: ## Intuition -كل شيفرة قبل هذه كانت تستبدل الحروف بحروف أخرى؛ أما شيفرة التبديل فتفعل العكس — لا تمسّ الحروف أبدًا، بل تنقلها. على الشاشة تركب الرسالة سياجًا: سكة واحدة نزولًا مع كل حرف، ارتداد من القاع، تسلّق من جديد، ثم ارتداد من القمة. النص المشفر هو ببساطة الصفوف مقروءة باستقامة، فحرف E الذي كان يلي W ينتهي على بُعد أماكن عدة، بجوار حروف لم يقف قربها قط. +كل شيفرة قبل هذه كانت تستبدل الحروف بحروف أخرى؛ أما شيفرة التبديل فتفعل العكس — لا تمسّ الحروف أبدًا، بل تنقلها. على الشاشة تركب الرسالة سياجًا: سكة واحدة نزولًا مع كل حرف، ارتداد من القاع، تسلّق من جديد، ثم ارتداد من القمة. النص المشفر هو ببساطة الصفوف مقروءة من اليسار إلى اليمين، فحرف E الذي كان بعد W مباشرة يبتعد عنه عدة أماكن، ويصير بجوار حروف لم يكن قربها من قبل. وهنا نقطة الضعف، وهي كبيرة: النص المشفر يحتوي حروف الأصل نفسها بالضبط. عُدَّها فتجد E ما يزال الحرف الأكثر شيوعًا، فيعرف مفكّك الشيفرة فورًا أن أمامه تبديلًا لا إحلالًا — ثم يصبح الهجوم أحجية ترتيب حروف، تُزلق فيها الصفوف بعضها على بعض حتى تظهر الكلمات. لهذا انقرض التبديل وحده، لكن — وهذه هي الفكرة الباقية — إبعاد الحروف بعضها عن بعض هو نصف ما تفعله الشيفرة الحديثة، تحت اسم الانتشار. @@ -53,14 +53,18 @@ variables: ## Real world -### صولجان إسبرطة -لفّ القادة الإغريق شريطًا جلديًّا حول عصا وكتبوا على طولها؛ وعند فكّه تجلس الحروف بترتيب متعرج — شيفرة تبديل عمرها 2500 سنة. +### عصا إسبرطة + +لفّ القادة الإغريق شريطًا جلديًّا حول عصا وكتبوا على طولها. وعند فكّ الشريط تظهر الحروف بترتيب مبعثر — شيفرة تبديل عمرها 2500 سنة. ### ADFGVX في الحرب العالمية الأولى + جمعت الشيفرة الميدانية الألمانية إحلالًا مع تبديل أعمدة؛ كسرها جورج بانفان عام 1918، ويُروى أنه خسر 15 كيلوغرامًا في المحاولة. ### ShiftRows في AES + في كل جولة من AES تنزلق صفوف الحالة جانبًا — تبديلٌ مهمته الكاملة هي الانتشار: بثّ أثر كل بايت عبر الكتلة كلها. ### لماذا لم ينجح وحده قط -نصٌّ مشفر يحتفظ بحروف الأصل يسلّم مفكّك الشيفرة إيصالًا بتوزيع الحروف؛ وهجمات ترتيب الحروف تنهي المهمة، ولهذا تقرن كل شيفرة قوية نقلَ الحروف بتغييرها. + +النص المشفر الذي يحتفظ بحروف الأصل يكشف لمفكّك الشيفرة عدد مرات كل حرف، ثم تكمل هجمات ترتيب الحروف المهمة، ولهذا تقرن كل شيفرة قوية نقلَ الحروف بتغييرها. diff --git a/content/lessons/cryptography/transposition-ciphers/en.md b/content/lessons/cryptography/transposition-ciphers/en.md index 562661c7..50f84919 100644 --- a/content/lessons/cryptography/transposition-ciphers/en.md +++ b/content/lessons/cryptography/transposition-ciphers/en.md @@ -13,9 +13,9 @@ variables: ## Try it -1. Set rails to 3 and read the bottom rows: the message WE ARE DISCOVERED RUN comes out as WECRU ERDSOEEDN AIVD — the same 18 letters, picked up row by row. +1. Set rails to 3 and read the bottom rows: the message WE ARE DISCOVERED RUN comes out as WECRU ERDSOEERN AIVD — the same 18 letters, picked up row by row. 2. Tap the picture to follow one letter at a time and watch where each one lands: down the rails, bounce, back up, bounce again. -3. Raise rails to 6 and see the zigzag stretch: the pattern now repeats only every 10 letters, and the rows scramble the message even further apart. +3. Raise rails to 6 and see the zigzag stretch: the pattern now repeats only every 10 letters, and the cipher text becomes WV EOE ACR RSEN EIDU DR. ## Real-life examples @@ -25,7 +25,7 @@ variables: ## Test yourself -1. Set the wheel of rails to 3, the classic rail-fence setting. +1. Set rails to 3, the classic rail-fence setting. 2. Now stretch the fence to exactly 5 rails and watch the rows re-form. 3. Move the letter marker forward until it lands on the top rail again — the first letter after a full zigzag. @@ -54,13 +54,17 @@ The serious version is columnar transposition: write the message into a grid und ## Real world ### Scytale of Sparta -Greek commanders wrapped a leather strip around a rod and wrote along it; unwound, the letters sat in zigzag order — a transposition cipher from 2,500 years ago. + +Greek commanders wrapped a leather strip around a rod and wrote along it; unwound, the letters sat in a scrambled order — a transposition cipher from 2,500 years ago. ### ADFGVX in World War I + The German field cipher combined substitution with columnar transposition; Georges Painvin broke it in 1918, reportedly losing 15 kilograms in the effort. ### AES ShiftRows + Every round of AES slides rows of the state sideways — a transposition whose whole job is diffusion, spreading each byte's influence across the block. ### Why it never worked alone + Cipher text that keeps the original letters hands the codebreaker a letter-frequency receipt; anagram attacks finish the job, which is why every strong cipher pairs moving letters with changing them. diff --git a/content/lessons/cryptography/transposition-ciphers/lesson.yaml b/content/lessons/cryptography/transposition-ciphers/lesson.yaml index 0cc2327b..75e04cc3 100644 --- a/content/lessons/cryptography/transposition-ciphers/lesson.yaml +++ b/content/lessons/cryptography/transposition-ciphers/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: beginner equation: T = 2(r - 1) concepts: -- cryptography -- transposition -- permutation -- rail-fence + - cryptography + - transposition + - permutation + - rail-fence prerequisites: -- caesar-cipher + - caesar-cipher related: -- vigenere-cipher -- frequency-analysis -- block-ciphers-and-aes + - vigenere-cipher + - frequency-analysis + - block-ciphers-and-aes visualization: type: transposition-cipher options: @@ -22,19 +22,19 @@ parameters: min: 2 max: 6 step: 1 - value: 3 + value: 4 pos: min: 0 max: 17 step: 1 value: 0 variables: -- r -- T + - r + - T derivation: -- T = 2(r - 1) -- '\text{letter } i \text{ rides the zigzag: down } r \text{ rails, back up, and again}' -- c = \text{row 1, then row 2, } \dots \text{ (the same letters, new places)} + - T = 2(r - 1) + - '\text{letter } i \text{ rides the zigzag: down } r \text{ rails, back up, and again}' + - c = \text{row 1, then row 2, } \dots \text{ (the same letters, new places)} charts: [] primary: rails presets: diff --git a/content/lessons/cryptography/vigenere-cipher/ar.md b/content/lessons/cryptography/vigenere-cipher/ar.md index 426d39d0..e509f66b 100644 --- a/content/lessons/cryptography/vigenere-cipher/ar.md +++ b/content/lessons/cryptography/vigenere-cipher/ar.md @@ -1,5 +1,5 @@ --- -title: 'شيفرة فيجينير: إزاحة لكل حرف' +title: 'شيفرة فيجنير: إزاحة لكل حرف' summary: >- غيّرت إزاحتها مع كل حرف فصمدت ثلاثة قرون أمام كل كاسر. انظر كيف عملت، وكيف سقطت في النهاية. @@ -15,14 +15,14 @@ variables: ## Try it -1. انظر إلى لوحة الكلمة المفتاحية على اليمين. تظهر الكلمة المختارة فوق صف حروف النص الأصلي ATTACK AT DAWN. -2. حرّك المنزلق «kw» بين KEY وLEMON وSUN وCAT. يتغيّر كل حرف في صف النص المشفر بالأسفل، رغم أن الرسالة أعلاه لا تتغيّر أبدًا. -3. حرّك «pos» على طول الرسالة. يتغيّر الحرف الغامق المميَّز من النص الأصلي مع رقم الإزاحة فوقه معًا، حرفًا واحدًا من الكلمة المفتاحية في كل مرة. +1. انظر إلى الجانب الأيمن من الصورة: الرسالة ATTACK AT DAWN في الأعلى، وتحت كل حرف رقم إزاحة صغير، ثم النص المشفر في الأسفل. وتجد الكلمة المفتاحية المختارة في القراءات. +2. اضبط «kw» على 0 (الكلمة KEY) فيصبح النص المشفر KXRKGI KX BKAL. اضبط «kw» على 1 (الكلمة LEMON) فيصبح LXFOPV EF RNHR. أما الرسالة في الأعلى فلا تتغيّر أبدًا. +3. أبقِ «kw» على 1 وحرّك «pos» من 0 إلى 4. ينتقل الحرف المميَّز على الرسالة، ويقرأ الرقم الكبير وسط العجلة +11 ثم +4 ثم +12 ثم +14 ثم +13، وهي الحروف L وE وM وO وN. ## Real-life examples 1. **كلمة مرور قصيرة من 3 أحرف: KEY.** يختار كاتب في القرن التاسع عشر أقصر كلمة مفتاحية ممكنة، ثلاثة أحرف فقط، لإخفاء ATTACK AT DAWN. عند «kw» = 0 تعيد العجلة تكرار K وE وY كل ثلاثة أحرف من الرسالة. -2. **الكلمة المفتاحية LEMON من الكتاب المدرسي.** هذا هو المثال نفسه الذي استخدمه كتاب فيجنير الأصلي. الكلمة LEMON تحوّل ATTACK AT DAWN إلى LXFOPV EF RNHR. اضبط «kw» على 1 وقارن صف النص المشفر بهذه الحروف. +2. **الكلمة المفتاحية LEMON من الكتب المدرسية.** هذا هو المثال الذي تستخدمه أغلب الكتب. الكلمة LEMON تحوّل ATTACK AT DAWN إلى LXFOPV EF RNHR. اضبط «kw» على 1 وقارن صف النص المشفر بهذه الحروف. 3. **عبارة مرور من كلمة واحدة: SUN.** يفضّل موظف تلغراف كلمة سهلة التذكر. عند «kw» = 2 و«pos» = 5، الحرف الثالث من الكلمة المفتاحية، وهو N، هو من يزيح ذلك الحرف من الرسالة. ## Test yourself @@ -33,19 +33,19 @@ variables: ## Intuition -في 1586 اقترح بليز دو فيجنير إخفاء الرسالة خلف إزاحة ليست واحدة بل عدة إزاحات، تتكرر بنمط لا يعرفه سوى طرفي المحادثة. على الشاشة حلقتان من الحروف، إحداهما داخل الأخرى. الحلقة الخارجية لا تتحرك أبدًا، والحلقة الداخلية تدور بمقدار الإزاحة الحالية، الظاهرة في المنتصف كـ«+11» أو «+4». حرّك المنزلق «kw» بين KEY وLEMON وSUN وCAT فتظهر الكلمة المفتاحية فوق الرسالة، وتحريك «pos» يحرّك مؤشرًا عليها، إذ يمنح كل حرف من الكلمة المفتاحية إزاحة جديدة لحرف تالٍ من الرسالة. +في 1586 اقترح بليز دو فيجنير إخفاء الرسالة خلف إزاحة ليست واحدة بل عدة إزاحات، تتكرر بنمط لا يعرفه سوى طرفي المحادثة. على الشاشة حلقتان من الحروف، إحداهما داخل الأخرى. الحلقة الخارجية لا تتحرك أبدًا، والحلقة الداخلية تدور بمقدار الإزاحة الحالية، وتظهر في المنتصف مثل «+11» أو «+4». حرّك المنزلق «kw» بين KEY وLEMON وSUN وCAT فتظهر الكلمة المفتاحية في القراءات. وحين تحرّك «pos» ينتقل التمييز على الرسالة حرفًا حرفًا، وكل حرف من الكلمة المفتاحية يعطي إزاحة جديدة للحرف التالي من الرسالة. -خذ الحرف الأول من ATTACK AT DAWN مع اختيار الكلمة المفتاحية LEMON. الحرف A يقع بعد A بمقدار 0 مكانًا، وأول حرف من الكلمة المفتاحية L يقع بعد A بمقدار 11 مكانًا، فتكون الإزاحة 11 لهذا الحرف فقط. جمعهما يعطي $C = (M + K) \bmod 26 = (0 + 11) \bmod 26 = 11$، والحرف الواقع بعد A بمقدار 11 مكانًا هو L، وهو بالضبط أول حرف يظهر في صف النص المشفر. +خذ الحرف الأول من ATTACK AT DAWN مع اختيار الكلمة المفتاحية LEMON. رقم الحرف A هو 0، وأول حرف من الكلمة المفتاحية، L، يبعد عن A بمقدار 11 خطوة، فتكون الإزاحة 11 لهذا الحرف فقط. جمعهما يعطي $C = (M + K) \bmod 26 = (0 + 11) \bmod 26 = 11$، والحرف الذي يبعد عن A بمقدار 11 خطوة هو L، وهو بالضبط أول حرف يظهر في صف النص المشفر. ## Formal -رقّم الأبجدية بحيث $A = 0, \dots, Z = 25$. لكلمة مفتاحية طولها $L$، تزيح شفرة فيجنير الحرف رقم $i$ من الرسالة بقيمة حرف الكلمة المفتاحية الواقع عند الموضع $i \bmod L$، لتعود إلى بداية الكلمة المفتاحية كل $L$ حرفًا. +رقّم الأبجدية بحيث $A = 0, \dots, Z = 25$. لكلمة مفتاحية طولها $L$، تزيح شيفرة فيجنير الحرف رقم $i$ من الرسالة بقيمة حرف الكلمة المفتاحية الواقع عند الموضع $i \bmod L$، لتعود إلى بداية الكلمة المفتاحية كل $L$ حرفًا. تشفير حرف واحد يتبع دائمًا القاعدة نفسها الظاهرة في العجلة كلها، $C = (M + K) \bmod 26$، إلا أن $K$ تُقرأ من موضع مختلف من الكلمة المفتاحية في كل مرة، بدل أن تبقى ثابتة كما في إزاحة قيصر الواحدة. ## Advanced -ظلت شفرة فيجنير تُعدّ مستعصية على الكسر قرابة ثلاثة قرون، حتى نشر فريدريش كازيسكي هجومًا عمليًا عام 1863. فكرته أن تبحث في النص المشفر عن مقاطع متكررة من ثلاثة أو أربعة أحرف، لأنها غالبًا تنتج من وقوع المقطع نفسه من النص الأصلي على المقطع نفسه من الكلمة المفتاحية مرة أخرى. والمسافات بين هذه التكرارات تشترك في عامل مشترك يساوي طول الكلمة المفتاحية. وبمجرد معرفة هذا الطول، ينقسم النص المشفر إلى أعمدة بعددها، كل عمود مُزاح بحرف ثابت واحد من الكلمة المفتاحية. ويسقط كل عمود أمام تحليل التكرار نفسه الذي يكسر شفرة قيصر البسيطة. +ظلت شيفرة فيجنير تُعدّ مستعصية على الكسر قرابة ثلاثة قرون، حتى نشر فريدريش كازيسكي هجومًا عمليًا عام 1863. فكرته أن تبحث في النص المشفر عن مقاطع متكررة من ثلاثة أو أربعة أحرف، لأنها غالبًا تنتج من وقوع المقطع نفسه من النص الأصلي على المقطع نفسه من الكلمة المفتاحية مرة أخرى. والمسافات بين هذه التكرارات تشترك في عامل مشترك يساوي طول الكلمة المفتاحية. وبمجرد معرفة هذا الطول، ينقسم النص المشفر إلى أعمدة بعددها، كل عمود مُزاح بحرف ثابت واحد من الكلمة المفتاحية. ويسقط كل عمود أمام تحليل التكرار نفسه الذي يكسر شيفرة قيصر البسيطة. ## Derivation @@ -55,14 +55,18 @@ variables: ## Real world -### «الشفرة التي لا تُفَك» -مدة ثلاثة قرون سمّاها الفرنسيون «الشفرة التي لا تُفَك»، وحمت رسائل دبلوماسية وعسكرية في أنحاء أوروبا. +### «الشيفرة التي لا تُفَك» + +مدة ثلاثة قرون سمّاها الفرنسيون «الشيفرة التي لا تُفَك»، وحمت رسائل دبلوماسية وعسكرية في أنحاء أوروبا. ### الحرب الأهلية الأمريكية + حمل ضباط الجنوب أقراص تشفير نحاسية مبنية على الفكرة نفسها، لكن محللي الشمال كسروا كثيرًا من برقياتهم في النهاية. -### تعليم تحليل الشفرات -لأنها تُكسر يدويًا بالصبر، ما زالت شفرة فيجنير من أوائل الشفرات التي يتعلم بها الطلاب تحليل التكرار وطريقة كازيسكي. +### تعليم تحليل الشيفرات + +لأنها تُكسر يدويًا بالصبر، ما زالت شيفرة فيجنير من أوائل الشيفرات التي يتعلم بها الطلاب تحليل التكرار وطريقة كازيسكي. + +### شيفرات المفتاح المتدفق الحديثة -### شفرات المفتاح المتدفق الحديثة -فكرة جمع الرسالة بسلسلة إزاحات متكررة أو مولَّدة لا تزال حية في شفرات التدفق الحديثة، التي تستبدل بالكلمة المفتاحية القصيرة المتكررة سلسلة عشوائية أطول بكثير. +فكرة جمع الرسالة بسلسلة إزاحات متكررة أو مولَّدة لا تزال حية في شيفرات التدفق الحديثة، التي تستبدل بالكلمة المفتاحية القصيرة المتكررة سلسلة عشوائية أطول بكثير. diff --git a/content/lessons/cryptography/vigenere-cipher/en.md b/content/lessons/cryptography/vigenere-cipher/en.md index bffb1068..ef8c705a 100644 --- a/content/lessons/cryptography/vigenere-cipher/en.md +++ b/content/lessons/cryptography/vigenere-cipher/en.md @@ -6,21 +6,21 @@ parameters: pos: letter position variables: - the plaintext letter's number, A = 0 up to Z = 25 - - 'the shift for this letter: the keyword letter''s number at this position' + - "the shift for this letter: the keyword letter's number at this position" - the ciphertext letter's number that results - the remainder after dividing by 26, which wraps Z back around to A --- ## Try it -1. Look at the keyword panel on the right: the chosen keyword sits above the row of plaintext letters ATTACK AT DAWN. -2. Drag the «kw» slider through KEY, LEMON, SUN and CAT. Every ciphertext letter in the bottom row changes, even though the message above it never does. -3. Drag «pos» along the message. The bold, highlighted plaintext letter and the shift number above it change together, one keyword letter at a time. +1. Look at the right side of the picture: the message ATTACK AT DAWN on top, a small shift number under each letter, and the cipher text below. The keyword readout names the chosen keyword. +2. Set «kw» to 0 (KEY): the cipher text reads KXRKGI KX BKAL. Set «kw» to 1 (LEMON): it reads LXFOPV EF RNHR. The message above never changes. +3. Keep «kw» at 1 and move «pos» from 0 to 4. The highlighted letter moves along the message and the big number in the wheel reads +11, +4, +12, +14, +13: the letters L, E, M, O, N. ## Real-life examples 1. **A short 3-letter password, KEY.** A 19th-century clerk picks the shortest workable keyword, just three letters, to hide ATTACK AT DAWN — with «kw» at 0, the wheel repeats K, E, Y every three letters of the message. -2. **The textbook keyword LEMON.** This is the very example Vigenère's own book used: the keyword LEMON turns ATTACK AT DAWN into LXFOPV EF RNHR. Set «kw» to 1 and check the ciphertext row against those letters. +2. **The textbook keyword LEMON.** This is the example most textbooks use: the keyword LEMON turns ATTACK AT DAWN into LXFOPV EF RNHR. Set «kw» to 1 and check the ciphertext row against those letters. 3. **A one-word passphrase, SUN.** A telegraph operator prefers an easy word to remember. With «kw» at 2 and «pos» at 5, the keyword's third letter, N, is the one shifting that letter of the message. ## Test yourself @@ -31,7 +31,7 @@ variables: ## Intuition -In 1586 Blaise de Vigenère proposed hiding a message behind not one shift but several, repeated in a pattern that only the two ends of a conversation know. On screen, two rings of letters sit one inside the other: the outer ring never moves, and the inner ring turns by the current shift amount, shown in the middle as «+11» or «+4». Drag the «kw» slider through KEY, LEMON, SUN and CAT — the keyword appears above the message, and dragging «pos» moves a marker along it, one keyword letter feeding a new shift for every plaintext letter in turn. +In 1586 Blaise de Vigenère proposed hiding a message behind not one shift but several, repeated in a pattern that only the two ends of a conversation know. On screen, two rings of letters sit one inside the other: the outer ring never moves, and the inner ring turns by the current shift amount, shown in the middle as «+11» or «+4». Drag the «kw» slider through KEY, LEMON, SUN and CAT — the keyword appears in the readouts, and dragging «pos» moves the highlight along the message, one keyword letter feeding a new shift for every plaintext letter in turn. Take the very first letter of ATTACK AT DAWN with keyword LEMON selected: the letter A sits 0 places after A, and the keyword's first letter L sits 11 places after A, so the shift is 11 for this letter only. Adding them gives $C = (M + K) \bmod 26 = (0 + 11) \bmod 26 = 11$, and the letter 11 places after A is L — exactly the first letter the ciphertext row shows. @@ -54,13 +54,17 @@ For nearly three centuries the Vigenère cipher was thought unbreakable, until F ## Real world ### "Le chiffre indéchiffrable" + For 300 years French cryptographers called it "the indecipherable cipher," and it protected diplomatic and military messages across Europe. ### The American Civil War + Confederate officers carried brass cipher disks built on the same idea, though Union cryptanalysts eventually read many of their dispatches. ### Teaching cryptanalysis + Because it can be broken by hand with patience, the Vigenère cipher is still one of the first ciphers students use to learn frequency analysis and Kasiski's method. ### Modern key-stream ciphers + The idea of combining a message with a repeating or generated stream of shift values lives on in modern stream ciphers, which replace the short repeated keyword with a much longer pseudorandom one. diff --git a/content/lessons/cryptography/vigenere-cipher/lesson.yaml b/content/lessons/cryptography/vigenere-cipher/lesson.yaml index c2a0c667..28687ff1 100644 --- a/content/lessons/cryptography/vigenere-cipher/lesson.yaml +++ b/content/lessons/cryptography/vigenere-cipher/lesson.yaml @@ -3,57 +3,57 @@ subject: cryptography difficulty: beginner equation: C = (M + K) \bmod 26 concepts: -- vigenere-cipher -- polyalphabetic-cipher -- kasiski-examination -- keyword + - vigenere-cipher + - polyalphabetic-cipher + - kasiski-examination + - keyword prerequisites: -- caesar-cipher -- modular-arithmetic + - caesar-cipher + - modular-arithmetic related: -- frequency-analysis -- xor-and-one-time-pad + - frequency-analysis + - xor-and-one-time-pad visualization: type: cipher-wheel options: text: ATTACK AT DAWN keywords: - - KEY - - LEMON - - SUN - - CAT + - KEY + - LEMON + - SUN + - CAT parameters: kw: min: 0 max: 3 step: 1 - value: 1 + value: 0 pos: min: 0 max: 13 step: 1 value: 0 variables: -- M -- K -- C -- \bmod + - M + - K + - C + - \bmod derivation: -- K = 11 \quad \text{(L is the 12th letter, counting A = 0)} -- C = (M + K) \bmod 26 = (0 + 11) \bmod 26 = 11 -- \text{11 is L, so A becomes L; the keyword then moves to its next letter} + - K = 11 \quad \text{(L is the 12th letter, counting A = 0)} + - C = (M + K) \bmod 26 = (0 + 11) \bmod 26 = 11 + - \text{11 is L, so A becomes L; the keyword then moves to its next letter} charts: [] primary: kw presets: -- kw: 0 - pos: 0 -- kw: 1 - pos: 0 -- kw: 2 - pos: 5 + - kw: 0 + pos: 0 + - kw: 1 + pos: 0 + - kw: 2 + pos: 5 challenges: -- check: kw - target: 1 -- check: pos - target: 13 -- check: kw == 3 and pos == 0 + - check: kw + target: 1 + - check: pos + target: 13 + - check: kw == 3 and pos == 0 diff --git a/content/lessons/cryptography/xor-and-one-time-pad/ar.md b/content/lessons/cryptography/xor-and-one-time-pad/ar.md index 7b1d5827..f5a0cc07 100644 --- a/content/lessons/cryptography/xor-and-one-time-pad/ar.md +++ b/content/lessons/cryptography/xor-and-one-time-pad/ar.md @@ -13,33 +13,33 @@ variables: ## Try it -1. راقب الصف الأصفر من المربعات أعلى الشاشة. كل 8 مربعات تمثل حرفًا واحدًا من HELLO، مكتوبًا كأصفار وآحاد. -2. حرّك المنزلق «key» فيتغيّر الصف الأحمر تمامًا. هذا هو المفتاح العشوائي، بايت كامل لكل حرف. +1. راقب الصف الأزرق من المربعات أعلى الشاشة. كل 8 مربعات تمثل حرفًا واحدًا من HELLO، مكتوبًا بأصفار وآحاد. +2. اضبط المنزلق «key» على 42 ثم على 512، فيتغيّر الصف الأحمر تمامًا. هذا هو المفتاح العشوائي، بايت كامل لكل حرف. وتتغيّر قراءة المفتاح من 0F 79 FF 73 DE إلى 7C 7B B4 65 CD. 3. تابع الصف الأخضر في الأسفل. يكتب HELLO من جديد دائمًا، لأن الجمع بإكس-أور بالمفتاح نفسه مرتين يُلغي أثره تمامًا. ## Real-life examples 1. **دفتر جاسوس في الحرب الباردة.** يحمل جاسوس عام 1960 دفترًا من الأرقام العشوائية، صفحة لكل رسالة، تُحرق فور استخدامها. بمفتاح 42 في صفحة اليوم، تتحول HELLO إلى صف من البايتات لا معنى له لأي شخص لا يملك تلك الصفحة بالذات. -2. **رسالة بنك برقم سري لمرة واحدة.** يطبع البنك رقمًا سريًا جديدًا مخفيًا خلف شفرة عشوائية تُستخدم مرة واحدة ثم تُهمل. ارفع المفتاح إلى 512 وسترى كل بايت في الصف البرتقالي يتغير كليًا عن حالته مع المفتاح 42. +2. **رسالة بنك برقم سري لمرة واحدة.** يطبع البنك رقمًا سريًا جديدًا مخفيًا خلف شيفرة عشوائية تُستخدم مرة واحدة ثم تُهمل. ارفع المفتاح إلى 512 وسترى كل بايت في الصف البرتقالي يتغير كليًا عن حالته مع المفتاح 42. 3. **برقية سفارة في الحرب العالمية الثانية.** كانت السفارات تتقاسم كتبًا سميكة من الأرقام العشوائية، سطرًا جديدًا لكل برقية يُشطب بعد استخدامه. المفتاح 900 يحوّل الكلمة نفسها HELLO إلى نمط ثالث مختلف تمامًا عن النمطين السابقين. ## Test yourself 1. أعد المنزلق «key» إلى 42، القيمة المستخدمة في المثال الأول أعلاه. -2. ارفع «key» إلى 900 أو أكثر، ولاحظ أن الصف البرتقالي (النص المشفر) يبدو مختلفًا تمامًا رغم أن الرسالة الصفراء HELLO لم تتغيّر. +2. ارفع «key» إلى 900 أو أكثر، ولاحظ أن الصف البرتقالي (النص المشفر) يبدو مختلفًا تمامًا رغم أن الرسالة الزرقاء HELLO لم تتغيّر. 3. اخفض «key» إلى أقل من 10. مفتاح بهذا الصغر سيكون من أول عشرة أرقام يجرّبها حاسوب يحاول تخمينه. ## Intuition -تخيّل أنك كتبت HELLO على شريط ورق، ثم رمى صديقك نردًا واختار خمسة أرقام سرية، رقمًا لكل حرف، وأضاف كل رقم إلى شيفرة حرفه. على الشاشة، الصف الأصفر العلوي هو HELLO مكتوبة كخمس مجموعات من 8 مربعات صغيرة، كل مربع صفر أو واحد. حرّك المنزلق «key» فيعيد الصف الأحمر تحته ترتيب بتّاته بالكامل. هذا هو المفتاح السري، بايت عشوائي كامل لكل حرف. الصف البرتقالي تحته هو ما يراه فعلًا من يعترض الرسالة. حرّكه فيتغيّر تمامًا، فيُخفي أي من رسائل كثيرة ممكنة هي الرسالة الحقيقية. +تخيّل أنك كتبت HELLO على شريط ورق، ثم رمى صديقك نردًا واختار خمسة أرقام سرية، رقمًا لكل حرف، وأضاف كل رقم إلى شيفرة حرفه. على الشاشة، الصف الأزرق العلوي هو HELLO مكتوبة في خمس مجموعات من 8 مربعات صغيرة، كل مربع صفر أو واحد. حرّك المنزلق «key» فيعيد الصف الأحمر تحته ترتيب بتّاته بالكامل. هذا هو المفتاح السري، بايت عشوائي كامل لكل حرف. الصف البرتقالي تحته هو ما يراه فعلًا من يعترض الرسالة. حرّكه فيتغيّر تمامًا، فيُخفي أي من رسائل كثيرة ممكنة هي الرسالة الحقيقية. -الصف الأخضر في الأسفل يكتب HELLO من جديد دائمًا، لأن جمع المفتاح نفسه مرتين يُلغي أثره. فك التعمية هو تعمية ثانية بالمفتاح ذاته. تكتب هذه القاعدة بصيغة واحدة هي $C \oplus K = M$. خذ الصف البرتقالي (النص المشفر) واجمعه مرة أخرى بإكس-أور مع الصف الأحمر (المفتاح) فوقه، فتصل من جديد إلى الصف الأصفر (الرسالة) الذي بدأت منه. +الصف الأخضر في الأسفل يكتب HELLO من جديد دائمًا، لأن جمع المفتاح نفسه مرتين يُلغي أثره. فك التشفير هو تشفير ثانٍ بالمفتاح نفسه. تكتب هذه القاعدة بصيغة واحدة هي $C \oplus K = M$. خذ الصف البرتقالي (النص المشفر) واجمعه مرة أخرى بإكس-أور مع الصف الأحمر (المفتاح) فوقه، فتصل من جديد إلى الصف الأزرق (الرسالة) الذي بدأت منه. ## Formal من أجل رسالة $M$ ومفتاح عشوائي $K$ بالطول نفسه، النص المشفر هو $C = M \oplus K$، أي عملية إكس-أور بين كل بتّين متقابلين من الرسالة والمفتاح. -فك التعمية يعكس الخطوة نفسها، إذ $C \oplus K = M$، لأن تكرار إكس-أور على البت نفسه مرتين يعيده كما كان. إن اختير $K$ عشوائيًا تمامًا ولم يُستخدم إلا مرة واحدة، فإن $C$ لا يحمل أي أثر إحصائي من $M$ على الإطلاق، وهذا هو إثبات السرية التامة لمفتاح المرة الواحدة. +فك التشفير يعكس الخطوة نفسها، إذ $C \oplus K = M$، لأن تكرار إكس-أور على البت نفسه مرتين يعيده كما كان. إن اختير $K$ عشوائيًا تمامًا ولم يُستخدم إلا مرة واحدة، فإن $C$ لا يحمل أي أثر إحصائي من $M$ على الإطلاق، وهذا هو إثبات السرية التامة لمفتاح المرة الواحدة. ## Advanced @@ -54,13 +54,17 @@ variables: ## Real world ### تجسس الحرب الباردة -كانت أجهزة الاستخبارات تصدر لوحات ورقية قابلة للتمزيق، وتُحرق كل صفحة فور إرسال رسالة واحدة بها. -### شفرات الميدان العسكرية -لا تزال «محطات الأرقام» تبث سلاسل من الأرقام عبر الراديو قصير الموجة، لتُجمع مع لوحة لا يملكها إلا العميل المستقبِل. +كانت أجهزة الاستخبارات تصدر دفاتر ورقية تُنزع صفحاتها، وتُحرق كل صفحة فور إرسال رسالة واحدة بها. -### شفرات التدفق الحديثة -تولّد شفرات التدفق الحديثة، كتلك المستخدمة في واي فاي والمكالمات الهاتفية، سلسلة مفاتيح عشوائية طويلة وتجمعها بإكس-أور مع البيانات، مضحّية بالعشوائية الكاملة مقابل مفتاح قصير يسهل تبادله. +### شيفرات الميدان العسكرية + +لا تزال «محطات الأرقام» تبث سلاسل من الأرقام عبر الراديو قصير الموجة، لتُجمع مع دفتر لا يملكه إلا العميل المستقبِل. + +### شيفرات التدفق الحديثة + +تولّد شيفرات التدفق الحديثة، كتلك المستخدمة في واي فاي والمكالمات الهاتفية، سلسلة مفاتيح عشوائية طويلة وتجمعها بإكس-أور مع البيانات، مضحّية بالعشوائية الكاملة مقابل مفتاح قصير يسهل تبادله. ### توزيع المفاتيح الكمومي + صُمم توزيع المفاتيح الكمومي خصيصًا لمنح طرفين بعيدين مفتاحًا مشتركًا عشوائيًا تمامًا وجديدًا، وهو بالضبط ما يحتاجه مفتاح المرة الواحدة الحقيقي. diff --git a/content/lessons/cryptography/xor-and-one-time-pad/en.md b/content/lessons/cryptography/xor-and-one-time-pad/en.md index d551c199..097217d6 100644 --- a/content/lessons/cryptography/xor-and-one-time-pad/en.md +++ b/content/lessons/cryptography/xor-and-one-time-pad/en.md @@ -11,8 +11,8 @@ variables: ## Try it -1. Look at the yellow row of boxes at the top: each group of 8 boxes is one letter of HELLO written as bits, 0s and 1s. -2. Drag the slider called «key». The red row of bits changes completely — that is the random key, one byte per letter. +1. Look at the blue row of boxes at the top: each group of 8 boxes is one letter of HELLO written as bits, 0s and 1s. +2. Set the slider called «key» to 42, then to 512. The red row of bits changes completely — that is the random key, one byte per letter. The key readout changes from 0F 79 FF 73 DE to 7C 7B B4 65 CD. 3. Watch the green row at the bottom. It always spells HELLO again, no matter where you leave the slider, because XOR-ing with the same key twice undoes itself. ## Real-life examples @@ -24,14 +24,14 @@ variables: ## Test yourself 1. Slide «key» back to 42, the value used in the first example above. -2. Push «key» to 900 or higher, and notice the orange ciphertext row looks totally different even though the yellow message HELLO never changed. +2. Push «key» to 900 or higher, and notice the orange ciphertext row looks totally different even though the blue message HELLO never changed. 3. Pull «key» below 10. A key that small would be one of the first ten numbers a computer tries when guessing. ## Intuition -Picture writing HELLO on a strip of paper, then a friend rolling dice to pick five secret numbers, one per letter, and adding each number to its letter. On screen the top yellow row is HELLO written out as five groups of 8 tiny boxes, each box a 0 or a 1. Drag the slider called «key» and the red row directly below it reshuffles into a new set of bits — that is the secret key, a full random byte for every letter. The orange row underneath is what someone intercepting the message would actually see: move the slider and it changes completely, hiding which of many possible messages it could be. +Picture writing HELLO on a strip of paper, then a friend rolling dice to pick five secret numbers, one per letter, and adding each number to its letter. On screen the top blue row is HELLO written out as five groups of 8 tiny boxes, each box a 0 or a 1. Drag the slider called «key» and the red row directly below it reshuffles into a new set of bits — that is the secret key, a full random byte for every letter. The orange row underneath is what someone intercepting the message would actually see: move the slider and it changes completely, hiding which of many possible messages it could be. -The green row at the bottom always spells HELLO again, because combining the same key twice cancels it out — decrypting is just encrypting a second time with the same key. Written as one rule it says $C \oplus K = M$: take the orange ciphertext row, combine it once more with the red key row above it, and you land back on the yellow message you started with. +The green row at the bottom always spells HELLO again, because combining the same key twice cancels it out — decrypting is just encrypting a second time with the same key. Written as one rule it says $C \oplus K = M$: take the orange ciphertext row, combine it once more with the red key row above it, and you land back on the blue message you started with. ## Formal @@ -52,13 +52,17 @@ Claude Shannon proved in 1949 that the one-time pad gives perfect secrecy: for e ## Real world ### Cold War spy tradecraft + Intelligence agencies issued physical one-time pads on tear-off paper, destroying each page immediately after a single message was sent. ### Military field ciphers + Numbers stations still broadcast strings of digits over shortwave radio, meant to be combined with a pad only the receiving agent holds. ### Stream ciphers today + Modern stream ciphers such as those inside Wi-Fi and phone calls generate a long pseudorandom key stream and XOR it with the data, trading true randomness for a key short enough to share. ### Quantum key distribution + Quantum key distribution exists specifically to hand two distant parties a fresh, truly random, shared key — exactly what a real one-time pad requires. diff --git a/content/lessons/cryptography/xor-and-one-time-pad/lesson.yaml b/content/lessons/cryptography/xor-and-one-time-pad/lesson.yaml index b106e19d..b807c376 100644 --- a/content/lessons/cryptography/xor-and-one-time-pad/lesson.yaml +++ b/content/lessons/cryptography/xor-and-one-time-pad/lesson.yaml @@ -3,16 +3,16 @@ subject: cryptography difficulty: beginner equation: C = M \oplus K concepts: -- xor -- one-time-pad -- perfect-secrecy -- stream-cipher + - xor + - one-time-pad + - perfect-secrecy + - stream-cipher prerequisites: -- caesar-cipher -- binary-numbers + - caesar-cipher + - binary-numbers related: -- vigenere-cipher -- block-ciphers-and-aes + - vigenere-cipher + - block-ciphers-and-aes visualization: type: xor-cipher options: @@ -22,23 +22,23 @@ parameters: min: 0 max: 999 step: 1 - value: 42 + value: 256 variables: -- M -- K -- C + - M + - K + - C derivation: -- C = M \oplus K -- C \oplus K = M -- \text{if } K \text{ is random and used once, every message is an equally likely explanation of } C + - C = M \oplus K + - C \oplus K = M + - \text{if } K \text{ is random and used once, every message is an equally likely explanation of } C charts: [] primary: key presets: -- key: 42 -- key: 512 -- key: 900 + - key: 42 + - key: 512 + - key: 900 challenges: -- check: key - target: 42 -- check: key >= 900 -- check: key < 10 + - check: key + target: 42 + - check: key >= 900 + - check: key < 10 diff --git a/content/lessons/cryptography/zero-knowledge-proofs/ar.md b/content/lessons/cryptography/zero-knowledge-proofs/ar.md index 5988bd5e..3eaad52c 100644 --- a/content/lessons/cryptography/zero-knowledge-proofs/ar.md +++ b/content/lessons/cryptography/zero-knowledge-proofs/ar.md @@ -13,14 +13,14 @@ variables: ## Try it -1. ومفتاح الادعاء على 0، شغّل بضع جولات: يصيح فيكتور A أو B، فتخرج بيجي من الجهة المطلوبة كل مرة، ويهبط مقياس ثقته نحو اليقين. -2. اقلب مفتاح الادعاء إلى 1: المنتحل خمّن جهة قبل سماع الصيحة، وقائمة الجولات تُظهر ✗ حيث نفد الحظ. -3. ادفع الجولات إلى 20 واقرأ الاحتمالات: ينجو المدّعي من عشرين صيحة مرة واحدة في نحو مليون محاولة. +1. ومفتاح الادعاء على 0، اضبط الجولات على 3: يصيح فيكتور بجهة، فتخرج بيجي من الجهة المطلوبة كل مرة، وتُظهر قراءة «نجاة المدّعي» 1 / 8، ويقول الحكم «اقتنع فيكتور». +2. اقلب مفتاح الادعاء إلى 1: المدّعي خمّن جهة قبل سماع الصيحة، وقائمة الجولات تُظهر ✗ حيث خانه الحظ — ويقول الحكم «انكشف الادعاء في الجولة 2». +3. ادفع الجولات إلى 20 واقرأ الاحتمال، 1 / 1,048,576: ينجو المدّعي من عشرين صيحة مرة واحدة في نحو مليون محاولة. ## Real-life examples - **ثلاث جولات نزيهة.** تجتاز بيجي الثلاث — لكن ثلاث رميات حظ ناجحة تحدث مرة من ثمانٍ، فيواصل فيكتور السؤال. -- **ثلاث جولات ادّعاء.** للمنتحل فرصة 1 من 8 في السجل نفسه؛ والمحاكاة تُظهر عادةً علامة ✗ التي تفضح اللعبة. +- **ثلاث جولات ادّعاء.** للمدّعي فرصة 1 من 8 في السجل نفسه. وفي هذه المحاكاة تظهر علامة ✗ التي تفضحه في الجولة 2. - **عشرون جولة، وانكشاف.** عند 20 جولة تصير احتمالات النجاة 1 من 1048576 — فيكتور على أقصى يقين قد يحتاجه، وما رأى كلمة السر بعد. ## Test yourself @@ -39,28 +39,32 @@ variables: يجب أن يحقق برهان انعدام المعرفة ثلاث خصائص. التمام: المثبِت النزيه يقنع المتحقق في كل مرة. والسلامة: المثبِت الذي لا يملك السر لا ينجو من $n$ جولة إلا باحتمال $q = \left(\frac{1}{2}\right)^{n}$، وهو ما يستطيع المتحقق دفعه إلى أي انخفاض يشاء. وانعدام المعرفة: كل ما يراه المتحقق من التبادل كان يمكن توليده دونما مثبِت أصلًا، فلا يحمل السجل معرفة تتجاوز الحقيقة الوحيدة المبرهَنة. -الكهف حكاية شعبية، أما الإنشاءات الحقيقية فملموسة: عرّف غولدواسر وميكالي وراكوف المفهوم عام 1985، وتوجد بروتوكولات لأي عبارة يمكن فحصها بكفاءة — معرفة لوغاريتم متقطع، أو حيازة اعتماد صالح، أو امتلاك حل لأحجية — دائمًا بالشكل نفسه: تحدٍّ، فاستجابة، فتكرار. +الكهف حكاية للتوضيح، أما البروتوكولات الحقيقية فمحددة بدقة: عرّف غولدواسر وميكالي وراكوف المفهوم عام 1985، وتوجد بروتوكولات لأي عبارة يمكن فحصها بكفاءة — معرفة لوغاريتم متقطع، أو حيازة اعتماد صالح، أو امتلاك حل لأحجية — دائمًا بالشكل نفسه: تحدٍّ، فاستجابة، فتكرار. ## Advanced -تحوّلان حديثان صيّرا معروضة القاعة هذه بنيةً تحتية. تحويلة فيات–شامير تستبدل بتحديات المتحقق الحيّة تجزئاتِ المحادثة حتى لحظتها، فتحوّل البرهان التفاعلي رسالة واحدة — هكذا تُبنى فعلًا عدة مخططات توقيع. والبراهين الوجيزة، zk-SNARKs وzk-STARKs، تضغط التحقق من حساب هائل في برهان من بضع مئات البايتات: تستخدمها سلاسل الكتل ليثبت طرف أن «كل الألف معاملة في هذه الكتلة صحيحة» — أو «عمري فوق 18» أو «هذا البنك مليء» — دون إظهار أي شيء آخر. +تطوّران حديثان نقلا هذه الفكرة من قاعة المتحف إلى أنظمة نستخدمها كل يوم. تحويلة فيات–شامير تستبدل بتحديات المتحقق الحيّة تجزئاتِ المحادثة حتى لحظتها، فتحوّل البرهان التفاعلي رسالة واحدة — هكذا تُبنى فعلًا عدة مخططات توقيع. والبراهين الوجيزة، zk-SNARKs وzk-STARKs، تضغط التحقق من حساب هائل في برهان من بضع مئات البايتات: تستخدمها سلاسل الكتل ليثبت طرف أن «كل الألف معاملة في هذه الكتلة صحيحة» — أو «عمري فوق 18» أو «هذا البنك يملك ما يكفي لسداد ديونه» — دون إظهار أي شيء آخر. ## Derivation 1. كل جولة تحدٍّ عادل: المدّعي لا يجتازه إلا إذا كان قد خمّن عملة المتحقق. 2. الجولات مستقلة، فينشطر حظّ المدّعي في النجاة نصفين مع كل مرة. -3. عشرون جولة تدفع الاحتمالات إلى ما بعد واحد في المليون، بينما يبقى ما يراه المتحقق قابلًا للتمثيل — يقينٌ بلا إفشاء. +3. عشرون جولة تدفع الاحتمالات إلى ما بعد واحد في المليون، بينما يبقى كل ما يراه المتحقق شيئًا كان يستطيع تمثيله وحده — يقينٌ بلا إفشاء. ## Real world ### المعاملات الخاصة + تستخدم Zcash وأشباهها براهين zk-SNARK لإثبات أن الدفعة متوازنة — لا عملات خُلقت ولا أُنفقت مرتين — مع إخفاء المرسل والمستقبل والمبلغ. ### إثبات العمر دون بطاقة هوية + تتيح أنظمة الهوية الرقمية للهاتف أن يثبت «فوق 18» أو «مرخَّص بالقيادة» لمتحقق لا يتعلم شيئًا آخر مما في الوثيقة. ### تجميعات سلاسل الكتل + تحزم شبكات الطبقة الثانية آلاف المعاملات خارج السلسلة وتنشر برهانًا وجيزًا واحدًا بصحتها جميعًا، فتتضاعف السعة دون الوثوق بالمشغّل. -### استيثاق بلا كلمات سر على السلك +### تسجيل دخول بلا كلمات سر على السلك + بروتوكولات التعريف عديمة المعرفة تتيح للجهاز إثبات حيازته مفتاحًا دون أن يعبر السلكَ المفتاحُ أو أي مشتق منه — فلا شيء يلتقطه متنصت ليعيد تشغيله. diff --git a/content/lessons/cryptography/zero-knowledge-proofs/en.md b/content/lessons/cryptography/zero-knowledge-proofs/en.md index 9fa978d3..b2d28283 100644 --- a/content/lessons/cryptography/zero-knowledge-proofs/en.md +++ b/content/lessons/cryptography/zero-knowledge-proofs/en.md @@ -14,14 +14,14 @@ variables: ## Try it -1. With the bluff switch at 0, run a few rounds: Victor shouts A or B, Peggy walks out of the demanded side every time, and his confidence meter sinks toward certainty. -2. Flip the bluff switch to 1: the impostor guessed a side before hearing the shout, and the round list shows the ✗ where the luck ran out. -3. Push rounds to 20 and read the odds: a bluffer survives all twenty shouts once in about a million attempts. +1. With the bluff switch at 0, set rounds to 3: Victor shouts a side, Peggy walks out of the demanded side every time, the "bluffing survives" readout shows 1 / 8, and the verdict reads "Victor is convinced". +2. Flip the bluff switch to 1: the impostor guessed a side before hearing the shout, and the round list shows the ✗ where the luck ran out — the verdict reads "caught bluffing in round 2". +3. Push rounds to 20 and read the odds, 1 / 1,048,576: a bluffer survives all twenty shouts once in about a million attempts. ## Real-life examples - **Three honest rounds.** Peggy passes all three — but three lucky coin flips happen one time in eight, so Victor keeps asking. -- **Three rounds of bluffing.** An impostor has a 1-in-8 chance of the same record; the simulation usually shows the ✗ that gives the game away. +- **Three rounds of bluffing.** An impostor has a 1-in-8 chance of the same record; in this simulation the ✗ that gives the game away appears in round 2. - **Twenty rounds, caught.** At 20 rounds the survival odds are 1 in 1,048,576 — Victor is as sure as he would ever need to be, and still has not seen the password. ## Test yourself @@ -55,13 +55,17 @@ Two modern turns made this hall exhibit into infrastructure. The Fiat–Shamir t ## Real world ### Private transactions + Zcash and similar cryptocurrencies use zk-SNARKs to prove a payment balances — no coins created, none double-spent — while hiding sender, receiver and amount. ### Proving age without an ID card + Digital identity schemes let a phone prove "over 18" or "licensed to drive" to a verifier that learns nothing else on the document. ### Blockchain rollups + Layer-2 networks batch thousands of transactions off-chain and post one succinct proof that all of them were valid, multiplying throughput without trusting the operator. ### Authentication without passwords-in-flight + Zero-knowledge identification protocols let a device prove it holds a key without the key or anything derived from it crossing the wire — nothing for an eavesdropper to replay. diff --git a/content/lessons/cryptography/zero-knowledge-proofs/lesson.yaml b/content/lessons/cryptography/zero-knowledge-proofs/lesson.yaml index bdf5a811..17e99f53 100644 --- a/content/lessons/cryptography/zero-knowledge-proofs/lesson.yaml +++ b/content/lessons/cryptography/zero-knowledge-proofs/lesson.yaml @@ -3,15 +3,15 @@ subject: cryptography difficulty: university equation: q = \left(\frac{1}{2}\right)^{n} concepts: -- zero-knowledge -- interactive-proof -- soundness -- privacy + - zero-knowledge + - interactive-proof + - soundness + - privacy prerequisites: -- one-way-functions + - one-way-functions related: -- digital-signatures -- hash-functions + - digital-signatures + - hash-functions visualization: type: zero-knowledge options: {} @@ -27,12 +27,12 @@ parameters: step: 1 value: 0 variables: -- q -- n + - q + - n derivation: -- \text{a bluffer survives one round with probability } \frac{1}{2} -- q = \left(\frac{1}{2}\right)^{n} \text{ after } n \text{ independent rounds} -- n = 20 \Rightarrow q = \frac{1}{1048576}, \text{ and the verifier still learns nothing} + - \text{a bluffer survives one round with probability } \frac{1}{2} + - q = \left(\frac{1}{2}\right)^{n} \text{ after } n \text{ independent rounds} + - n = 20 \Rightarrow q = \frac{1}{1048576}, \text{ and the verifier still learns nothing} charts: [] primary: rounds presets: diff --git a/content/lessons/data/bits-bytes-and-data-sizes/ar.md b/content/lessons/data/bits-bytes-and-data-sizes/ar.md index 6eb79b97..282957a1 100644 --- a/content/lessons/data/bits-bytes-and-data-sizes/ar.md +++ b/content/lessons/data/bits-bytes-and-data-sizes/ar.md @@ -11,15 +11,15 @@ variables: ## Try it -1. اسحب المنزلق المكتوب عليه e إلى أقصى اليسار، عند 0. يصبح الشريط الآن بايتًا واحدًا، أي حرفًا واحدًا تقريبًا. -2. حرّك المنزلق إلى قرابة 6. راقب الكلمة فوق الشريط وهي تقفز من بايت إلى كيلوبايت إلى ميجابايت مع نمو الشريط. -3. ادفع المنزلق فوق 20. يمثّل الشريط الآن بيانات أكثر من كل حاسوب امتلكته في حياتك مجتمعة. +1. اسحب المنزلق المكتوب عليه e إلى 0. تعرض خانة «مكتوبًا بالكامل» القيمة 1 B، أي بايتًا واحدًا، وأقرب مثال هو حرف واحد. +2. ارفع المنزلق ببطء إلى 6. تمرّ القراءة على 1 KB عند e = 3 وتصل إلى 1 MB عند e = 6، ويصبح أقرب مثال صورة من الهاتف. +3. ادفع المنزلق إلى 21. تعرض القراءة 1 ZB، وهذه بيانات أكثر بكثير مما في كل الحواسيب التي امتلكتها في حياتك مجتمعة. ## Real-life examples 1. **حرف واحد.** كتابة حرف واحد تكلّف حاسوبك بايتًا واحدًا تقريبًا، فيكون e عند 0. 2. **صورة من الجوال.** صورة عادية من الجوال حجمها بضعة ميجابايتات، فيكون e قرابة 6.6، أي نحو 4,000,000 بايت. -3. **بيانات العالم كله في سنة.** يسجّل البشر كل فيديو ورسالة وقراءة حسّاس في سنة واحدة. يصل مجموع هذه البايتات إلى رقم 1 وبعده 21 صفرًا تقريبًا، فيقترب e من 22. +3. **بيانات العالم كله في سنة.** يسجّل البشر كل فيديو ورسالة وقراءة حسّاس في سنة واحدة. يزيد مجموع هذه البايتات كثيرًا على رقم 1 وبعده 21 صفرًا، فيصعد e إلى آخر المنزلق، قريبًا من 22. ## Test yourself @@ -29,9 +29,9 @@ variables: ## Intuition -اكتب حرفًا واحدًا، يخزّنه حاسوبك في بايت واحد تقريبًا. اكتب رواية كاملة، يخزّنها في ملايين البايتات. حرّك المنزلق e وراقب الشريط ينمو. e يَعُدّ كم مرة ضربنا العشرة في نفسها، فيكون عدد البايتات N مساويًا لـ $10^e$ بايت. ارفع e بمقدار 1 فقط ويتضاعف N عشر مرات، ولهذا يقفز الشريط بسرعة كبيرة بعد أن يتجاوز e الرقم 10. +اكتب حرفًا واحدًا، يخزّنه حاسوبك في بايت واحد تقريبًا. اكتب رواية كاملة، يخزّنها في ملايين البايتات. حرّك المنزلق e وراقب عدد البايتات يكبر. e يَعُدّ كم مرة ضربنا العشرة في نفسها، فيكون عدد البايتات N مساويًا لـ $10^e$ بايت. ارفع e بمقدار 1 فقط فيصبح N عشرة أضعاف ما كان، ولهذا يصير العدد هائلًا بسرعة بعد أن يتجاوز e الرقم 10. -كل مرة يرتفع فيها e بمقدار 3، يدخل الشريط اسمًا جديدًا مثل بايت وكيلوبايت وميجابايت وجيجابايت وتيرابايت، وهكذا. حتى إن خدمات سحابية مثل BigQuery تحاسبك على عدد هذه البايتات التي يقرؤها استعلامك، فكلما ارتفع الشريط زادت تكلفة الاستعلام الواحد. +كل مرة يرتفع فيها e بمقدار 3، يأخذ الحجم اسمًا جديدًا: بايت وكيلوبايت وميجابايت وجيجابايت وتيرابايت، وهكذا. حتى إن خدمات سحابية مثل BigQuery تحاسبك على عدد هذه البايتات التي يقرؤها استعلامك، فكلما كبر العدد زادت تكلفة الاستعلام الواحد. ## Formal @@ -52,13 +52,17 @@ variables: ## Real world ### الصور والفيديو + تبلغ صور الجوال بضعة ميجابايتات لكل صورة. الفيديو أكبر من ذلك بكثير، ولهذا ينفد تخزين الجوال أو الحاسوب بسرعة. ### علم الجينوم -تفرز عملية تحليل جينوم إنسان واحد نحو مئة جيجابايت من البيانات الخام، وتحتفظ المستشفيات الآن بهذا لآلاف المرضى. + +ينتج عن قراءة جينوم إنسان واحد نحو مئة جيجابايت من البيانات الخام، وتحتفظ المستشفيات الآن بهذا لآلاف المرضى. ### التخزين السحابي وBigQuery + تخزّن خدمات مثل BigQuery من جوجل جداولك في السحابة. تحاسبك جزئيًا على عدد البايتات التي يقرؤها استعلامك، فلحجم بياناتك بالبايت تكلفة حقيقية. ### مكتبات البث + تصل مكتبة بث كبيرة من الأفلام والمسلسلات إلى مستوى البيتابايت، أي e قرابة 15. وتتوزع بياناتها على آلاف الأجهزة. diff --git a/content/lessons/data/bits-bytes-and-data-sizes/en.md b/content/lessons/data/bits-bytes-and-data-sizes/en.md index 38cbdf90..339b9ccb 100644 --- a/content/lessons/data/bits-bytes-and-data-sizes/en.md +++ b/content/lessons/data/bits-bytes-and-data-sizes/en.md @@ -10,15 +10,15 @@ variables: ## Try it -1. Drag the slider labeled e all the way to 0. The bar now shows a single byte, about one letter of text. -2. Move the slider to about 6. Watch the label above the bar jump from byte to kilobyte to megabyte as it grows. -3. Push the slider past 20. The bar now stands for more data than every computer you have ever owned put together. +1. Drag the slider labeled e all the way to 0. The "written out" readout shows 1 B, a single byte, and the closest example is one letter. +2. Move the slider slowly up to 6. The readout passes 1 KB at e = 3 and reaches 1 MB at e = 6, and the closest example becomes a phone photo. +3. Push the slider to 21. The readout shows 1 ZB, far more data than every computer you have ever owned put together. ## Real-life examples 1. **A single letter.** One typed character costs about one byte to store, so e sits at 0. 2. **A phone photo.** A typical phone photo is a few megabytes, so e sits around 6.6, about 4,000,000 bytes. -3. **All the world's data in a year.** Every video, message and sensor reading humanity records in a year adds up to roughly a 1 followed by 21 zeros in bytes, so e climbs close to 22. +3. **All the world's data in a year.** Every video, message and sensor reading humanity records in a year adds up to well over a 1 followed by 21 zeros in bytes, so e climbs to the top of the slider, close to 22. ## Test yourself @@ -28,9 +28,9 @@ variables: ## Intuition -Type a single letter and your computer stores about one byte. Type a whole novel and it stores a few million bytes. Drag the slider labeled e and watch the bar grow: e counts how many tens are multiplied together, so the number of bytes N works out to $10^e$ bytes in total. Raise e by just 1 and N grows tenfold, which is why the bar shoots up so fast once e passes 10. +Type a single letter and your computer stores about one byte. Type a whole novel and it stores a few million bytes. Drag the slider labeled e and watch the number of bytes grow: e counts how many tens are multiplied together, so the number of bytes N works out to $10^e$ bytes in total. Raise e by just 1 and N grows tenfold, which is why the number becomes huge so fast once e passes 10. -Every time e climbs by 3, the bar crosses into a new named size: byte, kilobyte, megabyte, gigabyte, terabyte, and on. Cloud services such as BigQuery even charge you by how many of these bytes a query scans, so the higher the bar climbs, the more a single query can cost. +Every time e climbs by 3, the size gets a new name: byte, kilobyte, megabyte, gigabyte, terabyte, and on. Cloud services such as BigQuery even charge you by how many of these bytes a query scans, so the bigger the number, the more a single query can cost. ## Formal @@ -51,13 +51,17 @@ Computers often measure memory in powers of two, 1024 bytes to a kibibyte, while ## Real world ### Photos and video + Phone photos run a few megabytes each and video is far larger, which is why a phone or laptop can run out of storage so quickly. ### Genomics + Sequencing one human genome produces on the order of a hundred gigabytes of raw data, and hospitals now keep this for thousands of patients. ### Cloud storage and BigQuery + Services such as Google's BigQuery store your tables in the cloud and bill you partly by how many bytes your queries scan, so the size of your data in bytes has a real cost attached to it. ### Streaming libraries + A large streaming catalogue of movies and shows can reach into the petabytes, e around 15, spread across thousands of machines. diff --git a/content/lessons/data/bits-bytes-and-data-sizes/lesson.yaml b/content/lessons/data/bits-bytes-and-data-sizes/lesson.yaml index 67d80817..dc5e08e4 100644 --- a/content/lessons/data/bits-bytes-and-data-sizes/lesson.yaml +++ b/content/lessons/data/bits-bytes-and-data-sizes/lesson.yaml @@ -3,16 +3,16 @@ subject: data difficulty: beginner equation: N = 10^e concepts: -- bits and bytes -- orders of magnitude -- data storage -- scientific notation + - bits and bytes + - orders of magnitude + - data storage + - scientific notation prerequisites: -- binary-numbers + - binary-numbers related: -- logarithms -- powers-of-ten -- big-number-names + - logarithms + - powers-of-ten + - big-number-names visualization: type: powers-of-ten options: @@ -23,21 +23,21 @@ parameters: min: 0 max: 22 step: 0.1 - value: 6 + value: 3 variables: -- e -- N + - e + - N derivation: -- N = 10^e -- e = \log_{10} N -- 10^{e+3} = 1000 \cdot 10^e + - N = 10^e + - e = \log_{10} N + - 10^{e+3} = 1000 \cdot 10^e presets: -- e: 0 -- e: 6.6 -- e: 21.9 + - e: 0 + - e: 6.6 + - e: 21.9 challenges: -- check: e - target: 9 -- check: 10^e - target: 1000000 -- check: e >= 20 + - check: e + target: 9 + - check: 10^e + target: 1000000 + - check: e >= 20 diff --git a/content/lessons/data/column-storage-and-bigquery/ar.md b/content/lessons/data/column-storage-and-bigquery/ar.md index e09658c7..769028a5 100644 --- a/content/lessons/data/column-storage-and-bigquery/ar.md +++ b/content/lessons/data/column-storage-and-bigquery/ar.md @@ -12,54 +12,58 @@ variables: ## Try it -1. اجعل cols يساوي 1. يضيء الجدول عمود amount فقط، وبايتات هذا العمود وحده تُحسب على الاستعلام. -2. ارفع cols إلى 2. يضيء عمود product أيضًا، وتكبر البايتات المقروءة لتطابق ذلك. -3. ادفع cols إلى 3. يقرأ الاستعلام كل الأعمدة، city وproduct وamount، تمامًا كما لو كتبت SELECT *. +1. اجعل cols يساوي 1. يضيء في الجدول عمود المبلغ (amount) فقط. تعرض القراءات: التخزين بالصفوف يقرأ 24 GB، والتخزين بالأعمدة يقرأ 8 GB، والبيانات المقروءة أقل بنسبة 67 %. +2. ارفع cols إلى 2. يضيء عمود المدينة (city) أيضًا. يقرأ التخزين بالأعمدة الآن 16 GB، وتنزل نسبة التوفير إلى 33 %. +3. ادفع cols إلى 3. يقرأ الاستعلام كل الأعمدة، amount وcity وproduct، تمامًا كما لو كتبت SELECT *. يقرأ النوعان 24 GB، فتصبح نسبة التوفير 0 %. ## Real-life examples 1. **المجموع فقط.** cols عند 1، أي استعلام يحتاج SUM(amount) فقط، يقرأ عمودًا واحدًا. -2. **المنتج والمبلغ.** cols عند 2، أي تقرير عن الإيراد لكل منتج، يقرأ عمودين. +2. **المدينة والمبلغ.** cols عند 2، أي تقرير عن الإيراد لكل مدينة، يقرأ عمودين. 3. **كل شيء.** cols عند 3، أي SELECT *، يقرأ كل أعمدة الجدول، city وproduct وamount. ## Test yourself -1. اجعل cols بحيث يُقرأ عمود واحد فقط. -2. اجعل cols بحيث تُقرأ كل الأعمدة. -3. اجعل cols يساوي 2 بالضبط. +1. أنزل cols حتى يقرأ التخزين بالأعمدة أقل مما يقرؤه التخزين بالصفوف. +2. اضبط cols حتى تعرض خانة «بيانات أقل بنسبة» القيمة 67 %. +3. اضبط cols حتى يقرأ التخزين بالأعمدة 16 GB بالضبط. ## Intuition -تخيّل جدولًا فيه مليار طلب، كل صف فيه مدينة ومنتج ومبلغ. حرّك cols من 1 إلى 3 وراقب أي أعمدة الجدول تضيء. عند أدنى قيمة يقرأ الاستعلام amount فقط، وعند أعلى قيمة يقرأ الأعمدة الثلاثة كلها. يحفظ التخزين العمودي city وproduct وamount في ثلاثة ملفات منفصلة على القرص، فيفتح الاستعلام فقط الأعمدة التي يحتاجها فعلًا، تاركًا بقية الجدول دون لمس. +تخيّل جدولًا فيه مليار طلب، كل صف فيه مدينة ومنتج ومبلغ. حرّك cols من 1 إلى 3 وراقب أي أعمدة الجدول تضيء. عند أدنى قيمة يقرأ الاستعلام amount فقط، وعند أعلى قيمة يقرأ الأعمدة الثلاثة كلها. يحفظ التخزين العمودي city وproduct وamount في ثلاثة ملفات منفصلة على القرص، فيفتح الاستعلام الأعمدة التي يحتاجها فقط، ولا يلمس بقية الجدول. يهم هذا لأن BigQuery، والمستودعات المشابهة له، تحاسبك على عدد البايتات المقروءة. قراءة عمود واحد من جدول فيه مليار صف بدل الأعمدة الثلاثة قد تخفّض البايتات المقروءة، والفاتورة، إلى نحو الثلث. كلما قلّت الأعمدة في قائمة SELECT، صار الاستعلام أرخص وأسرع. ## Formal -يخزّن الجدول ذو التوجه الصفّي كل أعمدة الصف معًا، فقراءة عمود واحد تعني قراءة أعمدة الصف كلها وعددها k، أي $B = k \cdot 10^9$ بايت لمليار صف بها k عمودًا لكل صف. أما الجدول ذو التوجه العمودي فيخزّن كل عمود بمفرده، فالاستعلام الذي يذكر c عمودًا يقرأ فقط $B = c \cdot 10^9$ بايت. +يخزّن الجدول المحفوظ صفًّا صفًّا كل أعمدة الصف معًا، فقراءة عمود واحد تعني قراءة أعمدة الصف كلها وعددها k، أي $B = k \cdot 10^9$ بايت لمليار صف في كل صف منها k عمودًا، إذا كانت كل قيمة تأخذ بايتًا واحدًا (الرسم يحسب 8 بايتات لكل قيمة، فقراءاته أكبر بثماني مرات). أما الجدول المحفوظ عمودًا عمودًا فيخزّن كل عمود بمفرده، فالاستعلام الذي يذكر c عمودًا يقرأ فقط $B = c \cdot 10^9$ بايت. بما أن الاستعلام يحتاج غالبًا أعمدة أقل مما يملكه الجدول، فإن $c < k$ في الواقع العملي، ويقرأ التخزين العمودي بايتات أقل من التخزين الصفّي للاستعلام نفسه دائمًا. يكبر هذا التوفير كلما اتسع الجدول وقلّت الأعمدة التي يذكرها الاستعلام. ## Advanced -تخزين عمود بمفرده يضغط أيضًا بشكل أفضل بكثير من خلط الأنواع صفًا بصف، لأن عمود المدن أو عمود المبالغ يميل لتكرار قيم متشابهة. يجمع BigQuery هذا التخزين العمودي مع التقسيم (partitioning) والتجميع (clustering) لتجاوز بايتات أكثر حتى قبل تشغيل الاستعلام. +تخزين عمود بمفرده يضغط أيضًا بشكل أفضل بكثير من خلط الأنواع صفًا بصف، لأن عمود المدن أو عمود المبالغ يميل لتكرار قيم متشابهة. يجمع BigQuery هذا التخزين العمودي مع التقسيم (partitioning) والتجميع (clustering) ليتخطّى بايتات أكثر حتى قبل تشغيل الاستعلام. ## Derivation -1. في التخزين الصفّي لا يزال على الاستعلام أن يسحب كل الأعمدة الـk مع العمود الذي يريده، فيقرأ B يساوي k مضروبًا في مليار بايت. +1. في التخزين الصفّي يضطر الاستعلام إلى سحب كل الأعمدة الـk مع العمود الذي يريده، فيقرأ B يساوي k مضروبًا في مليار بايت. 2. في التخزين العمودي يفتح الاستعلام فقط الأعمدة الـc التي يذكرها فعلًا، فيقرأ B يساوي c مضروبًا في مليار بايت بدلًا من ذلك. 3. بما أن c أصغر من k عادة، فذكر أعمدة أقل في SELECT يعني دائمًا بايتات أقل مقروءة، وفاتورة أصغر. ## Real world ### تسعير BigQuery + يحاسب تسعير BigQuery حسب الطلب على كل بايت مقروء. كتابة SELECT city, amount بدل SELECT * قد تخفّض الفاتورة بشكل كبير. ### مستودعات البيانات -تخزّن Snowflake وRedshift وBigQuery البيانات عمودًا عمودًا للسبب نفسه. تلمس معظم استعلامات التحليل حفنة أعمدة من عشرات. + +تخزّن Snowflake وRedshift وBigQuery البيانات عمودًا عمودًا للسبب نفسه. فمعظم استعلامات التحليل تحتاج أعمدة قليلة من بين عشرات. ### لوحات التحليل + لوحة تتحدّث كل ساعة تقرأ عادة الأعمدة القليلة نفسها مرارًا، فيبقيها التخزين العمودي سريعة ورخيصة. -### أنابيب تعلّم الآلة -لا تحتاج مهمة تدريب غالبًا سوى حفنة أعمدة من جدول فيه مئات الأعمدة. يتيح التخزين العمودي تجاوز البقية كليًا. +### تدريب نماذج تعلّم الآلة + +لا تحتاج مهمة التدريب غالبًا إلا أعمدة قليلة من جدول فيه مئات الأعمدة. يتيح التخزين العمودي ترك البقية دون قراءتها. diff --git a/content/lessons/data/column-storage-and-bigquery/en.md b/content/lessons/data/column-storage-and-bigquery/en.md index 766bf5de..f5e48b63 100644 --- a/content/lessons/data/column-storage-and-bigquery/en.md +++ b/content/lessons/data/column-storage-and-bigquery/en.md @@ -11,21 +11,21 @@ variables: ## Try it -1. Set cols to 1. The table highlights only the amount column, and only that column's bytes count toward the query. -2. Raise cols to 2. The product column lights up too, and the bytes scanned grow to match. -3. Push cols to 3. Every column, city, product and amount, is read, exactly like SELECT *. +1. Set cols to 1. The table highlights only the amount column. The readouts show row storage reads 24 GB, column storage reads 8 GB, and less data read is 67 %. +2. Raise cols to 2. The city column lights up too. Column storage now reads 16 GB, and less data read drops to 33 %. +3. Push cols to 3. Every column, amount, city and product, is read, exactly like SELECT *. Both kinds of storage read 24 GB, so less data read is 0 %. ## Real-life examples 1. **Just the total.** cols at 1: a query that only needs SUM(amount) reads a single column. -2. **Product and amount.** cols at 2: a report on revenue per product reads two columns. +2. **City and amount.** cols at 2: a report on revenue per city reads two columns. 3. **Everything.** cols at 3: SELECT * reads every column in the table, city, product and amount. ## Test yourself -1. Set cols so that only one column is read. -2. Set cols so that every column is read. -3. Set cols to exactly 2. +1. Lower cols until column storage reads less than row storage. +2. Set cols so that the "less data read" readout shows 67 %. +3. Set cols so that column storage reads exactly 16 GB. ## Intuition @@ -35,7 +35,7 @@ This matters because BigQuery, and warehouses like it, charge you by the number ## Formal -A row-oriented table stores every column of a row together, so reading any single column still means reading all k columns of every row: $B = k \cdot 10^9$ bytes for a billion rows with k columns each. A column-oriented table instead stores each column on its own, so a query that names c columns only scans $B = c \cdot 10^9$ bytes. +A row-oriented table stores every column of a row together, so reading any single column still means reading all k columns of every row: $B = k \cdot 10^9$ bytes for a billion rows with k columns each, if every value takes one byte (the picture counts 8 bytes per value, so its readings are 8 times larger). A column-oriented table instead stores each column on its own, so a query that names c columns only scans $B = c \cdot 10^9$ bytes. Since a query almost always needs fewer columns than the table has, $c < k$ in practice, and a column store scans strictly fewer bytes than a row store for the same query — the saving grows with how wide the table is and how few columns the query actually names. @@ -52,13 +52,17 @@ Storing a column on its own also compresses far better than mixing types row by ## Real world ### BigQuery pricing + BigQuery's on-demand pricing charges per byte scanned, so writing SELECT city, amount instead of SELECT * can cut a bill dramatically. ### Data warehouses + Snowflake, Redshift and BigQuery all store data by column for the same reason: most analytics queries touch a handful of columns out of dozens. ### Analytics dashboards + A dashboard that refreshes every hour usually reads the same few columns repeatedly, so column storage keeps it fast and cheap. ### Machine learning pipelines + A training job often needs only a handful of feature columns out of a table with hundreds, so column storage lets it skip the rest entirely. diff --git a/content/lessons/data/column-storage-and-bigquery/lesson.yaml b/content/lessons/data/column-storage-and-bigquery/lesson.yaml index 014d36b1..3049657f 100644 --- a/content/lessons/data/column-storage-and-bigquery/lesson.yaml +++ b/content/lessons/data/column-storage-and-bigquery/lesson.yaml @@ -3,15 +3,15 @@ subject: data difficulty: beginner equation: B = c \cdot 10^9 concepts: -- column-oriented storage -- BigQuery -- bytes scanned -- query cost + - column-oriented storage + - BigQuery + - bytes scanned + - query cost prerequisites: -- tables-and-filtering -- bits-bytes-and-data-sizes + - tables-and-filtering + - bits-bytes-and-data-sizes related: -- grouping-and-totals + - grouping-and-totals visualization: type: query-table options: @@ -22,22 +22,21 @@ parameters: min: 1 max: 3 step: 1 - value: 1 + value: 3 variables: -- B -- c -- k + - B + - c + - k derivation: -- \text{row store, read every column} \Rightarrow B = k \cdot 10^9 -- \text{column store, read only the columns you SELECT} \Rightarrow B = c \cdot 10^9 -- c < k \Rightarrow \text{fewer bytes scanned, smaller bill} + - \text{row store, read every column} \Rightarrow B = k \cdot 10^9 + - \text{column store, read only the columns you SELECT} \Rightarrow B = c \cdot 10^9 + - c < k \Rightarrow \text{fewer bytes scanned, smaller bill} presets: -- cols: 1 -- cols: 2 -- cols: 3 + - cols: 1 + - cols: 2 + - cols: 3 challenges: -- check: cols - target: 1 -- check: cols - target: 3 -- check: cols == 2 + - check: cols < 3 + - check: cols + target: 1 + - check: cols == 2 diff --git a/content/lessons/data/compression-and-entropy/ar.md b/content/lessons/data/compression-and-entropy/ar.md index 181408b6..be6ef366 100644 --- a/content/lessons/data/compression-and-entropy/ar.md +++ b/content/lessons/data/compression-and-entropy/ar.md @@ -3,7 +3,7 @@ title: الضغط والإنتروبيا summary: >- بدل تكرار الشيء نفسه اكتب «كم مرة». هكذا تصغر الملفات. parameters: - view: تكرار أو تكرارات، view + view: تكرار متتالٍ أو حروف شائعة، view reps: كم مرة يتكرر كل رمز، reps skew: مدى تفاوت تكرار الرموز، skew variables: @@ -16,27 +16,27 @@ variables: ## Try it -1. اجعل view يساوي 0، ثم اسحب reps من 2 إلى 12. راقب شريط المربعات الملوّنة يطول، بينما تبقى مربعات «رمز × عدد» المضغوطة تحته بالحجم نفسه تمامًا. +1. اجعل view يساوي 0 وreps يساوي 2: الحجم الأصلي والحجم المضغوط كلاهما 48 b، فنسبة الضغط ×1.0. اسحب الآن reps إلى 12: يرتفع الحجم الأصلي إلى 288 b، ويبقى الحجم المضغوط 48 b، وتصل النسبة إلى ×6.0. 2. حوّل view إلى 1. تظهر أربعة حروف، E وT وA وQ، كأعمدة يتناسب طولها مع تكرار كل حرف. -3. اسحب skew من 1 إلى 9. مع نمو عمود E أكبر من البقية، يتقلّص شريط بتّاته يمينًا من 2 بت نحو 1، بينما يطول شريط Q. +3. اجعل skew يساوي 1: يأخذ كل حرف 2 بت، وتعرض خانة «أصغر بنسبة» القيمة 0%. اسحب skew إلى 9: يطول عمود E أكثر من البقية وتقصر شفرته إلى بت واحد، وتطول شفرة Q إلى 3 بتّات، وينزل المتوسط إلى 1.56 b، وتعرض «أصغر بنسبة» القيمة 22%. ## Real-life examples -1. **تكرار قصير بالكاد يتكرر.** view عند 0، وreps عند 2: يظهر كل رمز مرتين فقط، فكتابة «رمز × 2» لا توفّر شيئًا يُذكر عن كتابته كاملًا. -2. **تكرار طويل شديد التكرار.** view عند 0، وreps عند 12: يظهر كل رمز اثنتي عشرة مرة متتالية، وتظل «رمز × 12» تكلّف البتّات القليلة نفسها التي كلّفتها «رمز × 2». -3. **تكرارات حروف متفاوتة بشدة.** view عند 1، وskew عند 8: يهيمن حرف واحد على الرسالة، فإعطاؤه شفرة قصيرة يوفّر أكثر بكثير مما توفّره شفرة ثابتة الطول عادلة بين الجميع. +1. **سلسلة قصيرة قليلة التكرار.** view عند 0، وreps عند 2: يظهر كل رمز مرتين فقط، فكتابة «رمز × 2» لا توفّر شيئًا عن كتابته كاملًا: النسبة ×1.0. +2. **سلسلة طويلة كثيرة التكرار.** view عند 0، وreps عند 12: يظهر كل رمز اثنتي عشرة مرة متتالية، وتظل «رمز × 12» تكلّف البتّات القليلة نفسها التي كلّفتها «رمز × 2»، فالنسبة ×6.0. +3. **حروف يتفاوت تكرارها كثيرًا.** view عند 1، وskew عند 8: يغلب حرف واحد على الرسالة، فإعطاؤه شفرة من بت واحد ينزل بالمتوسط من 2 بت إلى 1.60 b لكل حرف، أي أصغر بنسبة 20% من شفرة ثابتة الطول تساوي بين الجميع. ## Test yourself 1. ادفع reps إلى أقصاه، 12. 2. حوّل إلى view رقم 1، وأنزل skew إلى 2 أو أقل، قريبًا من توزيع متساوٍ بين الحروف الأربعة. -3. حوّل إلى view رقم 1، وارفع skew إلى 8 أو أكثر، مفضِّلًا حرفًا واحدًا بشدة. +3. حوّل إلى view رقم 1، وارفع skew إلى 8 أو أكثر، ليغلب حرف واحد على البقية. ## Intuition -تخيّل ماسحًا ضوئيًا يقرأ صفحة فاكس بيضاء غالبًا، بكسلًا بعد بكسل من اليسار لليمين: أبيض، أبيض، أبيض... لثلاثة آلاف بكسل قبل أن يصل أخيرًا إلى حرف أسود. كتابة «أبيض» ثلاثة آلاف مرة مُهدِرة. أما كتابة «3000 بكسل أبيض ثم أسود» فليست كذلك. هذا هو ترميز طول التكرار، وهو بالضبط ما يحوّله الشريط الملوّن على الشاشة إلى مربعات «رمز × عدد» المدمجة تحته. يطول الشريط مع زيادة reps، لكن المربعات المضغوطة لا تطول، لأن عددًا مثل 12 يكلّف تقريبًا البتّات القليلة نفسها التي يكلّفها عدد مثل 2. +تخيّل ماسحًا ضوئيًا يقرأ صفحة فاكس بيضاء غالبًا، بكسلًا بعد بكسل من اليسار لليمين: أبيض، أبيض، أبيض... لثلاثة آلاف بكسل قبل أن يصل أخيرًا إلى حرف أسود. كتابة «أبيض» ثلاثة آلاف مرة إسراف. أما كتابة «3000 بكسل أبيض ثم أسود» فتكفي. هذا هو ترميز طول التكرار، وهو بالضبط ما يحوّله الشريط الملوّن على الشاشة إلى مربعات «رمز × عدد» المدمجة تحته. يطول الشريط مع زيادة reps، لكن المربعات المضغوطة لا تطول، لأن عددًا مثل 12 يكلّف تقريبًا البتّات القليلة نفسها التي يكلّفها عدد مثل 2. -النصف الثاني من الدرس حيلة مختلفة لنوع مختلف من التكرار. بدل أن يجلس الرمز نفسه بجانب نفسه، بعض الرموز ببساطة أكثر شيوعًا عمومًا، مثلما يظهر الحرف E في نصوص الإنجليزية أكثر بكثير من الحرف Q. استخدمت شفرة مورس هذه الفكرة منذ ثلاثينيات القرن التاسع عشر: E نقطة واحدة، أقصر شفرة من الجميع، بينما Q شرطة-شرطة-نقطة-شرطة، من أطول الشفرات، لأن E احتاج إرسالًا سريعًا ومتكررًا بينما Q بالكاد يُحتاج إليه. +النصف الثاني من الدرس حيلة مختلفة لنوع مختلف من التكرار. هنا لا يتكرر الرمز نفسه متتاليًا، لكن بعض الرموز أكثر ظهورًا في النص كله، مثلما يظهر الحرف E في نصوص الإنجليزية أكثر بكثير من الحرف Q. استخدمت شفرة مورس هذه الفكرة منذ ثلاثينيات القرن التاسع عشر: E نقطة واحدة، أقصر شفرة من الجميع، بينما Q شرطة-شرطة-نقطة-شرطة، من أطول الشفرات، لأن E يُرسَل كثيرًا فيجب أن يكون سريعًا، أما Q فنادرًا ما يُرسَل. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### أجهزة الفاكس وصور BMP + تستخدم أجهزة الفاكس وصيغ الصور البسيطة مثل BMP ترميز طول التكرار على خطوط المسح ذات اللون الواحد غالبًا، فصفحة فارغة أو سماء صافية هما بالضبط النوع الطويل المتكرر الذي تصغّره هذه التقنية أفضل ما يكون. ### ZIP وPNG وgzip + تجمع أدوات ضغط يومية مثل ZIP وPNG وgzip بين خطوة تبحث عن التكرار وخطوة على طريقة هافمان في النهاية، فتستخلص النوعين من التكرار اللذين يغطيهما هذا الدرس، الواحد بعد الآخر. ### JPEG ومرمّزات الفيديو -تنهي صور JPEG ومرمّزات الفيديو مثل H.264 كلتاهما خط ضغطها بترميز هافمان أو ما يشبهه، بعد أن جعلت خطوات أخرى البيانات أكثر تكرارًا أصلًا. + +تنهي صور JPEG ومرمّزات الفيديو مثل H.264 مراحل ضغطها بترميز هافمان أو ما يشبهه، بعد أن جعلت خطوات أخرى البيانات أكثر تكرارًا أصلًا. ### شفرة مورس + خصّصت شفرة مورس أقصر إشاراتها لأكثر حروف الإنجليزية شيوعًا منذ ثلاثينيات القرن التاسع عشر، قبل عقود من اختراع ترميز هافمان، مستخدمةً الفكرة نفسها يدويًا: كلما زاد التكرار قصرت الشفرة. diff --git a/content/lessons/data/compression-and-entropy/en.md b/content/lessons/data/compression-and-entropy/en.md index 34dc187a..94061e26 100644 --- a/content/lessons/data/compression-and-entropy/en.md +++ b/content/lessons/data/compression-and-entropy/en.md @@ -15,15 +15,15 @@ variables: ## Try it -1. With view at 0, drag reps from 2 up to 12. Watch the strip of colored blocks grow, while the compressed "symbol × count" boxes underneath stay exactly the same size. +1. With view at 0, set reps to 2: the original size and the compressed size are both 48 b, so the compression ratio is ×1.0. Now drag reps to 12: the original size climbs to 288 b, the compressed size stays at 48 b, and the ratio reaches ×6.0. 2. Switch view to 1. Four letters, E, T, A and Q, appear as bars sized by how often each one shows up. -3. Drag skew from 1 to 9. As E's bar grows past the others, its bit strip on the right shrinks from 2 bits down toward 1, while Q's grows longer. +3. Set skew to 1: every letter gets 2 bits, and "smaller by" shows 0%. Drag skew to 9: E's bar grows past the others and its code shrinks to 1 bit, Q's grows to 3 bits, the average falls to 1.56 b, and "smaller by" shows 22%. ## Real-life examples -1. **A short, barely-repeated run.** view at 0, reps at 2: each symbol appears only twice, so writing "symbol × 2" barely saves anything over writing it out. -2. **A long, heavily-repeated run.** view at 0, reps at 12: each symbol appears twelve times in a row, and "symbol × 12" still costs the same few bits as "symbol × 2" did. -3. **Strongly uneven letter frequencies.** view at 1, skew at 8: one letter dominates the message, so giving it a short code saves far more than a fair, fixed-length code ever could. +1. **A short, barely-repeated run.** view at 0, reps at 2: each symbol appears only twice, so writing "symbol × 2" saves nothing over writing it out: the ratio is ×1.0. +2. **A long, heavily-repeated run.** view at 0, reps at 12: each symbol appears twelve times in a row, and "symbol × 12" still costs the same few bits as "symbol × 2" did, so the ratio is ×6.0. +3. **Strongly uneven letter frequencies.** view at 1, skew at 8: one letter dominates the message, so giving it a 1-bit code brings the average down from 2 bits to 1.60 b per letter, 20% smaller than a fair, fixed-length code. ## Test yourself @@ -56,13 +56,17 @@ The average number of bits per symbol that any lossless code can achieve is boun ## Real world ### Fax machines and BMP images + Fax machines and simple bitmap image formats use run-length encoding on scan lines that are mostly one color, since a blank page or a plain sky is exactly the kind of long, repeated run this technique shrinks best. ### ZIP, PNG and gzip + Everyday compressors such as ZIP, PNG and gzip combine a repeat-finder with a Huffman-style step at the end, squeezing out both kinds of redundancy this lesson covers, one after the other. ### JPEG and video codecs + JPEG images and video codecs like H.264 both finish their compression pipeline with Huffman or a close relative of it, after other steps have already made the data more repetitive. ### Morse code + Morse code assigned its shortest signals to the most common English letters back in the 1830s, decades before Huffman coding was invented, using exactly the same "frequent means short" idea by hand. diff --git a/content/lessons/data/compression-and-entropy/lesson.yaml b/content/lessons/data/compression-and-entropy/lesson.yaml index 31d398c3..2dbbaaae 100644 --- a/content/lessons/data/compression-and-entropy/lesson.yaml +++ b/content/lessons/data/compression-and-entropy/lesson.yaml @@ -3,15 +3,15 @@ subject: data difficulty: beginner equation: C = \dfrac{S_0}{S_1} concepts: -- lossless compression -- run-length encoding -- Huffman coding -- entropy + - lossless compression + - run-length encoding + - Huffman coding + - entropy prerequisites: -- bits-bytes-and-data-sizes + - bits-bytes-and-data-sizes related: -- bits-bytes-and-data-sizes -- column-storage-and-bigquery + - bits-bytes-and-data-sizes + - column-storage-and-bigquery visualization: type: compression-entropy options: {} @@ -33,24 +33,24 @@ parameters: step: 1 value: 5 variables: -- C -- S_0 -- S_1 -- n -- b + - C + - S_0 + - S_1 + - n + - b derivation: -- S_0 = n \times b -- S_1 = 2b -- C = \dfrac{S_0}{S_1} = \dfrac{n}{2} + - S_0 = n \times b + - S_1 = 2b + - C = \dfrac{S_0}{S_1} = \dfrac{n}{2} presets: -- view: 0 - reps: 2 -- view: 0 - reps: 12 -- view: 1 - skew: 8 + - view: 0 + reps: 2 + - view: 0 + reps: 12 + - view: 1 + skew: 8 challenges: -- check: reps - target: 12 -- check: view == 1 and skew <= 2 -- check: view == 1 and skew >= 8 + - check: reps + target: 12 + - check: view == 1 and skew <= 2 + - check: view == 1 and skew >= 8 diff --git a/content/lessons/data/data-visualisation-honestly/ar.md b/content/lessons/data/data-visualisation-honestly/ar.md index bdaf2803..26492e34 100644 --- a/content/lessons/data/data-visualisation-honestly/ar.md +++ b/content/lessons/data/data-visualisation-honestly/ar.md @@ -13,25 +13,25 @@ variables: ## Try it -1. اجعل truncStart يساوي 0 وgap يساوي 2، ثم قارن الرسمين. يتشابهان تقريبًا، لأن المحورين يبدآن من 0 هنا. -2. اسحب truncStart نحو 78. يتغيّر الرسم الأيسر قليلًا جدًا، لكن العمود الثاني في الرسم الأيمن يبدو الآن أطول بمرتين أو ثلاث من الأول، مع أن gap لم يتحرك إطلاقًا. -3. أعد truncStart إلى 0، وارفع gap إلى 20. الآن يُظهر الرسم الأمين نفسه عمودًا ثانيًا أطول بوضوح، بلا أي خدعة، لأن الفرق الحقيقي هذه المرة كبير فعلًا. +1. اجعل truncStart يساوي 0 وgap يساوي 2، ثم قارن الرسمين. يتشابهان تقريبًا، لأن المحورين يبدآن من 0 هنا. تعرض القراءات فرقًا حقيقيًا قدره 2.5%، ونسبة العمودين ×1.02 في الرسمين. +2. اسحب truncStart إلى 78. لا يتغيّر الرسم الأمين، لكن العمود الثاني في الرسم المبتور يبدو الآن ضعف الأول: نسبة العمودين فيه ×2.00، مع أن الفرق الحقيقي ما زال 2.5%. +3. أعد truncStart إلى 0، وارفع gap إلى 20. الآن يُظهر الرسم الأمين نفسه عمودًا ثانيًا أطول بوضوح، بلا أي خدعة، لأن الفرق الحقيقي هذه المرة كبير فعلًا: 25.0%، ونسبة العمودين ×1.25 في الرسمين. ## Real-life examples 1. **فرق حقيقي صغير، مرسوم بأمانة.** truncStart عند 0، وgap عند 2: 80 العام الماضي و82 هذا العام يبدوان متطابقين تقريبًا، وهذه هي الحقيقة، لأن الفرق الحقيقي 2.5% فقط. -2. **الفرق الصغير نفسه، مرسوم ليصدم.** truncStart عند 70، وgap عند 2: الرقمان 80 و82 نفسهما بالضبط، لكن مع محور يبدأ من 70، يبدو العمود الثاني الآن أطول بكثير من الأول. +2. **الفرق الصغير نفسه، مرسوم ليصدم.** truncStart عند 78، وgap عند 2: الرقمان 80 و82 نفسهما بالضبط، لكن مع محور يبدأ من 78، يبدو العمود الثاني الآن ضعف الأول. 3. **فرق حقيقي كبير، مرسوم بأمانة.** truncStart عند 0، وgap عند 20: نمو 80 إلى 100 قفزة حقيقية بنسبة 25%، ويُظهرها المحور الأمين الذي يبدأ من الصفر بوضوح من دون أي حاجة لخدعة. ## Test yourself -1. ادفع truncStart إلى أقصاه، 78، أكثر ما يمكن أن يتضخم المحور. +1. ادفع truncStart إلى أقصاه، 78، وهي أكبر مبالغة يسمح بها المحور. 2. اجعل truncStart يساوي 2 أو أقل وgap يساوي 18 أو أكثر، فرق حقيقي كبير مرسوم بأمانة. 3. اجعل truncStart يساوي 60 أو أكثر وgap يساوي 4 أو أقل، فرق صغير مرسوم ليبدو كبيرًا. ## Intuition -تخيّل تقرير أرباح شركة: بلغت المبيعات 80 ألف دولار العام الماضي و82 ألف دولار هذا العام، وهي زيادة حقيقية لكنها متواضعة بنسبة 2.5%. يُظهر رسم بمحور أمين يبدأ من الصفر عمودين بارتفاع متقارب جدًا، وهذه هي الحقيقة كاملة. لكن فريق التسويق في الشركة نفسها يستطيع رسم الرقمين نفسهما بمحور يبدأ من 79 ألف دولار بدل الصفر، فيبدو العمود الثاني فجأة أطول بمرتين أو ثلاث من الأول، مع أن شيئًا في المبيعات لم يتغيّر إطلاقًا. +تخيّل تقرير أرباح شركة: بلغت المبيعات 80 ألف دولار العام الماضي و82 ألف دولار هذا العام، وهي زيادة حقيقية لكنها متواضعة بنسبة 2.5%. يُظهر رسم بمحور أمين يبدأ من الصفر عمودين بارتفاع متقارب جدًا، وهذه هي الحقيقة كاملة. لكن فريق التسويق في الشركة نفسها يستطيع رسم الرقمين نفسهما بمحور يبدأ من 79 ألف دولار بدل الصفر، فيبدو العمود الثاني فجأة ثلاثة أضعاف الأول، مع أن شيئًا في المبيعات لم يتغيّر إطلاقًا. تجعل القراءات تحت الرسم هذا الفرق دقيقًا: نسبة العمودين في الرسم الأمين ونسبة العمودين في الرسم المبتور تقيسان كم مرة يبدو العمود الثاني أطول على الشاشة في كل نسخة. حين يكون truncStart صفرًا تتطابق النسبتان، لأن الرسمين حينها رسم واحد بعينه. ومع ارتفاع truncStart، تكبر نسبة الرسم المبتور بعيدًا عن نسبة الرسم الأمين، مع أن الفرق الحقيقي بالنسبة المئوية، $p$، لم يتغيّر ولو بخانة عشرية واحدة. @@ -43,7 +43,7 @@ variables: ## Advanced -يسمّي بعض الإحصائيين مقدار هذا التشويه «معامل الكذب»، وهو النسبة بين حجم الأثر كما يبدو على الورقة وحجمه الحقيقي في البيانات. فمعامل قريب من 1 أمين، أما القيم البعيدة عن 1، في أي اتجاه، فتعني أن الرسم يبالغ في تغيّر حقيقي أو يخفيه. حين يضطر رسّام حقًا إلى بتر المحور لإظهار تفصيل في مدى ضيق، فالعرف الأمين أن يُعلَّم القطع بوضوح، بخط متعرج في خط المحور مثلًا، لا أن يُبتر بصمت كما يفعل الرسم الأيمن في هذا الدرس. +يسمّي بعض الإحصائيين مقدار هذا التشويه «معامل الكذب»، وهو النسبة بين حجم الأثر كما يبدو على الورقة وحجمه الحقيقي في البيانات. فمعامل قريب من 1 أمين، أما القيم البعيدة عن 1، في أي اتجاه، فتعني أن الرسم يبالغ في تغيّر حقيقي أو يخفيه. حين يضطر من يرسم حقًا إلى بتر المحور لإظهار تفصيل في مدى ضيق، فالعرف الأمين أن يُعلَّم القطع بوضوح، بخط متعرج في خط المحور مثلًا، لا أن يُبتر بصمت كما يفعل الرسم المبتور في هذا الدرس. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### الرسوم في الأخبار والإعلانات + يستطيع إعلان سياسي أو تقرير إخباري أن يجعل تغيّرًا بنقطتين في استطلاع رأي يبدو هائلًا ببدء محور الرسم من 45 بدل الصفر. وقراءة أرقام المحور أولًا أسرع طريقة لاكتشاف ذلك. ### تطبيقات الأسهم والمال + غالبًا ما يستخدم تطبيق أسهم مكبَّر على تداول يوم واحد محورًا مبتورًا بشدة، وهو مفيد لرصد حركات صغيرة، لكنه قد يجعل تذبذبًا بنسبة 1% يبدو كانهيار إن لم تُقرأ أرقام المحور بعناية. ### شرائح أرباح الشركات -قد تبتر عروض أرباح الشركات محور رسم «النمو» أحيانًا لتجعل زيادة متواضعة بنسبة مئوية أحادية الرقم تبدو صعودًا حادًا. + +قد تبتر عروض أرباح الشركات محور رسم «النمو» أحيانًا لتجعل زيادة متواضعة أقل من 10% تبدو صعودًا حادًا. ### لوحات الحكومة والصحة العامة -يمكن للوحة عامة تتبع شيئًا كعدد الحالات أو نسبة البطالة أن تبدو أكثر إثارة للقلق أو أكثر طمأنة بكثير مما تبرره الأرقام الحقيقية، فقط بحسب النقطة التي يبدأ منها محورها. + +يمكن للوحة عامة تتابع عدد الإصابات أو نسبة البطالة مثلًا أن تبدو أكثر إثارة للقلق أو أكثر طمأنة بكثير مما تبرره الأرقام الحقيقية، فقط بحسب النقطة التي يبدأ منها محورها. diff --git a/content/lessons/data/data-visualisation-honestly/en.md b/content/lessons/data/data-visualisation-honestly/en.md index 5dfa6379..979ad332 100644 --- a/content/lessons/data/data-visualisation-honestly/en.md +++ b/content/lessons/data/data-visualisation-honestly/en.md @@ -12,14 +12,14 @@ variables: ## Try it -1. With truncStart at 0 and gap at 2, compare the two charts: they look almost the same, because both axes start at 0 here. -2. Drag truncStart up toward 78. The left chart barely changes, but the right chart's second bar now looks two or three times taller than the first, even though gap has not moved. -3. Set truncStart back to 0 and push gap up to 20. Now the honest chart itself shows a clearly taller second bar, no trick needed, because this time the real difference actually is large. +1. With truncStart at 0 and gap at 2, compare the two charts: they look almost the same, because both axes start at 0 here. The true % difference reads 2.5%, and both bar ratios read ×1.02. +2. Drag truncStart up to 78. The left chart does not change, but the right chart's second bar now looks twice as tall as the first: its bar ratio reads ×2.00, while the true % difference still reads 2.5%. +3. Set truncStart back to 0 and push gap up to 20. Now the honest chart itself shows a clearly taller second bar, no trick needed, because this time the real difference actually is large: 25.0%, and both bar ratios read ×1.25. ## Real-life examples 1. **A tiny real change, drawn honestly.** truncStart at 0, gap at 2: last year's 80 and this year's 82 look almost identical, which is the truth, since the real change is only 2.5%. -2. **The same tiny change, drawn to shock.** truncStart at 70, gap at 2: the exact same 80 and 82, but with the axis starting at 70, the second bar now looks dramatically taller than the first. +2. **The same tiny change, drawn to shock.** truncStart at 78, gap at 2: the exact same 80 and 82, but with the axis starting at 78, the second bar now looks twice as tall as the first. 3. **A genuinely large change, drawn honestly.** truncStart at 0, gap at 20: 80 growing to 100 is a real 25% jump, and an honest, zero-based axis already shows that clearly. ## Test yourself @@ -30,7 +30,7 @@ variables: ## Intuition -Picture a company's earnings report: sales went from 80,000 dollars last year to 82,000 dollars this year, a real but modest 2.5% increase. A chart with an honest, zero-based axis shows two bars of almost the same height, which is the honest truth. But the same company's marketing team could draw the exact same two numbers with a y-axis that starts at 79,000 dollars instead of zero, and suddenly the second bar looks two or three times taller than the first, even though nothing about the sales changed at all. +Picture a company's earnings report: sales went from 80,000 dollars last year to 82,000 dollars this year, a real but modest 2.5% increase. A chart with an honest, zero-based axis shows two bars of almost the same height, which is the honest truth. But the same company's marketing team could draw the exact same two numbers with a y-axis that starts at 79,000 dollars instead of zero, and suddenly the second bar looks three times taller than the first, even though nothing about the sales changed at all. The readouts under the chart make this precise: the honest chart's bar ratio and the truncated chart's bar ratio measure how many times taller the second bar looks, drawn on screen, in each version. When truncStart is 0 those two ratios match, because both charts are the same chart. As truncStart climbs, the truncated ratio grows far past the honest one, even though the underlying percentage difference, $p$, has not changed by a single decimal. @@ -53,13 +53,17 @@ Statisticians sometimes call the size of this distortion the "lie factor," the r ## Real world ### News and advertising charts + A political ad or a news segment can make a 2-point poll shift look enormous by starting its bar chart's axis at 45 instead of 0; reading the axis labels first is the fastest way to catch it. ### Stock and finance apps + A stock app zoomed into a single day's trading often uses a tightly truncated axis, which is useful for spotting small moves but can make a 1% wiggle look like a crash if the axis is not read carefully. ### Company earnings slides + Corporate earnings presentations sometimes truncate the y-axis on a "growth" chart to make a modest single-digit percentage increase look like a steep climb. ### Government and health dashboards + A public dashboard tracking something like case counts or unemployment can look far more alarming or far more reassuring than the real numbers justify, depending only on where its axis is set to start. diff --git a/content/lessons/data/data-visualisation-honestly/lesson.yaml b/content/lessons/data/data-visualisation-honestly/lesson.yaml index 1b090528..80904715 100644 --- a/content/lessons/data/data-visualisation-honestly/lesson.yaml +++ b/content/lessons/data/data-visualisation-honestly/lesson.yaml @@ -3,14 +3,14 @@ subject: data difficulty: beginner equation: p = \dfrac{v_2 - v_1}{v_1} \times 100 concepts: -- data visualization -- truncated axis -- misleading charts -- percentage change + - data visualization + - truncated axis + - misleading charts + - percentage change prerequisites: -- tables-and-filtering + - tables-and-filtering related: -- grouping-and-totals + - grouping-and-totals visualization: type: honest-charts options: {} @@ -27,22 +27,22 @@ parameters: step: 1 value: 8 variables: -- p -- v_1 -- v_2 + - p + - v_1 + - v_2 derivation: -- v_2 - v_1 \text{ is the real size of the difference} -- \dfrac{v_2 - v_1}{v_1} \text{ compares that difference to the starting value} -- p = \dfrac{v_2 - v_1}{v_1} \times 100 \text{ is the true percentage change, no matter how the axis is drawn} + - v_2 - v_1 \text{ is the real size of the difference} + - \dfrac{v_2 - v_1}{v_1} \text{ compares that difference to the starting value} + - p = \dfrac{v_2 - v_1}{v_1} \times 100 \text{ is the true percentage change, no matter how the axis is drawn} presets: -- truncStart: 0 - gap: 2 -- truncStart: 70 - gap: 2 -- truncStart: 0 - gap: 20 + - truncStart: 0 + gap: 2 + - truncStart: 78 + gap: 2 + - truncStart: 0 + gap: 20 challenges: -- check: truncStart - target: 78 -- check: truncStart <= 2 and gap >= 18 -- check: truncStart >= 60 and gap <= 4 + - check: truncStart + target: 78 + - check: truncStart <= 2 and gap >= 18 + - check: truncStart >= 60 and gap <= 4 diff --git a/content/lessons/data/grouping-and-totals/ar.md b/content/lessons/data/grouping-and-totals/ar.md index 9de11362..ed89edae 100644 --- a/content/lessons/data/grouping-and-totals/ar.md +++ b/content/lessons/data/grouping-and-totals/ar.md @@ -11,9 +11,9 @@ variables: ## Try it -1. اجعل المنزلق by يساوي 0. تنطوي صفوف الجدول في صف واحد لكل مدينة، ويظهر مجموع لكل صف. -2. اجعل by يساوي 1 بدلًا من ذلك. تنطوي الطلبات الـ12 نفسها الآن في صف واحد لكل منتج. -3. قارن بين المجموعتين. الطلبات الـ12 نفسها، مجمّعة بطريقتين مختلفتين، يبقى مجموعها الكلي واحدًا دائمًا. +1. اجعل المنزلق by يساوي 0. تأخذ صفوف المدينة الواحدة لونًا واحدًا، ويظهر لكل مدينة شريط يحمل مجموعها: الرياض 43، القاهرة 50، دبي 66، عمّان 51. +2. اجعل by يساوي 1 بدلًا من ذلك. تتلوّن الطلبات الـ12 نفسها الآن حسب المنتج، ولكل منتج شريط: شاي 54، قهوة 117، عصير 39. +3. قارن بين الحالتين: 43 + 50 + 66 + 51 = 210 و54 + 117 + 39 = 210. الطلبات الـ12 نفسها، مجمّعة بطريقتين مختلفتين، يبقى مجموعها الكلي واحدًا. ## Real-life examples @@ -22,12 +22,12 @@ variables: ## Test yourself -1. اجعل by يساوي 0 واقرأ مجموع مدينة واحدة. -2. اجعل by يساوي 1 واقرأ مجموع منتج واحد. +1. أي منتج باع أكثر؟ اضبط by حتى تتجمّع الطلبات حسب المنتج، واقرأ مجموع القهوة: 117. +2. والطلبات مجمّعة حسب المنتج، ابحث عن المنتج صاحب أصغر مجموع: العصير، 39. ## Intuition -لنقل إن متجرًا باع ثلاثة طلبات في باريس بقيمة 10 و15 و5 دولارات. بجمعها تبيع تلك المدينة 30 دولارًا في المجموع. حرّك المنزلق by بين 0 و1 في الجدول وراقب كل صف يشارك المدينة نفسها، أو المنتج نفسه، يندمج في صف واحد. رقم ذلك الصف المندمج هو مجموع المجموعة، ويُكتب $T(k) = \sum \text{amount}$، وk هو أي مجموعة يمثّلها الصف الآن، مدينة كانت أو منتجًا. +لنقل إن متجرًا باع ثلاثة طلبات في الرياض بقيمة 12 و25 و6 دولارات. إذا جمعناها كان مجموع مبيعات المدينة 43 دولارًا. حرّك المنزلق by بين 0 و1 وراقب: الصفوف التي لها المدينة نفسها، أو المنتج نفسه، تأخذ لونًا واحدًا وتصبّ في شريط واحد. رقم ذلك الشريط هو مجموع المجموعة، ويُكتب $T(k) = \sum \text{amount}$، وk هو المجموعة التي يمثّلها الشريط، مدينة كانت أو منتجًا. التجميع لا يحذف أي معلومة، بل يعيد تنظيمها فقط. كل دولار في الصفوف الـ12 الأصلية لا يزال محسوبًا مرة واحدة، لكنه الآن مرتّب في عدد أقل من الفئات المفيدة. هذه هي الفكرة وراء GROUP BY مع SUM في SQL، وهما من أكثر الأدوات استخدامًا لتحويل جدول ضخم إلى تقرير قصير يسهل قراءته. @@ -35,7 +35,7 @@ variables: يقسّم التجميع صفوف الجدول إلى مجموعات منفصلة تشترك في قيمة k، ثم يختزل كل مجموعة إلى رقم واحد. هذا الرقم هنا مجموع، $T(k) = \sum \text{amount}$، محسوب فقط على صفوف المجموعة k. هذا في SQL هو `SELECT city, SUM(amount) FROM orders GROUP BY city` حين by يساوي 0، أو الاستعلام نفسه بالمنتج حين by يساوي 1. -بما أن كل صف ينتمي إلى مجموعة واحدة فقط، فإن مجاميع $T(k)$ عبر كل المجموعات تعود وتجمع دائمًا إلى مجموع الجدول كله. التجميع حسب عمود مختلف يقطّع المجموع نفسه بطريقة مختلفة فقط. +بما أن كل صف ينتمي إلى مجموعة واحدة فقط، فإن مجاميع $T(k)$ لكل المجموعات، إذا جُمعت، تساوي دائمًا مجموع الجدول كله. التجميع حسب عمود آخر يقسّم المجموع نفسه بطريقة أخرى فقط. ## Advanced @@ -50,13 +50,17 @@ variables: ## Real world ### لوحات المبيعات + يراجع المدير المبيعات اليومية مجمّعة حسب الفرع أو المنتج ليعرف الأكثر مبيعًا والأقل. ### تقارير الدرجات المدرسية + يجمّع المعلم الدرجات حسب الفصل ليحسب متوسط كل فصل ويقارن بينها. ### تحليلات BigQuery -يشغّل المحلّلون GROUP BY على مليارات السجلات في BigQuery للحصول على حفنة مجاميع لكل دولة أو جهاز. + +يشغّل المحلّلون GROUP BY على مليارات السجلات في BigQuery ليحصلوا على مجاميع قليلة لكل دولة أو جهاز. ### تحليلات المواقع -يجمّع موقع إلكتروني الزيارات حسب الصفحة أو الدولة ليرى من أين تأتي حركة مروره فعليًا. + +يجمّع موقع إلكتروني الزيارات حسب الصفحة أو الدولة ليعرف من أين يأتي زوّاره فعلًا. diff --git a/content/lessons/data/grouping-and-totals/en.md b/content/lessons/data/grouping-and-totals/en.md index bbd48b76..0e7aa25b 100644 --- a/content/lessons/data/grouping-and-totals/en.md +++ b/content/lessons/data/grouping-and-totals/en.md @@ -10,9 +10,9 @@ variables: ## Try it -1. Set the slider by to 0. The table's rows collapse into one row per city, each showing a total. -2. Set by to 1 instead. The same 12 orders now collapse into one row per product. -3. Compare the two sets of totals: the same 12 orders, grouped two different ways, always add up to the same grand total. +1. Set the slider by to 0. Rows from the same city take the same colour, and one bar per city shows its total: Riyadh 43, Cairo 50, Dubai 66, Amman 51. +2. Set by to 1 instead. The same 12 orders are now coloured by product, with one bar each: tea 54, coffee 117, juice 39. +3. Compare the two sets of totals: 43 + 50 + 66 + 51 = 210 and 54 + 117 + 39 = 210. The same 12 orders, grouped two different ways, add up to the same grand total. ## Real-life examples @@ -21,12 +21,12 @@ variables: ## Test yourself -1. Set by to 0 and read off the total for a single city. -2. Set by to 1 and read off the total for a single product. +1. Which product sold the most? Set by so the orders are grouped by product and read the total for coffee, 117. +2. With the orders grouped by product, find the product with the smallest total: juice, 39. ## Intuition -Say a shop sold three orders in Paris worth 10, 15 and 5 dollars: added up, that city sold 30 dollars in total. Flip the slider by between 0 and 1 in the table and watch every row with the same city, or the same product, merge into a single line. That merged line's number is the group's total, written $T(k) = \sum \text{amount}$, where k is whichever group — a city or a product — the row now stands for. +Say a shop sold three orders in Riyadh worth 12, 25 and 6 dollars: added up, that city sold 43 dollars in total. Flip the slider by between 0 and 1 and watch every row with the same city, or the same product, take the same colour and feed a single bar. That bar's number is the group's total, written $T(k) = \sum \text{amount}$, where k is whichever group — a city or a product — the bar stands for. Grouping does not delete any information; it just reorganizes it. Every dollar in the original 12 rows is still counted once, only now sorted into fewer, more useful buckets. This is the idea behind SQL's GROUP BY together with SUM, two of the most common tools for turning a huge table into a short, readable report. @@ -49,13 +49,17 @@ A database usually computes a grouped total with a hash table: it reads each row ## Real world ### Sales dashboards + A manager checks daily sales grouped by store or by product to spot what is selling and what is not. ### School grade reports + A teacher groups scores by class to compute and compare each class's average. ### BigQuery analytics + Analysts run GROUP BY over billions of log rows in BigQuery to get a handful of totals per country or per device. ### Web analytics + A website groups visits by page or by country to see where its traffic actually comes from. diff --git a/content/lessons/data/grouping-and-totals/lesson.yaml b/content/lessons/data/grouping-and-totals/lesson.yaml index 7c312edd..9fd1e9e0 100644 --- a/content/lessons/data/grouping-and-totals/lesson.yaml +++ b/content/lessons/data/grouping-and-totals/lesson.yaml @@ -3,13 +3,13 @@ subject: data difficulty: beginner equation: T(k) = \sum \text{amount} concepts: -- GROUP BY -- aggregation -- SUM + - GROUP BY + - aggregation + - SUM prerequisites: -- tables-and-filtering + - tables-and-filtering related: -- column-storage-and-bigquery + - column-storage-and-bigquery visualization: type: query-table options: @@ -22,17 +22,16 @@ parameters: step: 1 value: 0 variables: -- T -- k + - T + - k derivation: -- k = \text{the city if by is 0, the product if by is 1} -- \text{every row sharing the same } k \text{ joins one group} -- T(k) = \sum \text{amount within group } k + - k = \text{the city if by is 0, the product if by is 1} + - \text{every row sharing the same } k \text{ joins one group} + - T(k) = \sum \text{amount within group } k presets: -- by: 0 -- by: 1 + - by: 0 + - by: 1 challenges: -- check: by - target: 0 -- check: by - target: 1 + - check: by + target: 1 + - check: by == 1 diff --git a/content/lessons/data/hashing-and-checksums/ar.md b/content/lessons/data/hashing-and-checksums/ar.md index bc6d0804..c780fc9b 100644 --- a/content/lessons/data/hashing-and-checksums/ar.md +++ b/content/lessons/data/hashing-and-checksums/ar.md @@ -14,20 +14,20 @@ variables: ## Try it -1. اجعل view يساوي 0 وm يساوي 11، وتأمّل المفاتيح السبعة وأوعيتها. معظمها ينزل وحده. اسحب m نحو 4 وراقب مفتاحين أو ثلاثة تتزاحم في الوعاء نفسه. -2. اقرأ السطر «23 mod 7 = 2». هذه القسمة الواحدة هي كل عملية البحث، بلا مسح، مباشرة إلى الوعاء 2. -3. حوّل view إلى 1. بدّل corrupt إلى 1، وراقب بايت الحرف الثالث يتحول أحمر عند المستقبل، بينما يتوقف مجموعا التحقق أدناه عن التطابق. +1. اجعل view يساوي 0 وm يساوي 10، وتأمّل المفاتيح السبعة وأوعيتها: كل مفتاح ينزل وحده، وتعرض القراءة «التصادمات» العدد 0. اسحب m إلى 4: تتزاحم المفاتيح السبعة كلها في الوعاءين 0 و3، وتعرض القراءات: التصادمات 2، ومعامل الامتلاء 1.75. +2. اجعل m يساوي 7 واقرأ السطر «23 mod 7 = 2». هذه القسمة الواحدة هي كل عملية البحث: تذهب مباشرة إلى الوعاء 2 من دون تفتيش بقية الأوعية. +3. حوّل view إلى 1. بدّل corrupt إلى 1، وراقب بايت الحرف الثالث يتحول إلى اللون الأحمر عند المستقبل، ويتغيّر من 108 إلى 100. يبقى مجموع تحقق المرسل 244، ويصبح مجموع تحقق المستقبل 236، فلا يتطابق المجموعان. ## Real-life examples 1. **جدول صغير، تصادمات كثيرة.** view عند 0، وm عند 4: أربعة أوعية فقط لسبعة مفاتيح تضمن أن وعاءً واحدًا على الأقل يحمل أكثر من مفتاح. -2. **جدول أكبر، تصادمات أقل.** view عند 0، وm عند 11: مع أوعية أكثر من المفاتيح، ينزل معظمها وحده ونادرًا ما يحتاج البحث فحص مفتاح ثانٍ. -3. **رسالة تالفة.** view عند 1، وcorrupt عند 1: يتغيّر بايت واحد أثناء النقل، فيتوقف مجموعا تحقق المرسل والمستقبل عن الاتفاق. +2. **جدول أكبر، بلا تصادمات.** view عند 0، وm عند 10: الأوعية أكثر من المفاتيح، وكل مفتاح من هذه المفاتيح السبعة ينزل وحده، فلا يحتاج البحث أبدًا إلى فحص مفتاح ثانٍ. +3. **رسالة تالفة.** view عند 1، وcorrupt عند 1: يتغيّر بايت واحد أثناء النقل، فيختلف مجموع تحقق المرسل عن مجموع تحقق المستقبل. ## Test yourself 1. اجعل view يساوي 0 وm يساوي 4، أصغر جدول، وابحث عن تصادم. -2. اجعل view يساوي 0 وm يساوي 11، أكبر جدول، بلا أي تصادم بين المفاتيح السبعة. +2. اجعل view يساوي 0 وm يساوي 10، وهو جدول بلا أي تصادم بين المفاتيح السبعة. 3. اجعل view يساوي 1 وcorrupt يساوي 1، وراقب مجموعي التحقق يختلفان. ## Intuition @@ -40,7 +40,7 @@ variables: تربط دالة التجزئة المفتاح $k$ برقم وعاء $h$ باستخدام $h = k \bmod m$، حيث $m$ عدد الأوعية في الجدول. والبحث عن $k$ يعني حساب $h$ مرة واحدة والتحقق من ذلك الوعاء فقط، ولهذا يستغرق البحث في جدول التجزئة زمنًا شبه ثابت بدل فحص كل مُدخل. -يطبّق مجموع التحقق الفكرة نفسها على الرسالة كلها بدل مفتاح واحد، فيجمع كل بايت $b_i$ في الرسالة ويبسّط الناتج، مثل $c = \left(\sum b_i\right) \bmod 256$. ينتج عن ذلك رقم صغير واحد يتغيّر في الغالب إن تغيّر أي بايت في الرسالة. مقارنة $c$ عند المرسل بـ$c$ عند المستقبل بعد الوصول تكشف معظم أخطاء النقل من دون إعادة إرسال كل بايت أو فحصه يدويًا. +يطبّق مجموع التحقق الفكرة نفسها على الرسالة كلها بدل مفتاح واحد، فيجمع كل بايتات الرسالة $b_i$ ثم يأخذ باقي قسمة المجموع، مثل $c = \left(\sum b_i\right) \bmod 256$. ينتج عن ذلك رقم صغير واحد يتغيّر في الغالب إن تغيّر أي بايت في الرسالة. مقارنة $c$ عند المرسل بـ$c$ عند المستقبل بعد الوصول تكشف معظم أخطاء النقل من دون إعادة إرسال كل بايت أو فحصه يدويًا. ## Advanced @@ -55,13 +55,17 @@ variables: ## Real world ### قواميس لغات البرمجة + يستخدم dict في بايثون وMap في جافاسكربت وHashMap في جافا جدول تجزئة داخليًا، فيبقى البحث عن قيمة بمفتاحها سريعًا حتى مع ملايين المُدخلات. ### الباركود وأرقام الهوية -الرقم الأخير في باركود UPC أو رقم ISBN لكتاب هو مجموع تحقق، يُحسب من الأرقام التي قبله، فيكتشف الماسح أو خطأ الكتابة فورًا رقمًا واحدًا مكتوبًا أو مقروءًا خطأ. + +الرقم الأخير في باركود UPC أو رقم ISBN لكتاب هو مجموع تحقق، يُحسب من الأرقام التي قبله، فيكتشف الماسح فورًا أي رقم كُتب أو قُرئ خطأ. ### تنزيل الملفات + غالبًا ما تعرض صفحة التنزيل مجموع تحقق بجانب الملف، فتحسبه بنفسك بعد التنزيل لتتأكد أن الملف لم يتلف أو ينقطع بسبب اتصال سيئ. ### حزم الشبكة -تحمل كل حزمة تُرسل عبر الإنترنت مجموع تحقق في ترويستها، محسوبًا من محتوى الحزمة، فيكتشف الموجّه أو الجهاز المستقبل حزمة تلفت في الطريق ويطلب إعادة إرسالها. + +تحمل كل حزمة تُرسل عبر الإنترنت مجموع تحقق في مقدمتها، محسوبًا من محتوى الحزمة، فيكتشف الموجّه أو الجهاز المستقبل حزمة تلفت في الطريق ويطلب إعادة إرسالها. diff --git a/content/lessons/data/hashing-and-checksums/en.md b/content/lessons/data/hashing-and-checksums/en.md index 3d57a399..626bae8d 100644 --- a/content/lessons/data/hashing-and-checksums/en.md +++ b/content/lessons/data/hashing-and-checksums/en.md @@ -13,20 +13,20 @@ variables: ## Try it -1. With view at 0 and m at 11, look at the seven keys and their buckets; most land alone. Drag m down toward 4 and watch two or three keys pile into the same bucket. -2. Read the line "23 mod 7 = 2": that single division is the whole lookup, no scanning needed, straight to bucket 2. -3. Switch view to 1. Flip corrupt to 1 and watch the third letter's byte turn red on the receiver's side, while the two checksums below stop matching. +1. With view at 0 and m at 10, look at the seven keys and their buckets: every key lands alone, and the readout shows collisions = 0. Drag m down to 4: all seven keys pile into buckets 0 and 3, and the readouts show collisions = 2 and load factor = 1.75. +2. Set m to 7 and read the line "23 mod 7 = 2": that single division is the whole lookup, no scanning needed, straight to bucket 2. +3. Switch view to 1. Flip corrupt to 1 and watch the third letter's byte turn red on the receiver's side, changing from 108 to 100. The sender checksum stays 244, the receiver checksum becomes 236, and the two no longer match. ## Real-life examples 1. **A small table, several collisions.** view at 0, m at 4: only four buckets for seven keys guarantees at least one bucket holds more than one key. -2. **A bigger table, fewer collisions.** view at 0, m at 11: with more buckets than keys, most land alone and lookups rarely need to check a second key. +2. **A bigger table, no collisions.** view at 0, m at 10: with more buckets than keys, every one of these seven keys lands alone, so a lookup never needs to check a second key. 3. **A corrupted message.** view at 1, corrupt at 1: one byte changes during transmission, and the sender's and receiver's checksums no longer agree. ## Test yourself 1. Set view to 0 and m to 4, the smallest table, and find a collision. -2. Set view to 0 and m to 11, the largest table, with no collisions among the seven keys. +2. Set view to 0 and m to 10, a table with no collisions among the seven keys. 3. Set view to 1 and corrupt to 1, and watch the checksums disagree. ## Intuition @@ -54,13 +54,17 @@ A real hash table keeps its load factor, the number of keys divided by the numbe ## Real world ### Programming language dictionaries + Python's dict, JavaScript's Map and Java's HashMap all use a hash table internally, so looking up a value by key stays fast even with millions of entries. ### Barcodes and ID numbers -The last digit of a UPC barcode or an ISBN book number is a checksum, computed from the digits before it, so a scanner or a typo instantly catches a single mistyped or misread digit. + +The last digit of a UPC barcode or an ISBN book number is a checksum, computed from the digits before it, so a scanner instantly catches a single mistyped or misread digit. ### File downloads + A download page often lists a checksum next to a file so you can recompute it after downloading and confirm the file was not corrupted or cut short by a bad connection. ### Network packets + Every packet sent over the internet carries a checksum in its header, computed from the packet's contents, so a router or the receiving computer can spot a packet damaged in transit and ask for it again. diff --git a/content/lessons/data/hashing-and-checksums/lesson.yaml b/content/lessons/data/hashing-and-checksums/lesson.yaml index d23d8562..8dfae950 100644 --- a/content/lessons/data/hashing-and-checksums/lesson.yaml +++ b/content/lessons/data/hashing-and-checksums/lesson.yaml @@ -3,16 +3,16 @@ subject: data difficulty: beginner equation: h = k \text{ mod } m concepts: -- hash function -- hash table -- collision -- checksum -- data integrity + - hash function + - hash table + - collision + - checksum + - data integrity prerequisites: -- indexes-and-fast-search + - indexes-and-fast-search related: -- indexes-and-fast-search -- bits-bytes-and-data-sizes + - indexes-and-fast-search + - bits-bytes-and-data-sizes visualization: type: hashing-checksums options: {} @@ -34,21 +34,21 @@ parameters: step: 1 value: 0 variables: -- h -- k -- m + - h + - k + - m derivation: -- k \text{ mod } m \text{ is the remainder after dividing } k \text{ by } m -- h \text{ names exactly one of the } m \text{ buckets to look in first} -- \text{two different keys landing on the same } h \text{ is called a collision} + - k \text{ mod } m \text{ is the remainder after dividing } k \text{ by } m + - h \text{ names exactly one of the } m \text{ buckets to look in first} + - \text{two different keys landing on the same } h \text{ is called a collision} presets: -- view: 0 - m: 4 -- view: 0 - m: 11 -- view: 1 - corrupt: 1 + - view: 0 + m: 4 + - view: 0 + m: 10 + - view: 1 + corrupt: 1 challenges: -- check: view == 0 and m == 4 -- check: view == 0 and m == 11 -- check: view == 1 and corrupt == 1 + - check: view == 0 and m == 4 + - check: view == 0 and m == 10 + - check: view == 1 and corrupt == 1 diff --git a/content/lessons/data/indexes-and-fast-search/ar.md b/content/lessons/data/indexes-and-fast-search/ar.md index f7f1743a..c1a6eef5 100644 --- a/content/lessons/data/indexes-and-fast-search/ar.md +++ b/content/lessons/data/indexes-and-fast-search/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اجعل e يساوي 3، أي 1,000 عنصر، وtarget رقمًا صغيرًا. راقب الباحث الذي يفحص عنصرًا عنصرًا والباحث الثنائي يتسابقان للوصول إليه. -2. ارفع e نحو 9. يحتاج الباحث الذي يفحص عنصرًا عنصرًا الآن خطوات أكثر بكثير، بينما يتباطأ الباحث الثنائي قليلًا فقط. -3. غيّر target إلى قيم مختلفة. لاحظ أن الباحث الثنائي يجده دائمًا في نحو العدد نفسه من الخطوات، أينما اختبأ. +1. اجعل e يساوي 3، أي 1,000 عنصر. تعرض القراءات أن الفحص واحدًا واحدًا يحتاج 1 000 خطوة (1.0 ms)، وأن التنصيف في كل مرة يحتاج 10 خطوات فقط (10 µs). +2. ارفع e إلى 9. يحتاج الفحص واحدًا واحدًا الآن 1 000 000 000 خطوة (1000.0 s)، بينما يحتاج التنصيف 30 خطوة فقط (30 µs). +3. انظر الآن إلى صف المربعات الـ64 وغيّر target، أو اضغط أحد المربعات. عند target يساوي 41 يكتب الرسم «وُجد في 5 خطوات»، وعند target يساوي 0 يكتب 6 خطوات. أينما اختبأ المربع، لا يحتاج البحث أكثر من 7 خطوات. ## Real-life examples @@ -31,9 +31,9 @@ variables: ## Intuition -تخيّل بحثك عن اسم واحد في دليل هاتف فيه مليون اسم بقراءة كل مُدخَل من البداية. في أسوأ الأحوال هذا قرابة مليون فحص. ارفع المنزلق e وراقب الباحث الذي يفحص عنصرًا عنصرًا يزحف عبر القائمة واحدًا تلو الآخر، بينما يقفز الباحث الثنائي إلى المنتصف مباشرة، يقرر إن كان الهدف يمينًا أو يسارًا، ويستبعد نصف القائمة في خطوة واحدة. تكرار هذا التنصيف يعطي عدد الخطوات التي يحتاجها البحث الثنائي، $b = \log_2 N$، وN هو عدد العناصر. +تخيّل أنك تبحث عن اسم واحد في دليل هاتف فيه مليون اسم، فتقرأ الأسماء واحدًا واحدًا من البداية. في أسوأ الأحوال تحتاج قرابة مليون فحص. ارفع المنزلق e وراقب عدد خطوات الفحص واحدًا واحدًا يكبر بسرعة هائلة، بينما يقفز البحث الثنائي إلى المنتصف مباشرة، ويقرر إن كان الهدف يمينًا أو يسارًا، ويستبعد نصف القائمة في خطوة واحدة. تكرار هذا التنصيف يعطي عدد الخطوات التي يحتاجها البحث الثنائي، $b = \log_2 N$، وN هو عدد العناصر. -هذا الفرق هائل. مليون عنصر يحتاج نحو 20 خطوة للبحث الثنائي، لكن يصل إلى مليون فحص للبحث عنصرًا عنصرًا. هذا بالضبط ما يفعله فهرس قاعدة البيانات خلف الكواليس، فبحث كان سيستغرق وقتًا طويلًا في جدول غير مرتّب ينتهي فورًا تقريبًا بمجرد فهرسته. +هذا الفرق هائل. مليون عنصر يحتاج نحو 20 خطوة للبحث الثنائي، أما الفحص واحدًا واحدًا فقد يحتاج مليون فحص. هذا بالضبط ما يفعله فهرس قاعدة البيانات خلف الكواليس، فبحث كان سيستغرق وقتًا طويلًا في جدول غير مرتّب ينتهي فورًا تقريبًا بمجرد فهرسته. ## Formal @@ -43,7 +43,7 @@ variables: ## Advanced -نادرًا ما تستخدم قواعد البيانات الحقيقية البحث الثنائي مباشرة. بل تستخدم أشجار B (B-trees) أو بنى مشابهة واسعة التفرع، فحتى البحث على القرص، حيث كل خطوة أبطأ نسبيًا، لا يحتاج إلا حفنة خطوات لمليارات الصفوف. يؤدي تجميع BigQuery (clustering) دورًا شبيهًا، إذ يرتّب الصفوف فعليًا بحيث يتجاوز الاستعلام كتلًا كاملة دفعة واحدة. +نادرًا ما تستخدم قواعد البيانات الحقيقية البحث الثنائي مباشرة. بل تستخدم أشجار B (B-trees) أو بنى مشابهة واسعة التفرع، فحتى البحث على القرص، حيث كل خطوة أبطأ نسبيًا، لا يحتاج إلا خطوات قليلة لمليارات الصفوف. يؤدي تجميع BigQuery (clustering) دورًا شبيهًا، إذ يرتّب الصفوف فعليًا بحيث يتجاوز الاستعلام كتلًا كاملة دفعة واحدة. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### تطبيقات الهاتف وجهات الاتصال -كتابة بضعة أحرف في تطبيق جهات الاتصال تضيّق مليون مُدخَل إلى واحد فورًا تقريبًا بفضل الفهرس. + +كتابة بضعة أحرف في تطبيق جهات الاتصال تختصر مليون اسم إلى اسم واحد في لحظة بفضل الفهرس. ### فهارس قواعد البيانات -إضافة فهرس إلى عمود تتيح لقاعدة البيانات إيجاد الصفوف المطابقة في حفنة خطوات بدل فحص الجدول كله. + +إضافة فهرس إلى عمود تتيح لقاعدة البيانات إيجاد الصفوف المطابقة في خطوات قليلة بدل فحص الجدول كله. ### القواميس وفهارس المكتبات -البحث عن كلمة في قاموس ورقي بحث ثنائي باليد. افتح قرب المنتصف، ثم ضيّق يمينًا أو يسارًا. + +البحث عن كلمة في قاموس ورقي بحث ثنائي باليد. تفتح قرب المنتصف، ثم تتجه يمينًا أو يسارًا. ### تجميع وتقسيم BigQuery + يتيح لك BigQuery تجميع جدول حسب عمود معين ليتجاوز الاستعلام مباشرة إلى الصفوف المهمة بدل فحص كل شيء. diff --git a/content/lessons/data/indexes-and-fast-search/en.md b/content/lessons/data/indexes-and-fast-search/en.md index dab03056..d815124d 100644 --- a/content/lessons/data/indexes-and-fast-search/en.md +++ b/content/lessons/data/indexes-and-fast-search/en.md @@ -12,9 +12,9 @@ variables: ## Try it -1. Set e to 3, so there are 1,000 items, and target to a small number. Watch the one-by-one searcher and the binary searcher race to it. -2. Raise e toward 9. The one-by-one searcher now needs far more steps, while the binary searcher barely slows down. -3. Change target to different values. Notice the binary searcher always finds it in roughly the same handful of steps, no matter where it hides. +1. Set e to 3, so there are 1,000 items. The readouts show checking one by one needs 1 000 steps (1.0 ms), while halving each time needs only 10 steps (10 µs). +2. Raise e to 9. Checking one by one now needs 1 000 000 000 steps (1000.0 s), while halving each time needs only 30 steps (30 µs). +3. Now look at the row of 64 boxes and change target, or tap a box. With target at 41 the picture says found in 5 steps; with target at 0 it says 6 steps. Wherever the box hides, it never takes more than 7. ## Real-life examples @@ -30,7 +30,7 @@ variables: ## Intuition -Picture searching for one name in a phone book of a million names by reading every single entry from the start: on a bad day that is nearly a million checks. Raise the slider e and watch the one-by-one searcher crawl through the list one item at a time, while the binary searcher instead jumps to the middle, decides whether the target is to its left or right, and throws away half the list in a single step. Repeating that halving gives the number of steps binary search needs, $b = \log_2 N$, where N is how many items there are. +Picture searching for one name in a phone book of a million names by reading every single entry from the start: on a bad day that is nearly a million checks. Raise the slider e and watch the number of steps for checking one by one explode, while the binary searcher instead jumps to the middle, decides whether the target is to its left or right, and throws away half the list in a single step. Repeating that halving gives the number of steps binary search needs, $b = \log_2 N$, where N is how many items there are. That difference is enormous: a million items takes about 20 steps for binary search but up to a million checks one by one. This is exactly what a database index does behind the scenes, so a lookup that would take forever on an unsorted table finishes almost instantly once it is indexed. @@ -53,13 +53,17 @@ Real databases rarely use plain binary search directly; they use B-trees or simi ## Real world ### Phone and contact apps + Typing a few letters into a contacts app narrows a million entries down to one almost instantly thanks to an index. ### Database indexes + Adding an index to a column lets a database find matching rows in a handful of steps instead of scanning the whole table. ### Dictionaries and library catalogues + Looking up a word in a paper dictionary is binary search by hand: open near the middle, then narrow left or right. ### BigQuery clustering and partitioning + BigQuery lets you cluster a table by a column so queries can skip straight to the relevant rows instead of scanning everything. diff --git a/content/lessons/data/indexes-and-fast-search/lesson.yaml b/content/lessons/data/indexes-and-fast-search/lesson.yaml index 50ea5b55..0a9b642e 100644 --- a/content/lessons/data/indexes-and-fast-search/lesson.yaml +++ b/content/lessons/data/indexes-and-fast-search/lesson.yaml @@ -3,16 +3,16 @@ subject: data difficulty: beginner equation: b = \log_2 N concepts: -- binary search -- database index -- logarithmic time -- algorithms + - binary search + - database index + - logarithmic time + - algorithms prerequisites: -- algorithms-and-complexity -- logarithms + - algorithms-and-complexity + - logarithms related: -- tables-and-filtering -- powers-of-ten + - tables-and-filtering + - powers-of-ten visualization: type: search-race options: {} @@ -29,23 +29,23 @@ parameters: step: 1 value: 41 variables: -- N -- b -- e + - N + - b + - e derivation: -- N = 10^e -- \text{each step of binary search discards half of what remains} -- b = \log_2 N + - N = 10^e + - \text{each step of binary search discards half of what remains} + - b = \log_2 N presets: -- e: 3 - target: 12 -- e: 6 - target: 41 -- e: 9 - target: 55 + - e: 3 + target: 12 + - e: 6 + target: 41 + - e: 9 + target: 55 challenges: -- check: e - target: 12 -- check: target - target: 0 -- check: e <= 2 + - check: e + target: 12 + - check: target + target: 0 + - check: e <= 2 diff --git a/content/lessons/data/joins-between-tables/ar.md b/content/lessons/data/joins-between-tables/ar.md index 4425d2fc..5505f854 100644 --- a/content/lessons/data/joins-between-tables/ar.md +++ b/content/lessons/data/joins-between-tables/ar.md @@ -8,13 +8,13 @@ parameters: variables: - A، الجدول الأول (العملاء) - B، الجدول الثاني (الطلبات) - - R، جدول النتيجة الظاهر على اليمين + - R، جدول النتيجة الظاهر في الأسفل --- ## Try it -1. اجعل mode يساوي 0 (ربط داخلي) وorphan يساوي 1. يوسف موجود في جدول العملاء يسارًا، لكن لا خط يصله، ولا يظهر في النتيجة أبدًا. -2. حرّك mode إلى 1 (ربط أيسر). يظهر صف يوسف نفسه في النتيجة الآن، وتكتب NULL بدل رقم طلبه ومبلغه. +1. اجعل mode يساوي 0 (ربط داخلي) وorphan يساوي 1. يوسف موجود في جدول العملاء يسارًا، لكن لا خط يصله، ولا يظهر في النتيجة أبدًا: عدد الصفوف الناتجة 4، وتقول القراءة إن هذا العميل يُستبعد. +2. حرّك mode إلى 1 (ربط أيسر). يظهر صف يوسف في النتيجة الآن، ومكتوب فيه NULL مكان رقم طلبه ومبلغه: عدد الصفوف الناتجة 5، وهذا العميل يبقى. 3. ادفع orphan إلى 0، فيختفي يوسف من جدول العملاء تمامًا. بدّل mode بين القيمتين. تبقى النتيجة أربعة صفوف في الحالتين. ## Real-life examples @@ -26,14 +26,14 @@ variables: ## Test yourself 1. اجعل mode يساوي 1، فيتحول الربط إلى أيسر. -2. أبقِ يوسف في جدول العملاء، واجعل mode يساوي 0، الربط الداخلي. +2. احذف يوسف من جدول العملاء (orphan يساوي 0) وأبقِ mode عند 0، الربط الداخلي، فلا يُستبعد أي عميل. 3. احذف يوسف من جدول العملاء، ثم اجعل mode يساوي 1، الربط الأيسر. ## Intuition -تخيّل قائمتين على مكتب معلم، هما كشف الفصل بأسماء الطلاب، وقائمة الواجبات المسلَّمة وعليها اسم لكل ورقة. ليصحح المعلم بعدل، يطابق كل ورقة باسم صاحبها، وهذا الاسم هو الرقم المشترك بين القائمتين. سلّمت سارة ولينا ورقة كل واحدة، فيُطابَق اسمهما بسهولة. أما يوسف، وهو مسجَّل في الكشف، فلم يسلّم شيئًا. الربط الداخلي يُبقي فقط الأسماء الموجودة في القائمتين معًا، فيسقط يوسف من التقرير المطابَق تمامًا. أما الربط الأيسر فيبقي كل اسم من الكشف مهما حدث، ويترك عمود واجب يوسف فارغًا فقط. +تخيّل قائمتين على مكتب معلم، هما كشف الفصل بأسماء الطلاب، وقائمة الواجبات المسلَّمة وعليها اسم لكل ورقة. ليصحح المعلم بعدل، يطابق كل ورقة باسم صاحبها، والاسم هنا هو الشيء المشترك بين القائمتين. سلّمت كل من سارة ولينا ورقة، فيجد المعلم اسميهما في القائمتين. أما يوسف، وهو مسجَّل في الكشف، فلم يسلّم شيئًا. الربط الداخلي يُبقي فقط الأسماء الموجودة في القائمتين معًا، فلا يظهر يوسف في التقرير إطلاقًا. أما الربط الأيسر فيبقي كل اسم من الكشف مهما حدث، ويترك عمود واجب يوسف فارغًا فقط. -هذا الفراغ هو ما تسميه قواعد البيانات NULL، أي ليس صفرًا، وليس بيانات ناقصة عن طريق الخطأ، بل معناه «لم يوجد في الجدول الآخر ما يُطابَق». تبديل mode بين الداخلي والأيسر لا يغيّر شيئًا في الجدولين الأصليين، العملاء والطلبات. هو فقط يغيّر أي الصفوف يقبل الربط أن يظهرها بعد انتهاء المطابقة. +هذا الفراغ هو ما تسميه قواعد البيانات NULL، وهو ليس صفرًا، وليس بيانات ضاعت بالخطأ، بل معناه «لم يوجد في الجدول الآخر ما يُطابَق». تبديل mode بين الداخلي والأيسر لا يغيّر شيئًا في الجدولين الأصليين، العملاء والطلبات. هو يغيّر فقط الصفوف التي يُظهرها الربط بعد انتهاء المطابقة. ## Formal @@ -43,24 +43,28 @@ variables: ## Advanced -تنفّذ قواعد البيانات الحقيقية الربط عادة بفهرس أو جدول تجزئة على عمود الرقم المشترك، بدل مقارنة كل صف من الجدول الأول بكل صف من الثاني، وهي مقارنة يكلف عددها ضرب حجمي الجدولين. ومع فهرس جيد، تحتاج مطابقة صف واحد من الأول إلى خطوات قليلة تقريبًا ثابتة أو لوغاريتمية بدل ذلك. +تنفّذ قواعد البيانات الحقيقية الربط عادة بفهرس أو جدول تجزئة على عمود الرقم المشترك، بدل مقارنة كل صف من الجدول الأول بكل صف من الثاني، وهي طريقة عدد مقارناتها يساوي حاصل ضرب حجمي الجدولين. ومع فهرس جيد، تحتاج مطابقة صف واحد من الأول إلى عدد قليل من الخطوات، ثابت تقريبًا أو لوغاريتمي. ## Derivation 1. لا يمكن أن يوجد صف في الجدول المجمَّع إلا بعد مقارنة رقمه بأرقام الجدول الآخر أولًا. -2. الربط الداخلي يطرح أي صف رقمه بلا شريك. أما الربط الأيسر فيُبقيه ويملأ الأعمدة الناقصة بـNULL. +2. الربط الداخلي يحذف أي صف لا يجد رقمه شريكًا. أما الربط الأيسر فيُبقيه ويملأ الأعمدة الناقصة بـNULL. 3. في الحالتين، $R$ هو الجدول الذي يظهر فعلًا لمن نفّذ الاستعلام. ## Real world ### إدارة علاقات العملاء + تربط شركة قائمة عملائها بقائمة طلباتهم لبناء تقرير «أكبر المشترين»، والعميل الذي لم يشترِ قط لا يظهر في نسخة الربط الداخلي من هذا التقرير. ### متاجر التسوق الإلكتروني + تربط صفحة تأكيد الطلب في متجر إلكتروني جدول الطلبات بجدول المنتجات عبر رقم المنتج، فتسحب اسم كل قطعة وسعرها لتظهر بجانب الطلب. ### رسائل التسويق + الربط الأيسر بين العملاء والطلبات هو بالضبط ما تستخدمه أداة تسويقية لتجد «عملاء اشتركوا ولم يشتروا شيئًا»، إذ تبحث عن الصفوف التي عادت أعمدة الطلب فيها NULL. ### البحث في جداول البيانات + تقوم دالة VLOOKUP أو XLOOKUP في جدول بيانات بالمطابقة نفسها يدويًا، صفًا بعد صف. وربط قاعدة البيانات يفعل الأمر نفسه تلقائيًا، لكن لملايين الصفوف دفعة واحدة. diff --git a/content/lessons/data/joins-between-tables/en.md b/content/lessons/data/joins-between-tables/en.md index f7710573..9429138e 100644 --- a/content/lessons/data/joins-between-tables/en.md +++ b/content/lessons/data/joins-between-tables/en.md @@ -7,13 +7,13 @@ parameters: variables: - A, the first table (customers) - B, the second table (orders) - - R, the result table shown on the right + - R, the result table shown at the bottom --- ## Try it -1. Set mode to 0 (inner join) with orphan at 1. Yousef sits in the customers table on the left, but no line reaches him, and he never appears in the result. -2. Move mode to 1 (left join). The same Yousef row now appears in the result, with NULL where his order id and amount would be. +1. Set mode to 0 (inner join) with orphan at 1. Yousef sits in the customers table on the left, but no line reaches him, and he never appears in the result: rows returned = 4, and the readout says that customer is dropped. +2. Move mode to 1 (left join). Yousef's row now appears in the result, with NULL where his order id and amount would be: rows returned = 5, and that customer is kept. 3. Push orphan to 0, removing Yousef from the customers table entirely. Now flip mode back and forth: the result stays the same four rows either way. ## Real-life examples @@ -25,7 +25,7 @@ variables: ## Test yourself 1. Set mode to 1, switching to a left join. -2. With Yousef still in the customers table, set mode to 0, the inner join. +2. Remove Yousef from the customers table (orphan at 0) and keep mode at 0, the inner join, so that no customer is dropped. 3. Remove Yousef from the customers table, then set mode to 1, the left join. ## Intuition @@ -53,13 +53,17 @@ Real databases usually implement a join with an index or a hash table on the key ## Real world ### Customer relationship management + A company joins its customer list to its orders list to build a "top spenders" report; customers who never ordered simply do not appear in an inner join version of that report. ### Online store checkouts + An online store's order confirmation page joins the orders table to the products table by product id, pulling in each item's name and price to show next to the order. ### Marketing emails + A left join between customers and orders is exactly how a marketing tool finds "customers who signed up but never bought anything": look for the rows where the order columns came back NULL. ### Spreadsheet lookups + A spreadsheet's VLOOKUP or XLOOKUP does the same matching by hand, one row at a time, that a database join does automatically for millions of rows. diff --git a/content/lessons/data/joins-between-tables/lesson.yaml b/content/lessons/data/joins-between-tables/lesson.yaml index 3c4be978..088b0f24 100644 --- a/content/lessons/data/joins-between-tables/lesson.yaml +++ b/content/lessons/data/joins-between-tables/lesson.yaml @@ -3,16 +3,16 @@ subject: data difficulty: beginner equation: R = \text{join}(A, B, \text{key}) concepts: -- joins -- inner join -- left join -- foreign key -- relational database + - joins + - inner join + - left join + - foreign key + - relational database prerequisites: -- tables-and-filtering + - tables-and-filtering related: -- tables-and-filtering -- grouping-and-totals + - tables-and-filtering + - grouping-and-totals visualization: type: join-tables options: {} @@ -29,22 +29,22 @@ parameters: step: 1 value: 1 variables: -- A -- B -- R + - A + - B + - R derivation: -- \text{inner join keeps a row only when its key appears in both } A \text{ and } B -- \text{left join keeps every row of } A, \text{ filling the blanks when } B \text{ has no match} -- R = \text{join}(A, B, \text{key}) \text{ is the table shown on the right} + - \text{inner join keeps a row only when its key appears in both } A \text{ and } B + - \text{left join keeps every row of } A, \text{ filling the blanks when } B \text{ has no match} + - R = \text{join}(A, B, \text{key}) \text{ is the table shown at the bottom} presets: -- mode: 0 - orphan: 1 -- mode: 1 - orphan: 1 -- mode: 1 - orphan: 0 + - mode: 0 + orphan: 1 + - mode: 1 + orphan: 1 + - mode: 1 + orphan: 0 challenges: -- check: mode - target: 1 -- check: mode == 0 and orphan == 1 -- check: mode == 1 and orphan == 0 + - check: mode + target: 1 + - check: mode == 0 and orphan == 0 + - check: mode == 1 and orphan == 0 diff --git a/content/lessons/data/mapreduce/ar.md b/content/lessons/data/mapreduce/ar.md index 55ef6a4f..e49aa27e 100644 --- a/content/lessons/data/mapreduce/ar.md +++ b/content/lessons/data/mapreduce/ar.md @@ -12,9 +12,9 @@ variables: ## Try it -1. اجعل step يساوي 0. راقب الوثائق الأربع تُقسّم، وثيقة لكل آلة. -2. حرّك step إلى 1 ثم 2. تحسب كل آلة الكلمات في وثيقتها، ثم تُخلط النتائج الجزئية معًا حسب الكلمة. -3. ادفع step إلى 3. تختزل النتائج المخلوطة إلى مجموع نهائي واحد لكل كلمة عبر الوثائق الأربع كلها. +1. اجعل step يساوي 0. تتوزّع الوثائق الأربع، وثيقة لكل آلة. تعرض القراءات: الآلات 4، الكلمات 12، الكلمات المختلفة 6. +2. حرّك step إلى 1 ثم 2. عند 1 تكتب كل آلة بطاقة «كلمة، 1» لكل كلمة في وثيقتها. وعند 2 تُجمع البطاقات معًا حسب الكلمة، مثل «هنا: 1 + 1 + 1». +3. ادفع step إلى 3. تُجمع بطاقات كل كلمة في مجموع نهائي واحد لها في الوثائق الأربع كلها: «هنا» 3، وكل من «جلس» و«القط» و«ركض» و«الكلب» 2، و«هناك» 1. ## Real-life examples @@ -24,8 +24,8 @@ variables: ## Test yourself -1. حرّك step إلى 1، مرحلة map. -2. حرّك step إلى 3، مرحلة reduce. +1. حرّك step إلى 1، مرحلة المعالجة (map). +2. حرّك step إلى 3، مرحلة التجميع (reduce). 3. صل إلى مرحلة الخلط (shuffle) أو ما بعدها، step عند 2 أو أكثر. ## Intuition @@ -53,13 +53,17 @@ variables: ## Real world ### عدّ الكلمات وفهارس البحث + قدّمت جوجل MapReduce لبناء فهرس بحثها، فتعدّ الكلمات عبر مليارات صفحات الويب موزّعة على آلات كثيرة. ### Hadoop وSpark -أخذت أدوات مفتوحة المصدر مثل Hadoop وSpark الفكرة نفسها، split وmap وshuffle وreduce. وأتاحتها لأي شخص لديه عنقود من الآلات. + +أخذت أدوات مفتوحة المصدر مثل Hadoop وSpark الفكرة نفسها، split وmap وshuffle وreduce، وأتاحتها لكل من لديه مجموعة من الآلات. ### محرك تنفيذ BigQuery -يجيب BigQuery عن استعلام SQL واحد بتقسيم البيانات الأساسية على آلاف الآلات خلف الكواليس، بروح MapReduce نفسها. + +يجيب BigQuery عن استعلام SQL واحد بتقسيم البيانات على آلاف الآلات من دون أن تراها، بطريقة قريبة من MapReduce. ### تحليل السجلات على نطاق واسع -تستقبل شركة مليارات أسطر السجل يوميًا. تستخدم هذا النمط لعدّ الأخطاء أو الأحداث في الساعة دون أن تقرأها آلة واحدة كلها. + +شركة تستقبل مليارات أسطر السجل يوميًا تستخدم هذه الطريقة لعدّ الأخطاء أو الأحداث في كل ساعة، من دون أن تقرأ آلة واحدة الأسطر كلها. diff --git a/content/lessons/data/mapreduce/en.md b/content/lessons/data/mapreduce/en.md index fdc91301..24f3f35f 100644 --- a/content/lessons/data/mapreduce/en.md +++ b/content/lessons/data/mapreduce/en.md @@ -11,9 +11,9 @@ variables: ## Try it -1. Set step to 0. Watch the four documents get split, one to each machine. -2. Move step to 1, then 2. Each machine counts words in its own document, then the partial counts shuffle together by word. -3. Push step to 3. The shuffled counts reduce into one final total for every word across all four documents. +1. Set step to 0. The four documents are split, one to each machine. The readouts show machines = 4, words = 12 and different words = 6. +2. Move step to 1, then 2. At 1, each machine writes a "word, 1" tag for every word in its own document. At 2, the tags are shuffled together by word, for example "the: 1 + 1 + 1". +3. Push step to 3. Each group of tags is added into one final total for its word across all four documents: the 3, cat 2, sat 2, dog 2, ran 2, a 1. ## Real-life examples @@ -52,13 +52,17 @@ The shuffle stage, which regroups partial results by key before the final reduce ## Real world ### Word count and search indexes + Google introduced MapReduce to build its search index, counting words across billions of web pages spread over many machines. ### Hadoop and Spark + Open-source tools such as Hadoop and Spark took the same split, map, shuffle, reduce idea and made it available to anyone with a cluster of machines. ### BigQuery's execution engine + BigQuery answers a single SQL query by splitting the underlying data across thousands of machines behind the scenes, in the same spirit as MapReduce. ### Log analysis at scale + A company with billions of log lines a day uses this pattern to count errors or events per hour without any single machine reading them all. diff --git a/content/lessons/data/mapreduce/lesson.yaml b/content/lessons/data/mapreduce/lesson.yaml index 4e0f0cd8..52b3c1f2 100644 --- a/content/lessons/data/mapreduce/lesson.yaml +++ b/content/lessons/data/mapreduce/lesson.yaml @@ -3,16 +3,16 @@ subject: data difficulty: beginner equation: T = \text{reduce}(\text{map}(\text{split}(D, k))) concepts: -- MapReduce -- distributed computing -- split -- shuffle -- reduce + - MapReduce + - distributed computing + - split + - shuffle + - reduce prerequisites: -- algorithms-and-complexity + - algorithms-and-complexity related: -- parallel-computing -- column-storage-and-bigquery + - parallel-computing + - column-storage-and-bigquery visualization: type: map-reduce options: {} @@ -24,20 +24,20 @@ parameters: step: 1 value: 0 variables: -- D -- k -- T + - D + - k + - T derivation: -- \text{split}(D, k) \to k \text{ independent chunks} -- '\text{map: each of the } k \text{ machines processes its own chunk}' -- '\text{reduce: combine the } k \text{ partial results into } T' + - \text{split}(D, k) \to k \text{ independent chunks} + - '\text{map: each of the } k \text{ machines processes its own chunk}' + - '\text{reduce: combine the } k \text{ partial results into } T' presets: -- step: 0 -- step: 1 -- step: 3 + - step: 0 + - step: 1 + - step: 3 challenges: -- check: step - target: 1 -- check: step - target: 3 -- check: step >= 2 + - check: step + target: 1 + - check: step + target: 3 + - check: step >= 2 diff --git a/content/lessons/data/parallel-computing/ar.md b/content/lessons/data/parallel-computing/ar.md index 06d02ee6..f4da2c39 100644 --- a/content/lessons/data/parallel-computing/ar.md +++ b/content/lessons/data/parallel-computing/ar.md @@ -14,15 +14,15 @@ variables: ## Try it -1. اجعل p يساوي 0.5 وx يساوي 1. تبقى النقطة منخفضة على المنحنى، فبآلة واحدة فقط لا يوجد أي تسريع. -2. اسحب x نحو 1000. يرتفع المنحنى بسرعة في البداية، ثم يستوي ويكاد لا يرتفع بعدها. -3. ارفع p نحو 0.99 بدلًا من ذلك. يصل عدد الآلات نفسه الآن إلى نقطة أعلى بكثير على المنحنى قبل أن يستوي. +1. اجعل p يساوي 0.5 وx يساوي 1. تقف النقطة عند أول المنحنى وتعرض القراءة f(x) = 1، فبآلة واحدة فقط لا يوجد أي تسريع. +2. اسحب x إلى 1000. تصعد النقطة بسرعة في البداية، ثم يستوي المنحنى: تعرض القراءة f(x) القيمة 1.998 ولا تتجاوز 2 أبدًا. +3. اجعل x يساوي 100، فتعرض القراءة f(x) القيمة 1.9802، ثم ارفع p إلى 0.99. تصل الآلات المئة نفسها الآن إلى نقطة أعلى بكثير على المنحنى: f(x) تساوي 50.2513. ## Real-life examples -1. **آلة واحدة في الغالب.** p عند 0.5، وx عند 4، حيث نصف المهمة فقط قابل للتقسيم، فأربع آلات بالكاد تضاعف السرعة. -2. **مهمة موازية جيدًا.** p عند 0.95، وx عند 16. يتوزع 95% من العمل على 16 آلة، قريبًا من تسريع بمقدار 16 مرة على عنقود حقيقي. -3. **مهمة MapReduce شبه مثالية.** p عند 0.99، وx عند 200، حيث 99% من العمل يتوازى على 200 آلة، كفحص كبير بأسلوب BigQuery. +1. **آلة واحدة في الغالب.** p عند 0.5، وx عند 4، حيث نصف المهمة فقط قابل للتقسيم، فأربع آلات تجعلها أسرع 1.6 مرة فقط. +2. **مهمة يسهل توزيعها.** p عند 0.95، وx عند 16. يتوزع 95% من العمل على 16 آلة، ومع ذلك تصبح المهمة أسرع بنحو 9.1 مرة فقط، وهذا بعيد عن 16. +3. **مهمة MapReduce شبه مثالية.** p عند 0.99، وx عند 100، حيث 99% من العمل يتوزع على 100 آلة، مثل قراءة جدول ضخم في BigQuery، فتصبح المهمة أسرع بنحو 50 مرة. ## Test yourself @@ -38,30 +38,34 @@ variables: ## Formal -طبّع وقت آلة واحدة إلى 1. جزء منه بنسبة p يمكن تشغيله على x آلة بالتوازي، فيستغرق $p/x$. أما الباقي، $1-p$، فلا يمكن تقسيمه ويستغرق الوقت نفسه دائمًا. فالوقت بـx آلة هو $T(x) = (1-p) + p/x$، والتسريع مقارنة بآلة واحدة يصل إلى $S(x) = 1/((1-p) + p/x)$، وهو المنحنى المرسوم أعلاه. +اعتبر أن وقت آلة واحدة يساوي 1. جزء منه بنسبة p يمكن تشغيله على x آلة بالتوازي، فيستغرق $p/x$. أما الباقي، $1-p$، فلا يمكن تقسيمه ويستغرق الوقت نفسه دائمًا. فالوقت بـx آلة هو $T(x) = (1-p) + p/x$، والتسريع مقارنة بآلة واحدة يساوي $S(x) = 1/((1-p) + p/x)$، وهو المنحنى المرسوم أعلاه. هذا هو قانون أمدال (Amdahl's law). كلما كبر x بلا حدود، يتقلص $p/x$ حتى يكاد يختفي، فيقترب التسريع من سقف ثابت، $S \to 1/(1-p)$. الجزء التسلسلي وحده هو من يحدد أفضل تسريع يمكن لأي عدد من الآلات بلوغه. ## Advanced -عمليًا يكون المنحنى عادة أسوأ من هذا المثالي، لأن تنسيق x آلة يحمل تكلفته الخاصة، مثل اتصال الشبكة، ومرحلة الخلط في MapReduce، أو انتظار أبطأ آلة لتنهي عملها. تميل منحنيات التسريع الحقيقية إلى الاستواء، بل أحيانًا الانخفاض، قبل ما يتنبأ به قانون أمدال وحده. +في الواقع يكون المنحنى عادة أسوأ من هذا المنحنى المثالي، لأن تنسيق العمل بين x آلة له تكلفته أيضًا، مثل اتصال الشبكة، ومرحلة الخلط في MapReduce، أو انتظار أبطأ آلة لتنهي عملها. تميل منحنيات التسريع الحقيقية إلى الاستواء، بل أحيانًا الانخفاض، قبل ما يتنبأ به قانون أمدال وحده. ## Derivation -1. بتطبيع وقت آلة واحدة إلى 1، فإن توزيع النسبة القابلة للتوازي p على x آلة يجعل ذلك الجزء يستغرق الآن p مقسومًا على x فقط، بينما يستغرق الجزء التسلسلي 1 ناقص p الوقت نفسه كما كان. +1. إذا اعتبرنا وقت آلة واحدة يساوي 1، فإن توزيع النسبة القابلة للتوازي p على x آلة يجعل ذلك الجزء يستغرق الآن p مقسومًا على x فقط، بينما يستغرق الجزء التسلسلي 1 ناقص p الوقت نفسه كما كان. 2. يقارن التسريع الوقت الأصلي على آلة واحدة بالوقت الجديد على x آلة، فـS(x) هو ذلك الوقت الأصلي مقسومًا على T(x). 3. كلما كبر x جدًا، يتقلص p مقسومًا على x نحو الصفر، فيقترب التسريع من سقف ثابت مقداره 1 مقسومًا على 1 ناقص p، ولا يمكنه أبدًا تجاوزه. ## Real world ### BigQuery والاستعلامات الموزّعة -يقسّم BigQuery استعلامًا على آلاف الآلات. لكن أي جزء من الخطة لا يمكن تقسيمه يبقى يحدّ من فائدة عنقود أكبر. -### تصيير الفيديو وترميزه -يتوزّع تصيير إطارات الفيديو المنفصلة بسهولة على آلات كثيرة. لكن دمج الملف النهائي خطوة تسلسلية تحدّ من التسريع الكلي. +يقسّم BigQuery استعلامًا على آلاف الآلات. لكن أي جزء من الخطة لا يمكن تقسيمه يحدّ من فائدة زيادة عدد الآلات. + +### إنتاج الفيديو وترميزه + +يتوزّع إنتاج إطارات الفيديو المنفصلة بسهولة على آلات كثيرة. لكن دمج الملف النهائي خطوة تسلسلية تحدّ من التسريع الكلي. ### المحاكاة العلمية -تقسّم محاكاة الطقس والمناخ الفضاء إلى شبكة تحسبها آلات كثيرة بالتوازي. لكن الأجزاء قرب حدود كل منطقة لا تزال بحاجة لتبادل بيانات فيما بينها. + +تقسّم محاكاة الطقس والمناخ الجو إلى شبكة تحسبها آلات كثيرة بالتوازي. لكن الأجزاء قرب حدود كل منطقة لا تزال بحاجة لتبادل بيانات فيما بينها. ### الجوالات والحواسيب متعددة الأنوية + لا يشغّل جوال بثمانية أنوية كل تطبيق أسرع بثماني مرات. والسبب أن نسبة العمل القابلة للتوازي p في معظم المهام اليومية أقل من 100% بكثير. diff --git a/content/lessons/data/parallel-computing/en.md b/content/lessons/data/parallel-computing/en.md index 837fb38a..8cb852c3 100644 --- a/content/lessons/data/parallel-computing/en.md +++ b/content/lessons/data/parallel-computing/en.md @@ -13,15 +13,15 @@ variables: ## Try it -1. Set p to 0.5 and x to 1. The curve sits low; with only one machine there is no speedup at all. -2. Drag x up toward 1000. The curve on the graph climbs fast at first, then flattens out and barely rises anymore. -3. Raise p toward 0.99 instead. The same number of machines now reaches a much higher point on the curve before it flattens. +1. Set p to 0.5 and x to 1. The dot sits at the very start of the curve and the readout shows f(x) = 1: with only one machine there is no speedup at all. +2. Drag x up to 1000. The dot climbs fast at first, then the curve flattens out: f(x) reads 1.998 and never passes 2. +3. Set x to 100, where f(x) reads 1.9802, then raise p to 0.99. The same 100 machines now reach a much higher point on the curve: f(x) reads 50.2513. ## Real-life examples -1. **Mostly one machine.** p at 0.5, x at 4: only half the job can be split up, so four machines barely double the speed. -2. **A well-parallelized job.** p at 0.95, x at 16: 95% of the work splits across 16 machines, close to a 16-fold speedup on a real cluster. -3. **A near-perfect MapReduce job.** p at 0.99, x at 200: 99% of the work parallelizes across 200 machines, like a large BigQuery-style scan. +1. **Mostly one machine.** p at 0.5, x at 4: only half the job can be split up, so four machines make it just 1.6 times faster. +2. **A well-parallelized job.** p at 0.95, x at 16: 95% of the work splits across 16 machines, yet the job runs only about 9.1 times faster, far short of 16. +3. **A near-perfect MapReduce job.** p at 0.99, x at 100: 99% of the work parallelizes across 100 machines, like a large BigQuery-style scan, and the job runs about 50 times faster. ## Test yourself @@ -54,13 +54,17 @@ In practice the curve is usually worse than this ideal, since coordinating x mac ## Real world ### BigQuery and distributed queries + BigQuery splits a query across thousands of machines, but any part of the plan that cannot be split still limits how much a bigger cluster helps. ### Video rendering and encoding + Rendering separate frames of a video splits easily across many machines, but stitching the final file back together is a serial step that limits total speedup. ### Scientific simulation + Weather and climate simulations split space into a grid that many machines can compute in parallel, but pieces near the edges of each region still need to exchange data with each other. ### Multi-core phones and laptops + A phone with eight cores does not run every app eight times faster, because the useful parallel fraction p of most everyday tasks is well under 100%. diff --git a/content/lessons/data/parallel-computing/lesson.yaml b/content/lessons/data/parallel-computing/lesson.yaml index d5d35c78..ab9acfdc 100644 --- a/content/lessons/data/parallel-computing/lesson.yaml +++ b/content/lessons/data/parallel-computing/lesson.yaml @@ -3,14 +3,14 @@ subject: data difficulty: beginner equation: S(x) = \dfrac{1}{(1-p) + p/x} concepts: -- Amdahl's law -- parallel computing -- speedup -- distributed systems + - Amdahl's law + - parallel computing + - speedup + - distributed systems prerequisites: -- algorithms-and-complexity + - algorithms-and-complexity related: -- mapreduce + - mapreduce visualization: type: function-plot options: @@ -31,24 +31,24 @@ parameters: step: 1 value: 16 variables: -- S -- p -- x -- T + - S + - p + - x + - T derivation: -- T(x) = (1-p) + \dfrac{p}{x} -- S(x) = \dfrac{T(1)}{T(x)} -- x \to \infty \Rightarrow S \to \dfrac{1}{1-p} + - T(x) = (1-p) + \dfrac{p}{x} + - S(x) = \dfrac{T(1)}{T(x)} + - x \to \infty \Rightarrow S \to \dfrac{1}{1-p} presets: -- p: 0.5 - x: 4 -- p: 0.95 - x: 16 -- p: 0.99 - x: 200 + - p: 0.5 + x: 4 + - p: 0.95 + x: 16 + - p: 0.99 + x: 100 challenges: -- check: p - target: 0.9 -- check: x - target: 100 -- check: 1/((1-p)+p/x) > 15 + - check: p + target: 0.9 + - check: x + target: 100 + - check: 1/((1-p)+p/x) > 15 diff --git a/content/lessons/data/sampling-big-data/ar.md b/content/lessons/data/sampling-big-data/ar.md index ecd6af5e..44c7cc14 100644 --- a/content/lessons/data/sampling-big-data/ar.md +++ b/content/lessons/data/sampling-big-data/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اجعل N يساوي 20 وراقب صف الرميات. يتقلب خط المتوسط المتحرك كثيرًا مع هذا العدد القليل من الرميات. -2. ارفع N نحو 1000. يستقر خط المتوسط المتحرك ويبقى قريبًا من p. -3. ارفع speed لتشغيل الرميات بسرعة، ثم غيّر p وراقب المتوسط يستقر قرب القيمة الجديدة بدلًا من ذلك. +1. اجعل N يساوي 20 وراقب صف الرميات. يتقلب خط النسبة كثيرًا مع هذا العدد القليل من الرميات، وتنتهي قراءة «البعد عن p» غالبًا قرب 0.1. +2. ارفع N إلى 1000. يستقر خط النسبة ويبقى قريبًا من p: في النهاية تكون قراءة «البعد عن p» أقل من 0.03 في الغالب. +3. ارفع speed إلى 200 لتمرّ الرميات بسرعة، ثم اجعل p يساوي 0.8. تبدأ الرميات من جديد وتستقر النسبة قرب 0.8 هذه المرة. ## Real-life examples @@ -31,36 +31,40 @@ variables: ## Intuition -تخيّل عملة تسقط على الصورة 30% من المرات، واسأل نفسك كم مرة ستظهر الصورة في أول 20 رمية. قد يبتعد خط المتوسط المتحرك على الرسم كثيرًا عن 0.3 مع هذا العدد القليل من الرميات. ارفع المنزلق N نحو 1000 وراقب الخط نفسه يستقر ويقترب من p أكثر بكثير. كلما زادت الرميات قلّ التذبذب. +تخيّل عملة تسقط على الصورة 30% من المرات، واسأل نفسك كم مرة ستظهر الصورة في أول 20 رمية. قد يبتعد خط النسبة على الرسم كثيرًا عن 0.3 مع هذا العدد القليل من الرميات. ارفع المنزلق N نحو 1000 وراقب الخط نفسه يستقر ويقترب من p أكثر بكثير. كلما زادت الرميات قلّ التذبذب. -لهذا التذبذب حجم يسمى الخطأ المعياري، ويصغر كلما كبرت عيّنتك N. يُكتب $\text{SE} = \sqrt{\dfrac{p(1-p)}{N}}$، وp هو النسبة الحقيقية وN هو عدد الرميات، أو الصفوف، التي أخذتها كعيّنة. يستخدم القائم على استطلاع أو محلل البيانات هذه الفكرة نفسها ليحدد كم شخصًا، أو صفًا، يحتاج أخذه كعيّنة قبل أن يثق بتقديره. +لهذا التذبذب حجم يسمى الخطأ المعياري، ويصغر كلما كبرت عيّنتك N. يُكتب $\text{SE} = \sqrt{\dfrac{p(1-p)}{N}}$، وp هو النسبة الحقيقية وN هو عدد الرميات، أو الصفوف، التي أخذتها كعيّنة. يستخدم من يُجري استطلاعًا أو يحلل بيانات هذه الفكرة نفسها ليحدد كم شخصًا، أو صفًا، يحتاج أخذه كعيّنة قبل أن يثق بتقديره. ## Formal -يقدّر أخذ العيّنة خاصية لمجموعة بيانات كاملة، مثل نسبة p من الصفوف التي تحقق شرطًا معينًا، بالنظر فقط إلى N صف مختار عشوائيًا بدل كل الصفوف. تُقاس عدم اليقين في هذا التقدير بالخطأ المعياري، $\text{SE} = \sqrt{\dfrac{p(1-p)}{N}}$، وهو يصغر كلما كبرت العيّنة. +يقدّر أخذ العيّنة خاصية لمجموعة بيانات كاملة، مثل نسبة p من الصفوف التي تحقق شرطًا معينًا، بالنظر فقط إلى N صف مختار عشوائيًا بدل كل الصفوف. يُقاس مقدار الشك في هذا التقدير بالخطأ المعياري، $\text{SE} = \sqrt{\dfrac{p(1-p)}{N}}$، وهو يصغر كلما كبرت العيّنة. -بما أن N يقع تحت جذر تربيعي، فمضاعفة حجم العيّنة أربع مرات لا تخفّض الخطأ المعياري إلا إلى نصفه، فتخفيضه بمقدار عشرة أضعاف يكلّف مئة ضعف من الصفوف. هذه حقيقة مفيدة عند تقرير ما إذا كان يستحق قراءة جدول كامل فيه مليار صف أم عيّنة مختارة جيدًا منه فقط. +بما أن N يقع تحت جذر تربيعي، فمضاعفة حجم العيّنة أربع مرات لا تخفّض الخطأ المعياري إلا إلى نصفه، فتخفيضه بمقدار عشرة أضعاف يكلّف مئة ضعف من الصفوف. تفيدك هذه الحقيقة حين تقرر: هل تقرأ جدولًا كاملًا فيه مليار صف، أم تكتفي بعيّنة مختارة جيدًا منه؟ ## Advanced -بلغة الرياضيات، تتقارب نسبة العيّنة نحو النسبة الحقيقية p بحكم قانون الأعداد الكبيرة، ولN كبير يتوزع تقديرها تقريبًا توزيعًا طبيعيًا حول p بانحراف معياري SE. هذا ما يتيح للمحللين بناء فترة ثقة 95% مقدارها تقريبًا $p \pm 2 \cdot \text{SE}$. يدعم BigQuery ومستودعات مشابهة له هذا مباشرة بجملة TABLESAMPLE التي تقرأ فقط جزءًا عشوائيًا من جدول ضخم. +بلغة الرياضيات، تتقارب نسبة العيّنة نحو النسبة الحقيقية p بحكم قانون الأعداد الكبيرة، وحين يكون N كبيرًا يتوزع تقديرها تقريبًا توزيعًا طبيعيًا حول p بانحراف معياري SE. هذا ما يتيح للمحللين بناء فترة ثقة 95% مقدارها تقريبًا $p \pm 2 \cdot \text{SE}$. يدعم BigQuery ومستودعات مشابهة له هذا مباشرة بجملة TABLESAMPLE التي تقرأ فقط جزءًا عشوائيًا من جدول ضخم. ## Derivation 1. تباين التقدير من N عيّنة لنسبة p يساوي p مضروبة في واحد ناقص p، مقسومًا على N. 2. الخطأ المعياري هو ببساطة الجذر التربيعي لذلك التباين، معادًا إلى وحدات p نفسها. -3. كلما كبر N بلا حدود، صغر ذلك الكسر نحو الصفر، فيصغر الخطأ المعياري نحو الصفر أيضًا. عيّنة أكبر تعني عدم يقين أقل. +3. كلما كبر N بلا حدود، صغر ذلك الكسر نحو الصفر، فيصغر الخطأ المعياري نحو الصفر أيضًا. عيّنة أكبر تعني شكًّا أقل. ## Real world ### استطلاعات الرأي -يقدّر القائم على استطلاع تأييد مرشح بين ملايين الناخبين بالاتصال ببضعة آلاف منهم فقط. + +يقدّر من يُجري الاستطلاع تأييد مرشح بين ملايين الناخبين بالاتصال ببضعة آلاف منهم فقط. ### اختبار A/B -يقارن موقع إلكتروني نسختين من صفحة. يعرض كل نسخة على عيّنة من الزوار بدل انتظار كل زائر إلى الأبد. + +يقارن موقع إلكتروني نسختين من صفحة. يعرض كل نسخة على عيّنة من الزوار بدل انتظار كل الزوار. ### TABLESAMPLE في BigQuery + يشغّل المحللون استعلامًا على عيّنة عشوائية من جدول ضخم بـTABLESAMPLE. يحصلون بذلك على تقدير سريع ورخيص قبل تشغيل الاستعلام الكامل. ### مراقبة الجودة + يفحص مصنع عيّنة من القطع الخارجة من خط الإنتاج بدل كل قطعة. يقدّر نسبة العيوب الكلية من تلك العيّنة. diff --git a/content/lessons/data/sampling-big-data/en.md b/content/lessons/data/sampling-big-data/en.md index c945cebf..e558a760 100644 --- a/content/lessons/data/sampling-big-data/en.md +++ b/content/lessons/data/sampling-big-data/en.md @@ -12,9 +12,9 @@ variables: ## Try it -1. Set N to 20 and watch the row of flips. The running average line jumps around a lot with so few flips. -2. Raise N toward 1000. The running average settles down and stays close to p. -3. Raise speed to run through flips quickly, then change p and watch the average settle near the new value instead. +1. Set N to 20 and watch the row of flips. The running average line jumps around a lot with so few flips, and the "distance from p" readout often ends near 0.1. +2. Raise N to 1000. The running average settles down and stays close to p: by the end, "distance from p" is usually below 0.03. +3. Raise speed to 200 to run through flips quickly, then set p to 0.8. The flips start again and the average settles near 0.8 instead. ## Real-life examples @@ -53,13 +53,17 @@ Formally, the sample proportion converges to the true p by the law of large numb ## Real world ### Opinion polls + A pollster estimates the support for a candidate among millions of voters by calling only a few thousand of them. ### A/B testing + A website compares two versions of a page by showing each to a sample of visitors rather than waiting for every visitor ever. ### BigQuery TABLESAMPLE + Analysts run a query on a random sample of a huge table with TABLESAMPLE to get a fast, cheap estimate before running the full query. ### Quality control + A factory tests a sample of items off the line instead of every single one, and estimates the overall defect rate from that sample. diff --git a/content/lessons/data/sampling-big-data/lesson.yaml b/content/lessons/data/sampling-big-data/lesson.yaml index 4cf93feb..72362fcf 100644 --- a/content/lessons/data/sampling-big-data/lesson.yaml +++ b/content/lessons/data/sampling-big-data/lesson.yaml @@ -3,14 +3,14 @@ subject: data difficulty: beginner equation: \text{SE} = \sqrt{\dfrac{p(1-p)}{N}} concepts: -- sampling -- margin of error -- law of large numbers -- estimation + - sampling + - margin of error + - law of large numbers + - estimation prerequisites: -- law-of-large-numbers + - law-of-large-numbers related: -- mapreduce + - mapreduce visualization: type: coin-flips options: {} @@ -32,25 +32,25 @@ parameters: step: 1 value: 60 variables: -- p -- N + - p + - N derivation: -- \text{Var} = \dfrac{p(1-p)}{N} -- \text{SE} = \sqrt{\text{Var}} -- N \to \infty \Rightarrow \text{SE} \to 0 + - \text{Var} = \dfrac{p(1-p)}{N} + - \text{SE} = \sqrt{\text{Var}} + - N \to \infty \Rightarrow \text{SE} \to 0 presets: -- p: 0.5 - N: 50 - speed: 80 -- p: 0.3 - N: 1000 - speed: 60 -- p: 0.8 - N: 2000 - speed: 150 + - p: 0.5 + N: 50 + speed: 80 + - p: 0.3 + N: 1000 + speed: 60 + - p: 0.8 + N: 2000 + speed: 150 challenges: -- check: N - target: 500 -- check: p - target: 0.5 -- check: N >= 1500 + - check: N + target: 500 + - check: p + target: 0.5 + - check: N >= 1500 diff --git a/content/lessons/data/tables-and-filtering/ar.md b/content/lessons/data/tables-and-filtering/ar.md index fbabaadb..f79096d8 100644 --- a/content/lessons/data/tables-and-filtering/ar.md +++ b/content/lessons/data/tables-and-filtering/ar.md @@ -10,54 +10,58 @@ variables: ## Try it -1. اسحب المنزلق المكتوب عليه min إلى 0. يبقى كل صف في جدول الطلبات مضاءً، فلا يُستبعد أي صف. -2. ارفع min نحو 20. راقب الصفوف ذات المبلغ الأصغر وهي تخفت، بينما تبقى الصفوف فوق 20 مضاءة. -3. ادفع min قرب 45. لا يبقى في الجدول سوى أكبر الطلبات فقط. +1. اسحب المنزلق المكتوب عليه min إلى 0. يبقى كل صف في جدول الطلبات مضاءً، وتعرض القراءة «الصفوف الناتجة» العدد 12. +2. اجعل min يساوي 20. تخفت الصفوف التي مبلغها أقل من 20، وتبقى 4 صفوف مضاءة: 22 و25 و30 و40. +3. اجعل min يساوي 40. لا يبقى إلا أكبر طلب، وهو 40، فتصبح الصفوف الناتجة 1. ادفع min إلى 41 فلا يبقى أي صف. ## Real-life examples 1. **أظهر كل طلب.** min عند 0 يُبقي الجدول كاملًا، مفيد حين تريد رؤية كل البيانات الخام أولًا. 2. **طلبات بقيمة 20 دولارًا فأكثر.** min عند 20 يستبعد الطلبات الصغيرة، ويترك ما يستحق أولوية التوصيل. -3. **كبار المشترين فقط.** min عند 40 يُبقي أكبر الطلبات فقط، مفيد لمعرفة أفضل زبائنك. +3. **كبار المشترين فقط.** min عند 40 يُبقي أكبر طلب فقط، مفيد لمعرفة أفضل زبائنك. ## Test yourself 1. اجعل min يساوي 20 بالضبط. -2. ادفع min إلى 35 أو أكثر، مستبعدًا كل الطلبات إلا الأكبر. -3. اجعل min يساوي 40 بالضبط، مُبقيًا أكبر الطلبات فقط. +2. ادفع min إلى 35 أو أكثر، لتستبعد كل الطلبات إلا الأكبر. +3. اجعل min يساوي 40 بالضبط، فلا يبقى إلا أكبر طلب. ## Intuition -تخيّل دفتر طلبات متجر فيه 12 صفًا فقط، مدينة ومنتج ومبلغ لكل عملية بيع. اسحب المنزلق min وراقب صفوف الجدول تتفاعل. أي صف مبلغه أكبر من min يبقى مضيئًا، وكل صف مبلغه min أو أقل يخفت ويختفي. هذا بالضبط ما تفعله جملة WHERE في استعلام قاعدة بيانات. يبقى الصف فقط حين $\text{amount} > m$، وm هو الرقم الذي يضبطه المنزلق. +تخيّل دفتر طلبات متجر فيه 12 صفًا فقط، مدينة ومنتج ومبلغ لكل عملية بيع. اسحب المنزلق min وراقب صفوف الجدول تتفاعل. أي صف مبلغه min أو أكثر يبقى مضيئًا، وكل صف مبلغه أقل من min يخفت. هذا بالضبط ما تفعله جملة WHERE في استعلام قاعدة بيانات. يبقى الصف فقط حين $\text{amount} \ge m$، وm هو الرقم الذي يضبطه المنزلق. -قد تحوي قواعد البيانات الحقيقية ملايين الصفوف، أكثر بكثير مما يمكن أن تراجعه عينك، فيصفّيها البرنامج بالطريقة نفسها. يفحص كل صف مقابل الشرط ويحذف ما لا يحقّقه. قد يصفّي نظام صندوق سوبرماركت إيصالات سنة كاملة ليُبقي فقط ما فوق 50 دولارًا، في اللحظة نفسها التي يصفّي فيها هذا الجدول 12 صفًا إلى حفنة منها. +قد تحوي قواعد البيانات الحقيقية ملايين الصفوف، أكثر بكثير مما يمكن أن تراجعه عينك، فيصفّيها البرنامج بالطريقة نفسها. يفحص كل صف مقابل الشرط ويحذف ما لا يحقّقه. قد يصفّي نظام صندوق سوبرماركت إيصالات سنة كاملة ليُبقي فقط ما فوق 50 دولارًا، بالسرعة نفسها التي يصفّي بها هذا الجدول 12 صفًا إلى صفوف قليلة. ## Formal -التصفية تُبقي فقط الصفوف التي يحقّق مبلغها شرطًا معينًا. يبقى الصف حين $\text{amount} > m$، حيث $m$ هو الحد الذي يضبطه المنزلق min. هذا في SQL هو الاستعلام `SELECT * FROM orders WHERE amount > m`. +التصفية تُبقي فقط الصفوف التي يحقّق مبلغها شرطًا معينًا. يبقى الصف حين $\text{amount} \ge m$، حيث $m$ هو الحد الذي يضبطه المنزلق min. هذا في SQL هو الاستعلام `SELECT * FROM orders WHERE amount >= m`. التصفية لا تغيّر بيانات أي صف أبدًا، بل تقرر فقط أي الصفوف تظهر في النتيجة. رفع $m$ لا يمكن أن يزيد صفوفًا جديدة، بل يحذف صفوفًا فقط، فالجدول المصفّى يبقى دائمًا جزءًا من الجدول الأصلي. ## Advanced -بلا بنية إضافية، لا يزال على التصفية أن تفحص كل صف مرة واحدة، فتصفية جدول فيه مليار صف تكلّف نحو مليار مقارنة. الفهرس (index)، الذي يأتي في درس لاحق، يسمح لقاعدة البيانات بتجاوز معظم هذا العمل. +من دون ترتيب مسبق للبيانات، تضطر التصفية إلى فحص كل صف مرة واحدة، فتصفية جدول فيه مليار صف تكلّف نحو مليار مقارنة. الفهرس (index)، الذي يأتي في درس لاحق، يسمح لقاعدة البيانات بتجاوز معظم هذا العمل. ## Derivation 1. m هو ببساطة الرقم الذي تضبطه بالمنزلق، لا أكثر. -2. أي صف مبلغه أكبر من m يحقّق الشرط فيبقى في النتيجة. -3. أي صف مبلغه m أو أقل لا يحقّق الشرط فيختفي من النتيجة. +2. أي صف مبلغه m أو أكثر يحقّق الشرط فيبقى في النتيجة. +3. أي صف مبلغه أقل من m لا يحقّق الشرط فيختفي من النتيجة. ## Real world ### التسوق عبر الإنترنت + قد يصفّي متجر الطلبات فوق مبلغ معين ليمنحها شحنًا مجانيًا أو بأولوية تلقائيًا. ### مرشّحات البريد المزعج -يصفّي نظام البريد الرسائل الواردة بدرجة معينة. يُبقي ما دون حد معين في صندوق الوارد ويرسل الباقي إلى المزعج. + +يصفّي نظام البريد الرسائل الواردة بدرجة معينة. يُبقي ما دون حد معين في صندوق الوارد ويرسل الباقي إلى مجلد البريد المزعج. ### لوحات BigQuery -يكتب المحلّلون جمل WHERE في BigQuery يوميًا لتضييق مليارات الصفوف إلى الحفنة التي تخص سؤالًا واحدًا. + +يكتب المحلّلون جمل WHERE في BigQuery يوميًا ليختاروا من مليارات الصفوف العدد القليل الذي يخص سؤالًا واحدًا. ### تنبيهات الاحتيال -يصفّي البنك المعاملات التي تفوق مبلغًا غير معتاد لحساب معين، ويرفع علامة على تلك فقط للمراجعة. + +يصفّي البنك المعاملات التي تفوق مبلغًا غير معتاد لحساب معين، ويحيل هذه المعاملات وحدها إلى المراجعة. diff --git a/content/lessons/data/tables-and-filtering/en.md b/content/lessons/data/tables-and-filtering/en.md index 3f97a06e..90cb7344 100644 --- a/content/lessons/data/tables-and-filtering/en.md +++ b/content/lessons/data/tables-and-filtering/en.md @@ -9,31 +9,31 @@ variables: ## Try it -1. Drag the slider labeled min down to 0. Every row in the orders table stays lit up; none are filtered out. -2. Raise min toward 20. Watch the rows with a smaller amount fade, while the ones above 20 stay highlighted. -3. Push min close to 45. Only the very largest orders in the table are left standing. +1. Drag the slider labeled min down to 0. Every row in the orders table stays lit up, and the readout shows rows returned = 12. +2. Set min to 20. The rows with an amount below 20 fade, and 4 rows stay highlighted: 22, 25, 30 and 40. +3. Set min to 40. Only the largest order, 40, is left, so rows returned = 1. Push min to 41 and no row is left at all. ## Real-life examples 1. **Show every order.** min at 0 keeps the whole table, useful when you want to see all the raw data first. 2. **Orders worth at least 20 dollars.** min at 20 filters out the small orders, leaving the ones worth chasing for delivery priority. -3. **Big spenders only.** min at 40 keeps only the very largest orders, useful for finding your best customers. +3. **Big spenders only.** min at 40 keeps only the single largest order, useful for finding your best customers. ## Test yourself 1. Set min to exactly 20. 2. Push min to 35 or higher, filtering out all but the biggest orders. -3. Set min to exactly 40, keeping only the very largest orders. +3. Set min to exactly 40, keeping only the single largest order. ## Intuition -Picture a shop's order book with just 12 rows: a city, a product and an amount for each sale. Drag the slider labeled min and watch the table's rows react — any row whose amount is above min stays bright, and every row at or below it fades away. This is exactly what a WHERE clause does in a database query: a row is kept only when $\text{amount} > m$, with m being the number the slider is set to. +Picture a shop's order book with just 12 rows: a city, a product and an amount for each sale. Drag the slider labeled min and watch the table's rows react — any row whose amount is min or more stays bright, and every row below it fades. This is exactly what a WHERE clause does in a database query: a row is kept only when $\text{amount} \ge m$, with m being the number the slider is set to. Real databases can hold millions of rows, far too many to scan by eye, so the software filters them the same way: check each row against the condition and drop the rows that fail. A supermarket's till system might filter a year of receipts down to just the ones over 50 dollars, in the same instant it takes this table to filter 12 rows down to a handful. ## Formal -A filter keeps exactly the rows whose value satisfies a condition. A row survives when $\text{amount} > m$, where $m$ is the threshold set by the min slider; in SQL this is the query `SELECT * FROM orders WHERE amount > m`. +A filter keeps exactly the rows whose value satisfies a condition. A row survives when $\text{amount} \ge m$, where $m$ is the threshold set by the min slider; in SQL this is the query `SELECT * FROM orders WHERE amount >= m`. Filtering never changes any row's data; it only decides which rows appear in the result. Raising $m$ can only remove rows from that result, never add new ones, so the filtered table is always a subset of the original one. @@ -44,19 +44,23 @@ Without extra structure, a filter still has to look at every row once, so filter ## Derivation 1. m is simply the number you set with the slider, nothing more. -2. Any row whose amount is bigger than m passes the condition and is kept in the result. -3. Any row whose amount is m or smaller fails the condition and disappears from the result. +2. Any row whose amount is m or bigger passes the condition and is kept in the result. +3. Any row whose amount is smaller than m fails the condition and disappears from the result. ## Real world ### Online shopping + A store might filter orders above a certain value to give them free or priority shipping automatically. ### Spam filters + An email system filters incoming messages by a score, keeping the ones below a threshold in your inbox and routing the rest to spam. ### BigQuery dashboards + Analysts write WHERE clauses in BigQuery every day to narrow billions of rows down to the handful relevant to one question. ### Fraud alerts + A bank filters transactions above an unusual amount for a given account and flags only those for review. diff --git a/content/lessons/data/tables-and-filtering/lesson.yaml b/content/lessons/data/tables-and-filtering/lesson.yaml index 72d71c53..857c80b3 100644 --- a/content/lessons/data/tables-and-filtering/lesson.yaml +++ b/content/lessons/data/tables-and-filtering/lesson.yaml @@ -1,14 +1,14 @@ id: tables-and-filtering subject: data difficulty: beginner -equation: \text{amount} > m +equation: \text{amount} \ge m concepts: -- tables -- filtering -- SQL WHERE clause + - tables + - filtering + - SQL WHERE clause prerequisites: [] related: -- grouping-and-totals + - grouping-and-totals visualization: type: query-table options: @@ -20,20 +20,20 @@ parameters: max: 45 step: 1 value: 15 - unit: "$" + unit: '$' variables: -- m + - m derivation: -- m = \text{the slider's value, the minimum amount to keep} -- \text{amount} > m \Rightarrow \text{row kept} -- \text{amount} \le m \Rightarrow \text{row filtered out} + - m = \text{the slider's value, the minimum amount to keep} + - \text{amount} \ge m \Rightarrow \text{row kept} + - \text{amount} < m \Rightarrow \text{row filtered out} presets: -- min: 0 -- min: 20 -- min: 40 + - min: 0 + - min: 20 + - min: 40 challenges: -- check: min - target: 20 -- check: min >= 35 -- check: min - target: 40 + - check: min + target: 20 + - check: min >= 35 + - check: min + target: 40 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. 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 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. 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- - عشر حمامات في تسعة أبراج: برج واحد على الأقل فيه حمامتان. فكرة بسيطة ببراهين قوية. +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. 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. 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.” 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. 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. 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. 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. 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. diff --git a/content/lessons/earth-space/day-length-and-latitude/ar.md b/content/lessons/earth-space/day-length-and-latitude/ar.md index ab2a065e..e08211b2 100644 --- a/content/lessons/earth-space/day-length-and-latitude/ar.md +++ b/content/lessons/earth-space/day-length-and-latitude/ar.md @@ -17,20 +17,20 @@ variables: ## Try it 1. أبقِ day عند 172 (قرب انقلاب يونيو) واسحب lat من 0° نحو 90°. راقب النهار يرتفع من 12 ساعة عند خط الاستواء نحو 24 ساعة بمجرد تجاوز نحو 66.5° شمالًا. -2. اضبط lat عند 71° شمالًا وحرّك day عبر السنة كلها. راقب النهار يتأرجح من شمس منتصف الليل لمدة 24 ساعة في يونيو إلى ليل قطبي صفر الساعات في ديسمبر. -3. اضبط lat عند 0° وحرّك day إلى أي يوم. لاحظ أن النهار بالكاد يتحرك عن 12 ساعة، فخط الاستواء لا يعرف فصولًا للنهار حقًّا. +2. اضبط lat عند 71° شمالًا وحرّك day عبر السنة كلها. راقب النهار يتغيّر من 24 ساعة في يونيو (شمس منتصف الليل) إلى 0 ساعة في ديسمبر (ليل قطبي). +3. اضبط lat عند 0° وحرّك day إلى أي يوم. لاحظ أن النهار يبقى 12 ساعة تقريبًا، فطول النهار عند خط الاستواء لا يتغيّر مع الفصول. ## Real-life examples -- **خط الاستواء، أي يوم.** عند lat = 0° يبقى طول النهار قريبًا جدًا من 12 ساعة بالضبط مهما كان يوم السنة، فكيتو ونيروبي تريان بالكاد أي تغيّر فصلي في طول النهار. -- **أوسلو في انقلاب يونيو.** عند lat = 60° شمالًا وday = 172 يمتد النهار إلى نحو 18.5 ساعة، سماء مسائية مضيئة بالكاد تُظلم قبل أن تشرق الشمس من جديد. +- **خط الاستواء، أي يوم.** عند lat = 0° يبقى طول النهار قريبًا جدًا من 12 ساعة بالضبط مهما كان يوم السنة، ففي كيتو ونيروبي لا يكاد طول النهار يتغيّر بين الفصول. +- **أوسلو في انقلاب يونيو.** عند lat = 60° شمالًا وday = 172 يمتد النهار إلى نحو 18.5 ساعة، فتبقى السماء مضيئة في المساء، ولا تكاد تُظلم حتى تشرق الشمس من جديد. - **أوتكياغفيك في ألاسكا في انقلاب يونيو.** عند lat = 71° شمالًا وday = 172 لا تغرب الشمس على الإطلاق، 24 ساعة من «شمس منتصف الليل»، وهي ظاهرة حقيقية في صيف القطب الشمالي. ## Test yourself -1. جِد خط عرض ويومًا يعطيان قرابة 12 ساعة نهار بالضبط، من دون أن تكون عند خط الاستواء. -2. ادفع موقعًا عند خط عرض مرتفع إلى شمس منتصف ليل كاملة: أكثر من 23.5 ساعة نهار. -3. ادفع خط العرض المرتفع نفسه إلى ليل قطبي كامل: أقل من نصف ساعة نهار. +1. ابحث عن خط عرض ويوم يكون فيهما النهار 12 ساعة تقريبًا، من دون أن تكون عند خط الاستواء. +2. اختر مكانًا في أقصى الشمال (خط عرض أكبر من 60°) واجعل الشمس لا تغيب عنه: أكثر من 23.5 ساعة نهار. +3. ثم اجعل المكان نفسه في ليل قطبي كامل: أقل من نصف ساعة نهار. ## Intuition @@ -46,7 +46,7 @@ variables: ## Advanced -الحد 66.5° للنهار والليل القطبيين هو ببساطة °90 ناقص ميل المحور: خط العرض الذي يلامس فيه ارتفاع الشمس عند الظهر، أو عند منتصف الليل، الأفق تمامًا في يوم انقلاب. ولأن ميل المحور يتغيّر ببطء على مدى نحو 41,000 سنة، إذ يتأرجح بين نحو 22.1° و24.5°، ينزلق خط عرض الدائرتين القطبيتين الشمالية والجنوبية ببطء شديد أيضًا، ببضعة أمتار كل سنة اليوم. +الحد 66.5° للنهار والليل القطبيين هو ببساطة °90 ناقص ميل المحور: خط العرض الذي يلامس فيه ارتفاع الشمس عند الظهر، أو عند منتصف الليل، الأفق تمامًا في يوم انقلاب. ولأن ميل المحور يتغيّر ببطء على مدى نحو 41,000 سنة، إذ يتأرجح بين نحو 22.1° و24.5°، ينزلق خط عرض الدائرتين القطبيتين الشمالية والجنوبية ببطء شديد أيضًا، بنحو 15 مترًا كل سنة اليوم. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### الزراعة وتخطيط المحاصيل + يخطط المزارعون عند خطوط العرض المرتفعة زراعتهم حول نهار الصيف الطويل، الذي يسرّع نمو المحاصيل بشكل غير معتاد، بينما يخطط المزارعون قرب خط الاستواء حول هطول الأمطار بدلًا من ذلك، فطول النهار هناك بالكاد يتغيّر. ### جداول شركات الطيران عبر خطوط العرض + تراعي شركات الطيران التي تسيّر رحلات قطبية النهار شبه المستمر أو الظلام شبه المستمر عند خطوط العرض المرتفعة صيفًا وشتاءً، وهذا يغيّر كيفية جدولة راحة طواقمها. ### إنتاج الطاقة الشمسية بحسب الموقع + تولّد المزارع الشمسية عند خطوط العرض المرتفعة طاقة أكبر بكثير في صيفها المحلي منها في شتائها، لأن ساعات النهار المتاحة أكثر بكثير، بينما تنتج المزارع الشمسية قرب خط الاستواء بثبات طوال السنة. ### الساعة البيولوجية للإنسان قرب القطبين + يبلّغ سكان مدن الشمال البعيد مثل تروميسو وأوتكياغفيك عن اضطراب في نومهم خلال أسابيع من نهار أو ظلام مستمر، لأن ساعة الجسم الداخلية تعتمد جزئيًا على دورة الليل والنهار التي تكاد تختفي عند هذه الخطوط. diff --git a/content/lessons/earth-space/day-length-and-latitude/en.md b/content/lessons/earth-space/day-length-and-latitude/en.md index ff219c67..60fc554a 100644 --- a/content/lessons/earth-space/day-length-and-latitude/en.md +++ b/content/lessons/earth-space/day-length-and-latitude/en.md @@ -31,7 +31,7 @@ variables: ## Test yourself 1. Find a latitude and day that give almost exactly 12 hours of daylight, without being at the equator. -2. Push a high-latitude location into full midnight sun: more than 23.5 hours of daylight. +2. Push a high-latitude location (lat above 60°) into full midnight sun: more than 23.5 hours of daylight. 3. Push that same high latitude into full polar night: less than half an hour of daylight. ## Intuition @@ -48,7 +48,7 @@ For a low $|\phi|$, $\tan\phi$ stays small, so $D$ stays close to 12 hours regar ## Advanced -The 66.5° threshold for polar day and night is simply $90° - \epsilon$: it is the latitude at which, on a solstice, the Sun's noon altitude or its midnight altitude just touches the horizon. Because $\epsilon$ slowly changes over roughly 41,000 years (Earth's axial tilt drifts between about 22.1° and 24.5°), the exact latitude of the Arctic and Antarctic Circles drifts very slowly too, by tens of meters a year today. +The 66.5° threshold for polar day and night is simply $90° - \epsilon$: it is the latitude at which, on a solstice, the Sun's noon altitude or its midnight altitude just touches the horizon. Because $\epsilon$ slowly changes over roughly 41,000 years (Earth's axial tilt drifts between about 22.1° and 24.5°), the exact latitude of the Arctic and Antarctic Circles drifts very slowly too, by about 15 meters a year today. ## Derivation @@ -59,13 +59,17 @@ The 66.5° threshold for polar day and night is simply $90° - \epsilon$: it is ## Real world ### Farming and crop planning + Farmers at high latitudes plan planting around the long summer daylight, which lets crops grow unusually fast, while farmers near the equator plan around rainfall instead, since daylight barely changes there. ### Airline schedules across latitudes + Airlines flying polar routes account for near-constant daylight or darkness at high latitude in summer and winter, which changes how crews are scheduled for rest. ### Solar power output by location + Solar farms built at high latitude generate far more power in local summer than winter, simply because there are so many more daylight hours to work with, while equatorial solar farms produce steadily all year. ### Human body clocks near the poles + Residents of far-northern cities like Tromsø and Utqiagvik report disrupted sleep during weeks of continuous daylight or darkness, since the body's clock depends partly on the day–night cycle these latitudes nearly lose. diff --git a/content/lessons/earth-space/day-length-and-latitude/lesson.yaml b/content/lessons/earth-space/day-length-and-latitude/lesson.yaml index 88c9a352..c9e78d30 100644 --- a/content/lessons/earth-space/day-length-and-latitude/lesson.yaml +++ b/content/lessons/earth-space/day-length-and-latitude/lesson.yaml @@ -27,7 +27,7 @@ parameters: max: 90 step: 1 value: 45 - unit: "°" + unit: '°' variables: - \phi - \delta @@ -42,15 +42,15 @@ derivation: charts: [] primary: day presets: -- lat: 0 - day: 172 -- lat: 60 - day: 172 -- lat: 71 - day: 172 + - lat: 0 + day: 172 + - lat: 60 + day: 172 + - lat: 71 + day: 172 challenges: -- check: 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) - target: 12 - tol: 0.3 -- check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) > 23.5 -- check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) < 0.5 + - check: 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) + target: 12 + tol: 0.3 + - check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) > 23.5 + - check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(23.4*pi/180*sin(2*pi*(day-80)/365))))) < 0.5 diff --git a/content/lessons/earth-space/earth-size/ar.md b/content/lessons/earth-space/earth-size/ar.md index a41f65d7..f7916a3d 100644 --- a/content/lessons/earth-space/earth-size/ar.md +++ b/content/lessons/earth-space/earth-size/ar.md @@ -16,7 +16,7 @@ variables: 1. اسحب رأس العود الأيمن على الأرض. تتغير الزاويتان الزرقاوان معًا، واحدة عند رأس العود وواحدة عند مركز الأرض. وهما متساويتان دائمًا. 2. اجعل theta يساوي 7.2 وd يساوي 800 كما فعل إراتوستينس. اقرأ «أرضك، حولها كلها» تحت الرسم، وقارنها بالأرض الحقيقية. -3. أبقِ d على 800 وكبّر theta. كلما كبرت زاوية الظل كفاك مشي أقصر حول الأرض، فتخرج الدائرة كلها أصغر. +3. أبقِ d على 800 وارفع theta إلى 14.4. تصغر أرضك إلى 20,000 km، أي النصف. كلما كبرت زاوية الظل كفاك مشي أقصر حول الأرض، فتخرج الدائرة كلها أصغر. ## Real-life examples diff --git a/content/lessons/earth-space/earth-size/en.md b/content/lessons/earth-space/earth-size/en.md index bcbe5927..037032b0 100644 --- a/content/lessons/earth-space/earth-size/en.md +++ b/content/lessons/earth-space/earth-size/en.md @@ -17,7 +17,7 @@ variables: 1. Drag the top of the right-hand stick along the Earth. The blue angle at the top of the stick and the blue angle at the Earth's centre change together. They are always the same size. 2. Set theta to 7.2 and d to 800, as Eratosthenes did. Read "your Earth, all the way round" below the picture and compare it with the real one. -3. Keep d at 800 and make theta bigger. A bigger shadow angle means you only had to walk a short way round the Earth, so the whole circle is smaller. +3. Keep d at 800 and raise theta to 14.4. Your Earth shrinks to 20,000 km, half the size. A bigger shadow angle means you only had to walk a short way round the Earth, so the whole circle is smaller. ## Real-life examples @@ -64,13 +64,17 @@ The angle is the hard part. With a 1 m stick, a 7.2° shadow is only about 12.6 ## Real world ### Schools measure the Earth + Every year, classes around the world do the Eratosthenes experiment. Two schools far apart, on the same north-south line, measure the shadow of a stick at the same moment and share the numbers. ### The first rung of a ladder + Everything we know about distances to the Moon, the Sun and the planets starts with the size of the Earth. It becomes the ruler for the next measurement, how far away the Moon is. ### Mapmakers still use angles + Surveyors measure long distances by measuring angles and one known distance, which is the same trick as here. Satellites now find the Earth's size to a few metres. ### Round, but not perfectly + The Earth is 40,008 km round through the poles and 40,075 km round the equator. It bulges a little at the middle because it spins. diff --git a/content/lessons/earth-space/earthquake-magnitude/ar.md b/content/lessons/earth-space/earthquake-magnitude/ar.md index 8a668936..819000d5 100644 --- a/content/lessons/earth-space/earthquake-magnitude/ar.md +++ b/content/lessons/earth-space/earthquake-magnitude/ar.md @@ -18,33 +18,33 @@ charts: ## Try it -1. راقب الخط المرسوم، لوغاريتم الطاقة، يرتفع في خط مستقيم وأنت تسحب القوة لأعلى. -2. راقب المخطط الثاني، نسبة الطاقة إلى زلزال قوته 5، بالكاد يتحرّك حتى نحو القوة 7. -3. ادفع منزلق القوة إلى 9 وراقب تلك النسبة تقفز إلى نحو مليون ضعف. +1. اجعل x يساوي 5: تظهر القراءة f(x) = 12.3، وهي لوغاريتم الطاقة. اجعل x يساوي 6: تصير f(x) = 13.8. كل درجة كاملة تضيف 1.5 نفسها، ولهذا الخط مستقيم. +2. انظر إلى المخطط الثاني، وهو نسبة الطاقة إلى طاقة زلزال قوته 5. لا يكاد يرتفع حتى القوة 7 تقريبًا، وعندها تكون النسبة 1000. +3. اجعل x يساوي 9. تظهر القراءة f(x) = 18.3، وتصل النسبة في المخطط الثاني إلى مليون. ## Real-life examples - **زلزال لا يشعر به معظم الناس.** قوة 3 تطلق طاقة قليلة جدًا لا تكشفها سوى الأجهزة الحسّاسة. - **زلزال ضخم تاريخي.** قوة 9، مثل زلزالَي سومطرة (2004) وتوهوكو (2011)، تطلق نحو مليون ضعف طاقة زلزال قوته 5. -- **زلزال متوسط ومدمِّر.** قوة 6.5 كافية لإلحاق الضرر بمبانٍ رديئة الإنشاء، وتطلق نحو 5600 ضعف طاقة زلزال قوته 5. +- **زلزال متوسط ومدمِّر.** قوة 6.5 كافية لإلحاق الضرر بمبانٍ رديئة الإنشاء، وتطلق نحو 180 ضعف طاقة زلزال قوته 5. ## Test yourself -1. جِد القوة التي تطلق طاقة تعادل 1000 ضعف طاقة زلزال قوته 5 بالضبط. -2. ادفع القوة بما يكفي لتتجاوز نسبة الطاقة 100000. -3. جِد القوة التي تكون عندها نسبة الطاقة 32 بالضبط، أي درجة واحدة كاملة فوق القوة 5. +1. ابحث عن القوة التي تطلق 1000 ضعف طاقة زلزال قوته 5. +2. ارفع القوة حتى تتجاوز نسبة الطاقة 100000. +3. ابحث عن القوة التي تكون عندها نسبة الطاقة 32، أي درجة واحدة كاملة فوق القوة 5. ## Intuition -حرّك منزلق القوة من 3 إلى 9 وراقب القيمة المرسومة، أي لوغاريتم الطاقة المُطلَقة بالأساس 10، ترتفع في خط مستقيم. هذه الاستقامة هي بيت القصيد في المقياس اللوغاريتمي، إذ يحوّل أرقامًا كانت لتمتد من آلاف الجولات إلى أرقام من 18 رقمًا، إلى خط مرتّب من نحو 9 إلى 18. +حرّك منزلق القوة من 3 إلى 9 وراقب القيمة المرسومة، أي لوغاريتم الطاقة المُطلَقة بالأساس 10، ترتفع في خط مستقيم. هذه الاستقامة هي بيت القصيد في المقياس اللوغاريتمي، فهو يحوّل أرقامًا تمتد من مليارات الجول إلى أعداد من 19 خانة، إلى خط مرتّب من نحو 9 إلى 18. -انظر بدلًا من ذلك إلى المخطط الثاني، نسبة الطاقة إلى زلزال قوته 5. بالكاد يرتفع حتى قرب القوة 7 ثم ينطلق صعودًا بسرعة. زلزال قوته 9، كتلك التي ضربت سومطرة عام 2004 أو توهوكو عام 2011، يطلق نحو مليون ضعف طاقة زلزال قوته 5 لا تكاد مدينة تشعر به. +انظر بدلًا من ذلك إلى المخطط الثاني، نسبة الطاقة إلى زلزال قوته 5. لا يكاد يرتفع حتى قرب القوة 7، ثم يصعد بسرعة كبيرة. زلزال قوته 9، كتلك التي ضربت سومطرة عام 2004 أو توهوكو عام 2011، يطلق نحو مليون ضعف طاقة زلزال قوته 5، وهو زلزال قد لا يشعر به سكان المدينة أصلًا. ## Formal تربط علاقة غوتنبرغ-ريختر للطاقة القوةَ بلوغاريتم الطاقة بالجول: $\log_{10}E = 1.5x + 4.8$. ولأن العلاقة خطّية في $\log_{10}E$ لا في $E$ نفسها، فإن كل خطوة مقدارها 1 في القوة تقابل قفزة ضربية ثابتة في الطاقة، لا قفزة جمعية ثابتة. -رفع القوة درجة كاملة يضرب لوغاريتم الأساس 10 في 1.5، فتُضرَب الطاقة نفسها في $10^{1.5} \approx 31.6$. يطلق زلزال قوته 6 نحو 32 ضعف طاقة زلزال قوته 5، ويطلق زلزال قوته 7 نحو 32 ضعف ذلك مرّة أخرى، أي نحو 1000 ضعف زلزال قوته 5. +رفع القوة درجة كاملة يضيف 1.5 إلى لوغاريتم الطاقة بالأساس 10، فتُضرَب الطاقة نفسها في $10^{1.5} \approx 31.6$. يطلق زلزال قوته 6 نحو 32 ضعف طاقة زلزال قوته 5، ويطلق زلزال قوته 7 نحو 32 ضعف ذلك مرّة أخرى، أي نحو 1000 ضعف زلزال قوته 5. ## Advanced @@ -59,13 +59,17 @@ charts: ## Real world ### مقارنة الزلازل التاريخية + حين تصف الأخبار زلزالًا بأنه «الأقوى منذ عقود» فهي تقارن نقاطًا على منحنى الطاقة الأسّي نفسه لا منحنى خطّي. ### أكواد البناء + تُصمَّم أكواد البناء الزلزالية لمدى القوة المتوقّع في منطقتها، إذ قد ينهار مبنى صُمِّم لهزّة قوتها 6 انهيارًا كارثيًا في حدث قوته 7 أقوى بأضعاف كثيرة. ### إنذارات تسونامي + تُطلق الزلازل البحرية الكبيرة قرب عتبة القوة 8 أو 9 إنذارات تسونامي تلقائية بالضبط لأن قفزة الطاقة بعد تلك النقطة هائلة. ### لماذا «درجة واحدة أعلى» تبدو هيّنة وليست كذلك -يبدو زلزال قوته 7 في الأخبار أسوأ بـ«درجة واحدة» فقط من زلزال قوته 6، لكنه يطلق نحو 32 ضعف الطاقة، ولوغاريتم المقياس يخفي الفارق الحقيقي. + +يبدو زلزال قوته 7 في الأخبار أسوأ بـ«درجة واحدة» فقط من زلزال قوته 6، لكنه يطلق نحو 32 ضعف الطاقة، فالمقياس اللوغاريتمي يخفي الفارق الحقيقي. diff --git a/content/lessons/earth-space/earthquake-magnitude/en.md b/content/lessons/earth-space/earthquake-magnitude/en.md index 3e781a21..c536cef0 100644 --- a/content/lessons/earth-space/earthquake-magnitude/en.md +++ b/content/lessons/earth-space/earthquake-magnitude/en.md @@ -20,15 +20,15 @@ charts: ## Try it -1. Watch the plotted line — the energy's logarithm — climb in a straight line as you drag magnitude up. -2. Watch the second chart, the energy ratio to a magnitude-5 quake, barely move until about magnitude 7. -3. Push the magnitude slider to 9 and watch that ratio rocket to roughly a million. +1. Set x to 5: the readout shows f(x) = 12.3, the energy's logarithm. Set x to 6: f(x) = 13.8. Every whole step adds the same 1.5, so the line is straight. +2. Look at the second chart, the energy ratio to a magnitude-5 quake. It barely rises until about magnitude 7, where the ratio is 1,000. +3. Set x to 9. The readout shows f(x) = 18.3, and on the second chart the ratio reaches a million. ## Real-life examples - **A quake most people don't notice.** Magnitude 3 releases so little energy that only sensitive instruments detect it. - **A historic mega-quake.** Magnitude 9, the scale of Sumatra (2004) and Tōhoku (2011), releases about a million times the energy of a magnitude-5 quake. -- **A moderate, damaging earthquake.** Magnitude 6.5 is strong enough to damage poorly built structures, releasing roughly 5,600 times the energy of a magnitude-5 quake. +- **A moderate, damaging earthquake.** Magnitude 6.5 is strong enough to damage poorly built structures, releasing roughly 180 times the energy of a magnitude-5 quake. ## Test yourself @@ -38,7 +38,7 @@ charts: ## Intuition -Drag the magnitude slider from 3 to 9 and watch the plotted value — the base-10 logarithm of the energy released — climb in a straight line. That straightness is the point of a logarithmic scale: it turns numbers that would otherwise range from thousands of joules to numbers with 18 digits into a tidy line from about 9 to 18. +Drag the magnitude slider from 3 to 9 and watch the plotted value — the base-10 logarithm of the energy released — climb in a straight line. That straightness is the point of a logarithmic scale: it turns numbers that would otherwise range from billions of joules to numbers with 19 digits into a tidy line from about 9 to 18. Look at the second chart instead, the energy ratio to a magnitude-5 quake: it barely rises until around magnitude 7, then rockets upward. A magnitude-9 earthquake, like the ones that struck Sumatra in 2004 or Tōhoku in 2011, releases roughly a million times the energy of a magnitude-5 quake that a city might not even notice. @@ -46,7 +46,7 @@ Look at the second chart instead, the energy ratio to a magnitude-5 quake: it ba The Gutenberg-Richter energy relation ties magnitude to log-energy in joules: $\log_{10}E = 1.5x + 4.8$. Because the relation is linear in $\log_{10}E$ rather than in $E$ itself, each step of 1 in magnitude corresponds to a fixed multiplicative jump in energy, not a fixed additive one. -Raising a whole magnitude step multiplies the base-10 logarithm by 1.5, so the energy itself multiplies by $10^{1.5} \approx 31.6$: a magnitude 6 quake releases about 32 times the energy of a magnitude 5, and a magnitude 7 releases about 32 times that again, roughly 1,000 times a magnitude 5. +Raising a whole magnitude step adds 1.5 to the base-10 logarithm, so the energy itself multiplies by $10^{1.5} \approx 31.6$: a magnitude 6 quake releases about 32 times the energy of a magnitude 5, and a magnitude 7 releases about 32 times that again, roughly 1,000 times a magnitude 5. ## Advanced @@ -61,13 +61,17 @@ The moment magnitude scale used today (replacing the older Richter scale, which ## Real world ### Comparing historical earthquakes + News reports of "the strongest earthquake in decades" are comparing points on this same exponential energy curve, not a linear one. ### Building codes + Seismic design codes size structures for the expected magnitude range of their region, since a building built for magnitude 6 shaking can fail catastrophically in a magnitude 7 event many times stronger. ### Tsunami warnings + Large undersea earthquakes near a magnitude 8 or 9 threshold trigger automatic tsunami warnings precisely because the energy jump past that point is so large. ### Why "one point higher" sounds unimpressive but is not + A magnitude 7 quake sounds only "one point" worse than a magnitude 6 on the news, but it releases about 32 times more energy — the scale's logarithm hides the real difference. diff --git a/content/lessons/earth-space/earthquake-magnitude/lesson.yaml b/content/lessons/earth-space/earthquake-magnitude/lesson.yaml index c8ab4346..c04e69df 100644 --- a/content/lessons/earth-space/earthquake-magnitude/lesson.yaml +++ b/content/lessons/earth-space/earthquake-magnitude/lesson.yaml @@ -25,7 +25,7 @@ parameters: min: 0 max: 9 step: 0.1 - value: 6 + value: 5 variables: - x - E @@ -43,12 +43,12 @@ charts: - 10^(1.5*(x-5)) primary: x presets: -- x: 3 -- x: 9 -- x: 6.5 + - x: 3 + - x: 9 + - x: 6.5 challenges: -- check: 10^(1.5*(x-5)) - target: 1000 -- check: 10^(1.5*(x-5)) > 100000 -- check: 10^(1.5*(x-5)) - target: 32 + - check: 10^(1.5*(x-5)) + target: 1000 + - check: 10^(1.5*(x-5)) > 100000 + - check: 10^(1.5*(x-5)) + target: 32 diff --git a/content/lessons/earth-space/eclipses/ar.md b/content/lessons/earth-space/eclipses/ar.md index 8b1fe00d..030e8984 100644 --- a/content/lessons/earth-space/eclipses/ar.md +++ b/content/lessons/earth-space/eclipses/ar.md @@ -15,37 +15,37 @@ variables: ## Try it -1. ابدأ عند ω = 90°، بعيدًا عن العقدة. راقب مخروطي الظل يخطئان الأرض تمامًا، فلا كسوف هذا الشهر. -2. اسحب ω نحو 0°. راقب المخروط المظلم (الأمبرا) ينزل حتى يلامس الأرض. -3. وω قريبة من 0°، اسحب المسافة بين الأرض والقمر من الصغرى إلى الكبرى. راقب الكسوف الكلي يتحول إلى حلقي حين تتوقف قمة المخروط المظلم قبل أن تصل الأرض. +1. ابدأ عند ω = 90°، بعيدًا عن العقدة. مخروطا الظل لا يصيبان الأرض أبدًا: تُظهر القراءة انحراف الظل نحو 34,400 كم، والكسوف «لا كسوف». +2. اسحب ω نحو 0°. راقب المخروط المظلم ينزل نحو الأرض. عند ω = 16° تتغيّر قراءة الكسوف إلى «جزئي»، وعند ω = 10° إلى «حلقي». +3. وω قريبة من 0°، اسحب المسافة بين الأرض والقمر من الصغرى إلى الكبرى. تبقى القراءة «كلي» حتى 374، ثم تصير «حلقي»: قمة المخروط المظلم لم تعد تصل إلى الأرض. ## Real-life examples - **الكسوف الكلي، 21 أغسطس 2017.** كان القمر قريبًا من عقدة (ω ≈ 2°) وقريبًا كفاية من الأرض (نحو 372,000 كم) فوصل ظله المظلم إلى الأرض وعبر الولايات المتحدة. -- **حلقة النار، 14 أكتوبر 2023.** كان القمر قريبًا من عقدة أيضًا لكنه كان أبعد، قرب الأوج (نحو 400,000 كم)، فتوقفت قمة ظله المظلم قبل أن تبلغ الأرض، ووصلت فقط الحلقة الخارجية الباهتة، فبدت حلقة مضيئة حول قرص مظلم. -- **محاق عادي.** في معظم الشهور يحدث المحاق بعيدًا عن أي عقدة (ω قريبة من 90°)، فيمر ظل القمر في الفضاء بجانب الأرض دون أن يراه أحد. +- **حلقة النار، 14 أكتوبر 2023.** كان القمر قريبًا من عقدة أيضًا لكنه كان أبعد، قرب الأوج (نحو 400,000 كم)، فتوقفت قمة ظله المظلم قبل أن تبلغ الأرض، ولم يصل إلى الأرض إلا امتداد الظل، فظهرت الشمس حلقة مضيئة حول قرص مظلم. +- **محاق عادي.** في معظم الشهور يحدث المحاق بعيدًا عن أي عقدة (ω قريبة من 90°)، فيمر ظل القمر في الفضاء بجانب الأرض ولا يرى أحد كسوفًا. ## Test yourself -1. رتّب كسوفًا مركزيًا: اجعل انحراف الظل الجانبي أقل من 6,371 كم، نصف قطر الأرض، حتى يمر محور الظل المظلم أو ما بعده فعلًا داخل الأرض. -2. جِد وضعًا يصل فيه شبه الظل فقط إلى الأرض، أي كسوف جزئي بلا أي طور كلي أو حلقي في أي مكان. -3. أعد المنزلقين إلى شهر عادي يخطئ فيه الظل الأرض بأكثر من مدى شبه الظل. +1. اصنع كسوفًا مركزيًا: اجعل انحراف الظل أقل من 6,371 كم، وهو نصف قطر الأرض، حتى يمر محور الظل داخل الأرض فعلًا. +2. ابحث عن وضع لا يصل فيه إلى الأرض إلا شبه الظل، أي كسوف جزئي لا يُرى كليًا ولا حلقيًا في أي مكان. +3. ابحث عن ظل يكاد يصيب الأرض: لا كسوف أبدًا، لكن انحراف الظل يبقى أقل من 12,000 كم. ## Intuition يحدث المحاق كل نحو 29.5 يومًا حين يقف القمر بين الأرض والشمس. لو كان مدار القمر يقع تمامًا في المستوى نفسه الذي تسير فيه الأرض حول الشمس، لألقى كل محاق ظله على الأرض ولرأينا كسوفًا كل شهر. لكن هذا لا يحدث، لأن مدار القمر مائل نحو 5.14° عن ذلك المستوى. في معظم الشهور، حين يصل القمر إلى وضع المحاق، يكون أعلى الشمس أو أسفلها بضع درجات في السماء، فيمر ظله في الفضاء بجانب الأرض. -فقط قرب النقطتين اللتين يقطع عندهما المدار المائل مستوى الأرض، وتسمَّيان العقدتين، يقترب المحاق كفاية من ذلك المستوى ليصل ظله إلى الأرض فعلًا. المنزلق ω يقيس كم يبعد القمر عن عقدة في ذلك المحاق. اسحبه نحو 0° فينزل الظل على الأرض، واسحبه نحو 90° فيخطئها بكامل الميل 5.14°. +ولا يقترب المحاق من ذلك المستوى بما يكفي ليصل ظله إلى الأرض إلا قرب النقطتين اللتين يقطع عندهما المدار المائل مستوى الأرض، وتسمَّيان العقدتين. المنزلق ω يقيس كم يبعد القمر عن عقدة في ذلك المحاق. اسحبه نحو 0° فينزل الظل على الأرض، واسحبه نحو 90° فيبتعد عنها بكامل الميل 5.14°. ## Formal ارتفاع القمر فوق مستوى مدار الأرض عند لحظة المحاق هو $\beta = i\sin\omega$، حيث $i = 5.14°$ ميل المدار، و$\omega$ كم يبعد القمر عن عقدة في مساره. تتحول هذه الزاوية إلى مسافة جانبية حقيقية $h = d\sin\beta$، باستخدام المسافة الفعلية بين الأرض والقمر $d$، التي تتراوح بين نحو 356,500 كم عند الحضيض و406,700 كم عند الأوج خلال الشهر. -نصف قطر الأرض 6,371 كم، فمتى كانت $h$ أصغر من ذلك يمر محور الظل داخل الأرض فعلًا، ويصبح كسوف مركزي، كلي أو حلقي، ممكنًا في مكان ما على سطحها. وحين تكبر $h$ عن نحو 9,900 كم، مجموع نصف قطر الأرض وعرض شبه الظل المعتاد، يخطئ حتى شبه الظل ولا يحدث كسوف على الإطلاق. +نصف قطر الأرض 6,371 كم، فمتى كانت $h$ أصغر من ذلك يمر محور الظل داخل الأرض فعلًا، ويصبح كسوف مركزي، كلي أو حلقي، ممكنًا في مكان ما على سطحها. وحين تكبر $h$ عن نحو 9,900 كم، مجموع نصف قطر الأرض وعرض شبه الظل المعتاد، لا يصيب الأرض حتى شبه الظل، ولا يحدث كسوف على الإطلاق. ## Advanced -كون الكسوف المركزي كليًا أو حلقيًا يعتمد على مقارنة أخرى منفصلة، هي طول الظل المظلم نفسه. لأن الشمس أكبر من القمر بكثير، يضيق ظل القمر المظلم إلى نقطة بعد نحو 374,400 كم، وهي أقل عادة من المسافة الفعلية بين الأرض والقمر. حين يكون القمر أقرب من ذلك، قرب الحضيض، تتجاوز قمة الظل سطح الأرض فيرى من تحتها مباشرة كسوفًا كليًا. وحين يكون أبعد، قرب الأوج، تتقاطع قمة الظل وتنتهي قبل أن تبلغ الأرض، فما يصل إلى الأرض هو شبه الظل الضيق الذي بعدها، ويبقى حافة الشمس المضيئة ظاهرة حول القمر، فتنتج حلقة نار بدل الكسوف الكلي. +كون الكسوف المركزي كليًا أو حلقيًا يعتمد على مقارنة أخرى منفصلة، هي طول الظل المظلم نفسه. لأن الشمس أكبر من القمر بكثير، يضيق ظل القمر المظلم إلى نقطة بعد نحو 374,400 كم، وهي أقل عادة من المسافة الفعلية بين الأرض والقمر. حين يكون القمر أقرب من ذلك، قرب الحضيض، تتجاوز قمة الظل سطح الأرض فيرى من تحتها مباشرة كسوفًا كليًا. وحين يكون أبعد، قرب الأوج، ينتهي الظل المظلم عند قمته قبل أن يبلغ الأرض، فما يصل إلى الأرض هو امتداد الظل الضيق الذي بعد القمة، وتبقى حافة الشمس المضيئة ظاهرة حول القمر، فتنتج حلقة نار بدل الكسوف الكلي. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### مطاردو الكسوف والسفر + يخطط الفلكيون والسياح لرحلات قبل سنوات ليقفوا داخل مسار الكلية الضيق، الذي لا يتجاوز عرضه أحيانًا 100 إلى 160 كم، لأن الكسوف نفسه يبدو جزئيًا فقط على بعد بضع مئات من الكيلومترات منه. ### التنبؤ بالكسوف عند القدماء + تتبّع الفلكيون البابليون والصينيون دورة سارّوس التي تدوم نحو 18 عامًا، وتعود فيها الشمس والقمر والعقدتان إلى ترتيب قريب من السابق، فتمكّنوا من التنبؤ بالكسوف قبل قرون من فهم هندسته الثلاثية الأبعاد. ### الأقمار الصناعية والطاقة + يخطط المهندسون مدارات الأقمار الصناعية حول ظل الأرض نفسه بالطريقة نفسها: القمر الصناعي الذي يمكث طويلًا في ظل الأرض المظلم يفقد ضوء الشمس عن ألواحه الكهروضوئية، فيحسب المهندسون أوقات دخوله الظل وخروجه منه بهذه الهندسة نفسها. ### اختبار النسبية العامة + الكسوف الكلي في 29 مايو 1919 أتاح للفلكيين رؤية نجوم قريبة من قرص الشمس المظلم وقياس مقدار انحناء ضوئها بجاذبية الشمس، فكان من أول تأكيدات نظرية آينشتاين في النسبية العامة. diff --git a/content/lessons/earth-space/eclipses/en.md b/content/lessons/earth-space/eclipses/en.md index 4a6660f5..023dee51 100644 --- a/content/lessons/earth-space/eclipses/en.md +++ b/content/lessons/earth-space/eclipses/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Start at ω = 90°, far from a node. Watch the shadow cones miss Earth completely — no eclipse this month. -2. Drag ω down toward 0°. Watch the umbra (dark cone) swing down until it lands on Earth. -3. With ω near 0°, drag the Earth–Moon distance from small to large. Watch a total eclipse turn into an annular one as the umbra's tip pulls back short of Earth. +1. Start at ω = 90°, far from a node. The shadow cones miss Earth completely: the readout shows a shadow offset of about 34,400 km and eclipse "none". +2. Drag ω down toward 0°. Watch the umbra (dark cone) swing down toward Earth. At ω = 16° the eclipse readout changes to "partial", and at ω = 10° to "annular". +3. With ω near 0°, drag the Earth–Moon distance from small to large. The readout says "total" up to 374, then "annular": the umbra's tip now stops short of Earth. ## Real-life examples @@ -31,7 +31,7 @@ variables: 1. Line up a central eclipse: get the shadow's sideways offset under 6,371 km (Earth's radius), so the umbra or antumbra axis actually crosses Earth. 2. Find a setting where only the penumbra reaches Earth — a partial eclipse with no total or annular phase anywhere. -3. Set the sliders back to an ordinary month where the shadow misses Earth by more than the penumbra's reach. +3. Find a near miss: no eclipse at all, but a shadow offset that stays under 12,000 km. ## Intuition @@ -58,13 +58,17 @@ Whether a central eclipse is total or annular depends on a second, separate comp ## Real world ### Eclipse chasers and travel + Astronomers and tourists plan trips years ahead to stand inside the narrow path of totality, often only 100–160 km wide, because the same eclipse looks merely partial just a few hundred kilometers to either side. ### Eclipse prediction and ancient astronomy + Babylonian and Chinese astronomers tracked the roughly 18-year Saros cycle, in which the Sun, Moon and nodes return to nearly the same arrangement, letting them predict eclipses centuries before anyone understood the three-dimensional geometry behind it. ### Spacecraft and satellite power + Engineers plan satellite orbits around Earth's own shadow the same way: a satellite that spends too long in Earth's umbra loses sunlight for its solar panels, so mission planners calculate shadow-crossing times using this same shadow geometry. ### Testing general relativity + The total solar eclipse of 29 May 1919 let astronomers see stars close to the Sun's darkened disc and measure how much the Sun's gravity bent their starlight, one of the first confirmations of Einstein's general relativity. diff --git a/content/lessons/earth-space/eclipses/lesson.yaml b/content/lessons/earth-space/eclipses/lesson.yaml index 123e4947..35018613 100644 --- a/content/lessons/earth-space/eclipses/lesson.yaml +++ b/content/lessons/earth-space/eclipses/lesson.yaml @@ -23,13 +23,13 @@ parameters: max: 180 step: 1 value: 90 - unit: "°" + unit: '°' dist: min: 356.5 max: 406.7 step: 0.5 value: 384.4 - unit: "×1000 km" + unit: '×1000 km' variables: - h - d @@ -43,13 +43,13 @@ derivation: charts: [] primary: omega presets: -- omega: 2 - dist: 372 -- omega: 2 - dist: 400 -- omega: 90 - dist: 384.4 + - omega: 2 + dist: 372 + - omega: 2 + dist: 400 + - omega: 90 + dist: 384.4 challenges: -- check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) < 6371 -- check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) >= 6371 and dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) < 9900 -- check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) >= 9900 + - check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) < 6371 + - check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) >= 6371 and dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) < 9900 + - check: dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) >= 9900 and dist*1000*sin(5.14*sin(omega*pi/180)*pi/180) < 12000 diff --git a/content/lessons/earth-space/escape-velocity/ar.md b/content/lessons/earth-space/escape-velocity/ar.md index 3063c0fd..994bcb86 100644 --- a/content/lessons/earth-space/escape-velocity/ar.md +++ b/content/lessons/earth-space/escape-velocity/ar.md @@ -21,25 +21,25 @@ charts: ## Try it -1. اسحب منزلق نصف القطر إلى سطح الأرض، نحو 6.4 بمقياس الألف كم. اقرأ سرعة الإفلات، وهي نحو 11.2 كم/ث. -2. قارنها بالمنحنى الأدنى، سرعة المدار، عند نصف القطر نفسه. -3. اسحب نصف القطر بعيدًا. راقب المنحنيين ينخفضان معًا مع ضعف الجاذبية. +1. اجعل x يساوي 6.4، وهو سطح الأرض بمقياس الألف كم. تُظهر القراءة f(x) سرعة الإفلات: نحو 11.2 كم/ث. +2. قارنها بالمخطط الثاني، سرعة المدار، عند نصف القطر نفسه: نحو 7.9 كم/ث، وهي أقل بوضوح. +3. اجعل x يساوي 60. تنخفض سرعة الإفلات إلى نحو 3.6 كم/ث، وتنخفض معها سرعة المدار، لأن الجاذبية تضعف. ## Real-life examples -- **الانطلاق من سطح الأرض.** عند x = 6.4 (بالألف كم من مركز الأرض)، سرعة الإفلات نحو 11.2 كم/ث، وهي السرعة التي يحتاجها جسم غير مدفوع ليغادر الأرض إلى الأبد. -- **ارتفاع أقمار GPS.** عند x = 20، تضعف الجاذبية كثيرًا، فتنخفض سرعة الإفلات بالفعل إلى بضعة كيلومترات في الثانية. -- **مسافة المدار المتزامن الأرضي.** عند x = 42.2، وهي المسافة التي تبدو فيها الأقمار الصناعية ثابتة فوق خط الاستواء، تكون سرعة الإفلات أخفض من ذلك. +- **الانطلاق من سطح الأرض.** عند x = 6.4 (بالألف كم من مركز الأرض)، سرعة الإفلات نحو 11.2 كم/ث، وهي السرعة التي يحتاجها جسم بلا محرّك ليغادر الأرض ولا يعود. +- **ارتفاع أقمار GPS.** عند x = 26.6 تضعف الجاذبية كثيرًا، فتنخفض سرعة الإفلات إلى نحو 5.5 كم/ث. +- **مسافة المدار المتزامن الأرضي.** عند x = 42.2، وهي المسافة التي تبدو فيها الأقمار الصناعية ثابتة فوق خط الاستواء، تكون سرعة الإفلات أقل من ذلك، نحو 4.3 كم/ث. ## Test yourself -1. جِد نصف القطر الذي تنخفض عنده سرعة الإفلات إلى 5 كم/ث بالضبط. -2. ادفع سرعة الإفلات فوق 10 كم/ث بالبقاء ضمن 10 آلاف كم من مركز الأرض. -3. اخفض سرعة الإفلات دون 6 كم/ث بالابتعاد بما يكفي. +1. ابحث عن نصف القطر الذي تنخفض عنده سرعة الإفلات إلى 5 كم/ث. +2. ارفع سرعة الإفلات فوق 10 كم/ث، وأنت على بعد أقل من 10 آلاف كم من مركز الأرض. +3. ابتعد عن الأرض حتى تنخفض سرعة الإفلات عن 6 كم/ث. ## Intuition -حرّك منزلق نصف القطر إلى سطح الأرض، نحو 6400 كم، واقرأ قيمة منحنى الإفلات، نحو 11.2 كم/ث، وهي السرعة التي يحتاجها الصاروخ (مع تجاهل مقاومة الهواء) ليغادر الأرض إلى الأبد بدل أن يسقط عائدًا. المنحنى الثاني، سرعة المدار الدائري عند نصف القطر نفسه، يقع أدنى منه. فسرعة الإفلات دائمًا $\sqrt{2}$ ضعف سرعة المدار الدائري، لأن مغادرة الجاذبية كليًا تحتاج طاقة أكبر من مجرد الاستمرار في الدوران. +حرّك منزلق نصف القطر إلى سطح الأرض، نحو 6400 كم، واقرأ قيمة منحنى الإفلات، نحو 11.2 كم/ث، وهي السرعة التي يحتاجها الصاروخ (مع تجاهل مقاومة الهواء) ليغادر الأرض ولا يسقط عائدًا إليها. المنحنى الثاني، سرعة المدار الدائري عند نصف القطر نفسه، يقع أدنى منه. فسرعة الإفلات دائمًا $\sqrt{2}$ ضعف سرعة المدار الدائري، لأن مغادرة الجاذبية كليًا تحتاج طاقة أكبر من مجرد الاستمرار في الدوران. اسحب نصف القطر مبتعدًا فينخفض المنحنيان معًا. كلما ابتعدت عن مركز الكوكب ضعف جذبه، فاحتجت سرعة إفلات أقل. ولهذا أيضًا يحرق الصاروخ معظم وقوده في المئات الأولى من الكيلومترات، حيث الجذب أقوى ما يكون. @@ -47,7 +47,7 @@ charts: الإفلات يعني امتلاك طاقة حركية تكفي بالضبط لإلغاء بئر الطاقة الكامنة الثقالية، لتنتهي عند ما لا نهاية بسرعة صفر: $\frac{1}{2}mv_{esc}^2 = \frac{GMm}{r}$. تُحذف كتلة الجسم المفلت $m$، فيبقى $v_{esc} = \sqrt{\frac{2GM}{r}}$، وهي مستقلة عمّا يُطلق، فرصاصة وصاروخ يحتاجان سرعة الإفلات نفسها من النقطة نفسها. -ولأن سرعة المدار الدائري $v = \sqrt{GM/r}$، فإن النسبة $v_{esc}/v = \sqrt{2}$ تبقى ثابتة عند أي نصف قطر، عامل نظيف مستقل عن نصف القطر. +ولأن سرعة المدار الدائري $v = \sqrt{GM/r}$، فإن النسبة $v_{esc}/v = \sqrt{2}$ تبقى ثابتة عند أي نصف قطر، فهي لا تتغيّر مع المسافة. ## Advanced @@ -62,13 +62,17 @@ charts: ## Real world ### إطلاق الصواريخ -لا تستهدف الصواريخ سرعة الإفلات للوصول إلى مدار أرضي منخفض، إذ تكفي سرعة المدار وحدها، لكن المسبارات بين الكواكب تحتاجها لمغادرة جذب الأرض كليًا. + +لا تستهدف الصواريخ سرعة الإفلات للوصول إلى مدار أرضي منخفض، إذ تكفي سرعة المدار وحدها، لكن المسابير المسافرة بين الكواكب تحتاجها لمغادرة جذب الأرض كليًا. ### لماذا لا هواء للقمر + سرعة إفلات القمر، 2.4 كم/ث، أقل من أن تحتفظ بغلاف جوي أمام السرعة الحرارية لجزيئات الغاز الخفيف عبر مليارات السنين. ### الثقوب السوداء + الثقب الأسود، بتبسيط، منطقة تتجاوز فيها سرعة الإفلات من داخل أفق حدثه سرعة الضوء. ### نقاشات تحويل المريخ لكوكب مأهول + يُعدّ المريخ، بسرعة إفلات 5.0 كم/ث، مرشّحًا جادًا في نقاشات الاحتفاظ بالغلاف الجوي، لأن هذا الرقم أقرب إلى رقم الأرض منه إلى رقم القمر. diff --git a/content/lessons/earth-space/escape-velocity/en.md b/content/lessons/earth-space/escape-velocity/en.md index 79adb8e1..b0ed5033 100644 --- a/content/lessons/earth-space/escape-velocity/en.md +++ b/content/lessons/earth-space/escape-velocity/en.md @@ -23,15 +23,15 @@ charts: ## Try it -1. Drag the radius slider to Earth's surface, about 6.4 on the thousand-km scale. Read off escape velocity: about 11.2 km/s. -2. Compare it with the lower curve, orbital speed, at that same radius. -3. Drag the radius far out. Watch both curves fall together as gravity weakens. +1. Set x to 6.4, Earth's surface on the thousand-km scale. The readout f(x) shows the escape velocity: about 11.2 km/s. +2. Compare it with the second chart, orbital speed, at that same radius: about 7.9 km/s, clearly lower. +3. Set x to 60. Escape velocity falls to about 3.6 km/s, and orbital speed falls with it, because gravity weakens. ## Real-life examples - **Launching from Earth's surface.** At x = 6.4 (thousand km from Earth's centre), escape velocity is about 11.2 km/s — the speed an unpowered object needs to leave Earth forever. -- **GPS satellite altitude.** At x = 20, gravity is much weaker, so escape velocity has already dropped to a few kilometres per second. -- **Geostationary distance.** At x = 42.2, the distance where satellites appear to hang still over the equator, escape velocity is lower still. +- **GPS satellite altitude.** At x = 26.6, gravity is much weaker, so escape velocity has already dropped to about 5.5 km/s. +- **Geostationary distance.** At x = 42.2, the distance where satellites appear to hang still over the equator, escape velocity is lower still, about 4.3 km/s. ## Test yourself @@ -64,13 +64,17 @@ Escape velocity is really a statement about the sign of total mechanical energy: ## Real world ### Rocket launches + Rockets do not aim for escape velocity when reaching low Earth orbit — that only takes orbital speed — but interplanetary probes need it to leave Earth's pull behind entirely. ### Why the Moon has no air + The Moon's escape velocity, 2.4 km/s, is too low to retain an atmosphere against the thermal speed of light gas molecules over billions of years. ### Black holes + A black hole is, loosely, a region where the escape velocity from within its event horizon would exceed the speed of light. ### Terraforming discussions + Mars, with an escape velocity of 5.0 km/s, is a serious candidate for atmosphere retention arguments precisely because that number sits closer to Earth's than the Moon's does. diff --git a/content/lessons/earth-space/escape-velocity/lesson.yaml b/content/lessons/earth-space/escape-velocity/lesson.yaml index 169cf9ef..1863a0af 100644 --- a/content/lessons/earth-space/escape-velocity/lesson.yaml +++ b/content/lessons/earth-space/escape-velocity/lesson.yaml @@ -26,8 +26,8 @@ parameters: min: 6.4 max: 60 step: 0.1 - value: 6.4 - unit: "×1000 km" + value: 10 + unit: '×1000 km' variables: - G - M @@ -48,11 +48,11 @@ charts: - sqrt(3.986e14/(x*1e6))/1000 primary: x presets: -- x: 6.4 -- x: 20 -- x: 42.2 + - x: 6.4 + - x: 26.6 + - x: 42.2 challenges: -- check: sqrt(2*3.986e14/(x*1e6))/1000 - target: 5 -- check: x < 10 and sqrt(2*3.986e14/(x*1e6))/1000 > 10 -- check: sqrt(2*3.986e14/(x*1e6))/1000 < 6 + - check: sqrt(2*3.986e14/(x*1e6))/1000 + target: 5 + - check: x < 10 and sqrt(2*3.986e14/(x*1e6))/1000 > 10 + - check: sqrt(2*3.986e14/(x*1e6))/1000 < 6 diff --git a/content/lessons/earth-space/greenhouse-effect/ar.md b/content/lessons/earth-space/greenhouse-effect/ar.md index 698d6798..a30e61f0 100644 --- a/content/lessons/earth-space/greenhouse-effect/ar.md +++ b/content/lessons/earth-space/greenhouse-effect/ar.md @@ -15,25 +15,25 @@ variables: ## Try it -1. اجعل قوة الاحتباس الحراري صفرًا. راقب الحرارة تستقرّ قرب −18°م، أرض بلا غلاف جوي. -2. اسحب قوة الاحتباس الحراري نحو 0.78، القيمة الحالية. راقب الحرارة ترتفع إلى نحو +15°م. -3. اسحب البياض لأعلى بدلًا من ذلك، فيعكس ضوءًا أكثر، وراقب الحرارة تنخفض. +1. اجعل قوة الاحتباس الحراري x صفرًا واترك البياض عند 0.3. تُظهر القراءة f(x) نحو −18.6°م، وهذه أرض بلا غلاف جوي. +2. ارفع قوة الاحتباس الحراري إلى 0.78، وهي قيمتها اليوم. ترتفع الحرارة إلى نحو +15°م. +3. أبقِ x عند 0.78 وارفع البياض من 0.3 إلى 0.4، فتعكس الأرض ضوءًا أكثر. تنخفض الحرارة من نحو +15°م إلى نحو +4°م. ## Real-life examples -- **عالم بلا هواء يشبه القمر.** مع احتباس حراري شبه معدوم (x = 0) وسطح داكن (بياض 0.11)، تستقرّ الحرارة أدنى بكثير من التجمّد. -- **الأرض اليوم.** ببياض اليوم (0.3) وقوة احتباس حراري (x = 0.78)، يبلغ متوسط الحرارة +15°م مريحة. -- **احتباس حراري جامح يشبه الزهرة.** غطاء سحابي ساطع (بياض 0.6) لا ينقذ عالمًا بقوة احتباس حراري متطرّفة (x = 0.95) من حرارة محرقة. +- **عالم بلا هواء يشبه القمر.** مع احتباس حراري شبه معدوم (x = 0) وسطح داكن (بياض 0.11)، تكون الحرارة تحت درجة التجمّد بقليل، نحو −3°م. +- **الأرض اليوم.** ببياض اليوم (0.3) وقوة احتباس حراري (x = 0.78)، يكون متوسط الحرارة +15°م، وهي حرارة معتدلة. +- **عالم ساطع تغطيه السحب.** غطاء سحابي ساطع (بياض 0.6) يعكس ضوءًا كثيرًا، حتى إن أقوى احتباس حراري على المنزلق (x = 0.95) يترك الحرارة عند نحو −13°م. أما الزهرة الحقيقية فمحرقة لأن احتباسها الحراري أقوى بكثير مما يبلغه هذا النموذج البسيط. ## Test yourself -1. اضبط البياض وقوة الاحتباس الحراري معًا حتى تستقرّ الحرارة عند التجمّد بالضبط، 0°م. -2. ادفع الحرارة فوق 40°م باحتباس حراري قوي وبياض منخفض. -3. مع عالم ساطع عالي البياض (فوق 0.55)، اخفض قوة الاحتباس الحراري حتى تنخفض الحرارة دون −30°م. +1. اضبط البياض وقوة الاحتباس الحراري معًا حتى تصير الحرارة عند درجة التجمّد، 0°م. +2. ارفع الحرارة فوق 40°م باحتباس حراري قوي وبياض منخفض. +3. اختر عالمًا ساطعًا بياضه أعلى من 0.55، ثم أضعف الاحتباس الحراري حتى تنخفض الحرارة تحت −30°م. ## Intuition -اجعل قوة الاحتباس الحراري صفرًا، أي بلا غلاف جوي حابس على الإطلاق، فيستقر المنحنى عند نحو −18°م، وهي الحرارة التي كان سيبلغها سطح الأرض من ضوء الشمس وحده بالبياض الحالي. هذه أبرد من أي مكان مأهول على الكوكب، وهي الرقم الصادق لأرض بلا غلاف جوي، مضاءة وعاكسة، لكن بلا شيء يحبس الحرارة. +اجعل قوة الاحتباس الحراري صفرًا، أي بلا غلاف جوي حابس على الإطلاق، فيستقر المنحنى عند نحو −18°م، وهي الحرارة التي كان سيبلغها سطح الأرض من ضوء الشمس وحده بالبياض الحالي. هذه أبرد من أي مكان مأهول على الكوكب، وهذا هو الرقم الحقيقي لأرض بلا غلاف جوي: تضيئها الشمس وتعكس بعض ضوئها، لكن لا شيء يحبس الحرارة. اسحب الآن قوة الاحتباس الحراري نحو قيمتها الحالية قرب 0.78 فترتفع الحرارة إلى نحو +15°م، متوسط حرارة الأرض الفعلي. الغلاف الجوي لا يضيف طاقة، بل يبطئ سرعة خروج الطاقة التي وصلت بالفعل، تمامًا كما يدفئك الغطاء بإبطاء فقدان الحرارة لا بتوليدها. @@ -56,13 +56,17 @@ variables: ## Real world ### تغيّر المناخ -يرفع ازدياد ثاني أكسيد الكربون والميثان قوة الاحتباس الحراري الفعالة، فتدفع حرارة السطح للأعلى وفق هذا المنحنى نفسه. + +يرفع ازدياد ثاني أكسيد الكربون والميثان قوة الاحتباس الحراري الفعالة، فترتفع حرارة السطح وفق هذا المنحنى نفسه. ### كوكب الزهرة + يدفع غلاف الزهرة الجوي الكثيف من ثاني أكسيد الكربون قوة احتباسها الحراري إلى حدّ يبلغ سطحها معه نحو 465°م، أسخن من عطارد رغم بعدها الأكبر عن الشمس. ### البيوت الزجاجية والسيارات + يسخن البيت الزجاجي الحقيقي (أو السيارة المركونة) بحبس الأشعّة تحت الحمراء خلف الزجاج، وهي آلية مرتبطة لكن مختلفة عن تأثير الاحتباس الحراري الجوي. ### العصور الجليدية وتغذية البياض الراجعة + كلما زاد الجليد ارتفع البياض، فينعكس ضوء أكثر ويبرد الكوكب أكثر، وهذه حلقة تغذية راجعة يمكن أن تعمّق عصرًا جليديًا بمجرد أن يبدأ. diff --git a/content/lessons/earth-space/greenhouse-effect/en.md b/content/lessons/earth-space/greenhouse-effect/en.md index 80961f45..bd4343d7 100644 --- a/content/lessons/earth-space/greenhouse-effect/en.md +++ b/content/lessons/earth-space/greenhouse-effect/en.md @@ -16,15 +16,15 @@ variables: ## Try it -1. Set greenhouse strength to 0. Watch the temperature settle near −18°C — an airless Earth. -2. Drag greenhouse strength up toward 0.78, today's value. Watch temperature climb to about +15°C. -3. Drag albedo up instead, reflecting more sunlight away, and watch temperature fall. +1. Set greenhouse strength x to 0 and leave albedo at 0.3. The readout f(x) shows about −18.6°C — an airless Earth. +2. Drag greenhouse strength up to 0.78, today's value. The temperature climbs to about +15°C. +3. Keep x at 0.78 and raise albedo from 0.3 to 0.4, reflecting more sunlight away. The temperature falls from about +15°C to about +4°C. ## Real-life examples -- **An airless, Moon-like world.** With almost no greenhouse trapping (x = 0) and a dark surface (albedo = 0.11), the surface sits far below freezing. +- **An airless, Moon-like world.** With almost no greenhouse trapping (x = 0) and a dark surface (albedo = 0.11), the surface sits just below freezing, at about −3°C. - **Earth today.** With today's albedo (0.3) and greenhouse strength (x = 0.78), the surface averages a comfortable +15°C. -- **A runaway greenhouse, Venus-like.** A bright cloud cover (albedo = 0.6) still can't save a world with an extreme greenhouse strength (x = 0.95) from scorching heat. +- **A bright, cloud-covered world.** A bright cloud cover (albedo = 0.6) reflects so much sunlight that even the strongest greenhouse on the slider (x = 0.95) leaves the surface at about −13°C. Real Venus is scorching because its greenhouse is far stronger than this simple model can reach. ## Test yourself @@ -57,13 +57,17 @@ This one-layer model is a simplification: real greenhouse warming depends on the ## Real world ### Climate change + Rising CO₂ and methane increase effective greenhouse strength, pushing surface temperature up along exactly this curve. ### Venus + Venus's thick CO₂ atmosphere pushes its greenhouse strength so high that its surface reaches roughly 465 °C, hotter than Mercury despite being farther from the Sun. ### Greenhouses and cars + A literal greenhouse (or a parked car) warms by trapping infrared radiation behind glass, a related but distinct mechanism from the atmospheric greenhouse effect. ### Ice ages and albedo feedback + More ice means higher albedo, which reflects more sunlight and cools the planet further, a feedback loop that can deepen an ice age once it starts. diff --git a/content/lessons/earth-space/greenhouse-effect/lesson.yaml b/content/lessons/earth-space/greenhouse-effect/lesson.yaml index d86b1652..64fdb3b1 100644 --- a/content/lessons/earth-space/greenhouse-effect/lesson.yaml +++ b/content/lessons/earth-space/greenhouse-effect/lesson.yaml @@ -25,7 +25,7 @@ parameters: max: 0.6 step: 0.01 value: 0.3 - label: "albedo — sunlight reflected" + label: 'albedo — sunlight reflected' x: min: 0 max: 0.95 @@ -44,15 +44,15 @@ derivation: charts: [] primary: x presets: -- alb: 0.11 - x: 0 -- alb: 0.3 - x: 0.78 -- alb: 0.6 - x: 0.95 + - alb: 0.11 + x: 0 + - alb: 0.3 + x: 0.78 + - alb: 0.6 + x: 0.95 challenges: -- check: ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 - target: 0 - tol: 2 -- check: ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 > 40 -- check: alb > 0.55 and ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 < -30 + - check: ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 + target: 0 + tol: 2 + - check: ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 > 40 + - check: alb > 0.55 and ((1-alb)*1361/(4*5.67e-8*(1-x/2)))^(1/4) - 273.15 < -30 diff --git a/content/lessons/earth-space/kepler-orbits/ar.md b/content/lessons/earth-space/kepler-orbits/ar.md index 3cadf6f7..9772fb05 100644 --- a/content/lessons/earth-space/kepler-orbits/ar.md +++ b/content/lessons/earth-space/kepler-orbits/ar.md @@ -21,31 +21,31 @@ charts: ## Try it -1. اسحب منزلق نصف القطر إلى نحو 6.8، قرب سطح الأرض. اقرأ سرعة المدار، نحو 7.8 كم/ث، نطاق محطة الفضاء الدولية. -2. تابع السحب حتى 42.2. راقب سرعة المدار تنخفض إلى نحو 3.1 كم/ث. -3. راقب الدورة المدارية ترتفع من نحو 90 دقيقة إلى 24 ساعة كاملة، وهذا هو المدار المتزامن أرضيًا. +1. اجعل x يساوي 6.8، فوق سطح الأرض بقليل. تُظهر القراءة f(x) سرعة المدار: نحو 7.7 كم/ث، وهنا تدور محطة الفضاء الدولية. +2. اجعل x يساوي 42.2. تنخفض سرعة المدار إلى نحو 3.1 كم/ث. +3. في المخطط الثاني ترتفع الدورة المدارية من نحو ساعة ونصف عند 6.8 إلى 24 ساعة كاملة عند 42.2، وهذا هو المدار المتزامن أرضيًا. ## Real-life examples -- **محطة الفضاء الدولية.** عند x = 6.8، المدار الأرضي المنخفض، تدور المحطة بسرعة نحو 7.8 كم/ث، وتكمل لفّة في نحو 93 دقيقة. +- **محطة الفضاء الدولية.** عند x = 6.8، المدار الأرضي المنخفض، تدور المحطة بسرعة نحو 7.7 كم/ث، وتكمل لفّة في نحو 93 دقيقة. - **أقمار GPS.** عند x = 26.6، تدور أقمار GPS أبطأ، وتكمل لفّة كل نحو 12 ساعة. -- **الأقمار المتزامنة أرضيًا.** عند x = 42.2، تنخفض سرعة المدار بما يكفي ليستغرق اللف الواحد 24 ساعة بالضبط، مطابقًا دوران الأرض. +- **الأقمار المتزامنة أرضيًا.** عند x = 42.2، تنخفض سرعة المدار حتى تستغرق اللفّة الواحدة 24 ساعة بالضبط، مثل دوران الأرض حول نفسها. ## Test yourself -1. جِد نصف القطر الذي تستغرق عنده الدورة 24 ساعة بالضبط (مدار متزامن أرضيًا). -2. جِد نصف القطر الذي يعطي سرعة مدار تساوي 5 كم/ث بالضبط. -3. ادفع الدورة المدارية دون ساعتين بالدوران قريبًا من الأرض. +1. ابحث عن نصف القطر الذي تستغرق عنده الدورة 24 ساعة (مدار متزامن أرضيًا). +2. ابحث عن نصف القطر الذي يعطي سرعة مدار تساوي 5 كم/ث. +3. اقترب من الأرض حتى تصير الدورة المدارية أقل من ساعتين. ## Intuition -حرّك منزلق نصف القطر مبتعدًا عن سطح الأرض وراقب ميل خط المماس، أي سرعة المدار، ينخفض. بالقرب من 6600 كم تحتاج نحو 7.8 كم/ث لتستمر في الانحناء بسرعة تكفي لموازنة جذب الأرض، وهذا هو المدار الأرضي المنخفض، موطن محطة الفضاء الدولية التي تدور حول الكوكب في نحو 90 دقيقة. +حرّك منزلق نصف القطر مبتعدًا عن سطح الأرض وراقب ارتفاع المنحنى، أي سرعة المدار، ينخفض. بالقرب من 6600 كم تحتاج نحو 7.8 كم/ث لتستمر في الانحناء بسرعة تكفي لموازنة جذب الأرض، وهذا هو المدار الأرضي المنخفض، موطن محطة الفضاء الدولية التي تدور حول الكوكب في نحو 90 دقيقة. -تابع السحب حتى 42200 كم فتنخفض السرعة إلى نحو 3.1 كم/ث، وهي بطيئة بما يكفي ليستغرق اللف الواحد 24 ساعة، أي يطابق بالضبط دوران الأرض. يبدو القمر الصناعي هناك ثابتًا فوق نقطة واحدة على خط الاستواء، وهذا هو المدار المتزامن الأرضي المستخدَم في أقمار الاتصالات والأرصاد. +تابع السحب حتى 42200 كم فتنخفض السرعة إلى نحو 3.1 كم/ث، وهي سرعة بطيئة تجعل اللفّة الواحدة تستغرق 24 ساعة، مثل دوران الأرض حول نفسها تمامًا. يبدو القمر الصناعي هناك ثابتًا فوق نقطة واحدة على خط الاستواء، وهذا هو المدار المتزامن الأرضي المستخدَم في أقمار الاتصالات والأرصاد. ## Formal -في المدار الدائري تزوّد الجاذبية بالضبط القوة المركزية اللازمة لاستمرار الانحناء: $\frac{GMm}{r^2} = \frac{mv^2}{r}$. تُحذف كتلة القمر الصناعي $m$ من طرفي المعادلة، فلا تعتمد سرعة المدار على ما تدور حوله: $v = \sqrt{\frac{GM}{r}}$. +في المدار الدائري تزوّد الجاذبية بالضبط القوة المركزية اللازمة لاستمرار الانحناء: $\frac{GMm}{r^2} = \frac{mv^2}{r}$. تُحذف كتلة القمر الصناعي $m$ من طرفي المعادلة، فلا تعتمد سرعة المدار على كتلة الجسم الذي يدور: $v = \sqrt{\frac{GM}{r}}$. تُشتق الدورة من قسمة المحيط على السرعة، $T = \frac{2\pi r}{v} = 2\pi\sqrt{\frac{r^3}{GM}}$، وهذا هو قانون كبلر الثالث، مربّع الدورة يتناسب مع مكعّب نصف القطر، وقد وسّعناه هنا ليشمل أي نصف قطر لا مدارات الكواكب حول الشمس فقط. @@ -62,13 +62,17 @@ charts: ## Real world ### أقمار GPS + تدور أقمار GPS على ارتفاع نحو 20200 كم، اختير بحيث تكرّر دورتها البالغة 12 ساعة المسار الأرضي نفسه مرّتين يوميًا. ### أقمار الاتصالات المتزامنة أرضيًا + تقف أقمار التلفزيون والأرصاد عند 42200 كم بالضبط لأن دورتها البالغة 24 ساعة تطابق دوران الأرض فتبقى ثابتة فوق نقطة واحدة. ### محطة الفضاء الدولية + تدور المحطة على بُعد نحو 6800 كم من مركز الأرض (أي نحو 400 كم ارتفاعًا)، وتكمل لفّة في نحو 93 دقيقة، أي أكثر من 15 شروقًا يوميًا لطاقمها. ### تخطيط الرحلات بين الكواكب + يستخدم مخطّطو المهمات هذا التبادل نفسه بين السرعة ونصف القطر، مع قوانين كبلر الأخرى، لحساب الوقود اللازم لنقل مركبة من مدار إلى آخر. diff --git a/content/lessons/earth-space/kepler-orbits/en.md b/content/lessons/earth-space/kepler-orbits/en.md index 691938f3..3f962b8b 100644 --- a/content/lessons/earth-space/kepler-orbits/en.md +++ b/content/lessons/earth-space/kepler-orbits/en.md @@ -23,13 +23,13 @@ charts: ## Try it -1. Drag the radius slider to about 6.8, near Earth's surface. Read orbital speed: about 7.8 km/s, ISS territory. -2. Keep dragging out to 42.2. Watch orbital speed drop to about 3.1 km/s. -3. Watch orbital period climb from about 90 minutes to a full 24 hours — geostationary orbit. +1. Set x to 6.8, just above Earth's surface. The readout f(x) shows the orbital speed: about 7.7 km/s, ISS territory. +2. Set x to 42.2. Orbital speed drops to about 3.1 km/s. +3. On the second chart, the orbital period climbs from about 1.5 hours at 6.8 to a full 24 hours at 42.2 — geostationary orbit. ## Real-life examples -- **The International Space Station.** At x = 6.8, low Earth orbit, the ISS circles at about 7.8 km/s, completing a lap in roughly 93 minutes. +- **The International Space Station.** At x = 6.8, low Earth orbit, the ISS circles at about 7.7 km/s, completing a lap in roughly 93 minutes. - **GPS satellites.** At x = 26.6, GPS satellites orbit slower, completing a lap roughly every 12 hours. - **Geostationary satellites.** At x = 42.2, orbital speed has dropped enough that one lap takes exactly 24 hours, matching Earth's rotation. @@ -41,13 +41,13 @@ charts: ## Intuition -Drag the radius slider outward from just above Earth's surface and watch the tangent line's slope — the orbital speed — fall. Close in, near 6,600 km, you need about 7.8 km/s to keep curving fast enough to match gravity's pull; that is low Earth orbit, home to the ISS, circling the planet in about 90 minutes. +Drag the radius slider outward from just above Earth's surface and watch the height of the curve — the orbital speed — fall. Close in, near 6,600 km, you need about 7.8 km/s to keep curving fast enough to match gravity's pull; that is low Earth orbit, home to the ISS, circling the planet in about 90 minutes. Keep dragging out to 42,200 km and the speed has dropped to about 3.1 km/s, slow enough that one lap now takes 24 hours — exactly matching Earth's rotation. A satellite there appears to hang motionless over one spot on the equator: geostationary orbit, used by communication and weather satellites. ## Formal -For a circular orbit, gravity supplies exactly the centripetal force needed to keep curving: $\frac{GMm}{r^2} = \frac{mv^2}{r}$. The satellite's own mass $m$ cancels from both sides, so orbital speed does not depend on what you are orbiting with: $v = \sqrt{\frac{GM}{r}}$. +For a circular orbit, gravity supplies exactly the centripetal force needed to keep curving: $\frac{GMm}{r^2} = \frac{mv^2}{r}$. The satellite's own mass $m$ cancels from both sides, so orbital speed does not depend on the mass of the thing in orbit: $v = \sqrt{\frac{GM}{r}}$. The period follows from circumference over speed, $T = \frac{2\pi r}{v} = 2\pi\sqrt{\frac{r^3}{GM}}$ — this is Kepler's third law, period squared proportional to radius cubed, extended here to any radius rather than just the planets' orbits around the Sun. @@ -64,13 +64,17 @@ Kepler's first law says real orbits are ellipses with the central body at one fo ## Real world ### GPS satellites + GPS satellites orbit at about 20,200 km, chosen so their 12-hour period repeats the same ground track twice a day. ### Geostationary communication satellites + TV and weather satellites sit at 42,200 km precisely so their 24-hour period matches Earth's rotation and they stay fixed over one spot. ### The International Space Station + The ISS orbits at roughly 6,800 km from Earth's centre (about 400 km altitude), completing a lap in about 93 minutes — over 15 sunrises a day for the crew. ### Planning interplanetary transfers + Mission planners use this same speed-versus-radius trade-off, layered with Kepler's other laws, to compute the fuel needed to move a spacecraft from one orbit to another. diff --git a/content/lessons/earth-space/kepler-orbits/lesson.yaml b/content/lessons/earth-space/kepler-orbits/lesson.yaml index 501ef8fd..f444a4f7 100644 --- a/content/lessons/earth-space/kepler-orbits/lesson.yaml +++ b/content/lessons/earth-space/kepler-orbits/lesson.yaml @@ -24,8 +24,8 @@ parameters: min: 6.6 max: 50 step: 0.1 - value: 6.8 - unit: "×1000 km" + value: 10 + unit: '×1000 km' variables: - G - M @@ -46,13 +46,13 @@ charts: - 2*pi*sqrt((x*1e6)^3/3.986e14)/3600 primary: x presets: -- x: 6.8 -- x: 26.6 -- x: 42.2 + - x: 6.8 + - x: 26.6 + - x: 42.2 challenges: -- check: 2*pi*sqrt((x*1e6)^3/3.986e14)/3600 - target: 24 - tol: 0.5 -- check: sqrt(3.986e14/(x*1e6))/1000 - target: 5 -- check: 2*pi*sqrt((x*1e6)^3/3.986e14)/3600 < 2 + - check: 2*pi*sqrt((x*1e6)^3/3.986e14)/3600 + target: 24 + tol: 0.5 + - check: sqrt(3.986e14/(x*1e6))/1000 + target: 5 + - check: 2*pi*sqrt((x*1e6)^3/3.986e14)/3600 < 2 diff --git a/content/lessons/earth-space/moon-phases/ar.md b/content/lessons/earth-space/moon-phases/ar.md index b6dab0ea..ae780361 100644 --- a/content/lessons/earth-space/moon-phases/ar.md +++ b/content/lessons/earth-space/moon-phases/ar.md @@ -13,27 +13,27 @@ variables: ## Try it -1. اسحب منزلق الأيام من الصفر. راقب هلالًا رفيعًا يكبر إلى قرص نصفه مضيء. -2. تابع السحب حتى اليوم 15 تقريبًا. راقب القرص يصبح دائرة كاملة مضيئة. -3. تابع السحب نحو اليوم 29.5. راقب القرص يصغر عائدًا إلى الظلام. +1. اسحب منزلق الأيام من 0 إلى 7.4. يكبر هلال رفيع حتى يصير قرصًا نصفه مضيء، وتُظهر القراءة 50 %. +2. تابع السحب حتى اليوم 14.8. يصير القرص دائرة كاملة مضيئة: 100 %. +3. تابع السحب حتى اليوم 29.5. يصغر الجزء المضيء حتى يعود القرص مظلمًا: 0 %. ## Real-life examples -- **المحاق.** عند اليوم 0، يكون النصف المضيء بعيدًا عن الأرض تمامًا، فلا يظهر قمر في السماء إطلاقًا. +- **المحاق.** عند اليوم 0، يكون النصف المضيء بعيدًا عن الأرض تمامًا، فلا نرى القمر في السماء. - **التربيع الأول.** عند اليوم 7.4، بعد نحو أسبوع، يضيء نصف القرص المرئي بالضبط. - **البدر.** عند اليوم 14.8، بعد نحو أسبوعين، يواجهنا القرص كلّه مضيئًا، أسطع ليلة في الشهر. ## Test yourself -1. جِد اليوم الذي يكون فيه القمر نصف مضيء بالضبط (تربيع أول أو أخير). -2. ادفع نسبة الإضاءة فوق 90%، قرب البدر. -3. اسحب حتى المحاق التالي وجِد أين يعود القرص إلى الظلام. +1. ابحث عن اليوم الذي يكون فيه نصف القمر مضيئًا (تربيع أول أو أخير). +2. اجعل نسبة الإضاءة أكبر من 90%، قرب البدر. +3. اسحب حتى المحاق التالي وابحث عن اليوم الذي يعود فيه القرص مظلمًا. ## Intuition -حرّك منزلق الأيام من الصفر وراقب هلالًا رفيعًا يكبر إلى نصف قرص ثم إلى بدر كامل مضيء ثم يصغر من جديد. تضيء الشمس نصف القمر دائمًا تمامًا كما تضيء نصف أي كرة تطفو في ضوئها. المتغيّر هو مقدار ذلك النصف المضيء الذي يواجه الأرض وهو يدور حولنا. +حرّك منزلق الأيام من الصفر وراقب هلالًا رفيعًا يكبر إلى نصف قرص ثم إلى بدر كامل مضيء ثم يصغر من جديد. تضيء الشمس نصف القمر دائمًا تمامًا كما تضيء نصف أي كرة تطفو في ضوئها. الذي يتغيّر هو مقدار ما نراه من الأرض من ذلك النصف المضيء، والقمر يدور حولنا. -عند اليوم صفر يكون النصف المضيء بعيدًا عنا تمامًا، وهذا هو المحاق، إذ يقع القمر تقريبًا بين الأرض والشمس. تابع السحب حتى اليوم 15 تقريبًا فيواجهنا النصف المضيء كاملًا، وهذا هو البدر، حين تقع الأرض تقريبًا بين القمر والشمس. وكل ما بينهما هو دوران النصف المضيء تدريجيًا ليصبح مرئيًا. +عند اليوم صفر يكون النصف المضيء بعيدًا عنا تمامًا، وهذا هو المحاق، إذ يقع القمر تقريبًا بين الأرض والشمس. تابع السحب حتى اليوم 15 تقريبًا فيواجهنا النصف المضيء كاملًا، وهذا هو البدر، حين تقع الأرض تقريبًا بين القمر والشمس. وبين هذين اليومين يدور النصف المضيء نحونا شيئًا فشيئًا. ## Formal @@ -54,13 +54,17 @@ variables: ## Real world ### جداول المدّ والجزر -تتجمّع المدود الربيعية حول المحاق والبدر، حين تتراصف الشمس والقمر بفضل الهندسة نفسها. + +يبلغ المدّ أعلى مستوياته حول المحاق والبدر، حين تصطفّ الشمس والقمر والأرض على خط واحد. ### التقويم الهجري وتقاويم قمرية أخرى + تبدأ تقاويم كثيرة كل شهر برؤية الهلال الأول بعد المحاق، فتربط التقويم مباشرة بهذه الدورة. ### التصوير الليلي والفلك + يجدول الفلكيون رصد الأجرام الخافتة حول المحاق، حين لا يطغى ضوء القمر عليها. ### الكسوف والخسوف + لا يحدث كسوف الشمس إلا قرب المحاق ولا خسوف القمر إلا قرب البدر، وفقط حين يعبر مدار القمر المائل قليلًا مستوى مدار الأرض في تلك اللحظة أيضًا. diff --git a/content/lessons/earth-space/moon-phases/en.md b/content/lessons/earth-space/moon-phases/en.md index 5ea05fe2..d7f252e3 100644 --- a/content/lessons/earth-space/moon-phases/en.md +++ b/content/lessons/earth-space/moon-phases/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Drag the day slider from 0. Watch a thin crescent grow into a half-lit disc. -2. Keep dragging to about day 15. Watch the disc become a full, glowing circle. -3. Keep dragging toward day 29.5. Watch the disc shrink back down to dark. +1. Drag the day slider from 0 to 7.4. A thin crescent grows into a half-lit disc, and the readout shows 50 % lit. +2. Keep dragging to day 14.8. The disc becomes a full, glowing circle: 100 % lit. +3. Keep dragging to day 29.5. The lit part shrinks back down to dark: 0 % lit. ## Real-life examples @@ -55,13 +55,17 @@ The synodic period (29.53 days, new moon to new moon) is longer than the Moon's ## Real world ### Tide tables + Spring tides cluster around new and full moon, when this same geometry lines up the Sun and Moon. ### Islamic and lunar calendars + Many calendars start each month at the first visible crescent after new moon, tying the calendar directly to this cycle. ### Night photography and astronomy + Astronomers schedule deep-sky observations around new moon, when no moonlight washes out faint objects. ### Eclipses + A solar eclipse can only happen near new moon and a lunar eclipse only near full moon, and only when the Moon's slightly tilted orbit also crosses Earth's orbital plane at that moment. diff --git a/content/lessons/earth-space/moon-phases/lesson.yaml b/content/lessons/earth-space/moon-phases/lesson.yaml index eb5c8b4c..315da359 100644 --- a/content/lessons/earth-space/moon-phases/lesson.yaml +++ b/content/lessons/earth-space/moon-phases/lesson.yaml @@ -36,14 +36,12 @@ derivation: charts: [] primary: day presets: -- day: 0 -- day: 7.4 -- day: 14.8 + - day: 0 + - day: 7.4 + - day: 14.8 challenges: -- check: (1-cos(2*pi*day/29.53))/2 - target: 0.5 - tol: 0.02 -- check: (1-cos(2*pi*day/29.53))/2 > 0.9 -- check: (1-cos(2*pi*day/29.53))/2 - target: 0 - tol: 0.02 + - check: (1-cos(2*pi*day/29.53))/2 + target: 0.5 + tol: 0.02 + - check: (1-cos(2*pi*day/29.53))/2 > 0.9 + - check: day > 15 and (1-cos(2*pi*day/29.53))/2 < 0.02 diff --git a/content/lessons/earth-space/planet-distances/ar.md b/content/lessons/earth-space/planet-distances/ar.md index 39c08c9a..dc34c8ae 100644 --- a/content/lessons/earth-space/planet-distances/ar.md +++ b/content/lessons/earth-space/planet-distances/ar.md @@ -46,7 +46,7 @@ variables: ## Advanced -المدارات الحقيقية ليست دوائر تامة، فتتغير أكبر زاوية من مرور إلى آخر. للزهرة تتراوح من نحو 45° إلى 47.8°، ولعطارد، وهو أكثر استطالة في مداره، من 18° إلى 28°. ومتوسط مرات كثيرة يعطي المسافات المتوسطة: 0.723 AU للزهرة و0.387 AU لعطارد. +المدارات الحقيقية ليست دوائر تامة، فتتغير أكبر زاوية من مرور إلى آخر. للزهرة تتراوح من نحو 45° إلى 47.8°، ولعطارد، ومداره أبعد عن شكل الدائرة، من 18° إلى 28°. ومتوسط مرات كثيرة يعطي المسافات المتوسطة: 0.723 AU للزهرة و0.387 AU لعطارد. تصلح الطريقة للكواكب داخل مدار الأرض فقط، لأنها وحدها لها أكبر زاوية. أما المريخ والكواكب الخارجية فتحتاج طريقة أخرى. ووجد كبلر لاحقًا قاعدة تربط سنة الكوكب ببعده، فيكفي قياس جيد واحد، هو الوحدة الفلكية، ليحدد بقية المسافات. diff --git a/content/lessons/earth-space/planet-distances/lesson.yaml b/content/lessons/earth-space/planet-distances/lesson.yaml index 7489bffe..f7de3d58 100644 --- a/content/lessons/earth-space/planet-distances/lesson.yaml +++ b/content/lessons/earth-space/planet-distances/lesson.yaml @@ -33,7 +33,7 @@ parameters: min: 0 max: 360 step: 1 - value: 60 + value: 120 unit: ° variables: - r diff --git a/content/lessons/earth-space/plate-tectonics/ar.md b/content/lessons/earth-space/plate-tectonics/ar.md index ab6cfcd8..cb037a4b 100644 --- a/content/lessons/earth-space/plate-tectonics/ar.md +++ b/content/lessons/earth-space/plate-tectonics/ar.md @@ -1,5 +1,5 @@ --- -title: تكتونية الصفائح +title: الصفائح التكتونية summary: >- صفائح الأرض تزحف بسرعة نمو الظفر. عبر ملايين السنين ترفع الجبال وتصنع الزلازل. parameters: @@ -13,27 +13,27 @@ variables: ## Try it -1. اجعل v عددًا موجبًا، مثل 5 سم/سنة، فتكون الصفيحتان في تصادم. اسحب t من الصفر وراقب D يرتفع إلى آلاف الكيلومترات. -2. اجعل v سالبة الآن، فتبتعد الصفيحتان. راقب D يصبح سالبًا هو الآخر، وهذا مقدار اتساع الفجوة بينهما. -3. جرّب v = 3.5 سم/سنة مع t = 20 مليون سنة. هذا تقريبًا مقدار الانزلاق الجانبي المقاس عبر صدع سان أندرياس في كاليفورنيا. +1. اجعل v يساوي 5 سم/سنة، وهو عدد موجب، فتتصادم الصفيحتان. اسحب t من 0 إلى 50 مليون سنة وراقب الإزاحة الكلية ترتفع إلى 2,500 كم. +2. اجعل الآن v يساوي −2 وt يساوي 180، فتبتعد الصفيحتان. تصير الإزاحة الكلية −3,600 كم، وهذا مقدار اتساع الفجوة بينهما. +3. جرّب v = 3.5 سم/سنة مع t = 20 مليون سنة. تُظهر القراءة 700 كم، وهذا تقريبًا مقدار الانزلاق الجانبي الذي قيس على صدع سان أندرياس في كاليفورنيا. ## Real-life examples - **اصطدام الهند بآسيا.** تحركت الهند شمالًا بنحو 5 سم/سنة طوال نحو 50 مليون سنة، فأغلقت نحو 2,500 كم من المحيط وطوت القشرة إلى الأعلى فكوّنت جبال الهيمالايا. -- **اتساع المحيط الأطلسي.** يبعد حيد وسط الأطلسي قاع البحر بنحو 2 سم/سنة طوال نحو 180 مليون سنة، ففتح محيطًا يبلغ عرضه الآن آلاف الكيلومترات. +- **اتساع المحيط الأطلسي.** يتباعد قاع البحر عند حيد وسط الأطلسي بنحو 2 سم/سنة منذ نحو 180 مليون سنة، ففتح محيطًا عرضه الآن آلاف الكيلومترات. - **صدع سان أندرياس.** تنزلق صفيحتا المحيط الهادئ وأمريكا الشمالية إحداهما بجانب الأخرى بنحو 3.5 سم/سنة، فيتراكم خلال 20 مليون سنة مئات الكيلومترات من الانزياح الجانبي في الصخر. ## Test yourself -1. جِد سرعة وزمنًا يحرّكان الصفيحتين معًا مسافة 1,000 كم بالضبط نسبة إحداهما للأخرى. -2. اجعل الصفيحتين تبتعدان مسافة أكثر من 2,000 كم. -3. اجعل الصفيحتين تتصادمان مسافة أكثر من 3,000 كم، وهي مسافة كافية لبناء سلسلة جبال بحجم الهيمالايا. +1. ابحث عن سرعة وزمن يجعلان الصفيحتين تتحركان 1,000 كم إحداهما نسبة إلى الأخرى. +2. اجعل الصفيحتين تبتعدان أكثر من 2,000 كم. +3. اجعل الصفيحتين تتقاربان أكثر من 3,000 كم، وهي مسافة تكفي لبناء سلسلة جبال بحجم الهيمالايا. ## Intuition -بضعة سنتيمترات في السنة تبدو لا شيء، فهي قريبة من سرعة نمو ظفرك. لن يشعر أحد أبدًا بصفيحة تزحف ببطء كهذا تحت قدميه. لكن الأرض أتيح لها وقت طويل جدًا ليتراكم هذا الزحف: الجبال والمحيطات لم تتشكل في سنوات بل في عشرات أو مئات ملايين السنين، وضرب خطوة سنوية صغيرة في هذا العدد الهائل من السنين يعطي مسافة كلية ضخمة. +بضعة سنتيمترات في السنة تبدو شيئًا لا يُذكر، فهي قريبة من سرعة نمو ظفرك. لن يشعر أحد أبدًا بصفيحة تزحف ببطء كهذا تحت قدميه. لكن الأرض أتيح لها وقت طويل جدًا ليتراكم هذا الزحف: الجبال والمحيطات لم تتشكل في سنوات بل في عشرات أو مئات ملايين السنين، وضرب خطوة سنوية صغيرة في هذا العدد الهائل من السنين يعطي مسافة كلية ضخمة. -اسحب v نحو الموجب فتصطدم الصفيحتان بعضهما ببعض، ولا مكان لهذا التصادم إلا الأعلى، فتطوي القشرة وتثخّنها لتكوّن سلسلة جبال، أو الأسفل، حين تغوص إحدى الصفيحتين تحت الأخرى. اسحب v نحو السالب فتبتعد الصفيحتان بدل أن تتصادما، وتترك صخرًا ساخنًا يرتفع ليملأ الفجوة المتسعة بقاع محيط جديد. وفي الحالتين تتراكم أيضًا عند حد الصفيحتين ضغوط في الصخر ببطء، وكل مدة تنطلق هذه الضغوط دفعة واحدة على شكل زلزال. +اسحب v نحو الموجب فتصطدم الصفيحتان بعضهما ببعض، ولا مخرج للقشرة عند التصادم إلا إلى الأعلى، فتنطوي وتزداد سماكة وتكوّن سلسلة جبال، أو إلى الأسفل، حين تغوص إحدى الصفيحتين تحت الأخرى. اسحب v نحو السالب فتبتعد الصفيحتان بدل أن تتصادما، فيصعد صخر ساخن ويملأ الفجوة المتسعة بقاع محيط جديد. وفي الحالتين تتراكم أيضًا عند حد الصفيحتين ضغوط في الصخر ببطء، وكل مدة تنطلق هذه الضغوط دفعة واحدة على شكل زلزال. ## Formal @@ -48,19 +48,23 @@ variables: ## Derivation 1. يزحف الحد كل سنة $v$ سنتيمترًا، فإذا ضربنا ذلك في $t$ مليون سنة نحصل على $vt$ ضرب مليون سنتيمتر. -2. الكيلومتر يساوي مئة ألف سنتيمتر، فقسمة هذا العدد الهائل من السنتيمترات على $10^5$ يحوّله إلى عدد نظيف من الكيلومترات. +2. الكيلومتر يساوي مئة ألف سنتيمتر، فقسمة هذا العدد الهائل من السنتيمترات على $10^5$ يحوّله إلى عدد بسيط من الكيلومترات. 3. جمع التحويلين معًا يختصر كل شيء في قاعدة بسيطة واحدة: عشرة كيلومترات لكل وحدة من حاصل ضرب $v$ في $t$. ## Real world ### بناء الجبال + جبال الهيمالايا والأنديز والألب تقع كلها حيث تتصادم صفائح فعليًا اليوم، ويستمر ارتفاعها في الازدياد، ويتآكل أيضًا، ما دام التصادم مستمرًا ببضعة سنتيمترات كل سنة. ### انتشار قاع البحر وعمر المحيط + يزداد عمر صخر قاع المحيط بانتظام كلما ابتعد عن حيد وسط المحيط، فيستطيع الجيولوجيون قراءة سرعة انتشار الصفيحة مباشرة من قاع البحر نفسه. ### خرائط خطر الزلازل -المدن المبنية على حدود صفائح نشطة، مثل سان فرانسيسكو وطوكيو، تبني كودات البناء فيها على مقدار الضغط الذي تراكم على الصدع على الأرجح منذ آخر زلزال كبير. + +المدن المبنية على حدود صفائح نشطة، مثل سان فرانسيسكو وطوكيو، تبني أكواد البناء فيها على مقدار الضغط الذي تراكم على الصدع على الأرجح منذ آخر زلزال كبير. ### رصد القارات المتحركة بنظام تحديد المواقع -تقيس شبكات محطات نظام تحديد المواقع اليوم حركة الصفائح مباشرة وفي الزمن الحقيقي، فتؤكد السرعات نفسها بالسنتيمتر في السنة التي كانت تُستنتج سابقًا من الصخر القديم وحده. + +تقيس شبكات محطات نظام تحديد المواقع اليوم حركة الصفائح مباشرة ولحظة بلحظة، فتؤكد السرعات نفسها بالسنتيمتر في السنة التي كانت تُستنتج سابقًا من الصخر القديم وحده. diff --git a/content/lessons/earth-space/plate-tectonics/en.md b/content/lessons/earth-space/plate-tectonics/en.md index 27f8c6ab..355e58ee 100644 --- a/content/lessons/earth-space/plate-tectonics/en.md +++ b/content/lessons/earth-space/plate-tectonics/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. Set v to a positive number, like 5 cm/yr — the plates are colliding. Drag t up from 0 and watch D climb into the thousands of kilometers. -2. Now make v negative — the plates are pulling apart. Watch D go negative too: that's how much wider the gap between them has grown. -3. Try v = 3.5 cm/yr with t = 20 Myr. That is roughly the sideways slip measured across California's San Andreas Fault. +1. Set v to 5 cm/yr, a positive number — the plates are colliding. Drag t up from 0 to 50 Myr and watch the total displacement climb to 2,500 km. +2. Now set v to −2 and t to 180 — the plates are pulling apart. The total displacement reads −3,600 km: that's how much wider the gap between them has grown. +3. Try v = 3.5 cm/yr with t = 20 Myr. The readout shows 700 km, roughly the sideways slip measured across California's San Andreas Fault. ## Real-life examples @@ -57,13 +57,17 @@ Real plate motion is rarely a single constant speed: rates measured from magneti ## Real world ### Mountain building + The Himalayas, the Andes, and the Alps all sit where plates are actively converging today; their height keeps growing (and eroding) as the collision continues at a few centimeters each year. ### Seafloor spreading and ocean age + Rock on the ocean floor gets systematically older the farther it sits from a mid-ocean ridge, letting geologists read off the plate's spreading rate directly from the seafloor itself. ### Earthquake hazard maps + Cities built along active plate boundaries, like San Francisco and Tokyo, base their building codes on how much stress a fault is likely to have stored since its last big earthquake. ### GPS monitoring of moving continents + Networks of GPS stations now measure plate motion directly, in real time, confirming the same centimeters-per-year speeds that were once inferred only from ancient rock. diff --git a/content/lessons/earth-space/plate-tectonics/lesson.yaml b/content/lessons/earth-space/plate-tectonics/lesson.yaml index 4d9841dc..89f045a7 100644 --- a/content/lessons/earth-space/plate-tectonics/lesson.yaml +++ b/content/lessons/earth-space/plate-tectonics/lesson.yaml @@ -18,13 +18,13 @@ parameters: max: 15 step: 0.5 value: 5 - unit: "cm/yr" + unit: 'cm/yr' t: min: 0 max: 200 step: 1 value: 50 - unit: "Myr" + unit: 'Myr' variables: - D - v @@ -36,14 +36,14 @@ derivation: charts: [] primary: v presets: -- v: 5 - t: 50 -- v: -2 - t: 180 -- v: 3.5 - t: 20 + - v: 5 + t: 50 + - v: -2 + t: 180 + - v: 3.5 + t: 20 challenges: -- check: 10*v*t - target: 1000 -- check: v < 0 and abs(10*v*t) > 2000 -- check: v > 0 and 10*v*t > 3000 + - check: 10*v*t + target: 1000 + - check: v < 0 and abs(10*v*t) > 2000 + - check: v > 0 and 10*v*t > 3000 diff --git a/content/lessons/earth-space/radioactive-dating/ar.md b/content/lessons/earth-space/radioactive-dating/ar.md index 645c3a7b..457636ec 100644 --- a/content/lessons/earth-space/radioactive-dating/ar.md +++ b/content/lessons/earth-space/radioactive-dating/ar.md @@ -22,33 +22,33 @@ charts: ## Try it -1. اسحب الزمن للأمام من الصفر. راقب المنحنى ينخفض أسرع ما يكون في البداية ثم يتباطأ. -2. راقب المنحنى يبلغ نصف ارتفاعه الابتدائي عند عمر نصف واحد بالضبط. -3. اسحب منزلق عمر النصف بدلًا من ذلك. راقب المنحنى كلّه يتمدّد أو ينضغط زمنيًا. +1. اترك N0 عند 100 وT عند 5730. اسحب الزمن x من 0 إلى 2000: تنخفض f(x) من 100 إلى نحو 78.5. ينخفض المنحنى بسرعة في البداية ثم يتباطأ. +2. اجعل x يساوي 5700، وهو عمر نصف واحد تقريبًا. تُظهر f(x) نحو 50، أي نصف الـ 100 التي بدأنا بها. +3. أبقِ x عند 5700 واجعل عمر النصف T يساوي 1900. ينكمش المنحنى كله نحو اليسار: صارت 5700 سنة تساوي ثلاثة أعمار نصف، ولا يبقى إلا 12.5. ## Real-life examples -- **عيّنة عظم طازجة.** بدءًا من 500 ذرّة من الكربون-14 (N₀ = 500، عمر نصف 5730 سنة)، وبعد 1000 سنة فقط (x = 1000)، لا يزال معظم النظير باقيًا. +- **عظمة حديثة.** بدءًا من 500 ذرّة من الكربون-14 (N₀ = 500، عمر نصف 5730 سنة)، وبعد 1000 سنة فقط (x = 1000)، لا يزال معظم النظير باقيًا. - **عظم عمره نحو عمر نصف واحد.** بدءًا من 200 ذرّة بعمر النصف نفسه، بعد 5700 سنة يكون نحو نصف الكربون-14 قد تحلّل. - **عيّنة أقدم بكثير، نظير مختلف.** بدءًا من 100 ذرّة من نظير بعمر نصف أقصر (T = 1000)، بعد 8000 سنة، أي ثمانية أعمار نصف، لا يبقى سوى أثر ضئيل جدًا. ## Test yourself -1. جِد الزمن الذي يتبقّى عنده نصف العيّنة بالضبط، عمر نصف واحد. -2. انتظر بما يكفي حتى يبقى أقلّ من 5% من العيّنة. -3. اخفض الكمية المتبقّية إلى 25 ذرّة بالضبط. +1. ابحث عن الزمن الذي يبقى عنده نصف العيّنة، أي عمر نصف واحد. +2. انتظر حتى يبقى أقلّ من 5% من العيّنة. +3. اجعل الكمية المتبقّية 25 ذرّة. ## Intuition حرّك الزمن من الصفر وراقب ميل خط المماس، أي معدّل التحلّل، يصبح أقل انحدارًا مع هبوط المنحنى. التحلّل أسرع ما يكون حين تكون الكمية المتبقّية أكبر، ويتباطأ كلما قلّ ما تبقّى، ولا يصل إلى الصفر تمامًا. عند عمر نصف واحد بالضبط يهبط المنحنى إلى نصف ارتفاعه الابتدائي، وعند عمري نصف إلى الربع، وعند ثلاثة إلى الثُمن. -حرّك منزلق عمر النصف بدلًا من ذلك وراقب المنحنى كله يتمدّد أو ينضغط زمنيًا. عمر نصف أطول يعني نظيرًا أبطأ تحلّلًا وأطول عمرًا، بينما يستهلك عمر النصف القصير عيّنته بسرعة. عمر النصف للكربون-14، 5730 سنة، هو ما يجعله مفيدًا لتأريخ ما بين بضع مئات إلى نحو 50000 سنة. +حرّك منزلق عمر النصف بدلًا من ذلك وراقب المنحنى كله يتمدّد أو ينكمش. عمر النصف الأطول يعني نظيرًا يتحلّل ببطء ويبقى مدة أطول، أما النظير الذي عمر نصفه قصير فتنفد عيّنته بسرعة. عمر النصف للكربون-14، 5730 سنة، هو ما يجعله مفيدًا لتأريخ ما بين بضع مئات إلى نحو 50000 سنة. ## Formal بعد $k$ من أعمار النصف تكون الكمية المتبقّية قد نُصِّفت $k$ مرّة: $N = N_0\left(\frac{1}{2}\right)^{k}$. وبما أن كل عمر نصف يستغرق $T_{1/2}$ سنة، فإن عدد أعمار النصف المنقضية بعد $x$ سنة هو $k = \frac{x}{T_{1/2}}$، ومنها $N = N_0\left(\frac{1}{2}\right)^{x/T_{1/2}}$. -قياس النسبة المتبقّية $N/N_0$ في عيّنة ما وحلّ هذه المعادلة من أجل $x$ (باستخدام لوغاريتم) هو بالضبط كيف يُقرَأ العمر من قياس التحلّل. +قياس النسبة المتبقّية $N/N_0$ في عيّنة ما وحلّ هذه المعادلة من أجل $x$ (باستخدام لوغاريتم) هكذا بالضبط يُعرف العمر من قياس التحلّل. ## Advanced @@ -63,13 +63,17 @@ charts: ## Real world ### تأريخ الكربون-14 للمواد العضوية + يؤرّخ علماء الآثار العظام والخشب والفحم بقياس النسبة المتبقّية من الكربون-14، وهو مفيد حتى نحو عشرة أعمار نصف، أي نحو 50000 سنة. ### تأريخ اليورانيوم-الرصاص للصخور + تؤرّخ نظائر أطول عمرًا بكثير مثل اليورانيوم-238 (عمر نصف 4.5 مليار سنة) الصخور والنيازك، بما في ذلك تقديرات عمر الأرض نفسها. ### التصوير الطبي والعلاج + تُختار نظائر قصيرة العمر مثل التكنيشيوم-99م (عمر نصف نحو 6 ساعات) عمدًا لأنها تتحلّل بسرعة بعد الفحص. ### تخزين النفايات النووية + تُخطَّط الجداول الزمنية للتخزين وفق عدد أعمار النصف اللازم ليهبط الإشعاع إلى مستوى آمن، وقد يبلغ عشرات آلاف السنين لأطول النواتج عمرًا. diff --git a/content/lessons/earth-space/radioactive-dating/en.md b/content/lessons/earth-space/radioactive-dating/en.md index 0e2f52d8..43e845cb 100644 --- a/content/lessons/earth-space/radioactive-dating/en.md +++ b/content/lessons/earth-space/radioactive-dating/en.md @@ -23,9 +23,9 @@ charts: ## Try it -1. Drag time forward from zero. Watch the curve drop fastest at the start, then slow down. -2. Watch the curve reach half its starting height at exactly one half-life. -3. Drag the half-life slider instead. Watch the whole curve stretch or compress in time. +1. Leave N0 at 100 and T at 5730. Drag time x forward from 0 to 2000: f(x) falls from 100 to about 78.5. The curve drops fastest at the start, then slows down. +2. Set x to 5700, almost exactly one half-life. f(x) shows about 50, half of the starting 100. +3. Keep x at 5700 and set the half-life T to 1900. The whole curve squeezes toward the left: three half-lives now fit into 5700 years, and only 12.5 remain. ## Real-life examples @@ -64,13 +64,17 @@ The same law can be written as continuous exponential decay, $N = N_0 e^{-\lambd ## Real world ### Carbon-14 dating of organic material + Archaeologists date bone, wood and charcoal by measuring the remaining fraction of carbon-14, useful out to roughly ten half-lives, about 50,000 years. ### Uranium-lead dating of rocks + Much longer-lived isotopes like uranium-238 (half-life 4.5 billion years) date rocks and meteorites, including estimates of Earth's own age. ### Medical imaging and treatment + Short-lived isotopes like technetium-99m (half-life about 6 hours) are chosen deliberately so they decay away quickly after a scan. ### Nuclear waste storage + Storage timelines are planned around how many half-lives it takes for radioactivity to fall to a safe level, sometimes tens of thousands of years for the longest-lived byproducts. diff --git a/content/lessons/earth-space/radioactive-dating/lesson.yaml b/content/lessons/earth-space/radioactive-dating/lesson.yaml index b9758c33..e4833a19 100644 --- a/content/lessons/earth-space/radioactive-dating/lesson.yaml +++ b/content/lessons/earth-space/radioactive-dating/lesson.yaml @@ -23,19 +23,19 @@ parameters: max: 1000 step: 10 value: 100 - unit: "atoms" + unit: 'atoms' T: min: 1000 max: 10000 step: 10 value: 5730 - unit: "yr" + unit: 'yr' x: min: 0 max: 40000 step: 100 - value: 5730 - unit: "yr" + value: 2000 + unit: 'yr' variables: - N_0 - T_{1/2} @@ -55,20 +55,20 @@ charts: - (1/2)^(x/T) primary: T presets: -- N0: 500 - T: 5730 - x: 1000 -- N0: 200 - T: 5730 - x: 5700 -- N0: 100 - T: 1000 - x: 8000 + - N0: 500 + T: 5730 + x: 1000 + - N0: 200 + T: 5730 + x: 5700 + - N0: 100 + T: 1000 + x: 8000 challenges: -- check: (1/2)^(x/T) - target: 0.5 - tol: 0.02 -- check: (1/2)^(x/T) < 0.05 -- check: N0*(1/2)^(x/T) - target: 25 - tol: 2 + - check: (1/2)^(x/T) + target: 0.5 + tol: 0.02 + - check: (1/2)^(x/T) < 0.05 + - check: N0*(1/2)^(x/T) + target: 25 + tol: 2 diff --git a/content/lessons/earth-space/seasons/ar.md b/content/lessons/earth-space/seasons/ar.md index 836fc1b5..e2a01d09 100644 --- a/content/lessons/earth-space/seasons/ar.md +++ b/content/lessons/earth-space/seasons/ar.md @@ -17,27 +17,27 @@ variables: ## Try it -1. اسحب منزلق يوم السنة عبر العام عند خط عرض 45°. راقب طول النهار يرتفع نحو يونيو وينخفض نحو ديسمبر. -2. اسحب خط العرض نحو القطبين. راقب الفارق بين الصيف والشتاء يكبر كثيرًا. -3. اسحب خط العرض نحو خط الاستواء بدلًا من ذلك. راقب المنحنى يستوي تقريبًا، بلا تغيّر فصلي يُذكر. +1. أبقِ خط العرض عند 45° واسحب منزلق يوم السنة x على طول العام. يرتفع طول النهار f(x) إلى نحو 15.4 ساعة في اليوم 172 (يونيو) وينخفض إلى نحو 8.6 ساعة في اليوم 355 (ديسمبر). +2. اجعل خط العرض 65°، أي أقرب إلى القطب. يكبر الفارق بين الصيف والشتاء كثيرًا: نحو 21.1 ساعة في اليوم 172، ونحو 2.9 ساعة فقط في اليوم 355. +3. اجعل خط العرض 2°، قرب خط الاستواء. يكاد المنحنى يصير خطًا مستويًا عند نحو 12.1 ساعة، فلا يتغيّر النهار مع الفصول تقريبًا. ## Real-life examples -- **مدينة متوسطة العرض في يونيو.** عند خط عرض 45° في اليوم 172 (قرب انقلاب يونيو)، يمتد النهار إلى أطول يوم في السنة. -- **مدينة قرب خط الاستواء.** عند خط عرض 2°، لا يتغيّر طول النهار تقريبًا طوال العام، إذ يبقى الشروق والغروب قريبَين من 6 ساعات من الظهر أيًا كان اليوم. -- **قرب الدائرة القطبية الشمالية شتاءً.** عند خط عرض 65° في اليوم 355 (قرب انقلاب ديسمبر)، بالكاد تشرق الشمس، وهذا هو الليل القطبي. +- **مدينة متوسطة العرض في يونيو.** عند خط عرض 45° في اليوم 172 (قرب انقلاب يونيو)، يكون النهار أطول نهار في السنة، نحو 15.4 ساعة. +- **مدينة قرب خط الاستواء.** عند خط عرض 2°، لا يتغيّر طول النهار تقريبًا طوال العام، فالشروق قبل الظهر بنحو 6 ساعات والغروب بعده بنحو 6 ساعات في أي يوم. +- **قرب الدائرة القطبية الشمالية شتاءً.** عند خط عرض 65° في اليوم 355 (قرب انقلاب ديسمبر)، تبقى الشمس فوق الأفق أقل من 3 ساعات، وهذا قريب من الليل القطبي. ## Test yourself -1. جِد يومًا وخط عرض يتساوى عندهما الليل والنهار بالضبط، 12 ساعة لكلّ منهما. -2. قرب الدائرة القطبية الشمالية (فوق 60°)، ادفع طول النهار الصيفي فوق 20 ساعة من الضوء. -3. قرب خط الاستواء (ضمن 5° منه)، جِد طول نهار يبقى ضمن نصف ساعة من 12، أيًا كان يوم السنة. +1. ابحث عن يوم وخط عرض يتساوى فيهما الليل والنهار، 12 ساعة لكلّ منهما. +2. قرب الدائرة القطبية الشمالية (فوق 60°)، اجعل نهار الصيف أطول من 20 ساعة. +3. قرب خط الاستواء (على بعد أقل من 5° منه)، ابحث عن نهار لا يبتعد طوله عن 12 ساعة بأكثر من نصف ساعة، في أي يوم من السنة. ## Intuition حرّك منزلق يوم السنة عند خط عرض متوسط وراقب المنحنى يرتفع وينخفض، نهار طويل في يونيو ونهار قصير في ديسمبر، ونقطتا تقاطع في الربيع والخريف يتساوى عندهما الليل والنهار. مسافة الأرض عن الشمس لا تتغيّر تقريبًا خلال السنة، بل ميل محورها 23.4° هو ما يجعل كل نصف كرة يميل نحو الشمس أو بعيدًا عنها وهي تدور حولها. -اسحب الآن خط العرض نحو القطبين، فيتّسع المدى. قرب الدائرة القطبية الشمالية يكاد المنحنى يلامس الصفر و24، أي شمس منتصف الليل والليل القطبي. وقرب خط الاستواء يكاد المنحنى يستوي، فالمناطق المدارية لا تكاد تشعر بالفصول لأن خط الاستواء يواجه أشعة الشمس بزاوية شبه قائمة طوال السنة. +اسحب الآن خط العرض نحو القطبين، فيكبر الفارق بين الصيف والشتاء. قرب الدائرة القطبية الشمالية يكاد المنحنى يلامس الصفر و24، أي شمس منتصف الليل والليل القطبي. وقرب خط الاستواء يكاد المنحنى يستوي، فالمناطق المدارية لا تكاد تشعر بالفصول لأن خط الاستواء يواجه أشعة الشمس بزاوية شبه قائمة طوال السنة. ## Formal @@ -58,13 +58,17 @@ variables: ## Real world ### التقاويم الزراعية + تتبع مواعيد الزراعة والحصاد طول النهار لا درجة الحرارة، لأن طول النهار يبقى نفسه كل سنة عند خط عرض وتاريخ معيّنين. ### ميل الألواح الشمسية + كثيرًا ما تُركَّب الألواح الثابتة بزاوية بين مسار الشمس الصيفي والشتوي، وهذا حل وسط ناتج عن تذبذب الميل الشمسي نفسه. ### هجرة الطيور + تعتمد الطيور وحيوانات أخرى على طول النهار لا درجة الحرارة، بوصفه الإشارة الموثوقة لبدء الهجرة كل سنة. ### لماذا تتعاكس الفصول بين نصفي الكرة + حين يميل المحور بنصف الكرة الشمالي نحو الشمس يميل بنصف الكرة الجنوبي بعيدًا عنها بالزاوية نفسها، فيكون في أحدهما صيف وفي الآخر شتاء. diff --git a/content/lessons/earth-space/seasons/en.md b/content/lessons/earth-space/seasons/en.md index 32e61722..06ae6f7e 100644 --- a/content/lessons/earth-space/seasons/en.md +++ b/content/lessons/earth-space/seasons/en.md @@ -18,15 +18,15 @@ variables: ## Try it -1. Drag the day-of-year slider through the year at latitude 45°. Watch day length rise toward June and fall toward December. -2. Drag latitude toward the poles. Watch the swing between summer and winter grow much bigger. -3. Drag latitude toward the equator instead. Watch the curve flatten out — almost no seasonal change at all. +1. Keep latitude at 45° and drag the day-of-year slider x through the year. Day length f(x) rises to about 15.4 hours at day 172 (June) and falls to about 8.6 hours at day 355 (December). +2. Set latitude to 65°, toward the pole. The swing between summer and winter grows much bigger: about 21.1 hours at day 172, only about 2.9 hours at day 355. +3. Set latitude to 2°, near the equator. The curve flattens out at about 12.1 hours — almost no seasonal change at all. ## Real-life examples -- **A mid-latitude city in June.** At latitude 45° on day 172 (near the June solstice), daylight stretches out to its longest of the year. +- **A mid-latitude city in June.** At latitude 45° on day 172 (near the June solstice), daylight stretches out to its longest of the year, about 15.4 hours. - **A city near the equator.** At latitude 2°, day length barely changes across the whole year — sunrise and sunset stay close to 6 hours apart from noon, whatever the day. -- **Near the Arctic Circle in winter.** At latitude 65° on day 355 (near the December solstice), the Sun barely rises at all — the polar night. +- **Near the Arctic Circle in winter.** At latitude 65° on day 355 (near the December solstice), the Sun is up for less than 3 hours — almost the polar night. ## Test yourself @@ -59,13 +59,17 @@ Where $|\tan(\phi)\tan(\delta)| > 1$ the cosine has no valid solution: the Sun n ## Real world ### Farming calendars + Planting and harvest dates track day length, not temperature, because day length is the same every year at a given latitude and date. ### Solar panel tilt + Fixed panels are often angled partway between the summer and winter Sun paths, a compromise driven by exactly this declination swing. ### Migration + Birds and other animals use day length, not temperature, as the reliable cue to begin migrating each year. ### Why seasons are opposite in each hemisphere + When the tilt leans the Northern Hemisphere toward the Sun it leans the Southern Hemisphere away by the same angle, so one has summer while the other has winter. diff --git a/content/lessons/earth-space/seasons/lesson.yaml b/content/lessons/earth-space/seasons/lesson.yaml index dcee806c..b4177a1a 100644 --- a/content/lessons/earth-space/seasons/lesson.yaml +++ b/content/lessons/earth-space/seasons/lesson.yaml @@ -25,7 +25,7 @@ parameters: max: 66 step: 1 value: 45 - unit: "°" + unit: '°' x: min: 0 max: 365 @@ -36,7 +36,7 @@ parameters: max: 45 step: 0.5 value: 23.4 - unit: "°" + unit: '°' variables: - \phi - \delta @@ -51,18 +51,18 @@ derivation: charts: [] primary: lat presets: -- lat: 45 - x: 172 - tilt: 23.4 -- lat: 2 - x: 172 - tilt: 23.4 -- lat: 65 - x: 355 - tilt: 23.4 + - lat: 45 + x: 172 + tilt: 23.4 + - lat: 2 + x: 172 + tilt: 23.4 + - lat: 65 + x: 355 + tilt: 23.4 challenges: -- check: 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) - target: 12 - tol: 0.3 -- check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) > 20 -- check: abs(lat) < 5 and abs(24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) - 12) < 0.3 + - check: 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) + target: 12 + tol: 0.3 + - check: lat > 60 and 24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) > 20 + - check: abs(lat) < 5 and abs(24/pi*acos(max(-1,min(1,-tan(lat*pi/180)*tan(tilt*pi/180*sin(2*pi*(x-80)/365))))) - 12) < 0.3 diff --git a/content/lessons/earth-space/sun-size/ar.md b/content/lessons/earth-space/sun-size/ar.md index a7cfb9e7..42260fa0 100644 --- a/content/lessons/earth-space/sun-size/ar.md +++ b/content/lessons/earth-space/sun-size/ar.md @@ -21,14 +21,14 @@ variables: ## Real-life examples -- **أريستارخوس، نحو 250 قبل الميلاد.** كان n عنده 19. عرض القمر 3,474 km، فعرض الشمس 19 × 3,474، أي نحو 66,000 km. هذا يساوي 5 أرضين متجاورة. كان رقمًا أصغر بكثير من الحقيقة، لكنه أكبر من العالم المعروف كله حينها. +- **أريستارخوس، نحو 270 قبل الميلاد.** كان n عنده 19. عرض القمر 3,474 km، فعرض الشمس 19 × 3,474، أي نحو 66,000 km. هذا يساوي 5 أرضين متجاورة. كان رقمًا أصغر بكثير من الحقيقة، لكنه أكبر من العالم المعروف كله حينها. - **اليوم.** تبدو الشمس أكبر من القمر المتوسط بنحو 3 %، فيكون n نحو 400. فعرضها 1.39 مليون km، أي 109 أرضين متجاورة. وهذا هو عرض الشمس الحقيقي. - **كسوف جزئي.** الأحجام نفسها، لكن القمر غطى نصف الشمس فقط. يتغير الشكل الذي تراه، ولا يتغير حجم الشمس. ## Test yourself 1. اجعل عرض الشمس 1.39 مليون km، وهو حجمها الحقيقي، بخطأ لا يزيد على 2 %. -2. اجعل عرض الشمس نحو 109 أضعاف عرض الأرض بالضبط. +2. اجعل عرض الشمس 109 أضعاف عرض الأرض. 3. اجعل الشمس أصغر من الأرض. هذا سهل، لكن لم يصدّق أحد بعد أريستارخوس شمسًا بهذا الصغر، لأن ما نراه في السماء يقول غير ذلك. ## Intuition @@ -37,7 +37,7 @@ variables: شيئان يبدوان بالحجم نفسه، لكن أحدهما أبعد من الآخر، فلا بد أن حجميهما مختلفان كثيرًا. الشمس أبعد من القمر n مرة. ارسم مخروطًا من عينك عبر حافة القمر وأكمله. عند الشمس يصير أعرض n مرة، فالشمس أعرض من القمر n مرة. المخروط في أعلى الرسم. حرّك n وشاهد قرص الشمس يكبر ليملأه. -أعطاك الدرس السابق قيمة n. قاسها أريستارخوس من ساموس فوجدها 19 نحو 250 قبل الميلاد. والحقيقة نحو 400. عرض القمر 3,474 km، فيعطي 19 الرقم 66,000 km، أي نحو 5 أرضين متجاورة. ويعطي 400 الرقم 1.39 مليون km، أي 109 أرضين متجاورة. الشريط السفلي يرسم الأرض والقمر وشمسك بنسبهم الحقيقية، ويقصّ الشمس إذا لم تتسع. +أعطاك الدرس السابق قيمة n. قاسها أريستارخوس من ساموس فوجدها 19 نحو 270 قبل الميلاد. والحقيقة نحو 400. عرض القمر 3,474 km، فيعطي 19 الرقم 66,000 km، أي نحو 5 أرضين متجاورة. ويعطي 400 الرقم 1.39 مليون km، أي 109 أرضين متجاورة. الشريط السفلي يرسم الأرض والقمر وشمسك بنسبهم الحقيقية، ويقصّ الشمس إذا لم تتسع. حتى رقم أريستارخوس الصغير قال شيئًا مدهشًا: الشمس أكبر من الأرض بكثير. وهذا جعل من الصعب تصديق أن الشمس الضخمة تدور حول الأرض الصغيرة. فقال إن الأرض هي التي تدور حول الشمس. كان ذلك قبل كوبرنيكوس بنحو 1800 سنة، ولم يصدّقه تقريبًا أحد. diff --git a/content/lessons/earth-space/sun-size/en.md b/content/lessons/earth-space/sun-size/en.md index bbdb04f8..76a96f71 100644 --- a/content/lessons/earth-space/sun-size/en.md +++ b/content/lessons/earth-space/sun-size/en.md @@ -22,14 +22,14 @@ variables: ## Real-life examples -- **Aristarchus, about 250 BC.** He had n = 19. The Moon is 3,474 km wide, so the Sun is 19 × 3,474, about 66,000 km. That is 5 Earths side by side, and it was far too small, but it was already bigger than the whole known world. +- **Aristarchus, about 270 BC.** He had n = 19. The Moon is 3,474 km wide, so the Sun is 19 × 3,474, about 66,000 km. That is 5 Earths side by side, and it was far too small, but it was already bigger than the whole known world. - **Today.** The Sun looks about 3 % bigger than the average Moon, so n = 400. That gives 1.39 million km, 109 Earths side by side. It is the real width of the Sun. - **A partial eclipse.** Same sizes, but the Moon has covered only half of the Sun. The shape you see changes, the size of the Sun does not. ## Test yourself 1. Make the Sun 1.39 million km wide, the real size, within 2 %. -2. Make the Sun exactly about 109 Earths wide. +2. Make the Sun 109 Earths wide. 3. Make a Sun smaller than the Earth. It is easy to do, but nobody after Aristarchus could believe a Sun that small, because the numbers of the sky say it is not. ## Intuition @@ -38,7 +38,7 @@ On 21 August 2017, millions of people across the United States stood in the Moon Two things that look equally big but are not equally far must be very different in size. The Sun is farther than the Moon by a number n. Draw a cone from your eye through the edge of the Moon and keep going: at the Sun it is n times wider, so the Sun is n times wider than the Moon. The top of the picture shows this cone. Move n and watch the Sun disc grow to fill it. -The earlier lesson gave you n. Aristarchus of Samos measured it as 19 around 250 BC. The truth is about 400. The Moon is 3,474 km wide, so 19 gives 66,000 km, about 5 Earths side by side. And 400 gives 1.39 million km, 109 Earths side by side. The bottom strip draws the Earth, the Moon and your Sun at true relative sizes, and it clips the Sun when it does not fit. +The earlier lesson gave you n. Aristarchus of Samos measured it as 19 around 270 BC. The truth is about 400. The Moon is 3,474 km wide, so 19 gives 66,000 km, about 5 Earths side by side. And 400 gives 1.39 million km, 109 Earths side by side. The bottom strip draws the Earth, the Moon and your Sun at true relative sizes, and it clips the Sun when it does not fit. Even Aristarchus's too-small number said something startling: the Sun is much bigger than the Earth. That made it hard to believe that the huge Sun goes round the small Earth. So he suggested that the Earth goes round the Sun. That was about 1,800 years before Copernicus, and almost nobody believed him. diff --git a/content/lessons/earth-space/sun-size/lesson.yaml b/content/lessons/earth-space/sun-size/lesson.yaml index 7e7694aa..fbeebe32 100644 --- a/content/lessons/earth-space/sun-size/lesson.yaml +++ b/content/lessons/earth-space/sun-size/lesson.yaml @@ -56,7 +56,7 @@ presets: challenges: - check: 3474*n/1e6 target: 1.39 - tol: 0.02 + tol: 0.028 - check: 3474*n/12742 target: 109 tol: 0.1 diff --git a/content/lessons/earth-space/the-water-cycle-and-clouds/ar.md b/content/lessons/earth-space/the-water-cycle-and-clouds/ar.md index 86ad8378..1c026b68 100644 --- a/content/lessons/earth-space/the-water-cycle-and-clouds/ar.md +++ b/content/lessons/earth-space/the-water-cycle-and-clouds/ar.md @@ -13,27 +13,27 @@ variables: ## Try it -1. اضبط T = 30°م وTd = 22°م، بعد ظهيرة صيفية رطبة. راقب قاعدة السحابة تقف منخفضة، عند نحو 1,000 م. -2. أبقِ T = 35°م واسحب Td إلى 5°م، بعد ظهيرة صحراوية جافة. راقب قاعدة السحابة ترتفع إلى قرب 4,000 م. -3. اسحب Td حتى تقترب من T بأقل من درجة واحدة. راقب قاعدة السحابة تنزل تقريبًا إلى الأرض، وهذا هو الضباب. +1. اضبط T = 30°م وTd = 22°م، بعد ظهيرة صيفية رطبة. تُظهر قراءة قاعدة السحابة 1,000 م، وهو ارتفاع منخفض. +2. اضبط T = 35°م واسحب Td إلى 5°م، بعد ظهيرة صحراوية جافة. ترتفع قاعدة السحابة إلى 3,750 م. +3. اضبط T = 10°م وTd = 9°م، والفرق بينهما درجة واحدة فقط. تنزل قاعدة السحابة إلى 125 م، قريبًا من الأرض. ارفع Td إلى 10°م فتُظهر القراءة «ضباب». ## Real-life examples -- **يوم صيفي رطب.** T = 30°م وTd = 22°م تعطيان قاعدة سحابة عند نحو 1,000 م، وهي السحب الركامية المسطحة القاعدة الشائعة في العصر الرطب. -- **بعد ظهيرة صحراوية جافة.** T = 35°م وTd = 5°م تعطيان قاعدة سحابة عند نحو 3,750 م، فالهواء الجاف يدفع قاعدة السحابة عاليًا جدًا، إن تكوّنت سحابة أصلًا. -- **صباح ضبابي.** T = 10°م وTd = 9°م تعطيان قاعدة سحابة عند نحو 125 م، أي قريبة جدًا من الإشباع أصلًا، فتتكوّن «السحابة» عند الأرض نفسها على هيئة ضباب. +- **يوم صيفي رطب.** T = 30°م وTd = 22°م تعطيان قاعدة سحابة عند نحو 1,000 م، وهي السحب الركامية ذات القاعدة المسطحة التي نراها كثيرًا في العصر الرطب. +- **بعد ظهيرة صحراوية جافة.** T = 35°م وTd = 5°م تعطيان قاعدة سحابة عند نحو 3,750 م، فالهواء الجاف يجعل قاعدة السحابة عالية جدًا، هذا إن تكوّنت سحابة أصلًا. +- **صباح ضبابي.** T = 10°م وTd = 9°م تعطيان قاعدة سحابة عند نحو 125 م، فالهواء قريب جدًا من التشبّع، وتتكوّن «السحابة» عند الأرض نفسها ضبابًا. ## Test yourself -1. اضبط قاعدة السحابة عند 1,000 م بالضبط. -2. ادفع قاعدة السحابة فوق 3,000 م باستخدام كتلة هواء جافة. -3. كوّن ضبابًا أرضيًا: اجعل نقطة الندى قريبة من درجة الحرارة بأقل من درجة واحدة. +1. اجعل قاعدة السحابة عند 1,000 م. +2. ارفع قاعدة السحابة فوق 3,000 م بهواء جاف. +3. اصنع ضبابًا عند الأرض: اجعل الفرق بين نقطة الندى ودرجة الحرارة درجة واحدة أو أقل. ## Intuition يحمل الهواء بخار ماء أكثر حين يكون دافئًا وأقل حين يكون باردًا، تمامًا كما تحمل الإسفنجة الدافئة ماء أكثر من إسفنجة باردة متيبّسة. حين تسخّن الشمس فقاعة هواء قرب الأرض فترتفع، تتمدد في الهواء الأخف فوقها وتبرد بسبب هذا التمدد، من دون أن يبرّدها شيء من خارجها. أما كمية بخار الماء التي تحملها هذه الفقاعة الصاعدة فتبقى شبه ثابتة، فكلما برد الهواء أصبحت الكمية نفسها من البخار حصة أكبر فأكبر مما يستطيع الهواء أن يحمله. -وفي النهاية يبلغ الهواء الصاعد المبرّد نقطة الندى، الدرجة التي يصبح عندها مشبعًا تمامًا، حاملًا كل ما يستطيع من بخار. وإذا ارتفع مترًا واحدًا إضافيًا لا يجد بخار الماء الزائد مكانًا إلا أن يتكاثف على ذرات الغبار الدقيقة إلى قطرات مرئية. هذا الارتفاع بالضبط هو القاعدة المسطحة الحادة التي تراها في سحابة ركامية في يوم صافٍ، وتحدد بدقة أين عبر الهواء الصاعد من الصفاء إلى الإشباع. +وفي النهاية يبلغ الهواء الصاعد المبرّد نقطة الندى، الدرجة التي يصبح عندها مشبعًا تمامًا، حاملًا كل ما يستطيع من بخار. وإذا ارتفع مترًا واحدًا إضافيًا لا يجد بخار الماء الزائد مكانًا إلا أن يتكاثف على ذرات الغبار الدقيقة إلى قطرات مرئية. هذا الارتفاع بالضبط هو القاعدة المسطحة الحادة التي تراها في سحابة ركامية في يوم صافٍ، وهي تدل بدقة على الارتفاع الذي تشبّع عنده الهواء الصاعد. ## Formal @@ -54,13 +54,17 @@ variables: ## Real world ### السحب الركامية في عصر يوم صيفي + القواعد المسطحة المصطفة في السماء في يوم صافٍ تقف كلها عند ارتفاع متقارب تقريبًا، لأن كل فقاعة هواء صاعدة في تلك المنطقة تشترك تقريبًا في درجة الحرارة ونقطة الندى نفسيهما عند الأرض. ### الطيارون وطيارو الطائرات الشراعية يقرؤون السماء + يستخدم طيارو الطائرات الشراعية قاعدة السحابة المرئية لتقدير الارتفاع الذي يتوقعون أن ترفعهم إليه التيارات الحرارية الصاعدة قبل أن يبدأ التكاثف، فيخططون رحلاتهم الطويلة حوله. ### الضباب عند الفجر + تنخفض درجة حرارة الأرض غالبًا طوال الليل حتى تقترب من نقطة الندى، ولهذا يشيع الضباب عند الفجر، وعادة ما يتبدد خلال ساعة أو ساعتين حين تدفئ شمس الصباح الأرض من جديد. ### سحب الجبال والرفع التضاريسي + حين يُجبر هواء رطب على الصعود فوق سلسلة جبال، تنتج العملية نفسها من التبريد حتى نقطة الندى غطاء سحابيًا ثابتًا يقف عند الارتفاع نفسه تقريبًا على المنحدر المواجه للريح كل يوم تقريبًا. diff --git a/content/lessons/earth-space/the-water-cycle-and-clouds/en.md b/content/lessons/earth-space/the-water-cycle-and-clouds/en.md index 83ce268d..50e6cb8b 100644 --- a/content/lessons/earth-space/the-water-cycle-and-clouds/en.md +++ b/content/lessons/earth-space/the-water-cycle-and-clouds/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Set T = 30°C and Td = 22°C, a muggy summer afternoon. See the cloud base sit low, around 1,000 m. -2. Keep T = 35°C but drag Td down to 5°C, a dry desert afternoon. Watch the cloud base climb to nearly 4,000 m. -3. Drag Td up until it is within 1°C of T. Watch the cloud base drop almost to the ground — that is fog. +1. Set T = 30°C and Td = 22°C, a muggy summer afternoon. The cloud base readout shows 1,000 m, quite low. +2. Set T = 35°C and drag Td down to 5°C, a dry desert afternoon. The cloud base climbs to 3,750 m. +3. Set T = 10°C and Td = 9°C, only 1°C apart. The cloud base drops to 125 m, almost at the ground. Raise Td to 10°C and the readout says fog. ## Real-life examples @@ -56,13 +56,17 @@ This "125 rule" is the same rough estimate pilots, skydivers, and glider pilots ## Real world ### Cumulus clouds on a summer afternoon + The flat bottoms lined up across the sky on a fair-weather day all sit at nearly the same height, because every rising bubble of air over that region shares almost the same ground temperature and dew point. ### Pilots and glider pilots reading the sky + Glider pilots use the visible cloud base to estimate how high they can expect rising thermals to carry them before condensation begins, planning cross-country flights around it. ### Fog at dawn + Ground temperatures often drop overnight until they nearly meet the dew point, which is why fog is common at dawn and usually burns off within an hour or two once morning sunlight warms the ground again. ### Mountain clouds and orographic lift + When moist air is forced to rise over a mountain range, the same cooling-to-dew-point process produces a persistent cap of cloud sitting right at the same height on the windward slope almost every day. diff --git a/content/lessons/earth-space/the-water-cycle-and-clouds/lesson.yaml b/content/lessons/earth-space/the-water-cycle-and-clouds/lesson.yaml index 90b8e075..bebcce59 100644 --- a/content/lessons/earth-space/the-water-cycle-and-clouds/lesson.yaml +++ b/content/lessons/earth-space/the-water-cycle-and-clouds/lesson.yaml @@ -18,13 +18,13 @@ parameters: max: 40 step: 0.5 value: 25 - unit: "°C" + unit: '°C' Td: min: 0 max: 30 step: 0.5 value: 15 - unit: "°C" + unit: '°C' variables: - h - T @@ -36,14 +36,14 @@ derivation: charts: [] primary: T presets: -- T: 30 - Td: 22 -- T: 35 - Td: 5 -- T: 10 - Td: 9 + - T: 30 + Td: 22 + - T: 35 + Td: 5 + - T: 10 + Td: 9 challenges: -- check: 125*(T-Td) - target: 1000 -- check: 125*(T-Td) > 3000 -- check: T - Td <= 1 + - check: 125*(T-Td) + target: 1000 + - check: 125*(T-Td) > 3000 + - check: T - Td <= 1 diff --git a/content/lessons/earth-space/tides/ar.md b/content/lessons/earth-space/tides/ar.md index 773bc58e..ec50eabb 100644 --- a/content/lessons/earth-space/tides/ar.md +++ b/content/lessons/earth-space/tides/ar.md @@ -3,47 +3,47 @@ title: المدّ والجزر summary: >- القمر يمدد الأرض على طول الخط بينهما، فيرفع انتفاخين من الماء: قريبًا وبعيدًا. parameters: - A: سعة المدّ القمري - B: سعة المدّ الشمسي - t0: إزاحة طور المدّ القمري + A: قوة المدّ القمري (أقصى ارتفاع) + B: قوة المدّ الشمسي (أقصى ارتفاع) + t0: تأخّر المدّ القمري x: الزمن variables: - ارتفاع سطح البحر فوق المتوسط - - سعة مركّبة المدّ القمري - - سعة مركّبة المدّ الشمسي - - إزاحة طور المدّ القمري بالساعات + - أقصى ارتفاع للمدّ الذي يسببه القمر + - أقصى ارتفاع للمدّ الذي تسببه الشمس + - تأخّر المدّ القمري بالساعات - الزمن بالساعات --- ## Try it -1. اسحب الزمن للأمام. راقب سطح البحر يرتفع وينخفض مرّتين تقريبًا كل يوم مع مرور الانتفاخ القمري. -2. ارفع $B$، جذب الشمس، نحو $A$، جذب القمر. راقب شكل نمط المدّ يتغيّر. -3. اجعل $B$ صفرًا. راقب المدّ يستقرّ في إيقاع قمري نظيف ومتكرّر. +1. اسحب الزمن x من 0 إلى 48 ساعة. يرتفع سطح البحر f(x) وينخفض نحو أربع مرات، أي مرّتين تقريبًا كل يوم، مع مرور الانتفاخ القمري. +2. ارفع $B$، جذب الشمس، من 0.5 إلى 1.5 حتى يساوي $A$، جذب القمر. يعلو المدّ أكثر، حتى يقترب من 3 م. +3. اجعل $B$ صفرًا. يصير المدّ إيقاعًا قمريًا واحدًا منتظمًا يتكرّر: كل مدّ يبلغ 1.5 م بالضبط. ## Real-life examples -- **ساحل محيطي معتاد.** جذب قمري معتدل ($A = 1.0$ م) وجذب شمسي أصغر ($B = 0.3$ م) يعطيان مدى مدّيًا عاديًا بضعة أمتار. -- **ساحل بمدى مدّي هائل، أشبه بخليج فَندي.** مع اقتراب الجذبين من أقصاهما ($A = 3.0$ م، $B = 1.5$ م) ومحاذاتهما معًا، يعلو المدّ العالي المجمّع أمتارًا عديدة فوق المدّ المنخفض. -- **بحر هادئ بجذب شمسي شبه معدوم.** جذب قمري ضعيف ($A = 0.5$ م) وبلا مساهمة شمسية ($B = 0$) ينتجان إيقاعًا هادئًا وثابتًا. +- **ساحل محيطي معتاد.** جذب قمري معتدل ($A = 1.0$ م) وجذب شمسي أصغر ($B = 0.3$ م) يعطيان فرقًا عاديًا بين المدّ والجزر، نحو مترين أو ثلاثة. +- **ساحل فيه مدّ هائل، مثل خليج فَندي.** حين يكون الجذبان عند أقصاهما ($A = 3.0$ م، $B = 1.5$ م) ويعملان معًا، يرتفع الماء في المدّ أمتارًا عديدة فوق مستواه في الجزر. +- **بحر هادئ بجذب شمسي شبه معدوم.** جذب قمري ضعيف ($A = 0.5$ م) بلا أي جذب شمسي ($B = 0$) يعطي إيقاعًا هادئًا منتظمًا. ## Test yourself -1. ادفع ارتفاع المدّ المجمّع فوق 3 أمتار. -2. جِد لحظة جزر، أي ادفع مستوى سطح البحر دون −2 مترًا. -3. أبقِ الجذب القمري دون 0.7 م وجِد لحظة يستقرّ فيها البحر ضمن 0.2 م من مستواه المتوسط. +1. اجعل ارتفاع المدّ الكلي أكثر من 3 أمتار. +2. ابحث عن لحظة جزر ينخفض فيها سطح البحر تحت −2 متر. +3. أبقِ الجذب القمري أقل من 0.7 م وابحث عن لحظة لا يبتعد فيها البحر عن مستواه المتوسط بأكثر من 0.2 م. ## Intuition -حرّك الزمن إلى الأمام وراقب سطح البحر يرتفع وينخفض مرّتين تقريبًا كل يوم. هذا الانتفاخ القمري يمرّ فوقك والأرض تدور تحته. وبما أن القمر نفسه يتحرّك قليلًا في مداره كل يوم، تصل المدّتان العاليتان متأخرتين نحو 50 دقيقة كل يوم لا بعد 12 ساعة بالضبط. فاليوم القمري الكامل 24 ساعة و50 دقيقة لا 24 ساعة. +حرّك الزمن إلى الأمام وراقب سطح البحر يرتفع وينخفض مرّتين تقريبًا كل يوم. هذا الانتفاخ القمري يمرّ فوقك والأرض تدور تحته. وبما أن القمر نفسه يتحرّك قليلًا في مداره كل يوم، يتأخر المدّان نحو 50 دقيقة كل يوم، فلا يفصل بينهما 12 ساعة بالضبط. فاليوم القمري الكامل 24 ساعة و50 دقيقة لا 24 ساعة. -ارفع الآن قوّة المدّ الشمسي، وتُسمّى $B$. قرّبها من قوّة المدّ القمري، $A$. راقب الشكل يتغيّر. حين يتراصف الانتفاخان الشمسي والقمري تحصل على مدود ربيعية عالية عند المحاق والبدر. وحين يفصل بينهما ربع دورة بدلًا من ذلك تحصل على مدود ميتة صغيرة عند التربيع الأول والأخير، وهي الزاوية نفسها التي تحدّد شكل القمر الذي نراه. +ارفع الآن قوّة المدّ الشمسي، وتُسمّى $B$. قرّبها من قوّة المدّ القمري، $A$. راقب الشكل يتغيّر. حين يقع الانتفاخان الشمسي والقمري على خط واحد تحصل على أعلى مدّ، ويسمّى المدّ الأعظم، عند المحاق والبدر. وحين يفصل بينهما ربع دورة تحصل على أضعف مدّ، ويسمّى المدّ الأصغر، عند التربيع الأول والأخير، وهي الزاوية نفسها التي تحدّد شكل القمر الذي نراه. ## Formal -دورة المدّ القمري 12.42 ساعة، أي نصف الـ24 ساعة و50 دقيقة، لأن كل موقع يمرّ تحت انتفاخين كل يوم قمري: $A\cos\left(\frac{2\pi(x-t_0)}{12.42}\right)$. وترفع الشمس زوجًا ثانيًا أضعف من الانتفاخات بدورة نظيفة مدتها 12 ساعة: $B\cos\left(\frac{2\pi x}{12}\right)$. +دورة المدّ القمري 12.42 ساعة، أي نصف الـ24 ساعة و50 دقيقة، لأن كل موقع يمرّ تحت انتفاخين كل يوم قمري: $A\cos\left(\frac{2\pi(x-t_0)}{12.42}\right)$. وترفع الشمس زوجًا ثانيًا أضعف من الانتفاخات بدورة منتظمة مدتها 12 ساعة: $B\cos\left(\frac{2\pi x}{12}\right)$. -جمع الحدّين يعطي مستوى سطح البحر المرصود، $h(x) = A\cos\left(\frac{2\pi(x-t_0)}{12.42}\right) + B\cos\left(\frac{2\pi x}{12}\right)$، الذي يتذبذب ارتفاعه الكلي صعودًا وهبوطًا على مدى نحو 14.8 يومًا وهما يدخلان ويخرجان من التوافق في الطور. +جمع الحدّين يعطي مستوى سطح البحر المرصود، $h(x) = A\cos\left(\frac{2\pi(x-t_0)}{12.42}\right) + B\cos\left(\frac{2\pi x}{12}\right)$، الذي يتذبذب ارتفاعه الكلي صعودًا وهبوطًا على مدى نحو 14.8 يومًا كلما اتفقت الموجتان ثم اختلفتا. ## Advanced @@ -52,19 +52,23 @@ variables: ## Derivation 1. جاذبية القمر أقوى قليلًا على الجانب القريب من الأرض منها على الجانب البعيد، فتمدّد المحيطات إلى انتفاخ على كل جانب، بإيقاع مدته نحو 12.42 ساعة تدور فيها الأرض تحتهما. -2. تفعل الشمس الأمر نفسه بدورة نظيفة مدتها 12 ساعة، لكن بتأثير أضعف لبعدها الكبير. -3. المدّ الذي تراه هو مجموع الموجتين، فتراصفهما خلال الشهر هو ما يحدّد إن كانت المدود كبيرة أم صغيرة. +2. تفعل الشمس الأمر نفسه بدورة منتظمة مدتها 12 ساعة، لكن بتأثير أضعف لبعدها الكبير. +3. المدّ الذي تراه هو مجموع الموجتين، واتفاقهما أو اختلافهما خلال الشهر هو ما يحدّد هل يكون المدّ كبيرًا أم صغيرًا. ## Real world ### الملاحة والصيد الساحلي + تجدول الموانئ عمليات الشحن ورحلات الصيد وفق أوقات المدّ العالي والمنخفض المتوقّعة، وتُقرأ مباشرة من منحنى كهذا. ### طاقة المدّ -تُصمَّم سدود وتوربينات المدّ وفق مدى المدود الربيعية والميتة، إذ تحرّك المدود الربيعية حجم ماء يفوق المدود الميتة بعدّة أضعاف. + +تُصمَّم سدود وتوربينات المدّ وفق ارتفاع المدّ الأعظم والمدّ الأصغر، فالمدّ الأعظم يحرّك من الماء أضعاف ما يحرّكه المدّ الأصغر. ### برك المدّ والنظم البيئية + تضبط كائنات المنطقة بين المدّين تغذيتها وتكاثرها على إيقاع المدّ، بل تحافظ بعض الأنواع عليه حتى في الأسر بعيدًا عن أي محيط. ### خليج فَندي -يملك خليج فَندي أكبر مدى مدّي في العالم، يتجاوز 15 مترًا، لأن شكله يتردّد مع دورة المدّ التي تقارب 12 ساعة. + +في خليج فَندي أكبر فرق بين المدّ والجزر في العالم، أكثر من 15 مترًا، لأن شكله يجعل الماء يتأرجح فيه بإيقاع قريب من دورة المدّ، أي نحو 12 ساعة. diff --git a/content/lessons/earth-space/tides/en.md b/content/lessons/earth-space/tides/en.md index efd0e7ab..e39f9331 100644 --- a/content/lessons/earth-space/tides/en.md +++ b/content/lessons/earth-space/tides/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. Drag time forward. Watch sea level rise and fall roughly twice a day as the lunar bulge sweeps past. -2. Raise $B$, the Sun's pull, toward $A$, the Moon's pull. Watch the tide pattern's shape change. -3. Set $B$ to 0. Watch the tide settle into one clean, repeating lunar rhythm. +1. Drag time x from 0 to 48 hours. Sea level f(x) rises and falls about four times — roughly twice a day — as the lunar bulge sweeps past. +2. Raise $B$, the Sun's pull, from 0.5 to 1.5, equal to $A$, the Moon's pull. The high tides grow taller, to almost 3 m. +3. Set $B$ to 0. The tide settles into one clean, repeating lunar rhythm: every high tide reaches exactly 1.5 m. ## Real-life examples @@ -59,13 +59,17 @@ The Moon's tidal pull is a differential force: it is stronger on the near side o ## Real world ### Coastal shipping and fishing + Harbours schedule loading and fishing trips around predicted high and low tides read straight off this kind of curve. ### Tidal power + Tidal barrages and turbines are sized around the spring-neap range, since spring tides can move several times the water volume of neap tides. ### Tide pools and ecosystems + Intertidal life times feeding and reproduction to the tidal rhythm, some species even keeping to it in captivity with no ocean nearby. ### Bay of Fundy + The Bay of Fundy has the world's largest tidal range, over 15 metres, because its shape resonates with the roughly 12-hour tidal period. diff --git a/content/lessons/earth-space/tides/lesson.yaml b/content/lessons/earth-space/tides/lesson.yaml index 902f444c..1b060094 100644 --- a/content/lessons/earth-space/tides/lesson.yaml +++ b/content/lessons/earth-space/tides/lesson.yaml @@ -26,25 +26,25 @@ parameters: max: 3 step: 0.1 value: 1.5 - unit: "m" + unit: 'm' B: min: 0 max: 1.5 step: 0.1 value: 0.5 - unit: "m" + unit: 'm' t0: min: 0 max: 12 step: 0.5 value: 2 - unit: "h" + unit: 'h' x: min: 0 max: 48 step: 0.1 value: 6 - unit: "h" + unit: 'h' variables: - h - A @@ -58,19 +58,19 @@ derivation: charts: [] primary: A presets: -- A: 1.0 - B: 0.3 - t0: 1 - x: 6 -- A: 3.0 - B: 1.5 - t0: 0 - x: 0 -- A: 0.5 - B: 0 - t0: 0 - x: 3 + - A: 1.0 + B: 0.3 + t0: 1 + x: 6 + - A: 3.0 + B: 1.5 + t0: 0 + x: 0 + - A: 0.5 + B: 0 + t0: 0 + x: 3 challenges: -- check: A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12) > 3 -- check: A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12) < -2 -- check: A < 0.7 and abs(A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12)) < 0.2 + - check: A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12) > 3 + - check: A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12) < -2 + - check: A < 0.7 and abs(A*cos(2*pi*(x-t0)/12.42) + B*cos(2*pi*x/12)) < 0.2 diff --git a/content/lessons/economics/budgeting-and-saving/ar.md b/content/lessons/economics/budgeting-and-saving/ar.md index b85d6c9c..a4d92142 100644 --- a/content/lessons/economics/budgeting-and-saving/ar.md +++ b/content/lessons/economics/budgeting-and-saving/ar.md @@ -17,27 +17,27 @@ charts: [] ## Try it -1. اخفض «الإنفاق الشهري X» كثيرًا دون «الدخل الشهري I». يقفز الادخار الشهري، ويقفز معه إجمالي المدخرات بعد «عدد الأشهر m». -2. ارفع «عدد الأشهر m» نحو سنة كاملة أو سنتين. حتى ادخار شهري متواضع يتحول إلى مبلغ يستحق الانتباه. -3. قرّب «الإنفاق الشهري X» من «الدخل الشهري I». يتقلص الادخار نحو الصفر، وبالكاد يزيد الإجمالي مهما طال «عدد الأشهر m». +1. اخفض «الإنفاق الشهري X» من 900 إلى 600، أي أقل كثيرًا من «الدخل الشهري I» وهو 1200. يقفز الادخار الشهري S من 300 إلى 600، ويقفز إجمالي المدخرات T بعد 6 أشهر من 1800 إلى 3600. +2. ارفع «عدد الأشهر m» إلى 24، أي سنتين كاملتين. تعرض T القيمة 14400: ادخار شهري ثابت يتحول إلى مبلغ كبير. +3. ارفع «الإنفاق الشهري X» إلى 1150، قريبًا من «الدخل الشهري I». ينزل S إلى 50، ولا يبلغ T إلا 1200 حتى بعد 24 شهرًا. ## Real-life examples 1. **ميزانية ضيقة.** الدخل 800 ريال شهريًا والإنفاق 750 ريالًا. يبقى معك 50 ريالًا فقط كل شهر، لكن بعد سنة كاملة يصل المجموع إلى 600 ريال، تكفي لشراء دراجة جيدة. -2. **مدخر منتظم.** الدخل 1200 ريال والإنفاق 900 ريال. يبقى معك 300 ريال كل شهر، وبعد سنتين يصل المجموع إلى 7200 ريال، مبلغ حقيقي نحو حاسوب محمول أو سيارة مستعملة. +2. **مدخر منتظم.** الدخل 1200 ريال والإنفاق 900 ريال. يبقى معك 300 ريال كل شهر، وبعد سنتين يصل المجموع إلى 7200 ريال، مبلغ يقرّبك من شراء حاسوب محمول أو سيارة مستعملة. 3. **منفق كبير.** الدخل 2000 ريال والإنفاق 1950 ريالًا. رغم الدخل الأعلى بكثير، لا يبقى معك سوى 50 ريالًا شهريًا، فيصل المجموع بعد سنة إلى 600 ريال، تمامًا مثل مثال الميزانية الضيقة أعلاه. ## Test yourself 1. اجعل إجمالي المدخرات 3600 ريال بالضبط. -2. ادخر أقل من 100 ريال شهريًا، وادفع مع ذلك إجمالي المدخرات فوق 500 ريال. +2. ادخر أقل من 100 ريال شهريًا، واجعل إجمالي المدخرات مع ذلك يتجاوز 500 ريال. 3. اكسب أكثر من 3000 ريال شهريًا، لكن أبقِ إجمالي المدخرات دون 1000 ريال. ## Intuition -الادخار ليس كومة مال منفصلة. هو ببساطة ما يتبقى من «الدخل الشهري I» بعد طرح «الإنفاق الشهري X». تخيل الدخل تيارًا يتدفق إلى الداخل والإنفاق مصرفًا يُخرج الماء منه، فيتجمع الادخار فقط حين يكون المصرف أصغر من التيار. لا شيء غامض يجعله يكبر سوى بقاء هذه الفجوة مفتوحة شهرًا بعد شهر. +الادخار ليس كومة مال منفصلة. هو ببساطة ما يتبقى من «الدخل الشهري I» بعد طرح «الإنفاق الشهري X». تخيل الدخل ماءً يصبّ في حوض، والإنفاق فتحةً في أسفل الحوض يخرج منها الماء. لا يتجمع الادخار إلا حين يخرج من الفتحة أقل مما يصبّ في الحوض. لا سرّ في زيادته سوى أن يبقى هذا الفرق موجودًا شهرًا بعد شهر. -مثال المنفق الكبير أعلاه يحمل الدرس الأهم هنا. دخل 2000 ريال يبدو أفضل بكثير من 800 ريال، لكن حين يقترب الإنفاق منه ينهار الادخار إلى الـ50 ريالًا شهريًا نفسها كما في مثال الميزانية الضيقة، وبعد سنة يكون كلاهما قد ادخر 600 ريال بالضبط. «عدد الأشهر m» هو ما يحوّل فجوة صغيرة إلى شيء حقيقي. الـ50 ريالًا شهريًا نفسها تصبح 600 ريال بعد سنة، و1200 ريال بعد سنتين، لمجرد استمرار إضافتها شهرًا بعد شهر. +مثال المنفق الكبير أعلاه يحمل الدرس الأهم هنا. دخل 2000 ريال يبدو أفضل بكثير من 800 ريال، لكن حين يقترب الإنفاق منه ينزل الادخار إلى 50 ريالًا شهريًا، مثل مثال الميزانية الضيقة تمامًا، وبعد سنة يكون كلاهما قد ادخر 600 ريال بالضبط. «عدد الأشهر m» هو ما يحوّل فرقًا صغيرًا إلى مبلغ له قيمة. الـ50 ريالًا شهريًا نفسها تصبح 600 ريال بعد سنة، و1200 ريال بعد سنتين، لمجرد استمرار إضافتها شهرًا بعد شهر. ## Formal @@ -58,13 +58,17 @@ charts: [] ## Real world ### الميزانية الصفرية + تخصص طريقة منزلية شائعة لكل ريال من «الدخل الشهري I» مهمة محددة قبل بداية الشهر، كالإيجار والطعام والادخار، فلا يبقى شيء غير محسوب ولا يتسلل الإنفاق ليقترب من الدخل بصمت. ### ادّخر أولًا + يُعِدّ كثير من المدخرين تحويلًا تلقائيًا للادخار فور وصول الدخل، قبل أن تُتاح فرصة إنفاقه. هكذا يتحول الادخار من «ما تبقى بالصدفة» إلى جزء ثابت محمي في الميزانية. ### صناديق الغرض الواحد + ادّخر مبلغًا ثابتًا كل شهر لتكلفة مستقبلية محددة، كهدية عيد ميلاد أو رحلة مدرسية أو هاتف بديل. هذا هو حساب $T = S\,m$ نفسه، لكن موجّهًا نحو هدف معروف بدل هدف مفتوح. ### تضخم نمط الحياة + مع ارتفاع «الدخل الشهري I»، يرتفع «الإنفاق الشهري X» غالبًا معه بصمت. هذا بالضبط سبب أن زيادة الدخل لا تتحول دائمًا إلى ادخار أكبر، فالفجوة $S$ قد تبقى ضيقة كما كانت. diff --git a/content/lessons/economics/budgeting-and-saving/en.md b/content/lessons/economics/budgeting-and-saving/en.md index c73895d2..0af9eb5a 100644 --- a/content/lessons/economics/budgeting-and-saving/en.md +++ b/content/lessons/economics/budgeting-and-saving/en.md @@ -20,9 +20,9 @@ charts: [] ## Try it -1. Drop «monthly spending X» well below «monthly income I». The monthly saving jumps, and so does the total saved after «months saved m». -2. Raise «months saved m» toward a full year or two. Even a modest monthly saving turns into a total worth noticing. -3. Push «monthly spending X» close to «monthly income I». The saving shrinks toward zero, and the total barely grows no matter how long «months saved m» runs. +1. Drop «monthly spending X» from 900 to 600, well below «monthly income I» at 1200. The monthly saving S jumps from 300 to 600, and the total saved T after 6 months jumps from 1800 to 3600. +2. Raise «months saved m» to 24, two full years. T reads 14400: a steady monthly saving turns into a total worth noticing. +3. Push «monthly spending X» up to 1150, close to «monthly income I». S shrinks to 50, and T is only 1200 even after 24 months. ## Real-life examples @@ -61,13 +61,17 @@ The same formula runs backward for goal-setting: to reach a target total $T$ by ## Real world ### Zero-based budgeting + A common household technique assigns every dollar of «monthly income I» a job before the month starts — rent, food, saving — so nothing is left unaccounted for and spending cannot quietly creep up to match income. ### Pay yourself first + Many savers set up an automatic transfer of the saving the moment income arrives, before there is a chance to spend it, which turns saving from "whatever is left over" into a fixed, protected part of the budget. ### Sinking funds + Saving a fixed amount every month toward a specific future cost — a birthday gift, a school trip, a replacement phone — is the same $T = S\,m$ arithmetic aimed at a known target instead of an open-ended goal. ### Lifestyle inflation + As «monthly income I» rises, «monthly spending X» often quietly rises with it, which is exactly why a raise does not always translate into more saving — the gap $S$ can stay just as thin as before. diff --git a/content/lessons/economics/budgeting-and-saving/lesson.yaml b/content/lessons/economics/budgeting-and-saving/lesson.yaml index 6c74fa97..cc7fbd11 100644 --- a/content/lessons/economics/budgeting-and-saving/lesson.yaml +++ b/content/lessons/economics/budgeting-and-saving/lesson.yaml @@ -29,7 +29,7 @@ parameters: min: 1 max: 60 step: 1 - value: 12 + value: 6 unit: mo variables: - I diff --git a/content/lessons/economics/compound-interest/ar.md b/content/lessons/economics/compound-interest/ar.md index 72e7d8e4..fd92f5d7 100644 --- a/content/lessons/economics/compound-interest/ar.md +++ b/content/lessons/economics/compound-interest/ar.md @@ -23,27 +23,27 @@ charts: ## Try it -1. راقب المنحنى $A$. يبدأ منخفضًا شبه مستوٍ، فرصيدك ينمو ببطء في البداية. -2. ارفع $r$، معدّل الفائدة. يصعد المنحنى بشدة، فمعدّل أعلى يغيّر مسار نمو رصيدك بالكامل. -3. ثبّت $r$ هذه المرة، وحرّك $x$، عدد السنوات، إلى الأمام. المعدّل نفسه ينتج رصيدًا أكبر بكثير لمجرد الانتظار أطول. +1. انظر إلى المنحنى. يبدأ منخفضًا شبه مستوٍ، فرصيدك $A$ ينمو ببطء في البداية: عند $x$ = 5 تعرض القراءة f(x) نحو 1418. +2. اضبط $r$، معدّل الفائدة، على 12. يصعد المنحنى أسرع بكثير، وتقفز f(x) إلى نحو 1817. +3. أعد $r$ إلى 7 واضبط $x$، عدد السنوات، على 20. المعدّل نفسه يعطي رصيدًا أكبر بكثير لأنك انتظرت مدة أطول فقط: تعرض f(x) نحو 4039. ## Real-life examples -1. **ادخار لتعليم طفل.** يضع والدان 1000 ريال عند ولادة طفلهما في حساب بفائدة 6% سنويًا تُحتسب شهريًا. وبحلول التحاقه بالجامعة عند 18 سنة يكون المبلغ قد تضاعف مرات عدة. -2. **بناء مدّخرات التقاعد.** استثمر 5000 ريال بعائد سنوي 7% محسوب سنويًا، واتركه 30 سنة. معظم الرصيد النهائي يأتي من عقود من الفائدة التي تكسب فائدة، لا من المبلغ الأصلي. -3. **رصيد بطاقة ائتمان.** اترك 2000 ريال دون سداد بفائدة 15% تُحتسب شهريًا. تتراكم الفائدة هنا ضد صاحب البطاقة لا لصالحه، ويكبر الدين كل شهر يمرّ دون سداد. +1. **ادخار لتعليم طفل.** يضع والدان 1000 ريال عند ولادة طفلهما في حساب بفائدة 6% سنويًا تُحتسب شهريًا. وحين يبلغ الطفل 18 سنة يكون المبلغ قد صار ثلاثة أمثاله تقريبًا، نحو 2937 ريالًا. +2. **بناء مدّخرات التقاعد.** استثمر 5000 ريال بعائد سنوي 7% محسوب سنويًا، واتركه 30 سنة فيصير نحو 38061 ريالًا. معظم الرصيد النهائي يأتي من عقود من الفائدة التي تكسب فائدة، لا من المبلغ الأصلي. +3. **رصيد بطاقة ائتمان.** اترك 2000 ريال دون سداد بفائدة 15% تُحتسب شهريًا. تتراكم الفائدة هنا ضد صاحب البطاقة لا لصالحه، فيزيد الدين على الضعف ويصير نحو 4214 ريالًا بعد 5 سنوات. ## Test yourself 1. جِد معدّلًا وعدد مرات احتساب وعدد سنوات تجعل مدّخراتك تتضاعف تقريبًا. -2. باستخدام معدّل واقعي أقل من 10%، نمِّ مدّخراتك إلى أكثر من 5 أضعاف المبلغ الأصلي خلال 40 سنة. +2. اختر معدّلًا واقعيًا أقل من 10%، واجعل مدّخراتك تزيد على 5 أمثال المبلغ الأصلي خلال 40 سنة. 3. اضبط المعدّل على 12% وجِد عدد السنوات اللازمة لتتضاعف أموالك، ثم تحقّق منه بقاعدة 72 (72 ÷ 12 = 6 سنوات). ## Intuition -ضع 1000 ريال في حساب توفير بفائدة 7% سنويًا، تُحتسب كل شهر، واتركه سنوات دون أن تلمسه. المنحنى المسمّى $A$ على الشاشة هو رصيدك المتنامي، ومحوره الأفقي $x$، أي عدد سنوات الاستثمار. حرّك $x$ إلى اليمين، فيزداد ميل المماس المرسوم على المنحنى عامًا بعد عام، لأنك تكسب الآن فائدة على وديعتك الأصلية وعلى فائدة كل سنة سابقة معًا. +ضع 1000 ريال في حساب توفير بفائدة 7% سنويًا، تُحتسب كل شهر، واتركه سنوات دون أن تلمسه. المنحنى على الشاشة هو رصيدك $A$ وهو يكبر، ومحوره الأفقي $x$، أي عدد سنوات الاستثمار. حرّك $x$ إلى اليمين، فيزداد ميل المماس المرسوم على المنحنى عامًا بعد عام، لأنك تكسب الآن فائدة على وديعتك الأصلية وعلى فائدة كل سنة سابقة معًا. -الآن حرّك $r$، معدّل الفائدة السنوي، إلى الأعلى بدلًا من ذلك. حتى ارتفاع بسيط يجعل المنحنى يصعد أسرع بكثير، لأن معدّلًا أعلى يُضرَب في كل سنة قادمة بدل أن يُضاف مرة واحدة فقط. لهذا السبب ينتهي مدّخر بدأ عند 25 برصيد تقاعد يقارب ضعف رصيد مدّخر بدأ عند 35 بالإيداع الشهري نفسه. الفرق كله من البدء المبكر، فمدة ادخار الاثنين متقاربة. +الآن حرّك $r$، معدّل الفائدة السنوي، إلى الأعلى بدلًا من ذلك. حتى ارتفاع بسيط يجعل المنحنى يصعد أسرع بكثير، لأن معدّلًا أعلى يُضرَب في كل سنة قادمة بدل أن يُضاف مرة واحدة فقط. لهذا السبب يصل من بدأ الادخار في سن 25 إلى رصيد تقاعد يقارب ضعف رصيد من بدأ في سن 35 بالإيداع الشهري نفسه. الفرق كله من البدء المبكر، فمدة ادخار الاثنين متقاربة. ## Formal @@ -71,17 +71,21 @@ $u$ الصغيرة. اختيار تكرار الاحتساب $n$ أقل أهمي ## Real world ### ادخار التقاعد + مدّخر يبدأ عند 25 بدل 35 قد ينهي برصيد يقارب ضعف رصيد الآخر عند 65، حتى مع الاشتراك الشهري نفسه. ### ديون بطاقات الائتمان + الأرصدة غير المسدّدة تتراكم بالطريقة نفسها لكن ضد المقترض، فالدين المتروك دون سداد ينمو أسرع كلما طال بقاؤه. ### حسابات التوفير + تعلن البنوك معدّلًا سنويًا لكنها غالبًا تحتسب الفائدة شهريًا أو يوميًا، لذا ينتهي الرصيد الفعلي أعلى قليلًا من التقدير البسيط. ### الدين العام + دين حكومة يتراكم أسرع من نمو اقتصادها يصبح حصة أكبر من الدخل الوطني مع الوقت. diff --git a/content/lessons/economics/compound-interest/en.md b/content/lessons/economics/compound-interest/en.md index 230b5f70..78e9fcae 100644 --- a/content/lessons/economics/compound-interest/en.md +++ b/content/lessons/economics/compound-interest/en.md @@ -24,15 +24,15 @@ charts: ## Try it -1. Watch the curve. It starts low and flat, showing your balance $A$ growing slowly. -2. Drag $r$ (interest rate) up. The curve gets dramatically steeper — a higher rate changes everything. -3. Now drag $x$ (years invested) forward instead, keeping $r$ fixed. The same rate compounds into a much bigger balance simply by waiting longer. +1. Watch the curve. It starts low and flat, showing your balance $A$ growing slowly: at $x$ = 5 the readout f(x) shows about 1418. +2. Set $r$ (interest rate) to 12. The curve gets much steeper, and f(x) jumps to about 1817. +3. Put $r$ back to 7 and set $x$ (years invested) to 20 instead. The same rate compounds into a much bigger balance simply by waiting longer: f(x) shows about 4039. ## Real-life examples -1. **Saving for a child's education.** Parents put aside 1,000 at birth in an account paying 6% a year, compounded monthly; by the time their child turns 18 the fund has grown several times over. -2. **Building a retirement nest egg.** 5,000 invested at a 7% annual return, compounded yearly, grows for 30 years — most of the final balance comes from decades of interest earning interest, not the original deposit. -3. **A credit card balance.** 2,000 left unpaid at 15% interest, compounded monthly, compounds against the borrower instead of for them, growing steadily larger the longer it goes unpaid. +1. **Saving for a child's education.** Parents put aside 1,000 at birth in an account paying 6% a year, compounded monthly; by the time their child turns 18 the fund has nearly tripled, to about 2,937. +2. **Building a retirement nest egg.** 5,000 invested at a 7% annual return, compounded yearly, grows for 30 years to about 38,061 — most of the final balance comes from decades of interest earning interest, not the original deposit. +3. **A credit card balance.** 2,000 left unpaid at 15% interest, compounded monthly, compounds against the borrower instead of for them, more than doubling to about 4,214 after 5 years. ## Test yourself @@ -42,7 +42,7 @@ charts: ## Intuition -Put 1,000 in a savings account at 7% a year, compounded every month, and leave it alone for years. On screen, the curve labelled $A$ is your growing balance, plotted against $x$, the number of years invested. Drag $x$ to the right: the tangent line drawn on the curve gets steeper year after year, because you are now earning interest on your original deposit and on every year's interest that came before it. +Put 1,000 in a savings account at 7% a year, compounded every month, and leave it alone for years. On screen, the curve is your growing balance $A$, plotted against $x$, the number of years invested. Drag $x$ to the right: the tangent line drawn on the curve gets steeper year after year, because you are now earning interest on your original deposit and on every year's interest that came before it. Now drag $r$, the annual interest rate, up instead: even a small rise makes the curve climb dramatically faster, because a higher rate multiplies every future year rather than just adding once. This is why a saver who starts at 25 can end up with roughly double the retirement balance of one who starts at 35 with the same monthly deposit, even though the later saver contributes for nearly as many years. @@ -74,17 +74,21 @@ decade than from daily versus monthly compounding. ## Real world ### Retirement savings + A saver starting at 25 instead of 35 can end up with nearly double the balance at 65, even with the same monthly contribution. ### Credit card debt + Unpaid balances compound the same way, working against the borrower — a debt left unpaid grows faster the longer it sits. ### Savings accounts + Banks quote an annual rate but often compound monthly or daily, which is why the actual balance ends up slightly above the simple estimate. ### National debt + Government debt that compounds faster than the economy grows becomes a larger share of national income over time. diff --git a/content/lessons/economics/compound-interest/lesson.yaml b/content/lessons/economics/compound-interest/lesson.yaml index fd9c79f7..09db5028 100644 --- a/content/lessons/economics/compound-interest/lesson.yaml +++ b/content/lessons/economics/compound-interest/lesson.yaml @@ -34,7 +34,7 @@ parameters: max: 15 step: 0.25 value: 7 - unit: "%" + unit: '%' n: min: 1 max: 12 @@ -45,7 +45,7 @@ parameters: min: 0 max: 40 step: 0.5 - value: 10 + value: 5 variables: - A - P diff --git a/content/lessons/economics/elasticity/ar.md b/content/lessons/economics/elasticity/ar.md index fcfbf0ae..573dd310 100644 --- a/content/lessons/economics/elasticity/ar.md +++ b/content/lessons/economics/elasticity/ar.md @@ -23,27 +23,27 @@ charts: ## Try it -1. حرّك $x$، السعر، صعودًا من قيمة منخفضة وراقب المستطيل المظلل — السعر × المشترين — يكبر معه. -2. استمر برفع $x$. بعد راية |E| = 1 يترقّق الطابور أسرع مما يرتفع السعر، ويبدأ المستطيل بالانكماش بدلًا من النمو. -3. تحقّق من مخطط المرونة أدناه. يقطع القيمة 1 عند السعر نفسه الذي يبلغ عنده المستطيل ذروته. +1. اضبط $x$، السعر، على 10 ثم على 20. يكبر المستطيل المظلل — السعر × المشترين — وترتفع القراءة R = x·Q من 800 إلى 1200. +2. اضبط $x$ على 25: يبلغ R أعلى قيمة له، 1250، وتصير |E| تساوي 1. الآن اضبط $x$ على 35. بعد راية |E| = 1 يقصر الطابور أسرع مما يرتفع السعر، فيصغر المستطيل: R = 1050 و|E| = 2.33. +3. انظر إلى مخطط المرونة في الأسفل. يمرّ بالقيمة 1 عند $x$ = 25، وهو السعر نفسه الذي يكون عنده المستطيل أكبر ما يمكن. ## Real-life examples -1. **سلعة أساسية.** أرزّ سعره 30 ريالًا يُباع منه 105 وحدة. رفع سعره بالكاد يغيّر ما يشتريه الناس، فالجميع يحتاج الأكل على أي حال. الطلب هنا غير مرن. -2. **حقيبة يد فاخرة.** سعرها قرب 25 ريالًا ولا يُباع منها سوى 25 وحدة. خفض السعر قليلًا يجذب مشترين جددًا كافين لرفع الإيراد الكلي. الطلب هنا مرن. -3. **تذكرة حفلة عند نقطتها المثلى.** سعرها 25 ريالًا ويُباع منها 50 تذكرة. رفعها ريالًا واحدًا يخسر من المبيعات بقدر ما يكسب من السعر بالضبط. هذا هو السعر الوحيد الذي يحقق أعلى إيراد ممكن. +1. **سلعة أساسية.** أرزّ سعره 30 ريالًا يُباع منه 105 وحدات (a = 120، b = 0.5). رفع سعره لا يكاد يغيّر ما يشتريه الناس، فالجميع يحتاج إلى الطعام على أي حال. الطلب هنا غير مرن. +2. **حقيبة يد فاخرة.** سعرها 25 ريالًا ولا يُباع منها سوى 25 وحدة (a = 100، b = 3). خفض السعر قليلًا يجذب من المشترين الجدد ما يكفي لرفع الإيراد الكلي. الطلب هنا مرن. +3. **تذكرة حفلة عند أفضل سعر.** سعرها 25 ريالًا ويُباع منها 50 تذكرة (a = 100، b = 2). رفعها ريالًا واحدًا يخسر من المبيعات بقدر ما يكسب من السعر بالضبط. هذا هو السعر الوحيد الذي يحقق أعلى إيراد ممكن. ## Test yourself -1. جِد سعرًا يكون عنده الطلب مرنًا وحدويًا تمامًا، أي تساوي قيمة مخطط المرونة 1. هذا هو السعر الذي يعظّم الإيراد. +1. جِد السعر الذي تساوي عنده المرونة 1 بالضبط، كما يظهر في مخطط المرونة. هذا هو السعر الذي يحقق أعلى إيراد. 2. ارفع السعر حتى يصبح الطلب مرنًا بوضوح (المرونة أعلى من 2)، مع إبقاء الكمية المُباعة أعلى من صفر. 3. اخفض السعر حتى يصبح الطلب غير مرن بوضوح (المرونة أقل من 0.2)، مع إبقاء الكمية المُباعة أعلى من صفر. ## Intuition -تخيّل حفلة موسيقية تجذب فيها التذكرة المجانية 100 معجب. كل ريال إضافي على السعر ينفّر منها معجبَين، وهذه العلاقة هي خط الطلب الذي تراه على الشاشة. عند سعر تذكرة 20 ريالًا يشتري 60 معجبًا. ويستمرّ مستطيل الإيراد تحت الخط في النمو، لأن الريال الذي تكسبه من كل من بقي يفوق قيمة المعجبين القلائل الذين خسرتهم. الطلب هنا غير مرن، أي أن المشترين بالكاد يتفاعلون مع السعر. +تخيّل حفلة موسيقية تجذب فيها التذكرة المجانية 100 معجب. كل ريال إضافي على السعر يُبعد معجبَين، وهذه العلاقة هي خط الطلب الذي تراه على الشاشة. عند سعر تذكرة 20 ريالًا يشتري 60 معجبًا. ويستمرّ مستطيل الإيراد تحت الخط في النمو، لأن الريال الذي تكسبه من كل من بقي يفوق قيمة المعجبين القلائل الذين خسرتهم. الطلب هنا غير مرن، أي أن المشترين لا يتأثرون كثيرًا بالسعر. -استمر برفع $x$، السعر، أكثر. بعد الراية التي يبلغ عندها المستطيل ذروته، يخسر كل رفع إضافي للسعر تذاكر أكثر ممّا يكسبه من قيمة كل تذكرة، وصار الطلب مرنًا. يقطع منحنى المرونة أدناه القيمة 1 عند تلك الذروة بالضبط، وهي السعر الوحيد الذي يحقق أعلى إيراد إجمالي. +استمر برفع $x$، السعر، أكثر. بعد الراية التي يبلغ عندها المستطيل ذروته، يخسر كل رفع إضافي للسعر تذاكر أكثر ممّا يكسبه من سعر كل تذكرة، ويصير الطلب مرنًا. يقطع منحنى المرونة أدناه القيمة 1 عند تلك الذروة بالضبط، وهي السعر الوحيد الذي يحقق أعلى إيراد إجمالي. ## Formal @@ -71,17 +71,21 @@ $R$ أقصاه عند $|E_d| = 1$ بالضبط. ## Real world ### ضرائب السجائر + طلب السجائر غير مرن نسبيًا، فترفع الضريبة إيراد الحكومة مع خفض التدخين قليلًا فقط. ### تذاكر الطيران + يدفع مسافرو الأعمال قرب موعد الرحلة سعرًا غير مرن، بينما يحجز مسافرو الترفيه مبكرًا بحثًا عن أسعار أقل، وهم مرنون. ### السلع الفاخرة + طلب الماركات الفاخرة غالبًا مرن، فخفض السعر قد يجذب مشترين جددًا كافين لرفع الإيراد الكلي. ### الغذاء الأساسي + طلب الأرز أو الخبز غير مرن في كل مكان تقريبًا، فيستمر الناس بشراء الكمية نفسها تقريبًا مهما تقلّب السعر. diff --git a/content/lessons/economics/elasticity/en.md b/content/lessons/economics/elasticity/en.md index cbaba280..5223057b 100644 --- a/content/lessons/economics/elasticity/en.md +++ b/content/lessons/economics/elasticity/en.md @@ -24,15 +24,15 @@ charts: ## Try it -1. Drag $x$, the price, up from a low value and watch the shaded rectangle — price × buyers — grow with it. -2. Keep dragging $x$ higher. Past the |E| = 1 flag the queue thins faster than the price rises, and the rectangle starts shrinking instead. -3. Check the elasticity chart below: it crosses the value 1 at exactly the price where the rectangle peaks. +1. Set $x$, the price, to 10, then to 20. The shaded rectangle — price × buyers — grows: the readout R = x·Q goes from 800 to 1200. +2. Set $x$ = 25: R peaks at 1250 and |E| reads 1. Now set $x$ = 35. Past the |E| = 1 flag the queue thins faster than the price rises, and the rectangle shrinks: R = 1050, |E| = 2.33. +3. Check the elasticity chart below: it crosses the value 1 at $x$ = 25, exactly the price where the rectangle peaks. ## Real-life examples -1. **A staple food.** Rice priced at 30 with 105 units sold: raising the price barely changes how much people buy, since everyone still needs to eat. Demand is inelastic. -2. **A luxury handbag.** Priced near 25 with only 25 units sold: a small price cut brings in enough new buyers to raise total revenue. Demand is elastic. -3. **A concert ticket at the sweet spot.** Priced at 25 with 50 tickets sold, a 1-unit price rise would lose exactly as many sales as it gains in price — this is the single price that earns the most money overall. +1. **A staple food.** Rice priced at 30 with 105 units sold (a = 120, b = 0.5): raising the price barely changes how much people buy, since everyone still needs to eat. Demand is inelastic. +2. **A luxury handbag.** Priced at 25 with only 25 units sold (a = 100, b = 3): a small price cut brings in enough new buyers to raise total revenue. Demand is elastic. +3. **A concert ticket at the sweet spot.** Priced at 25 with 50 tickets sold (a = 100, b = 2), a 1-unit price rise would lose exactly as many sales as it gains in price — this is the single price that earns the most money overall. ## Test yourself @@ -73,17 +73,21 @@ buyers can adjust habits and find alternatives. ## Real world ### Cigarette taxes + Demand for cigarettes is fairly inelastic, so a tax raises government revenue even as it cuts smoking a little. ### Airline tickets + Business travellers pay inelastically close to departure; leisure travellers are elastic and book early for lower fares. ### Luxury goods + Demand for designer goods is often elastic — a price cut can bring in enough new buyers to raise total revenue. ### Staple foods + Demand for rice or bread is inelastic almost everywhere: people keep buying roughly the same amount regardless of price swings. diff --git a/content/lessons/economics/elasticity/lesson.yaml b/content/lessons/economics/elasticity/lesson.yaml index 45d9ed51..018f476b 100644 --- a/content/lessons/economics/elasticity/lesson.yaml +++ b/content/lessons/economics/elasticity/lesson.yaml @@ -46,7 +46,7 @@ charts: - 45 marker: x series: - - -b*x/(a - b*x) + - b*x/(a - b*x) primary: x presets: - a: 120 diff --git a/content/lessons/economics/exchange-rates/ar.md b/content/lessons/economics/exchange-rates/ar.md index 753e924f..30962aac 100644 --- a/content/lessons/economics/exchange-rates/ar.md +++ b/content/lessons/economics/exchange-rates/ar.md @@ -17,9 +17,9 @@ charts: [] ## Try it -1. ارفع «سعر الصرف e» بينما يبقى «سعر المستورد p» ثابتًا. ترتفع تكلفة السلعة المستوردة نفسها بالجنيه. لم يتغير شيء في السلعة، تغيّر سعر الصرف فقط. -2. ارفع «سعر الصرف e» مجددًا ولاحظ كم دولارًا تشتريه «الجنيهات المراد تحويلها m». المدخرات نفسها تصل إلى أبعد أقل كلما ارتفع السعر. -3. اخفض «سعر المستورد p» إلى شيء رخيص. حتى «سعر الصرف e» أضعف بكثير بالكاد يحرّك التكلفة بالجنيه لسلعة رخيصة. +1. ارفع «سعر الصرف e» من 30 إلى 40 واترك «سعر المستورد p» على 300. ترتفع تكلفة السلعة المستوردة نفسها c من 9000 جنيه إلى 12000 جنيه. لم يتغير شيء في السلعة، تغيّر سعر الصرف فقط. +2. ارفع «سعر الصرف e» مرة أخرى إلى 50 ولاحظ كم دولارًا تشتري «الجنيهات المراد تحويلها m»: كانت f تعرض 166.7 عند سعر 30، وهي الآن تعرض 100. المدخرات نفسها تشتري أقل في الخارج كلما ارتفع السعر. +3. اخفض «سعر المستورد p» إلى 10. تعرض التكلفة c القيمة 500 جنيه عند سعر 50، و300 جنيه عند سعر 30: حتى الجنيه الأضعف بكثير لا يزيد على سلعة رخيصة سوى 200 جنيه. ## Real-life examples @@ -29,42 +29,46 @@ charts: [] ## Test yourself -1. اجعل تكلفة المستورد بالجنيه 9,000 جنيه بالضبط. -2. مع جنيه أضعف من 40 جنيهًا للدولار، ادفع تكلفة المستورد بالجنيه فوق 12,000 جنيه. -3. مع جنيه أضعف من 45 جنيهًا للدولار، اجعل الدولارات المحوَّلة أقل من 100 دولار. +1. اجعل تكلفة المستورد بالجنيه 6,000 جنيه بالضبط. +2. اجعل سعر الصرف أعلى من 40 جنيهًا للدولار، واجعل تكلفة المستورد بالجنيه تتجاوز 12,000 جنيه. +3. اجعل سعر الصرف أعلى من 45 جنيهًا للدولار، واجعل الدولارات التي تحصل عليها أقل من 100 دولار. ## Intuition -«سعر الصرف e» هو ببساطة بطاقة سعر على المال نفسه. يقول كم جنيهًا مصريًا يكلّف الدولار الأمريكي الواحد. يبدو أن جنيهًا «أضعف» يعني رقمًا أصغر، لكنه في الحقيقة يعني رقمًا أكبر. يلزم الآن جنيهات أكثر لشراء الدولار الواحد نفسه. هذه هي حيلة الدرس كلها: حين تشاهد «سعر الصرف e» يرتفع فأنت تشاهد الجنيه يضعف، رغم أن الرقم نفسه يزيد. +«سعر الصرف e» هو ببساطة ثمن المال نفسه: كم جنيهًا مصريًا تدفع لتشتري دولارًا أمريكيًا واحدًا. يبدو أن جنيهًا «أضعف» يعني رقمًا أصغر، لكنه في الحقيقة يعني رقمًا أكبر. يلزم الآن جنيهات أكثر لشراء الدولار الواحد نفسه. هذه فكرة الدرس كلها: حين ترى «سعر الصرف e» يرتفع فأنت ترى الجنيه يضعف، رغم أن الرقم نفسه يزيد. -يشعر الاتجاهان كلاهما بذلك الضعف في اللحظة نفسها. استيراد جهاز الألعاب نفسه بـ300 دولار يكلّف 9,000 جنيه عند سعر 30، لكنه يكلّف 15,000 جنيه عند سعر 50. جنيه أضعف يجعل السلع الأجنبية أغلى في الداخل. وفي اللحظة نفسها، الـ5,000 جنيه نفسها التي تحولت إلى 166.70 دولارًا بالخارج عند سعر 30 تتحول إلى 100 دولار فقط عند سعر 50. جنيه أضعف يشتري أقل في رحلة بالخارج أيضًا. لم يتغيّر شيء في السلعة أو المدخرات. تغيّر «سعر الصرف e» فقط، وضرب الرقمين معًا. +يظهر أثر هذا الضعف في الاتجاهين معًا. استيراد جهاز الألعاب نفسه بـ300 دولار يكلّف 9,000 جنيه عند سعر 30، لكنه يكلّف 15,000 جنيه عند سعر 50. جنيه أضعف يجعل السلع الأجنبية أغلى في الداخل. وفي اللحظة نفسها، الـ5,000 جنيه نفسها التي تحولت إلى 166.70 دولارًا بالخارج عند سعر 30 تتحول إلى 100 دولار فقط عند سعر 50. جنيه أضعف يشتري أقل في رحلة بالخارج أيضًا. لم يتغيّر شيء في السلعة أو المدخرات. تغيّر «سعر الصرف e» فقط، فتأثر الرقمان معًا. ## Formal تكلفة المستورد بالجنيه هي سعره بالدولار مضروبًا في سعر الصرف: $c = p\,e$. هذا ضرب مباشر، فترتفع التكلفة بما يتناسب مباشرة مع السعر. -تحويل الجنيهات في الاتجاه المعاكس يقسم بدل أن يضرب: $f = \dfrac{m}{e}$. «سعر الصرف e» نفسه الذي يرفع تكلفة المستوردات يخفض كمية العملة الأجنبية التي تشتريها كومة ثابتة من الجنيهات. +تحويل الجنيهات في الاتجاه المعاكس يقسم بدل أن يضرب: $f = \dfrac{m}{e}$. «سعر الصرف e» نفسه الذي يرفع تكلفة المستوردات يخفض كمية العملة الأجنبية التي يشتريها مبلغ ثابت من الجنيهات. ## Advanced -عملة أضعف ليست خبرًا سيئًا بحتًا. فهي تجعل صادرات البلد وسياحته أرخص للأجانب، إذ تتحول دولاراتهم الآن إلى جنيهات أكثر. «سعر الصرف e» نفسه الذي يضر بالمستوردين والمسافرين إلى الخارج يفيد المصدّرين والزوار القادمين في اللحظة نفسها تمامًا. +العملة الأضعف ليست سيئة من كل وجه. فهي تجعل صادرات البلد وسياحته أرخص للأجانب، إذ تتحول دولاراتهم الآن إلى جنيهات أكثر. «سعر الصرف e» نفسه الذي يضر بالمستوردين والمسافرين إلى الخارج يفيد المصدّرين والزوار القادمين في اللحظة نفسها تمامًا. ## Derivation 1. ضرب سعر السلعة بالدولار في سعر الصرف يحوّله إلى جنيهات: $c = p\,e$. -2. قسمة كومة من الجنيهات على سعر الصرف يحوّلها إلى دولارات: $f = \dfrac{m}{e}$. -3. تشترك الصيغتان في «سعر الصرف e» نفسه، فعملة أضعف ترفع التكلفة وتخفض القوة الشرائية الأجنبية معًا. حين يرتفع $e$ (عملة محلية أضعف) يرتفع $c$ وينخفض $f$. +2. قسمة مبلغ من الجنيهات على سعر الصرف تحوّله إلى دولارات: $f = \dfrac{m}{e}$. +3. تشترك الصيغتان في «سعر الصرف e» نفسه، فعملة أضعف ترفع التكلفة وتخفض ما تشتريه من العملة الأجنبية معًا. حين يرتفع $e$ (عملة محلية أضعف) يرتفع $c$ وينخفض $f$. ## Real world ### تدخل البنك المركزي + يشتري البنك المركزي أو يبيع احتياطيات العملة الأجنبية أحيانًا لدفع «سعر الصرف e» في اتجاه مختار، محاولًا إبقاء المستوردات في متناول اليد أو الصادرات تنافسية بدل ترك السعر للأسواق وحدها. ### مؤشر بيج ماك + مقارنة سعر منتج واحد مطابق، كوجبة برغر، محوَّلًا عبر «سعر الصرف e» بين دول مختلفة تعطي فحصًا تقريبيًا غير رسمي لما إذا كانت عملة ما مقوَّمة بأعلى أو بأقل مما تشتريه فعليًا. ### اقتصادات معتمدة على الاستيراد + الدول التي تستورد معظم وقودها أو غذائها تشعر بضعف «سعر الصرف e» أسرع وأشد، لأن «سعر المستورد p» للسلع الأساسية اليومية يتحول مباشرة إلى أسعار أعلى بالجنيه في السوق. ### تقلبات السياحة + «سعر الصرف e» الأضعف يجعل البلد أرخص للزوار الأجانب الذين يحوّلون أموالهم إليه، ولهذا ترتفع السياحة غالبًا بالضبط حين تضعف العملة، حتى مع أن السعر نفسه يجعل الرحلات إلى الخارج أغلى على السكان المحليين. diff --git a/content/lessons/economics/exchange-rates/en.md b/content/lessons/economics/exchange-rates/en.md index dbd27410..1129b6fb 100644 --- a/content/lessons/economics/exchange-rates/en.md +++ b/content/lessons/economics/exchange-rates/en.md @@ -20,9 +20,9 @@ charts: [] ## Try it -1. Raise «exchange rate e» while «import price p» stays fixed. The pound cost of the exact same imported item climbs — nothing about the item changed, only the exchange rate did. -2. Raise «exchange rate e» again and watch how many dollars «pounds to convert m» buys — the same savings reach less far abroad as the rate rises. -3. Drop «import price p» to something cheap. Even a much weaker «exchange rate e» barely moves the pound cost of a cheap item. +1. Raise «exchange rate e» from 30 to 40 while «import price p» stays at 300. The pound cost c of the exact same imported item climbs from 9000 EGP to 12000 EGP — nothing about the item changed, only the exchange rate did. +2. Raise «exchange rate e» again, to 50, and watch how many dollars «pounds to convert m» buys: f, which read 166.7 at a rate of 30, now reads 100 — the same savings reach less far abroad as the rate rises. +3. Drop «import price p» to 10. The cost c reads 500 EGP at a rate of 50 and 300 EGP at a rate of 30: even a much weaker pound adds only 200 EGP to a cheap item. ## Real-life examples @@ -32,7 +32,7 @@ charts: [] ## Test yourself -1. Get the pound cost of the import to exactly 9,000 EGP. +1. Get the pound cost of the import to exactly 6,000 EGP. 2. With the pound weaker than 40 EGP per dollar, push the import's pound cost above 12,000 EGP. 3. With the pound weaker than 45 EGP per dollar, get the converted dollars below 100. @@ -61,13 +61,17 @@ A weaker currency is not purely bad news: it makes a country's own exports and t ## Real world ### Central bank intervention + Central banks sometimes buy or sell foreign currency reserves to push «exchange rate e» in a chosen direction, trying to keep imports affordable or exports competitive rather than leaving the rate to markets alone. ### The Big Mac Index + Comparing the price of an identical product, like a burger, converted through «exchange rate e» across countries gives a rough, informal check on whether a currency looks over- or under-valued relative to what money actually buys. ### Import-dependent economies + Countries that import most of their fuel or food feel a weakening «exchange rate e» fastest and hardest, since «import price p» for daily essentials converts straight into higher pound prices at the market. ### Tourism swings + A weaker «exchange rate e» makes a country cheaper for foreign visitors converting their own money in, which is why tourism often rises exactly when a currency weakens, even as the same rate makes trips abroad pricier for locals. diff --git a/content/lessons/economics/exchange-rates/lesson.yaml b/content/lessons/economics/exchange-rates/lesson.yaml index c2da1abf..824fbaf9 100644 --- a/content/lessons/economics/exchange-rates/lesson.yaml +++ b/content/lessons/economics/exchange-rates/lesson.yaml @@ -53,6 +53,6 @@ presets: m: 5000 challenges: - check: p*e - target: 9000 + target: 6000 - check: e > 40 and p*e > 12000 - check: m/e < 100 and e > 45 diff --git a/content/lessons/economics/gdp-and-growth/ar.md b/content/lessons/economics/gdp-and-growth/ar.md index 99f1482e..23d43c6d 100644 --- a/content/lessons/economics/gdp-and-growth/ar.md +++ b/content/lessons/economics/gdp-and-growth/ar.md @@ -17,27 +17,27 @@ charts: [] ## Try it -1. اجعل «السنوات المنقضية t» صفرًا. يساوي الناتج «الناتج المحلي اليوم p» تمامًا. لم يُتح للنمو وقت ليتراكم بعد. -2. ارفع «معدل النمو السنوي g» من 1.5% البطيء نحو 9% السريع. ينخفض تقدير التضاعف بقاعدة السبعين بحدة. نمو أسرع ست مرات يعني تضاعفًا في جزء صغير من الزمن، لا مجرد زمن أقل بست مرات. -3. ادفع «السنوات المنقضية t» إلى ما بعد تقدير التضاعف. يتجاوز الناتج ضعف «الناتج المحلي اليوم p» تقريبًا، مؤكدًا صحة التقدير. +1. اجعل «السنوات المنقضية t» صفرًا. تعرض قراءة الناتج Y القيمة 500، أي «الناتج المحلي اليوم p» تمامًا. لم يمرّ وقت بعد ليتراكم النمو. +2. اضبط «معدل النمو السنوي g» على 1.5، وهو نمو بطيء: يعرض تقدير التضاعف بقاعدة السبعين d القيمة 46.7 سنة. الآن اضبطه على 9، وهو نمو سريع: ينزل d إلى 7.8 سنة. نمو أسرع ست مرات يعني تضاعفًا في سدس الزمن. +3. أبقِ g على 9 واضبط «السنوات المنقضية t» على 9، أي بعد تقدير التضاعف بقليل. تعرض Y القيمة 1086، أي أكثر بقليل من ضعف «الناتج المحلي اليوم p»، وهذا يؤكد أن التقدير صحيح. ## Real-life examples 1. **اقتصاد ناضج بطيء النمو.** 2,000 مليار دولار ينمو 1.5% سنويًا. بعد 20 سنة يصل الناتج إلى نحو 2,694 مليار دولار، زيادة 35% فقط، لأن النمو البطيء يتراكم ببطء. -2. **اقتصاد ناشئ نموذجي.** 500 مليار دولار ينمو 5% سنويًا. بعد 15 سنة يصل الناتج إلى نحو 1,039 مليار دولار، بعد التضاعف بقليل، مطابقًا تقدير قاعدة السبعين بنحو 14 سنة للتضاعف. -3. **نمو لحاق سريع.** 200 مليار دولار ينمو 9% سنويًا. بعد 8 سنوات فقط يصل الناتج إلى نحو 399 مليار دولار، ضعفه تقريبًا بالضبط، مطابقًا تقدير قاعدة السبعين بنحو 7.8 سنة. +2. **اقتصاد ناشئ نموذجي.** 500 مليار دولار ينمو 5% سنويًا. بعد 15 سنة يصل الناتج إلى نحو 1,039 مليار دولار، أي أكثر من الضعف بقليل، وهذا يوافق تقدير قاعدة السبعين: نحو 14 سنة للتضاعف. +3. **اقتصاد يلحق بغيره بسرعة.** 200 مليار دولار ينمو 9% سنويًا. بعد 8 سنوات فقط يصل الناتج إلى نحو 399 مليار دولار، أي ضعفه تقريبًا، وهذا يوافق تقدير قاعدة السبعين: نحو 7.8 سنة. ## Test yourself 1. اجعل الناتج يتضاعف تقريبًا عن «الناتج المحلي اليوم p» خلال السنوات المعروضة. 2. اجعل تقدير التضاعف بقاعدة السبعين أقل من 8 سنوات. -3. باستخدام ناتج محلي أقل من 300 مليار دولار، اجعل الناتج يتضاعف ثلاث مرات خلال السنوات المعروضة. +3. باستخدام ناتج محلي أقل من 300 مليار دولار، اجعل الناتج يصير أكثر من ثلاثة أمثاله خلال السنوات المعروضة. ## Intuition -قاعدة السبعين حل مختصر لسؤال يحتاج عادة إلى لوغاريتمات. عند معدل نمو ثابت، كم سنة حتى يتضاعف شيء ما؟ الحيلة أن معدل نمو قدره $g$ بالمئة يقابله زمن تضاعف قدره $70/g$ سنة تقريبًا. اقسم 70 على النسبة المئوية فيظهر الجواب دون آلة حاسبة، لأن $\ln 2 \approx 0.693$ وأن $69.3 \approx 70$ قريب بما يكفي لتقدير سريع. +قاعدة السبعين طريق مختصر لسؤال يحتاج عادة إلى لوغاريتمات. عند معدل نمو ثابت، كم سنة حتى يتضاعف شيء ما؟ الفكرة أن معدل نمو قدره $g$ بالمئة يقابله زمن تضاعف قدره $70/g$ سنة تقريبًا. اقسم 70 على النسبة المئوية فيظهر الجواب دون آلة حاسبة، لأن $\ln 2 \approx 0.693$ وأن $69.3 \approx 70$ قريب بما يكفي لتقدير سريع. -تُظهر الأمثلة الثلاثة أعلاه مدى تأرجح ذلك التقدير بشدة مع «معدل النمو السنوي g». يحتاج الاقتصاد البطيء 1.5% نحو 47 سنة ليتضاعف، ويحتاج الاقتصاد الناشئ 5% نحو 14 سنة، ويحتاج الاقتصاد السريع 9% أقل من 8 سنوات. معدل نمو أكبر بست مرات فقط يقلّص زمن التضاعف بمقدار ست مرات، لأن زمن التضاعف يتناسب مع $1/g$، لا مع منحنى أكثر تدرجًا. +تُظهر الأمثلة الثلاثة أعلاه كم يتغير هذا التقدير مع «معدل النمو السنوي g». يحتاج الاقتصاد البطيء 1.5% نحو 47 سنة ليتضاعف، ويحتاج الاقتصاد الناشئ 5% نحو 14 سنة، ويحتاج الاقتصاد السريع 9% أقل من 8 سنوات. معدل نمو أكبر بست مرات فقط يجعل زمن التضاعف سدس ما كان، لأن زمن التضاعف يتناسب مع $1/g$. ## Formal @@ -58,13 +58,17 @@ charts: [] ## Real world ### معجزات النمو -حافظت عدة اقتصادات سريعة النمو في أواخر القرن العشرين على «معدل نمو سنوي g» قرب 9-10% لعقود، فتضاعف ناتجها كل 7 إلى 8 سنوات تقريبًا، وتيرة حوّلت اقتصادات متواضعة إلى اقتصادات كبرى خلال حياة عملية واحدة. + +حافظت عدة اقتصادات سريعة النمو في أواخر القرن العشرين على «معدل نمو سنوي g» قرب 9-10% لعقود، فتضاعف ناتجها كل 7 إلى 8 سنوات تقريبًا، وهذه سرعة حوّلت اقتصادات صغيرة إلى اقتصادات كبرى خلال عمر جيل واحد. ### قاعدة الاثنين وسبعين + يستخدم البعض 72 بدل 70، لأن 72 يقبل القسمة بالتساوي على أرقام صغيرة أكثر (2 و3 و4 و6 و8 و9 و12). هذه مقايضة بسيطة مقابل تقدير أقل دقة قليلًا عند «معدل نمو سنوي g» منخفض جدًا. ### تضاعف السكان + ينطبق اختصار $d \approx 70/g$ نفسه بالضبط على أي نمو نسبي مئوي ثابت، بما فيه السكان. بلد ينمو سكانه 2% سنويًا يتضاعف عدد سكانه خلال نحو الـ35 سنة نفسها التي يستغرقها ناتج محلي ينمو 2% ليتضاعف. ### الناتج للفرد الواحد + تضاعف «الناتج» الإجمالي ليس مثل تضاعف مستوى المعيشة. فإن كان السكان ينمون أيضًا، ينمو الناتج المحلي للفرد أبطأ من الناتج الإجمالي، فتقدير قاعدة السبعين هنا يجيب عن «كم سنة حتى يتضاعف الاقتصاد كله»، لا «كم سنة حتى يتحسن وضع كل فرد ضعفين». diff --git a/content/lessons/economics/gdp-and-growth/en.md b/content/lessons/economics/gdp-and-growth/en.md index a7fb71bd..405b687e 100644 --- a/content/lessons/economics/gdp-and-growth/en.md +++ b/content/lessons/economics/gdp-and-growth/en.md @@ -20,9 +20,9 @@ charts: [] ## Try it -1. Set «years elapsed t» to 0. Output equals «today's GDP p» exactly — no growth has had time to compound yet. -2. Raise «annual growth rate g» from a slow 1.5% toward a fast 9%. The rule-of-70 doubling estimate drops sharply — growing six times faster means doubling in a fraction of the time, not just six times less time saved. -3. Push «years elapsed t» out past the doubling estimate. Output crosses roughly double «today's GDP p», confirming the estimate was on track. +1. Set «years elapsed t» to 0. Output Y reads 500, exactly «today's GDP p» — no growth has had time to compound yet. +2. Set «annual growth rate g» to a slow 1.5: the rule-of-70 doubling estimate d reads 46.7 years. Now set it to a fast 9: d drops to 7.8 years — growing six times faster means doubling in one sixth of the time. +3. Keep g at 9 and set «years elapsed t» to 9, just past the doubling estimate. Output Y reads 1086, a little more than double «today's GDP p», confirming the estimate was on track. ## Real-life examples @@ -61,13 +61,17 @@ The rule of 70 is not exact, but it stays close across realistic growth rates: a ## Real world ### Growth miracles + Several fast-growing economies in the late 20th century sustained «annual growth rate g» near 9–10% for decades, doubling their output roughly every 7 to 8 years — a pace that turned modest economies into major ones within a single working lifetime. ### The rule of 72 + Some use 72 instead of 70, since 72 divides evenly by more small numbers (2, 3, 4, 6, 8, 9, 12) — a minor convenience trade for a slightly less accurate estimate at very low «annual growth rate g». ### Population doubling + The exact same $d \approx 70/g$ shortcut applies to any steady percentage growth, including population — a country growing at 2% a year doubles its population in about the same 35 years that a 2% GDP growth rate would take to double output. ### Output per person + Total «output» doubling is not the same as living standards doubling: if population is also growing, GDP per person grows more slowly than total GDP, so the rule-of-70 estimate here answers "how long until the whole economy is twice as big," not "how long until each person is twice as well off." diff --git a/content/lessons/economics/gdp-and-growth/lesson.yaml b/content/lessons/economics/gdp-and-growth/lesson.yaml index 2a6e2a6a..ec4f941f 100644 --- a/content/lessons/economics/gdp-and-growth/lesson.yaml +++ b/content/lessons/economics/gdp-and-growth/lesson.yaml @@ -25,7 +25,7 @@ parameters: max: 12 step: 0.25 value: 3 - unit: "%/yr" + unit: '%/yr' t: min: 0 max: 60 diff --git a/content/lessons/economics/inflation/ar.md b/content/lessons/economics/inflation/ar.md index f980cb04..7dbed66e 100644 --- a/content/lessons/economics/inflation/ar.md +++ b/content/lessons/economics/inflation/ar.md @@ -19,15 +19,15 @@ charts: ## Try it -1. راقب الورقة النقدية. تُظهر كم يستطيع مبلغ ثابت قدره 100 شراءه بعد $x$ سنة من ارتفاع الأسعار — والأرغفة في الأسفل تعدّ ذلك. -2. ارفع $p$، معدّل التضخم. تنكمش الورقة أسرع بكثير، فحتى نسبة إضافية بسيطة تُنقص المدّخرات كثيرًا خلال عقود. -3. الآن حرّك $x$ (عدد السنوات) إلى الأمام. معدّل التضخم نفسه يستمر بتآكل قيمة مالك كلما طال الوقت. +1. انظر إلى الورقة النقدية. تُظهر كم يشتري مبلغ ثابت قدره 100 بعد $x$ سنة من ارتفاع الأسعار، والأرغفة في الأسفل تعدّ ذلك. عند $p$ = 3 و $x$ = 20 تعرض قراءة «القوة الشرائية للمئة» 55.4 وتعرض قراءة «مؤشر الأسعار» 181. +2. اضبط $p$، معدّل التضخم، على 8. تصغر الورقة أسرع بكثير: تنزل القوة الشرائية إلى 21.5 ويصعد مؤشر الأسعار إلى 466، فزيادة قليلة في النسبة تُنقص المدّخرات كثيرًا خلال عشرات السنين. +3. الآن أعد $p$ إلى 3 واضبط $x$ (عدد السنوات) على 40. تعرض القوة الشرائية 30.7: معدّل التضخم نفسه يظل يُنقص قيمة مالك كلما طال الوقت. ## Real-life examples -1. **معدّل تضخم اقتصاد متقدّم.** بمعدّل ثابت 2% سنويًا لمدة 20 سنة، يفقد معاش متقاعد ثابت نحو ثلث قدرته الشرائية بهدوء، رغم أن الرقم على الشيك لا يتغيّر أبدًا. -2. **اقتصاد ناشئ سريع النمو.** بمعدّل 8% سنويًا، تدّخر أسرة لشراء سيارة على مدى 10 سنوات. تراقب الأسعار وهي ترتفع بوضوح كل عام، فيتآكل جزء ممّا تستطيع مدّخراتها شراءه لاحقًا. -3. **أزمة عملة.** بمعدّل 20% سنويًا، تفقد مدّخرات أسرة قيمتها الحقيقية بسرعة. بعد 5 سنوات فقط، يشتري الكوم النقدي نفسه أقل بوضوح من نصف ما كان يشتريه. +1. **معدّل تضخم اقتصاد متقدّم.** بمعدّل ثابت 2% سنويًا لمدة 20 سنة، يفقد معاش متقاعد ثابت نحو ثلث قدرته الشرائية دون أن يشعر صاحبه، رغم أن الرقم على الشيك لا يتغيّر أبدًا. +2. **اقتصاد ناشئ سريع النمو.** بمعدّل 8% سنويًا، تدّخر أسرة لشراء سيارة على مدى 10 سنوات. ترتفع الأسعار كل عام، وبعد 10 سنوات تشتري كل 100 ريال ادّخرتها ما كانت تشتريه نحو 46 ريالًا فقط. +3. **أزمة عملة.** بمعدّل 20% سنويًا، تفقد مدّخرات أسرة قيمتها الحقيقية بسرعة. بعد 5 سنوات فقط، تشتري كل 100 ريال ما كانت تشتريه نحو 40 ريالًا فقط، أي أقل من النصف. ## Test yourself @@ -37,9 +37,9 @@ charts: ## Intuition -لنفترض أن رغيف الخبز يكلّف اليوم ريالين، وترتفع الأسعار بمعدّل $p$، أي معدّل التضخم، مضبوطًا على 8% سنويًا على المنزلق. الورقة المنكمشة على الشاشة تُظهر $V$: كم يستطيع مبلغ 100 وحدة نقدية أصلي شراءه بعد $x$ سنة. حرّك $x$ إلى الأمام فتنكمش الورقة على المسار المركّب نفسه الذي يصعد به النمو، لكن معكوسًا، إذ المعدّل نفسه الذي كان يشتري رغيفًا كاملًا يشتري شريحة أصغر منه كل سنة تمرّ. +لنفترض أن رغيف الخبز يكلّف اليوم ريالين، وترتفع الأسعار بمعدّل $p$، أي معدّل التضخم، مضبوطًا على 8% سنويًا على المنزلق. الورقة النقدية على الشاشة تُظهر $V$: كم تشتري ورقة المئة بعد $x$ سنة. حرّك $x$ إلى الأمام فتصغر الورقة بالطريقة نفسها التي ينمو بها المال في الفائدة المركّبة، لكن بالعكس: النقود نفسها التي كانت تشتري رغيفًا كاملًا تشتري قطعة أصغر منه كل سنة تمرّ. -الآن ارفع $p$ بدلًا من ذلك. حتى معدّل يبدو متواضعًا يقلّص الورقة أسرع بكثير إن استمر عقودًا، لأن زيادات سنوية صغيرة تتراكم فوق بعضها باستمرار. تُظهر بطاقة سعر السلّة الصورة المعاكسة، إذ يصعد ثمن السلع نفسها كلما تراكم $p$. قدرة المال على الشراء تنخفض بالسرعة نفسها التي يرتفع بها سعر تلك السلع. +الآن ارفع $p$ بدلًا من ذلك. حتى معدّل يبدو صغيرًا يصغّر الورقة أسرع بكثير إن استمر عقودًا، لأن زيادات سنوية صغيرة تتراكم فوق بعضها باستمرار. تُظهر بطاقة سعر السلّة الصورة المعاكسة، إذ يصعد ثمن السلع نفسها كلما تراكم $p$. قدرة المال على الشراء تنخفض بالسرعة نفسها التي يرتفع بها سعر تلك السلع. ## Formal @@ -70,17 +70,21 @@ $V = \dfrac{100}{(1+p/100)^x}$، بينما يرتفع الرقم القياسي ## Real world ### فاتورة البقالة + بتضخم 3%، سلّة تكلف اليوم 100 تكلف نحو 180 بعد 20 سنة، حتى لو لم يتغيّر ما تحويه. ### مدّخرات تحت الفراش + النقد المحتفَظ به دون فائدة يفقد قوته الشرائية كل سنة ترتفع فيها الأسعار، وهذا ظاهر مباشرة في ورقة هذا الدرس المنكمشة. ### التفاوض على الأجور + يتفاوض العمّال على زيادات تفوق التضخم كي يروا زيادة حقيقية فيما يشتريه أجرهم، لا زيادة اسمية فقط. ### نوبات التضخم المفرط + شهدت ألمانيا زمن فايمار، وحديثًا فنزويلا وزيمبابوي، تضاعف الأسعار خلال -أيام لا عقود، حتى صار النقد شبه عديم القيمة خلال أسابيع. +أيام أو أسابيع لا عقود، حتى صار النقد شبه عديم القيمة خلال أسابيع. diff --git a/content/lessons/economics/inflation/en.md b/content/lessons/economics/inflation/en.md index 6f46a52e..7f8dbf0e 100644 --- a/content/lessons/economics/inflation/en.md +++ b/content/lessons/economics/inflation/en.md @@ -20,15 +20,15 @@ charts: ## Try it -1. Watch the note. It shows how much a fixed 100 can still buy after $x$ years of rising prices — the loaves below count it out. -2. Drag $p$ (inflation rate) up. The note shrinks much faster — even a couple of extra percent erodes savings a lot over decades. -3. Now drag $x$ (years elapsed) forward. The same inflation rate keeps eating away at your money's value the longer it continues. +1. Watch the note. It shows how much a fixed 100 can still buy after $x$ years of rising prices — the loaves below count it out. With $p$ = 3 and $x$ = 20, "buying power of 100" reads 55.4 and the price index reads 181. +2. Set $p$ (inflation rate) to 8. The note shrinks much faster: buying power drops to 21.5 and the price index climbs to 466 — a few extra percent erodes savings a lot over decades. +3. Now put $p$ back to 3 and set $x$ (years elapsed) to 40. Buying power reads 30.7: the same inflation rate keeps eating away at your money's value the longer it continues. ## Real-life examples 1. **A developed economy's inflation target.** At a steady 2% a year for 20 years, a retiree's fixed pension quietly loses about a third of its buying power, even though the number on the check never changes. -2. **A fast-growing emerging economy.** At 8% a year, a family saving for a car over 10 years watches prices creep up noticeably every year, eating into how much their savings can eventually buy. -3. **A currency crisis.** At 20% a year, a household's savings lose real value fast: after just 5 years, the same pile of cash buys distinctly less than half of what it used to. +2. **A fast-growing emerging economy.** At 8% a year, a family saving for a car over 10 years watches prices climb every year: after 10 years each 100 saved buys only what about 46 used to. +3. **A currency crisis.** At 20% a year, a household's savings lose real value fast: after just 5 years, each 100 of cash buys only what about 40 used to, less than half. ## Test yourself @@ -38,7 +38,7 @@ charts: ## Intuition -Suppose a loaf of bread costs 2 today, and prices climb by $p$, the inflation rate, set to 8% a year on the slider. The shrinking note on screen shows $V$: how much your original 100 currency units can still buy after $x$ years. Drag $x$ forward and the note shrinks along the same compound path that growth climbs, only in reverse — the same rate that used to buy a whole loaf buys a smaller slice of it every year that passes. +Suppose a loaf of bread costs 2 today, and prices climb by $p$, the inflation rate, set to 8% a year on the slider. The shrinking note on screen shows $V$: how much your original 100 currency units can still buy after $x$ years. Drag $x$ forward and the note shrinks along the same compound path that growth climbs, only in reverse — the same coins that used to buy a whole loaf buy a smaller slice of it every year that passes. Now raise $p$ instead: even a rate that sounds modest, kept up for decades, shrinks the note much faster, because small yearly increases keep stacking on top of each other. The basket's price tag shows the mirror image: the cost of the same goods, marching upward as $p$ compounds — money's power to buy things falls exactly as fast as the price tag on those things rises. @@ -72,17 +72,21 @@ it cannot otherwise finance. ## Real world ### Grocery bills + At 3% inflation, a basket costing 100 today costs about 180 in 20 years, even with no change in what is bought. ### Savings under a mattress + Cash held without earning interest loses purchasing power every year prices rise, visible directly in this lesson's shrinking note. ### Wage negotiations + Workers negotiate for raises above inflation to see a real increase in what their pay can buy, not just a nominal one. ### Hyperinflation episodes + Weimar Germany and more recently Venezuela and Zimbabwe saw prices double -in days rather than decades, making cash nearly worthless within weeks. +in days or weeks rather than decades, making cash nearly worthless within weeks. diff --git a/content/lessons/economics/inflation/lesson.yaml b/content/lessons/economics/inflation/lesson.yaml index 36c1a5be..c790930a 100644 --- a/content/lessons/economics/inflation/lesson.yaml +++ b/content/lessons/economics/inflation/lesson.yaml @@ -20,7 +20,7 @@ parameters: max: 20 step: 0.25 value: 3 - unit: "%" + unit: '%' x: min: 0 max: 40 diff --git a/content/lessons/economics/loan-amortization/ar.md b/content/lessons/economics/loan-amortization/ar.md index 3828a936..e7609f57 100644 --- a/content/lessons/economics/loan-amortization/ar.md +++ b/content/lessons/economics/loan-amortization/ar.md @@ -24,27 +24,27 @@ charts: ## Try it -1. راقب الأعمدة: كل عمود هو الدفعة الشهرية نفسها، لكن شريحة الفائدة الحمراء تلتهم معظمه في البداية. الخط الرفيع هو الرصيد، ويبدأ بكامل مبلغ القرض. -2. حرّك $x$ (الأشهر المنقضية) إلى الأمام. تكبر شريحة أصل الدين الخضراء شهرًا بعد شهر، والراية المتقطعة تعلّم شهر الانقلاب حيث تتفوق على الفائدة أول مرة. -3. الآن ارفع $L$ أو $r$ بدلًا من ذلك. تسمن الشرائح الحمراء وينزلق شهر الانقلاب لاحقًا — قرض أكبر أو معدّل أعلى يبقيك في أرض الفائدة أطول. +1. انظر إلى الأعمدة: كل عمود هو الدفعة الشهرية نفسها، لكن جزء الفائدة الأحمر يأخذ معظمه في البداية. الخط الرفيع هو الرصيد، ويبدأ بكامل مبلغ القرض. عند الشهر 60 تعرض القراءات دفعة شهرية 716، منها 426 فائدة و290 فقط لأصل الدين. +2. اضبط $x$ (عدد الأشهر التي مضت) على 120. كبر جزء أصل الدين الأخضر إلى 392 وصغرت الفائدة إلى 325. العلامة المتقطعة تحدّد الشهر 103، وهو أول شهر يزيد فيه أصل الدين على الفائدة. +3. الآن ارفع $r$ إلى 10. تكبر الأجزاء الحمراء وتتأخر العلامة من الشهر 103 إلى الشهر 158، فالمعدّل الأعلى يجعل معظم دفعتك فائدة مدة أطول. أما رفع $L$ فيكبّر كل دفعة لكنه لا يغيّر القسمة ولا مكان العلامة. ## Real-life examples -1. **رهن عقاري مدته 30 سنة بمبلغ 250,000 ريال.** بفائدة 6%، لا يزال الرصيد بعد سنتين كما هو تقريبًا. دفع المقترض آلاف الريالات فائدة قبل أن يُنقص أصل الدين فعليًا. -2. **قرض سيارة مدته 5 سنوات بمبلغ 25,000 ريال.** بفائدة 7%، ينخفض الرصيد بعد سنة واحدة أسرع ممّا في الرهن العقاري، بفضل المدة الأقصر. ومع ذلك تبقى حصة كبيرة من كل دفعة فائدة. -3. **قرض شخصي مدته سنتان بمبلغ 5,000 ريال.** بفائدة 12%، ينخفض الرصيد بعد ستة أشهر بسرعة نسبية رغم ارتفاع المعدّل، لأن مدة القرض قصيرة. +1. **قرض عقاري مدته 30 سنة بمبلغ 250000 ريال.** بفائدة 6%، لا يزال الرصيد بعد سنتين كما هو تقريبًا: نحو 243700 ريال. دفع المقترض قرابة 30000 ريال فائدة قبل أن ينقص أصل الدين نقصًا يُذكر. +2. **قرض سيارة مدته 5 سنوات بمبلغ 25000 ريال.** بفائدة 7%، ينخفض الرصيد بعد سنة واحدة أسرع ممّا في القرض العقاري، بفضل المدة الأقصر. ومع ذلك يذهب نحو ربع كل دفعة (123 من 495 ريالًا) إلى الفائدة. +3. **قرض شخصي مدته سنتان بمبلغ 5000 ريال.** بفائدة 12%، ينخفض الرصيد بعد ستة أشهر إلى نحو 3860 ريالًا رغم ارتفاع المعدّل، لأن مدة القرض قصيرة. ## Test yourself 1. جِد الشهر الذي يُسدَّد فيه نصف مبلغ القرض الأصلي بالضبط. 2. جِد معدّلًا ومدة قرض يبقى عندهما أكثر من 55% من القرض غير مسدّد عند منتصف المدة بالضبط. هذا دليل على بطء السداد في البداية. -3. حتى بعد مرور ثلث مدة القرض، جِد معدّلًا مرتفعًا كافيًا يبقي أكثر من 90% من القرض غير مسدّد. +3. جِد معدّلًا مرتفعًا يُبقي أكثر من 90% من القرض غير مسدّد حتى بعد مرور ثلث مدة القرض. ## Intuition -خذ رهنًا عقاريًا بمبلغ 250,000 ريال وفائدة 6% على مدى 30 سنة، أي 360 شهرًا. في الدفعة الأولى وحدها يكون أكثر من 1,000 ريال فائدة، ولا يُنقص المبلغ المستحق فعليًا سوى جزء صغير. الخط الرفيع على الشاشة، $B$، هو بالضبط ذلك الرصيد المتبقي، ينحدر عبر الأعمدة مع تقدّم $x$، أي عدد الأشهر منذ بدء القرض. حرّك $x$ من الصفر إلى الأمام وشاهد الرصيد بالكاد يتحرك في البداية، ثم ينخفض أسرع فأسرع كلما اقترب من نهاية المدة. +خذ قرضًا عقاريًا بمبلغ 250000 ريال وفائدة 6% على مدى 30 سنة، أي 360 شهرًا. في الدفعة الأولى وحدها يكون أكثر من 1000 ريال فائدة، ولا يُنقص الدين إلا جزء صغير منها. الخط الرفيع على الشاشة، $B$، هو ذلك الرصيد المتبقي، ينزل فوق الأعمدة مع تقدّم $x$، أي عدد الأشهر منذ بدء القرض. حرّك $x$ من الصفر إلى الأمام وسترى أن الرصيد لا يكاد يتحرك في البداية، ثم ينخفض أسرع فأسرع كلما اقترب من نهاية المدة. -الآن حرّك $L$ أو $r$، مبلغ القرض أو معدّل الفائدة، إلى الأعلى بدلًا من ذلك. يرتفع منحنى الرصيد كله طوال الوقت، لأن قرضًا أكبر أو معدّلًا أعلى كلاهما يعني مبلغًا مستحقًا أكبر في أي شهر. انظر إلى الشرائح الحمراء في الأعمدة، حيث يذهب معظم الدفعة الشهرية الثابتة في البداية للفائدة، ولا يُنقص الرصيد إلا جزء صغير. لهذا بالضبط لا تُنقص السنوات الأولى من الرهن العقاري المبلغ المستحق كثيرًا. +الآن ارفع $r$، معدّل الفائدة. يرتفع خط الرصيد كله، لأن المعدّل الأعلى يعني دينًا متبقيًا أكبر في أي شهر. أما القرض الأكبر $L$ فيكبّر كل دفعة لكنه لا يغيّر شكل الخط. انظر إلى الأجزاء الحمراء في الأعمدة: يذهب معظم الدفعة الشهرية الثابتة في البداية للفائدة، ولا يُنقص الرصيد إلا جزء صغير. لهذا بالضبط لا تُنقص السنوات الأولى من القرض العقاري المبلغ المستحق كثيرًا. ## Formal @@ -73,18 +73,22 @@ $\text{payment} = L\cdot\dfrac{i}{1-(1+i)^{-N}}$، وتُختار بحيث يب ## Real world -### الرهن العقاري -غالبًا ما تكون أول دفعة في رهن مدته 30 سنة فائدة بنسبة 70-80%، ولا يُنقص +### القرض العقاري + +غالبًا ما تكون أول دفعة في قرض عقاري مدته 30 سنة فائدة بنسبة 70-80%، ولا يُنقص معظم الدفعة الرصيد إلا في السنوات الأخيرة. ### قروض السيارات + مدد القروض الأقصر تحمل دفعات شهرية أعلى لكن فائدة إجمالية أقل بكثير، لأن الرصيد ينخفض أسرع. ### الدفعات الإضافية -دفع مبلغ إضافي مبكرًا في الرهن يوفّر فائدة أكثر من دفع المبلغ نفسه في + +دفع مبلغ إضافي مبكرًا في القرض العقاري يوفّر فائدة أكثر من دفع المبلغ نفسه في السنة الأخيرة. ### إعادة التمويل + تغيير القرض إلى معدّل جديد يعيد ضبط منحنى الرصيد، ولهذا قد ترفع إعادة التمويل المتأخرة إجمالي الفائدة المدفوعة. diff --git a/content/lessons/economics/loan-amortization/en.md b/content/lessons/economics/loan-amortization/en.md index 2cb17dcd..064de9df 100644 --- a/content/lessons/economics/loan-amortization/en.md +++ b/content/lessons/economics/loan-amortization/en.md @@ -25,15 +25,15 @@ charts: ## Try it -1. Watch the bars: every one is the same monthly payment, but at the start the red interest slice eats most of it. The thin line is the balance, starting at the full loan. -2. Drag $x$ (months elapsed) forward. The green principal slice grows month by month, and the dashed flag marks the tipping month where it first beats the interest. -3. Now raise $L$ or $r$ instead. The red slices fatten and the tipping month slides later — a bigger loan or a costlier rate keeps you in interest territory longer. +1. Watch the bars: every one is the same monthly payment, but at the start the red interest slice eats most of it. The thin line is the balance, starting at the full loan. At month 60 the readouts show a monthly payment of 716: 426 of it is interest and only 290 is principal. +2. Set $x$ (months elapsed) to 120. The green principal slice has grown to 392 and the interest has shrunk to 325. The dashed flag marks month 103, the tipping month where principal first beats the interest. +3. Now raise $r$ to 10. The red slices fatten and the tipping month slides from 103 to 158 — a costlier rate keeps you in interest territory longer. Raising $L$ makes every payment bigger but leaves the split and the flag where they are. ## Real-life examples -1. **A 30-year, 250,000 mortgage.** At 6% interest, two years in, the balance has barely moved — the borrower has paid thousands in interest before making a real dent in the debt. -2. **A 5-year, 25,000 car loan.** At 7%, one year in, the shorter term forces faster progress than a mortgage, but a good share of each payment still goes to interest. -3. **A 2-year, 5,000 personal loan.** At 12%, six months in, the short term forces a comparatively fast payoff despite the higher rate. +1. **A 30-year, 250,000 mortgage.** At 6% interest, two years in, the balance has barely moved: about 243,700 is still owed. The borrower has paid nearly 30,000 in interest before making a real dent in the debt. +2. **A 5-year, 25,000 car loan.** At 7%, one year in, the shorter term forces faster progress than a mortgage, but about a quarter of each 495 payment (123) still goes to interest. +3. **A 2-year, 5,000 personal loan.** At 12%, six months in, the short term forces a comparatively fast payoff despite the higher rate: the balance is already down to about 3,860. ## Test yourself @@ -45,7 +45,7 @@ charts: Take a 250,000 mortgage at 6% interest over 30 years, or 360 months: in the very first payment, well over 1,000 of it is interest, and only a small amount actually reduces what is owed. The thin line on screen, $B$, is exactly that remaining balance, sliding down across the bars as $x$, the number of months since the loan started, advances. Drag $x$ forward from zero and watch the balance barely move at first, then fall faster and faster as it nears the end of the term. -Now drag $L$ or $r$, the loan amount or the interest rate, up instead: the whole balance curve sits higher throughout, since a bigger loan or a costlier rate both mean more is still owed at any given month. Look at the red slices of the bars: early on, most of the fixed monthly payment goes to interest, and only a small remainder chips away at the balance — exactly why the first years of a mortgage barely dent what is owed. +Now drag $r$, the interest rate, up instead: the whole balance line sits higher throughout, since a costlier rate means more is still owed at any given month. A bigger loan $L$ scales every payment up but leaves the shape unchanged. Look at the red slices of the bars: early on, most of the fixed monthly payment goes to interest, and only a small remainder chips away at the balance — exactly why the first years of a mortgage barely dent what is owed. ## Formal @@ -78,17 +78,21 @@ to accrue interest. ## Real world ### Mortgages + A 30-year mortgage's first payment is often 70–80% interest; only by the final years does most of the payment reduce the balance. ### Car loans + Shorter loan terms carry higher monthly payments but far less total interest, since the balance falls faster. ### Extra payments + Paying a lump sum early in a mortgage saves more interest than the same amount paid in the final year. ### Refinancing + Resetting a loan to a new rate restarts the balance curve, which is why refinancing late in a loan can raise total interest paid. diff --git a/content/lessons/economics/loan-amortization/lesson.yaml b/content/lessons/economics/loan-amortization/lesson.yaml index 66ef856c..f1ab7407 100644 --- a/content/lessons/economics/loan-amortization/lesson.yaml +++ b/content/lessons/economics/loan-amortization/lesson.yaml @@ -23,7 +23,7 @@ parameters: max: 15 step: 0.25 value: 6 - unit: "%" + unit: '%' N: min: 12 max: 360 diff --git a/content/lessons/economics/present-value/ar.md b/content/lessons/economics/present-value/ar.md index 32c4c13a..6bfdb862 100644 --- a/content/lessons/economics/present-value/ar.md +++ b/content/lessons/economics/present-value/ar.md @@ -15,15 +15,15 @@ variables: ## Try it -1. راقب المنحنى. يُظهر كم تساوي دفعة مستقبلية اليوم، مخصومة بحسب عدد السنوات المتبقية عليها. -2. حرّك $x$، السنوات حتى الدفعة، يمينًا. تنخفض القيمة بسرعة في البداية ثم تستوي، فالمال البعيد في المستقبل يساوي اليوم مبلغًا زهيدًا. -3. الآن ارفع $r$ (معدّل الخصم). ينخفض المنحنى كله أسرع، لأن معدّلًا أعلى يجعل المال لاحقًا أقلّ قيمة الآن. +1. انظر إلى المنحنى. يُظهر كم تساوي اليوم دفعة ستُدفع في المستقبل، وتقلّ قيمتها كلما زاد عدد السنوات الباقية عليها. عند $x$ = 10 تعرض القراءة f(x) نحو 614: هذه قيمة 1000 ريال تُدفع بعد 10 سنوات. +2. اضبط $x$، عدد السنوات حتى الدفعة، على 30. تنخفض القيمة بسرعة في البداية ثم يقلّ انخفاضها: تعرض f(x) الآن نحو 231، فالمال البعيد في المستقبل يساوي اليوم مبلغًا قليلًا. +3. الآن اضبط $r$ (معدّل الخصم) على 10. ينخفض المنحنى كله أسرع وتنزل f(x) إلى نحو 57، لأن المعدّل الأعلى يجعل مال المستقبل أقلّ قيمة الآن. ## Real-life examples -1. **مكافأة عمل 2000 ريال تُدفع العام القادم.** بمعدّل خصم 5%، تساوي تلك المكافأة الموعودة اليوم نحو 1900 ريال. أي أقل بقليل فقط، لأنها بعد سنة واحدة لا أكثر. -2. **معاش يعد بـ8000 ريال بعد 20 سنة.** بمعدّل خصم 6%، تساوي تلك الدفعة المستقبلية اليوم بضعة آلاف من الريالات فقط. عقدان كاملان من الانتظار خصما معظم قيمتها الاسمية. -3. **تسوية قانونية بقيمة 10,000 ريال تُدفع على 40 سنة.** بمعدّل خصم 8%، تساوي الدفعة المستحقة في السنة الأربعين اليوم بضع مئات من الريالات فقط. لهذا يقبل كثير ممّن يستحقون تسويات كهذه مبلغًا أصغر دفعة واحدة فورًا بدلًا منها. +1. **مكافأة عمل 2000 ريال تُدفع العام القادم.** بمعدّل خصم 5%، تساوي تلك المكافأة الموعودة اليوم نحو 1905 ريالات. أي أقل بقليل فقط، لأنها بعد سنة واحدة لا أكثر. +2. **معاش يعد بـ8000 ريال بعد 20 سنة.** بمعدّل خصم 6%، تساوي تلك الدفعة المستقبلية اليوم نحو 2494 ريالًا فقط. عشرون سنة من الانتظار أذهبت معظم قيمتها. +3. **تسوية قانونية بقيمة 10000 ريال تُدفع على 40 سنة.** بمعدّل خصم 8%، تساوي الدفعة المستحقة في السنة الأربعين اليوم نحو 460 ريالًا فقط. لهذا يقبل كثير ممّن يستحقون تسويات كهذه مبلغًا أصغر دفعة واحدة فورًا بدلًا منها. ## Test yourself @@ -35,7 +35,7 @@ variables: لنفترض أن أحدهم يعرض عليك الاختيار بين 1000 ريال الآن، أو 1200 ريال بعد خمس سنوات. المنحنى على الشاشة يُظهر $V$، أي قيمة دفعة مستقبلية اليوم، مرسومًا مقابل $x$، عدد السنوات حتى تستلمها. حرّك $x$ إلى اليمين فينخفض المنحنى بسرعة في البداية، لأن دفعة بعد سنة أو سنتين تساوي تقريبًا نقدًا في يدك الآن، ثم يستوي المنحنى، لأن دفعة بعد 40 سنة تساوي اليوم مبلغًا زهيدًا مهما كبُرت. -الآن ارفع $r$، معدّل الخصم، بدلًا من ذلك. ينخفض المنحنى كله أسرع، لأن معدّلًا أعلى يعني أن المال اليوم أثمن نسبيًا من المال لاحقًا، فتُخصَم الدفعات المستقبلية بقوة أكبر. حرّك $r$ حتى تبلغ قيمة المنحنى عند $x = 5$ المبلغ 1000. هذا المعدّل بالضبط هو ما يجعل العرض أعلاه تعادلًا بين الخيارين. +الآن ارفع $r$، معدّل الخصم، بدلًا من ذلك. ينخفض المنحنى كله أسرع، لأن معدّلًا أعلى يعني أن المال اليوم أثمن نسبيًا من المال لاحقًا، فتُخصَم الدفعات المستقبلية بقوة أكبر. اضبط $F$ على 1200 و $x = 5$، ثم حرّك $r$ حتى تعرض f(x) نحو 1000 (عند $r$ = 3.75). عند هذا المعدّل يتساوى الخياران في العرض السابق. ## Formal @@ -44,7 +44,7 @@ variables: $r$ لنما تمامًا إلى $F$ في السنة $x$. القيمة الحالية عملية عكسية للنمو المركّب. فبينما يسأل الاحتساب المركّب -«بماذا سيصبح $P$؟»، يسأل الخصم «كم تساوي $F$ اليوم؟» +«كم سيصبح $P$؟»، يسأل الخصم «كم تساوي $F$ اليوم؟» ## Advanced @@ -62,17 +62,21 @@ $r$ لنما تمامًا إلى $F$ في السنة $x$. ## Real world ### جوائز اليانصيب + جائزة يانصيب مُعلَنة بـ«مليون» تُدفع على 20 سنة تساوي اليوم أقل بكثير من مليون يُدفع دفعة واحدة. ### تقييم الشركات + يقيّم المستثمرون الشركة جزئيًا بخصم أرباحها المستقبلية المتوقعة إلى قيمة حالية. ### وعود المعاشات + معاش يعد بدفعات مستقبلية ثابتة يساوي اليوم أقل حين تكون أسعار الفائدة مرتفعة، لأن تلك الدفعات تُخصَم أكثر. ### التسويات القانونية المجدولة + تسويات قانونية تُدفع على سنوات كثيرًا ما تُباع بخصم مقابل مبلغ أصغر دفعة واحدة اليوم، تعبيرًا عن القيمة الحالية. diff --git a/content/lessons/economics/present-value/en.md b/content/lessons/economics/present-value/en.md index 55c6a5b2..df6b0b59 100644 --- a/content/lessons/economics/present-value/en.md +++ b/content/lessons/economics/present-value/en.md @@ -16,15 +16,15 @@ variables: ## Try it -1. Watch the curve. It shows what a future payment is worth today, discounted by how many years away it is. -2. Drag $x$ (years until payment) to the right. The value drops fast at first, then flattens — money far in the future is worth very little today. -3. Now drag $r$ (discount rate) up. The whole curve falls faster, since a higher rate makes future money less valuable right now. +1. Watch the curve. It shows what a future payment is worth today, discounted by how many years away it is. At $x$ = 10 the readout f(x) shows about 614: that is what 1,000 paid in 10 years is worth now. +2. Set $x$ (years until payment) to 30. The value drops fast at first, then flattens: f(x) is now about 231 — money far in the future is worth very little today. +3. Now set $r$ (discount rate) to 10. The whole curve falls faster and f(x) drops to about 57, since a higher rate makes future money less valuable right now. ## Real-life examples -1. **A 2,000 work bonus paid next year.** At a 5% discount rate, that promised bonus is worth about 1,900 today — barely less, since it's only a year away. -2. **A pension promising 8,000 in 20 years.** At a 6% discount rate, that future payment is worth only a few thousand today, because decades of waiting have discounted away most of its face value. -3. **A 10,000 legal settlement paid over 40 years.** At an 8% discount rate, the payment due in year 40 is worth only a few hundred today, which is why people receiving settlements often accept a smaller lump sum right away instead. +1. **A 2,000 work bonus paid next year.** At a 5% discount rate, that promised bonus is worth about 1,905 today — barely less, since it's only a year away. +2. **A pension promising 8,000 in 20 years.** At a 6% discount rate, that future payment is worth only about 2,494 today, because decades of waiting have discounted away most of its face value. +3. **A 10,000 legal settlement paid over 40 years.** At an 8% discount rate, the payment due in year 40 is worth only about 460 today, which is why people receiving settlements often accept a smaller lump sum right away instead. ## Test yourself @@ -36,7 +36,7 @@ variables: Suppose someone offers you a choice: 1,000 today, or 1,200 in five years. The curve on screen shows $V$, what a future payment is worth right now, plotted against $x$, the number of years until you receive it. Drag $x$ to the right and the curve drops fast at first, since a payment a year or two away is worth almost as much as cash in hand, then flattens out, since a payment 40 years away is worth very little today no matter how large it is. -Now raise $r$, the discount rate, instead: the whole curve falls faster, because a higher rate means money today is worth relatively more than money later, so future payments get discounted harder. Drag $r$ until the curve's value at $x = 5$ reaches 1,000 — that rate is exactly the one that makes the offer above a toss-up. +Now raise $r$, the discount rate, instead: the whole curve falls faster, because a higher rate means money today is worth relatively more than money later, so future payments get discounted harder. Set $F$ to 1200 and $x = 5$, then drag $r$ until f(x) reads about 1,000 (at $r$ = 3.75) — that rate is the one that makes the offer above a toss-up. ## Formal @@ -65,17 +65,21 @@ project or investment is worth undertaking. ## Real world ### Lottery payouts + A lottery advertising "1 million" paid over 20 years is worth substantially less today than 1 million paid as a lump sum. ### Company valuation + Investors value a company partly by discounting its expected future profits back to a present value. ### Pension promises + A pension promising fixed future payments is worth less today when interest rates are high, since those future payments are discounted more. ### Structured settlements + Legal settlements paid over years are often sold at a discount for a smaller lump sum today, reflecting present value. diff --git a/content/lessons/economics/present-value/lesson.yaml b/content/lessons/economics/present-value/lesson.yaml index aa8a9449..455f0866 100644 --- a/content/lessons/economics/present-value/lesson.yaml +++ b/content/lessons/economics/present-value/lesson.yaml @@ -33,7 +33,7 @@ parameters: max: 15 step: 0.25 value: 5 - unit: "%" + unit: '%' x: min: 0 max: 50 diff --git a/content/lessons/economics/price-controls/ar.md b/content/lessons/economics/price-controls/ar.md index a3115b6d..103855bb 100644 --- a/content/lessons/economics/price-controls/ar.md +++ b/content/lessons/economics/price-controls/ar.md @@ -5,7 +5,7 @@ summary: >- parameters: a: a — أعلى سعر يقبل المشتري دفعه b: b — سرعة انخفاض الطلب مع ارتفاع السعر - c: c — أدنى سعر يقبل البائع بيعه + c: c — أدنى سعر يقبل به البائع d: d — سرعة ازدياد العرض مع ارتفاع السعر price: P₀ — السعر الذي يحدده القانون variables: @@ -20,27 +20,27 @@ variables: ## Try it -1. راقب تقاطع الخطّين. تلك النقطة هي سعر السوق وكميته الطبيعيان عند التوازن. -2. حرّك price، السعر الذي يحدده القانون، إلى ما دون نقطة التقاطع. تفتح فجوة بين الخطّين، هي نقص، إذ يُطلَب أكثر ممّا يُعرَض. -3. الآن حرّك price إلى ما فوق نقطة التقاطع بدلًا من ذلك. تنقلب الفجوة إلى فائض، إذ يُعرَض أكثر ممّا يُطلَب. +1. انظر إلى نقطة تقاطع الخطّين. هذه نقطة توازن السوق لو تُرك وحده: تعرض القراءات سعر التوازن 40 وكمية التوازن 50. +2. اضبط $P_0$، السعر الذي يحدده القانون، على 28، أي تحت نقطة التقاطع. تظهر فجوة بين الخطّين: الكمية المطلوبة 65 والكمية المعروضة 30، فالنقص 35. +3. الآن اضبط $P_0$ على 52، أي فوق نقطة التقاطع. تنقلب الفجوة: الكمية المعروضة 70 والكمية المطلوبة 35، فالفائض 35. ## Real-life examples -1. **تحديد الإيجارات.** مدينة تضع سقفًا للإيجار دون سعر السوق بكثير. يريد المستأجرون عند هذا السعر شققًا أكثر ممّا يرضى الملّاك بتوفيره، فيظهر نقص يتجلى في قوائم انتظار طويلة وشواغر قليلة. -2. **الحد الأدنى للأجور.** أرضية أجور فوق أجر السوق تعني أن الباحثين عن عمل بهذا الأجر أكثر ممّا يريد أصحاب العمل توظيفه. ينشأ فائض، فيبقى عمّال كانوا سيقبلون أجرًا أقل بلا عمل. +1. **تحديد الإيجارات.** مدينة تضع سقفًا للإيجار دون سعر السوق بكثير. يريد المستأجرون عند هذا السعر شققًا أكثر ممّا يرضى الملّاك بتوفيره، فيظهر نقص: قوائم انتظار طويلة وشقق خالية قليلة. +2. **الحد الأدنى للأجور.** حد أدنى للأجور أعلى من أجر السوق يعني أن الباحثين عن عمل بهذا الأجر أكثر ممّا يريد أصحاب العمل توظيفه. ينشأ فائض، فيبقى عمّال كانوا سيقبلون أجرًا أقل بلا عمل. 3. **سقف أسعار الوقود وقت الأزمات.** تجمّد حكومة سعر الوقود دون ما يحدده العرض والطلب. يريد السائقون حينها وقودًا أكثر ممّا تستطيع المحطات توفيره، فتتشكّل طوابير بدل أن يرتفع السعر. ## Test yourself 1. أوجد نقصًا مقداره 20 وحدة بالضبط بتثبيت السعر دون التوازن. 2. أوجد فائضًا يفوق 15 وحدة بتثبيت السعر فوق التوازن. -3. عدّل استعداد المشترين والبائعين للدفع بحيث يصادف السعر الثابت 50 توازن السوق نفسه، دون أي نقص أو فائض. +3. عدّل استعداد المشترين والبائعين للدفع بحيث يساوي السعر الثابت 50 سعر توازن السوق نفسه، دون أي نقص أو فائض. ## Intuition -تخيّل مدينة تُؤجَّر فيها الشقق طبيعيًا بـ40 ريالًا شهريًا عند التوازن، لكن قانونًا يحدّد سقفًا للإيجار عند 25 ريالًا فقط. حرّك خط السعر على الشاشة، $P_0$، إلى ما دون نقطة تقاطع خطّي الطلب والعرض. يريد المشترون الآن شققًا أكثر ممّا يرضى الملّاك بتوفيره عند هذا السعر المنخفض، فتصبح الفجوة بين الخطّين نقصًا، وهذا سقف السعر، ومثاله المعروف تحديد إيجار المساكن. +تخيّل مدينة تُؤجَّر فيها الشقق بـ40 ريالًا شهريًا لو تُرك السوق وحده، لكن قانونًا يحدّد سقفًا للإيجار عند 25 ريالًا فقط. حرّك خط السعر على الشاشة، $P_0$، إلى ما دون نقطة تقاطع خطّي الطلب والعرض. يريد المشترون الآن شققًا أكثر ممّا يرضى الملّاك بتوفيره عند هذا السعر المنخفض، فتصبح الفجوة بين الخطّين نقصًا، وهذا سقف السعر، ومثاله المعروف تحديد إيجار المساكن. -الآن حرّك خط السعر إلى ما فوق نقطة التقاطع بدلًا من ذلك، إلى نحو 55 ريالًا مثلًا. يريد البائعون بيع كمية أكبر ممّا يقبل المشترون شراءه عند هذا السعر المرتفع، فتصبح الفجوة فائضًا. هذا أرضية السعر، والحد الأدنى للأجور فوق أجر السوق يعمل بالطريقة نفسها في سوق العمل، إذ يكون «البائعون» هم العمّال الباحثون عن عمل. +الآن حرّك خط السعر إلى ما فوق نقطة التقاطع بدلًا من ذلك، إلى نحو 55 ريالًا مثلًا. يريد البائعون بيع كمية أكبر ممّا يقبل المشترون شراءه عند هذا السعر المرتفع، فتصبح الفجوة فائضًا. هذا هو الحد الأدنى للسعر، والحد الأدنى للأجور فوق أجر السوق يعمل بالطريقة نفسها في سوق العمل، إذ يكون «البائعون» هم العمّال الباحثون عن عمل. ## Formal @@ -71,17 +71,21 @@ variables: ## Real world ### تحديد الإيجارات + مدن تضع سقفًا للإيجارات دون سعر السوق كثيرًا ما تشهد قوائم انتظار طويلة وإحجام الملّاك عن صيانة الوحدات أو عرضها. ### الحد الأدنى للأجور -أرضية أجور فوق سعر السوق ترفع دخل من يبقى في عمله، لكن أثرها في توظيف + +حد أدنى للأجور أعلى من أجر السوق يرفع دخل من يبقى في عمله، لكن أثرها في توظيف العمالة قليلة المهارة موضع جدل. ### سقف أسعار الوقود + حكومات تضع سقفًا لسعر الوقود وقت الأزمات غالبًا ترى طوابير عند المحطات بدل ارتفاع السعر. ### تقنين زمن الحرب + سقوف أسعار المواد الأساسية وقت النقص أدّت إلى بطاقات تموين توزّع الكمية الشحيحة مباشرة. diff --git a/content/lessons/economics/price-controls/en.md b/content/lessons/economics/price-controls/en.md index a468dd55..2ebf60c2 100644 --- a/content/lessons/economics/price-controls/en.md +++ b/content/lessons/economics/price-controls/en.md @@ -21,9 +21,9 @@ variables: ## Try it -1. Watch the two lines cross. That crossing point is the market's natural equilibrium price and quantity. -2. Drag price (the price fixed by law) below the crossing point. A gap opens between the lines: a shortage, more is demanded than supplied. -3. Now drag price above the crossing point instead. The gap flips: a surplus, more is supplied than demanded. +1. Watch the two lines cross. That crossing point is the market's natural equilibrium: the readouts show equilibrium price 40 and equilibrium quantity 50. +2. Set $P_0$ (the price fixed by law) to 28, below the crossing point. A gap opens between the lines: quantity demanded 65, quantity supplied 30, a shortage of 35. +3. Now set $P_0$ to 52, above the crossing point. The gap flips: quantity supplied 70, quantity demanded 35, a surplus of 35. ## Real-life examples @@ -74,17 +74,21 @@ employment is smaller than simple theory predicts. ## Real world ### Rent control + Cities that cap rents below market level often see long waiting lists and landlords reluctant to maintain or offer units. ### Minimum wage + A wage floor above the market rate raises pay for those still employed but is debated for its effect on low-skill hiring. ### Fuel price caps + Governments capping fuel prices during shortages often see queues at petrol stations instead of prices rising. ### Wartime rationing + Price ceilings on staple foods during shortages led to ration cards allocating the scarce supply directly. diff --git a/content/lessons/economics/risk-and-diversification/ar.md b/content/lessons/economics/risk-and-diversification/ar.md index 32a46fd9..c6cef373 100644 --- a/content/lessons/economics/risk-and-diversification/ar.md +++ b/content/lessons/economics/risk-and-diversification/ar.md @@ -16,15 +16,15 @@ charts: [] ## Try it -1. اجعل «عدد الأسهم n» يساوي 1. تساوي مخاطرة المحفظة «تذبذب السهم الواحد v» تمامًا. لا تنويع إطلاقًا بسهم واحد. -2. ارفع «عدد الأسهم n» نحو 30. تنخفض مخاطرة المحفظة كثيرًا دون تذبذب السهم الواحد، رغم أن متوسط العائد المتوقع لم يتغير. -3. ارفع «الارتباط المتوسط c» نحو 0.8. حتى مع أسهم كثيرة، تتوقف مخاطرة المحفظة عن الانخفاض كثيرًا. الأسهم المرتبطة تميل إلى الهبوط معًا، فيتوقف توزيع المال عليها عن الإفادة كما كان. +1. اجعل «عدد الأسهم n» يساوي 1. تعرض مخاطرة المحفظة w القيمة 35%، أي «تذبذب السهم الواحد v» تمامًا. لا تنويع إطلاقًا بسهم واحد. +2. ارفع «عدد الأسهم n» إلى 30. تنخفض مخاطرة المحفظة w إلى 19.9%، أي أقل كثيرًا من 35% للسهم الواحد، رغم أن متوسط العائد المتوقع لم يتغير. +3. ارفع «الارتباط المتوسط c» إلى 0.8. حتى مع 30 سهمًا تعود مخاطرة المحفظة w فترتفع إلى 31.4%. الأسهم المرتبطة تهبط معًا في الغالب، فلا ينفع توزيع المال عليها كما كان ينفع. ## Real-life examples -1. **سهم ساخن واحد.** المراهنة بكل المال على سهم تقني متقلب واحد بتذبذب 45%، وn = 1. مخاطرة المحفظة هي الـ45% كاملة، بالضبط كخطورة السهم نفسه. +1. **سهم واحد رائج.** وضع المال كله في سهم واحد متقلب لشركة تقنية بتذبذب 45%، وn = 1. مخاطرة المحفظة هي الـ45% كاملة، مثل مخاطرة السهم نفسه تمامًا. 2. **محفظة مبتدئة.** توزيع المبلغ نفسه على 10 أسهم بارتباط متوسط 0.3. تنخفض مخاطرة المحفظة إلى نحو 27.4%، انخفاض كبير مقابل متوسط العائد نفسه. -3. **توزيع يشبه صندوق المؤشرات.** التوزيع على 30 سهمًا بالارتباط نفسه 0.3. تنخفض مخاطرة المحفظة إلى نحو 25.6% فقط، بالكاد أقل من حالة العشرة أسهم، لأن الجزء المرتبط من المخاطرة لا يمكن التخلص منه بالتنويع. +3. **توزيع يشبه صندوق المؤشرات.** التوزيع على 30 سهمًا بالارتباط نفسه 0.3. تنخفض مخاطرة المحفظة إلى نحو 25.6% فقط، وهذا لا يكاد يقل عن حالة الأسهم العشرة، لأن الجزء المرتبط من المخاطرة لا يمكن التخلص منه بالتنويع. ## Test yourself @@ -34,9 +34,9 @@ charts: [] ## Intuition -مخاطرة كل سهم هي في الحقيقة مخاطرتان مدمجتان معًا. جزء منها هو حظ الشركة الخاص السيئ، كحريق في مصنع أو إطلاق منتج فاشل أو دعوى قضائية، ولا علاقة له بأي شركة أخرى، فتوزيع المال على أسهم أكثر فأكثر يُلاشيه تقريبًا بالكامل بالمتوسط. أما الجزء الآخر فيتحرك مع السوق أو الاقتصاد كله، كركود أو قفزة في أسعار الفائدة أو صدمة نفطية، ويشعر به كل سهم بدرجة ما، فلا يستطيع أي قدر من التوزيع محوه. هذا الجزء المشترك بالضبط هو ما يقيسه «الارتباط المتوسط c». +مخاطرة كل سهم هي في الحقيقة مخاطرتان مجتمعتان. جزء منها هو سوء حظ يصيب الشركة وحدها، كحريق في مصنع أو إطلاق منتج فاشل أو دعوى قضائية، ولا علاقة له بأي شركة أخرى، فتوزيع المال على أسهم أكثر فأكثر يكاد يزيله تمامًا. أما الجزء الآخر فيتحرك مع السوق أو الاقتصاد كله، كركود أو قفزة في أسعار الفائدة أو صدمة نفطية، ويشعر به كل سهم بدرجة ما، فلا يزيله التوزيع مهما كثرت الأسهم. هذا الجزء المشترك بالضبط هو ما يقيسه «الارتباط المتوسط c». -لهذا تكون القفزة من سهم واحد إلى 10 أسهم في الأمثلة أعلاه كبيرة، من 45% إلى 27.4%، معظمها اختفاء المخاطرة الخاصة بالشركة. بينما الانتقال من 10 أسهم إلى 30 بالكاد يحرك الرقم، من 27.4% إلى 25.6% فقط. ما تبقى قرب 25% قريب من الحد الأدنى الذي تفرضه المخاطرة المرتبطة، $v\sqrt{c} \approx 24.6\%$ هنا، ولا يخفضه كثيرًا أي عدد إضافي من الأسهم بالارتباط نفسه. +لهذا تكون القفزة من سهم واحد إلى 10 أسهم في الأمثلة أعلاه كبيرة، من 45% إلى 27.4%، معظمها اختفاء المخاطرة الخاصة بالشركة. أما الانتقال من 10 أسهم إلى 30 فلا يكاد يغيّر الرقم، من 27.4% إلى 25.6% فقط. ما تبقى قرب 25% قريب من الحد الأدنى الذي تفرضه المخاطرة المرتبطة، $v\sqrt{c} \approx 24.6\%$ هنا، ولا يخفضه كثيرًا أي عدد إضافي من الأسهم بالارتباط نفسه. ## Formal @@ -51,19 +51,23 @@ charts: [] ## Derivation 1. مخاطرة المحفظة هي تذبذب السهم الواحد مضروبًا في مزيج من نصيب قابل للتنويع ونصيب مرتبط: $w = v\sqrt{\dfrac{1}{n} + \left(1-\dfrac{1}{n}\right)c}$. -2. بسهم واحد فقط، لا شيء يتوزع، فتنكمش الصيغة إلى تذبذب السهم نفسه: مع $n \to 1$، $w \to v$. +2. بسهم واحد فقط، لا شيء يتوزع، فتصير الصيغة تذبذب السهم نفسه: مع $n \to 1$، $w \to v$. 3. بأسهم كثيرة جدًا، يتلاشى الجزء القابل للتنويع نحو الصفر ولا يبقى إلا الجزء المشترك المرتبط: مع $n \to \infty$، $w \to v\sqrt{c}$. ## Real world ### صناديق المؤشرات + يرفع صندوق يضم مئات أو آلاف الأسهم «عدد الأسهم n» إلى أقصى ما يمكن تقريبًا، فيحصل على معظم تخفيض المخاطرة القابلة للتنويع بصفقة شراء واحدة بدل شراء عشرات الأسهم واحدًا تلو الآخر. ### التنويع الدولي + تميل أسهم من دول وقطاعات مختلفة إلى «ارتباط متوسط c» أقل فيما بينها من أسهم القطاع نفسه، ولهذا فإن التوزيع عبر الجغرافيا والقطاعات، لا مجرد عبر شركات أكثر، هو ما يخفض الحد الأدنى للمخاطرة المرتبطة نفسه. ### الانهيارات وقفزات الارتباط + خلال أزمة مالية، يميل «الارتباط المتوسط c» إلى الارتفاع بحدة إذ يهبط كل شيء تقريبًا معًا، وهذه بالضبط اللحظة التي تتقلص فيها فائدة التنويع أكثر ما تكون، وهي اللحظة التي كان المستثمرون في أمسّ الحاجة فيها إلى تلك الفائدة. ### التركّز الزائد («التنويع الكاذب») -إضافة أسهم أكثر من القطاع نفسه بالكاد تخفض «الارتباط المتوسط c»، فقد تضم محفظة عشرات الأسهم وتظل تحمل معظم مخاطرة قطاع واحد. العدد وحده ليس تنويعًا حقيقيًا. + +إضافة أسهم أكثر من القطاع نفسه لا تكاد تخفض «الارتباط المتوسط c»، فقد تضم محفظة عشرات الأسهم وتظل تحمل معظم مخاطرة قطاع واحد. العدد وحده ليس تنويعًا حقيقيًا. diff --git a/content/lessons/economics/risk-and-diversification/en.md b/content/lessons/economics/risk-and-diversification/en.md index ab4ca2a0..4f37abde 100644 --- a/content/lessons/economics/risk-and-diversification/en.md +++ b/content/lessons/economics/risk-and-diversification/en.md @@ -19,9 +19,9 @@ charts: [] ## Try it -1. Set «number of stocks n» to 1. Portfolio risk equals «single-stock volatility v» exactly — no diversification at all with just one stock. -2. Raise «number of stocks n» toward 30. Portfolio risk drops well below the single stock's volatility, even though the average expected return has not changed. -3. Raise «average correlation c» toward 0.8. Even with many stocks, portfolio risk stops shrinking much further — correlated stocks tend to fall together, so spreading money across them stops helping as much. +1. Set «number of stocks n» to 1. Portfolio risk w reads 35%, exactly «single-stock volatility v» — no diversification at all with just one stock. +2. Raise «number of stocks n» to 30. Portfolio risk w drops to 19.9%, well below the single stock's 35%, even though the average expected return has not changed. +3. Raise «average correlation c» to 0.8. Even with 30 stocks, portfolio risk w climbs back to 31.4% — correlated stocks tend to fall together, so spreading money across them stops helping as much. ## Real-life examples @@ -60,13 +60,17 @@ Diversification is sometimes called the only "free lunch" in investing, because ## Real world ### Index funds + A fund holding hundreds or thousands of stocks pushes «number of stocks n» about as high as it can go, capturing nearly all of the diversifiable-risk reduction in one purchase instead of buying dozens of shares one at a time. ### International diversification + Stocks from different countries and industries tend to have lower «average correlation c» with each other than stocks from the same sector, which is why spreading across geographies and industries — not just across more companies — lowers the correlated risk floor itself. ### Crashes and correlation spikes + During a financial crisis, «average correlation c» tends to rise sharply as nearly everything sells off together, which is exactly when diversification's benefit shrinks the most — the one moment investors most wanted it to help. ### Over-concentration ("diworsification") + Adding more stocks from the same sector barely lowers «average correlation c», so a portfolio can hold dozens of stocks and still carry most of a single sector's risk — count alone is not the same as real diversification. diff --git a/content/lessons/economics/risk-and-diversification/lesson.yaml b/content/lessons/economics/risk-and-diversification/lesson.yaml index 7cbe947e..31dde955 100644 --- a/content/lessons/economics/risk-and-diversification/lesson.yaml +++ b/content/lessons/economics/risk-and-diversification/lesson.yaml @@ -18,7 +18,7 @@ parameters: max: 60 step: 1 value: 35 - unit: "%/yr" + unit: '%/yr' n: min: 1 max: 30 diff --git a/content/lessons/economics/supply-and-demand/ar.md b/content/lessons/economics/supply-and-demand/ar.md index 09fb1070..0a41fae3 100644 --- a/content/lessons/economics/supply-and-demand/ar.md +++ b/content/lessons/economics/supply-and-demand/ar.md @@ -5,7 +5,7 @@ summary: >- parameters: a: a — أعلى سعر يقبل المشتري دفعه b: b — سرعة انخفاض الطلب مع ارتفاع السعر - c: c — أدنى سعر يقبل البائع بيعه + c: c — أدنى سعر يقبل به البائع d: d — سرعة ازدياد العرض مع ارتفاع السعر variables: - سعر السوق @@ -18,25 +18,25 @@ variables: ## Try it -1. راقب تقاطع الخطّين. تلك النقطة هي السعر والكمية اللذان يتداول بهما الجميع فعليًا. -2. ارفع $a$. يرتفع خط الطلب كله، وتنتقل نقطة التقاطع إلى سعر أعلى وكمية أكبر. -3. الآن ارفع $c$ بدلًا من ذلك. يرتفع خط العرض، وتستقرّ نقطة التقاطع عند سعر أعلى لكن كمية أصغر. +1. انظر إلى نقطة تقاطع الخطّين. تعرض القراءات سعر التوازن 40 وكمية التوازن 50، وهما السعر والكمية اللذان يبيع ويشتري بهما الجميع فعلًا. +2. اضبط $a$ على 94. يرتفع خط الطلب كله، وتنتقل نقطة التقاطع إلى سعر أعلى وكمية أكبر: 46 و60. +3. أعد $a$ إلى 80 واضبط $c$ على 31 هذه المرة. يرتفع خط العرض، وتستقرّ نقطة التقاطع عند سعر أعلى لكن كمية أصغر: 52 و35. ## Real-life examples -1. **سوق إسكان في مدينة مزدهرة.** وظائف تقنية جديدة تجذب سكانًا مستعدين لدفع أكثر بكثير مقابل سكن (a مرتفع، b شبه ثابت)، بينما يتباطأ الملّاك في إضافة وحدات جديدة (c أعلى، d ثابت)، فتستقرّ الإيجارات عند توازن جديد أعلى. +1. **سوق إسكان في مدينة مزدهرة.** وظائف تقنية جديدة تجذب سكانًا مستعدين لدفع أكثر بكثير مقابل سكن (يرتفع a)، بينما يتأخر الملّاك في بناء مساكن جديدة (d كبير)، فتستقرّ الإيجارات عند توازن جديد أعلى. 2. **صدمة في عرض النفط.** حرب تعطّل منتجًا رئيسيًا، فيحتاج البائعون الآن سعرًا أعلى بكثير ليوفّروا أي نفط أصلًا (يرتفع c وd معًا بشدة). لا تُباع الكمية نفسها بعدها إلا بسعر أعلى بكثير. -3. **موسم حصاد وفير في سوق مزارعين.** موسم زراعة ممتاز يجعل المزارعين يبيعون حتى بسعر منخفض (c منخفض، d ثابت)، بينما لم تزدد شهية المشترين، فينخفض سعر التوازن ويُباع محصول أكثر. +3. **موسم حصاد وفير في سوق مزارعين.** موسم زراعة ممتاز يجعل المزارعين يبيعون حتى بسعر منخفض (ينخفض c)، بينما لم تزدد رغبة المشترين في الشراء، فينخفض سعر التوازن ويُباع محصول أكثر. ## Test yourself 1. جِد قيمًا تجعل كمية التوازن 30 وحدة بالضبط. -2. أزح منحنى الطلب حتى يرتفع سعر التوازن فوق 60 مع إبقاء كمية التوازن دون 25. +2. حرّك خط العرض حتى يرتفع سعر التوازن فوق 60 مع إبقاء كمية التوازن دون 25. 3. جِد قيمًا تجعل كمية التوازن 20 وحدة بالضبط مع إبقاء سعر التوازن دون 30. ## Intuition -تخيّل سوقًا للمزارعين يبيع فيه الطماطم: يشتري المستهلكون 80 صندوقًا أسبوعيًا لو كانت مجانية، لكن كل ريال إضافي على السعر ينفّر بعض المشترين، وهذه هي العلاقة التي يمثّلها خط الطلب على الشاشة. لا يبيع المزارعون صندوقًا واحدًا دون 10 ريالات، لكنهم يجلبون كمية أكبر للسوق مع كل ريال إضافي يُعرَض عليهم، وهذا خط العرض. حرّك $a$، أعلى سعر يقبل أي مشترٍ دفعه، إلى الأعلى. يرتفع خط الطلب كله، وتنتقل نقطة تقاطع الخطّين، أي السعر والكمية اللذان يتداول بهما الجميع فعليًا، إلى سعر أعلى وكمية أكبر. +تخيّل سوقًا للمزارعين تُباع فيه الطماطم: لا يدفع أي مشترٍ أكثر من 80 ريالًا للصندوق، وكل ريال إضافي على السعر يُبعد بعض المشترين، وهذه هي العلاقة التي يمثّلها خط الطلب على الشاشة. لا يبيع المزارعون صندوقًا واحدًا دون 10 ريالات، لكنهم يجلبون كمية أكبر للسوق مع كل ريال إضافي يُعرَض عليهم، وهذا خط العرض. حرّك $a$، أعلى سعر يقبل أي مشترٍ دفعه، إلى الأعلى. يرتفع خط الطلب كله، وتنتقل نقطة تقاطع الخطّين، أي السعر والكمية اللذان يبيع ويشتري بهما الجميع فعلًا، إلى سعر أعلى وكمية أكبر. الآن حرّك $c$، أدنى سعر يقبله أي بائع، إلى الأعلى بدلًا من ذلك. يرتفع خط العرض، فيحتاج المزارعون سعرًا أعلى قبل أن يبيعوا أصلًا، وتستقرّ نقطة التقاطع عند سعر أعلى لكن كمية أصغر. لا أحد يخطّط لهذه النتيجة. عند أي سعر آخر يريد أحد الطرفين كمية أكبر ممّا يعرضه الطرف الآخر، فيستمرّ السعر بالتحرّك حتى تُغلق هذه الفجوة. @@ -52,8 +52,8 @@ $(P^*, Q^*)$ الذي يحقّق المعادلتين معًا. ## Advanced أي عامل غير السعر نفسه، كالدخل والأذواق وتكلفة المدخلات والتقنية والطقس، -يحرّك الخط كله بدل أن يحرّك نقطة عليه. يفرّق الاقتصاديون بدقة بين *الحركة -على* منحنى الطلب، وسببها السعر، و*إزاحة* المنحنى، وسببها كل شيء آخر. أما +يحرّك الخط كله بدل أن يحرّك نقطة عليه. يفرّق الاقتصاديون بدقة بين _الحركة +على_ منحنى الطلب، وسببها السعر، و*إزاحة* المنحنى، وسببها كل شيء آخر. أما سرعة تفاعل الكمية مع السعر فسؤال منفصل، يعالجه درس المرونة. ## Derivation @@ -65,16 +65,20 @@ $(P^*, Q^*)$ الذي يحقّق المعادلتين معًا. ## Real world ### إيجارات المساكن + مدينة تستحدث وظائف كثيرة تُزيح خط الطلب يمينًا، فترتفع الإيجارات حتى توازن جديد أعلى. ### صدمات أسعار النفط + حرب تقطع منتجًا رئيسيًا تُزيح خط العرض يسارًا، فتحتاج الكمية نفسها سعرًا أعلى كي تُباع كلها. ### أسواق المزارعين + موسم حصاد وفير يُزيح العرض يمينًا، فيقبل المزارعون سعرًا أقل لبيع الفائض. ### تذاكر الحفلات + المقاعد محدودة فلا يتحرك العرض كثيرًا مع السعر، فارتفاع بسيط في الطلب قد يرفع الأسعار بشدة. diff --git a/content/lessons/economics/supply-and-demand/en.md b/content/lessons/economics/supply-and-demand/en.md index 213bd2c4..775a24e3 100644 --- a/content/lessons/economics/supply-and-demand/en.md +++ b/content/lessons/economics/supply-and-demand/en.md @@ -19,25 +19,25 @@ variables: ## Try it -1. Watch the two lines cross. That crossing point is the market price and quantity everyone actually trades at. -2. Drag $a$ up. The demand line shifts up, and the crossing point moves to a higher price and a larger quantity. -3. Now drag $c$ up instead. The supply line shifts up, and the crossing point settles at a higher price but a smaller quantity. +1. Watch the two lines cross. The readouts show equilibrium price 40 and equilibrium quantity 50: the price and quantity everyone actually trades at. +2. Set $a$ = 94. The demand line shifts up, and the crossing point moves to a higher price and a larger quantity: 46 and 60. +3. Put $a$ back to 80 and set $c$ = 31 instead. The supply line shifts up, and the crossing point settles at a higher price but a smaller quantity: 52 and 35. ## Real-life examples -1. **A booming city's housing market.** New tech jobs pull in residents willing to pay much more for a home (a high, flat b), while landlords are slow to add new supply (a higher c, flat d) — rents settle at a new, higher equilibrium. +1. **A booming city's housing market.** New tech jobs pull in residents willing to pay much more for a home (a rises), while landlords are slow to add new homes (a large d) — rents settle at a new, higher equilibrium. 2. **An oil supply shock.** A war disrupts a major oil producer: sellers now need a much higher price to supply any oil at all (c and d both rise sharply), so the same demand now clears only at a far higher price. -3. **A bumper harvest at a farmers' market.** A great growing season means farmers will sell even at a low price (c low, flat d), while buyers' appetite hasn't grown — the equilibrium price falls and more produce sells. +3. **A bumper harvest at a farmers' market.** A great growing season means farmers will sell even at a low price (c falls), while buyers' appetite hasn't grown — the equilibrium price falls and more produce sells. ## Test yourself 1. Find values that put the equilibrium quantity at exactly 30 units. -2. Shift the demand curve so the equilibrium price rises above 60 while keeping the equilibrium quantity below 25. +2. Shift the supply line so the equilibrium price rises above 60 while keeping the equilibrium quantity below 25. 3. Find values that put the equilibrium quantity at exactly 20 units while keeping the equilibrium price below 30. ## Intuition -Imagine a farmers' market for tomatoes: buyers would take 80 crates a week if they were free, but each extra dollar on the price puts off some buyers — that relationship is the demand line on screen. Farmers won't sell a single crate below 10 dollars, but bring more to market for every extra dollar offered — that's the supply line. Drag $a$, the highest price any buyer would pay, up: the whole demand line shifts up, and the point where the two lines cross — the price and quantity everyone actually trades at — moves to a higher price and a larger quantity. +Imagine a farmers' market for tomatoes: no buyer would pay more than 80 dollars for a crate, and each extra dollar on the price puts off some buyers — that relationship is the demand line on screen. Farmers won't sell a single crate below 10 dollars, but bring more to market for every extra dollar offered — that's the supply line. Drag $a$, the highest price any buyer would pay, up: the whole demand line shifts up, and the point where the two lines cross — the price and quantity everyone actually trades at — moves to a higher price and a larger quantity. Now drag $c$, the lowest price any seller accepts, up instead: the supply line shifts up, so farmers need a higher price before they'll sell at all, and the crossing point settles at a higher price but a smaller quantity. No one plans this outcome — at any other price, one side would want to trade more than the other side offers, and the price keeps moving until that gap closes. @@ -55,8 +55,8 @@ equilibrium price. Any event that is not a price change — income, tastes, input costs, technology, weather — shifts an entire line rather than moving a point -along it. Economists keep this distinction strict: a *movement along* the -demand curve is caused by price; a *shift of* the curve is caused by +along it. Economists keep this distinction strict: a _movement along_ the +demand curve is caused by price; a _shift of_ the curve is caused by everything else. How sharply quantity reacts to price is a separate question, covered by elasticity. @@ -69,17 +69,21 @@ question, covered by elasticity. ## Real world ### Housing rents + A city that adds many jobs shifts the demand curve right; rents rise until a new, higher equilibrium is reached. ### Oil price shocks + A war cutting off a major producer shifts the supply curve left, so the same quantity now clears only at a higher price. ### Farmers' markets + A bumper harvest shifts supply right: farmers accept a lower price to sell the extra produce. ### Concert tickets + Fixed seating means supply barely moves with price, so a small rise in demand can send prices up sharply. diff --git a/content/lessons/economics/taxes-and-brackets/ar.md b/content/lessons/economics/taxes-and-brackets/ar.md index 66e2e05f..637ade11 100644 --- a/content/lessons/economics/taxes-and-brackets/ar.md +++ b/content/lessons/economics/taxes-and-brackets/ar.md @@ -14,27 +14,27 @@ charts: [] ## Try it -1. أبقِ «الدخل السنوي x» دون «حد الشريحة b». يقع كل الدخل في الشريحة الرخيصة، فيتساوى المعدل المتوسط مع المعدل الحدي 10% تمامًا. -2. ارفع «الدخل السنوي x» كثيرًا فوق «حد الشريحة b». يُفرض 25% فقط على ما يتجاوز الحد، فيبقى المعدل المتوسط أقل بكثير من ذلك المعدل الحدي. -3. ارفع «حد الشريحة b» نحو «الدخل السنوي x». يقع جزء أكبر من الدخل نفسه الآن في الشريحة الرخيصة 10%، وينخفض المعدل المتوسط رغم أن الدخل لم يتغير إطلاقًا. +1. اضبط «الدخل السنوي x» على 30000، أي أقل من «حد الشريحة b» وهو 40000. يقع كل الدخل في الشريحة الرخيصة: تعرض T القيمة 3000، ويتساوى المعدل المتوسط مع المعدل الحدي 10% تمامًا. +2. ارفع «الدخل السنوي x» إلى 120000، أي فوق «حد الشريحة b» بكثير. لا تُؤخذ نسبة 25% إلا مما يتجاوز الحد: تعرض T القيمة 24000، فيكون المعدل المتوسط 20%، وهو أقل من المعدل الحدي 25%. +3. ارفع «حد الشريحة b» إلى 100000، قريبًا من «الدخل السنوي x». يقع جزء أكبر من الدخل نفسه الآن في الشريحة الرخيصة 10%، وينخفض المعدل المتوسط إلى 12.5% رغم أن الدخل لم يتغير إطلاقًا. ## Real-life examples 1. **أول وظيفة.** دخل 18,000 ريال سنويًا، كله داخل حد الـ40,000 ريال. كل ريال يُفرض عليه 10%، فيتساوى المعدل الحدي والمتوسط عند 10% بالضبط. 2. **راتب معلم.** دخل 55,000 ريال. أول 40,000 ريال بنسبة 10% (4,000 ريال)، والباقي 15,000 ريال بنسبة 25% (3,750 ريالًا). إجمالي 7,750 ريالًا، أي معدل متوسط 14.1% رغم أن المعدل الحدي على آخر ريال مكتسب هو 25%. -3. **موظف كبير.** دخل 140,000 ريال. 4,000 ريال على أول 40,000، ثم 25% على الباقي 100,000 ريال (25,000 ريالًا). إجمالي 29,000 ريالًا، أي معدل متوسط 20.7%، لا يزال أقل بكثير من المعدل الحدي 25%. +3. **موظف كبير.** دخل 140,000 ريال. 4,000 ريال على أول 40,000، ثم 25% على الباقي 100,000 ريال (25,000 ريال). إجمالي 29,000 ريال، أي معدل متوسط 20.7%، لا يزال أقل بكثير من المعدل الحدي 25%. ## Test yourself 1. اجعل معدل الضريبة المتوسط 15% بالضبط. -2. اكسب أكثر من «حد الشريحة b»، وأبقِ المعدل المتوسط دون 20%. +2. اكسب أكثر من 100,000 ريال، وأبقِ المعدل المتوسط دون 20%. 3. اكسب أكثر من 60,000 ريال، وأبقِ المعدل المتوسط دون 12%. ## Intuition يختبئ «معدلان» مختلفان في كل فاتورة ضريبية. المعدل الحدي هو ما سيُفرض على الريال التالي مباشرة، إما 10% أو 25% هنا، بحسب أي جانب من «حد الشريحة b» يقع فيه ذلك الريال فقط. أما المعدل المتوسط فهو الضريبة كلها مقسومة على الدخل كله، أي مزيج من المعدلين موزون بحسب مقدار الدخل الذي وقع في كل شريحة. الأمر أشبه تمامًا بفاتورة مياه تتقاضى أكثر لكل لتر بعد كمية معينة. سعر آخر لتر مستهلك ليس هو سعر الفاتورة كلها. -هذه الفجوة تفسّر مثال راتب المعلم أعلاه. المعدل الحدي على آخر ريال مكتسب هو 25%، لكن المعدل المتوسط على الـ55,000 ريال كلها لا يتجاوز 14.1%، لأن معظم ذلك الدخل ظل داخل الشريحة الرخيصة 10%. كما يفنّد هذا خرافة شائعة، وهي أن كسب ريال إضافي و«الانتقال إلى شريحة أعلى» يخفض الدخل الصافي. هذا لا يحدث أبدًا، لأن ما يتجاوز «حد الشريحة b» فقط هو ما يُفرض عليه المعدل الأعلى، وكل ريال دونه يبقى يُفرض عليه 10% مهما ارتفع الدخل الكلي. +هذه الفجوة تفسّر مثال راتب المعلم أعلاه. المعدل الحدي على آخر ريال مكتسب هو 25%، لكن المعدل المتوسط على الـ55,000 ريال كلها لا يتجاوز 14.1%، لأن معظم ذلك الدخل ظل داخل الشريحة الرخيصة 10%. وهذا يُبطل خرافة شائعة، وهي أن كسب ريال إضافي و«الانتقال إلى شريحة أعلى» يخفض الدخل الصافي. هذا لا يحدث أبدًا، لأن ما يتجاوز «حد الشريحة b» فقط هو ما يُفرض عليه المعدل الأعلى، وكل ريال دونه يبقى يُفرض عليه 10% مهما ارتفع الدخل الكلي. ## Formal @@ -44,7 +44,7 @@ charts: [] ## Advanced -تربط أنظمة الضرائب الحقيقية شرائح أكثر بكثير من شريحتين، لكن الحساب مطابق. كل شريحة إضافية تفرض الضريبة فقط على جزء الدخل الواقع داخلها، فنظام من خمس شرائح هو ببساطة هذا النمط نفسه من $\min$ و$\max$ مكررًا مرة لكل حد ومجموعًا. +في أنظمة الضرائب الحقيقية شرائح أكثر بكثير من شريحتين، لكن الحساب هو نفسه. كل شريحة إضافية تفرض الضريبة فقط على جزء الدخل الواقع داخلها، فنظام من خمس شرائح هو ببساطة هذا النمط نفسه من $\min$ و$\max$ مكررًا مرة لكل حد ومجموعًا. ## Derivation @@ -55,13 +55,17 @@ charts: [] ## Real world ### خرافة «الزيادة تجعلك أفقر» -قلق شائع هو أن زيادة الراتب التي تتجاوز حد الشريحة تعني خسارة مال إجمالًا، لكن في نظام تصاعدي حقيقي لا يُفرض المعدل الأعلى إلا على الدخل الذي يتجاوز الحد، فيرتفع الدخل الصافي دائمًا مع أي زيادة، وإن لم يكن بقدر كل ريال فوق الحد بالضبط. + +يخشى كثيرون أن زيادة الراتب التي تتجاوز حد الشريحة تعني خسارة مال إجمالًا، لكن في نظام تصاعدي حقيقي لا يُفرض المعدل الأعلى إلا على الدخل الذي يتجاوز الحد، فيرتفع الدخل الصافي دائمًا مع أي زيادة، وإن كان ما يبقى لك من كل ريال فوق الحد أقل قليلًا. ### الإعفاءات الأساسية + تعفي معظم أنظمة الضرائب الحقيقية أيضًا شريحة أولى من الدخل كليًا، أي إعفاء بنسبة 0% قبل أن تبدأ شريحة الـ10% أصلًا، وهو طبقة إضافية فوق النمط نفسه من $\min$ و$\max$ المستخدم هنا. ### الاستقطاع + يقدّر أصحاب العمل عادة المعدل المتوسط للسنة ويستقطعون تلك النسبة تقريبًا من كل راتب، فتكون «الضريبة المستحقة» غالبًا مدفوعة تدريجيًا طوال السنة بدل أن تصل دفعة واحدة. ### زحف الشرائح + حين لا يُرفع «حد الشريحة b» ليواكب ارتفاع الأسعار، فإن أجورًا تواكب التضخم فقط تدفع مزيدًا من الدخل إلى الشريحة الأعلى مع الوقت، رغم أن شيئًا لم يتغير فعليًا فيما يستطيع ذلك الدخل شراءه. diff --git a/content/lessons/economics/taxes-and-brackets/en.md b/content/lessons/economics/taxes-and-brackets/en.md index 615fb77f..8101af51 100644 --- a/content/lessons/economics/taxes-and-brackets/en.md +++ b/content/lessons/economics/taxes-and-brackets/en.md @@ -18,9 +18,9 @@ charts: [] ## Try it -1. Keep «annual income x» below «bracket threshold b». All of it sits in the cheap slice, so the average rate equals the 10% marginal rate exactly. -2. Raise «annual income x» well above «bracket threshold b». Only the slice above the threshold is taxed at 25%, so the average rate stays well below that 25% marginal rate. -3. Raise «bracket threshold b» toward «annual income x». More of the same income now sits in the cheap 10% slice, and the average rate falls even though income has not changed at all. +1. Set «annual income x» to 30000, below «bracket threshold b» at 40000. All of it sits in the cheap slice: T reads 3000, and the average rate equals the 10% marginal rate exactly. +2. Raise «annual income x» to 120000, well above «bracket threshold b». Only the slice above the threshold is taxed at 25%: T reads 24000, so the average rate is 20%, still below the 25% marginal rate. +3. Raise «bracket threshold b» to 100000, toward «annual income x». More of the same income now sits in the cheap 10% slice, and the average rate falls to 12.5% even though income has not changed at all. ## Real-life examples @@ -31,7 +31,7 @@ charts: [] ## Test yourself 1. Get the average tax rate to exactly 15%. -2. Earn more than «bracket threshold b», and keep the average rate under 20%. +2. Earn more than 100,000 dollars, and keep the average rate under 20%. 3. Earn more than 60,000 dollars, and keep the average rate under 12%. ## Intuition @@ -59,13 +59,17 @@ Real tax systems chain together many more brackets than two, but the arithmetic ## Real world ### The "raise makes you poorer" myth + A common worry is that a raise pushing income past a bracket threshold means losing money overall — but under a progressive system only the income above the threshold is ever taxed at the higher rate, so take-home pay always rises with a raise, just not by quite as much per dollar above the threshold. ### Standard deductions + Most real tax systems also exempt a first slice of income entirely — a 0%-taxed allowance before the 10% bracket even begins — layering one more slice onto the same $\min$/$\max$ pattern used here. ### Withholding + Employers typically estimate the year's average rate and withhold roughly that share from every paycheck, so «tax owed» is usually already paid gradually across the year rather than landing as one lump sum. ### Bracket creep + When «bracket threshold b» is not raised to keep pace with rising prices, wages that merely keep up with inflation still push more and more income into the higher bracket over time, even though nothing has really changed in what that income can buy. diff --git a/content/lessons/economics/taxes-and-brackets/lesson.yaml b/content/lessons/economics/taxes-and-brackets/lesson.yaml index be7e730a..7b34dae0 100644 --- a/content/lessons/economics/taxes-and-brackets/lesson.yaml +++ b/content/lessons/economics/taxes-and-brackets/lesson.yaml @@ -18,13 +18,13 @@ parameters: max: 200000 step: 1000 value: 45000 - unit: "" + unit: '' b: min: 10000 max: 100000 step: 1000 value: 40000 - unit: "" + unit: '' variables: - x - b @@ -43,5 +43,5 @@ presets: challenges: - check: (0.10*min(x,b)+0.25*max(0,x-b))/x*100 target: 15 - - check: x > b and (0.10*min(x,b)+0.25*max(0,x-b))/x*100 < 20 + - check: x > 100000 and (0.10*min(x,b)+0.25*max(0,x-b))/x*100 < 20 - check: x > 60000 and (0.10*min(x,b)+0.25*max(0,x-b))/x*100 < 12 diff --git a/content/lessons/electricity/ac-power/ar.md b/content/lessons/electricity/ac-power/ar.md index 14f76288..4df2879b 100644 --- a/content/lessons/electricity/ac-power/ar.md +++ b/content/lessons/electricity/ac-power/ar.md @@ -18,15 +18,15 @@ variables: ## Try it -1. راقب السهمين الدوّارين: الجهد يتقدم، والتيار يتخلف عنه بمقدار φ. حاصل ضربهما هو منحنى القدرة الأزرق في الأسفل، والرقعة المظللة بين a وb هي الطاقة المسلَّمة في تلك النافذة. -2. ارفع منزلق «فرق الطور φ» نحو أقصاه. يتباعد السهمان، وينخفض المنحنى دون الصفر أكثر فأكثر، ويخفت المصباح مع أن V0 وI0 لم يتغيرا. -3. اضبط a = 0 وb = 0.02 s (دورة كاملة واحدة) واقرأ متوسط النافذة. يطابق ½V0I0·cos φ — ويتقلص كلما زاد φ. +1. راقب السهمين الدوّارين: الجهد يتقدم، والتيار يتخلف عنه بمقدار φ. حاصل ضربهما هو منحنى القدرة الأزرق في الأسفل، والمساحة المظللة بين a وb هي الطاقة التي وصلت في تلك المدة. +2. ارفع منزلق «فرق الطور φ» من 0.8 نحو 1.57 rad (90°). يتباعد السهمان، وينخفض المنحنى دون الصفر أكثر فأكثر، ويخفت المصباح مع أن V0 وI0 لم يتغيرا. بعد 90° يصير المتوسط سالبًا: الجهاز الآن يعيد الطاقة إلى المصدر. +3. اجعل φ = 0.8 وa = 0 وb = 0.02 s (دورة كاملة واحدة) واقرأ متوسط النافذة: نحو 17.4 W عند V0 = 10 V وI0 = 5 A. هذا يطابق ½V0I0·cos φ، ويقل كلما زاد φ. ## Real-life examples -1. **سخان كهربائي (مقاومة خالصة).** يبقى الجهد والتيار متزامنين تمامًا (V0 = 10 V، I0 = 5 A، φ = 0)، فيتحول كل واط مسلَّم إلى حرارة، دون أي هدر. -2. **محرك حثّي يعمل تحت حمل.** يتأخر التيار بوضوح عن الجهد (V0 = 15 V، I0 = 6 A، φ = 0.9 rad)، فيسحب المحرك تيارًا أكبر مما يوحي به الشغل المفيد الذي يبذله. -3. **بطارية مكثفات تُصحِّح معامل قدرة مصنع.** إضافة المكثفات تُعيد التأخر إلى قرب الصفر (V0 = 12 V، I0 = 4 A، φ = 0.2 rad)، فيعود معظم القدرة المسلَّمة شغلًا مفيدًا. +1. **سخان كهربائي (مقاومة خالصة).** يبقى الجهد والتيار متزامنين تمامًا (V0 = 10 V، I0 = 5 A، φ = 0)، فالقدرة المتوسطة 25 W كاملة، وكلها تتحول إلى حرارة. +2. **محرك حثّي يعمل تحت حمل.** يتأخر التيار بوضوح عن الجهد (V0 = 15 V، I0 = 6 A، φ = 0.9 rad)، فالقدرة المتوسطة نحو 28 W فقط، مع أن V0 وI0 يستطيعان إعطاء 45 W لو تزامنا. +3. **مجموعة مكثفات تُصحِّح معامل قدرة مصنع.** إضافة المكثفات تُعيد التأخر إلى قرب الصفر (V0 = 12 V، I0 = 4 A، φ = 0.2 rad)، فالقدرة المتوسطة نحو 23.5 W من 24 W ممكنة. ## Test yourself @@ -36,9 +36,9 @@ variables: ## Intuition -تخيّل مصدر التيار المنزلي 230 فولت يُشغّل سخانًا كهربائيًا. يرتفع الجهد والتيار وينخفضان معًا، متزامنين، ويتحول كل واط مسلَّم مباشرة إلى حرارة. تخيّل الآن المصدر نفسه يُشغّل محرك مروحة كبيرة بدلًا من ذلك. يتأخر التيار قليلًا عن الجهد، فيخرجان عن التزامن، ويتأرجح جزء من القدرة ذهابًا وإيابًا دون أن يبذل أي شغل مفيد. يُظهر الرسم على الشاشة هذا التأخر مباشرة. المساحة المظللة بين العلامتين $a$ و$b$ هي الطاقة المسلَّمة في تلك الفترة الزمنية، وهي إشارية. الأجزاء التي ينخفض فيها المنحنى الأزرق دون الصفر تمثّل لحظات تتدفق فيها الطاقة عكسيًا نحو مقبس الحائط. +تخيّل مصدر التيار المنزلي 230 فولت يُشغّل سخانًا كهربائيًا. يرتفع الجهد والتيار وينخفضان معًا، متزامنين، وتتحول كل القدرة مباشرة إلى حرارة. تخيّل الآن المصدر نفسه يُشغّل محرك مروحة كبيرة بدلًا من ذلك. يتأخر التيار قليلًا عن الجهد، فيخرجان عن التزامن، ويتأرجح جزء من القدرة ذهابًا وإيابًا دون أن يبذل أي شغل مفيد. يُظهر الرسم على الشاشة هذا التأخر مباشرة. المساحة المظللة بين العلامتين $a$ و$b$ هي الطاقة التي وصلت في تلك المدة، وقد تكون موجبة أو سالبة. الأجزاء التي ينخفض فيها المنحنى الأزرق دون الصفر تمثّل لحظات تتدفق فيها الطاقة عكسيًا نحو مقبس الحائط. -عند أن تكون $\varphi$ صفرًا، كما في حالة السخان حيث يتزامن الجهد والتيار، بالكاد ينخفض المنحنى دون الصفر. حرّك $\varphi$ صعودًا نحو أقصى قيمة له فتكبر الفصوص السالبة حتى تكاد تلغي الفصوص الموجبة، تمامًا كمحرك المروحة المتأخر. اضبط النافذة الزمنية على دورة كاملة واحدة، $a=0$ و$b=0.02$ ثانية. راقب صافي المساحة المظللة يتقلص كلما ارتفع $\varphi$. هذا الصافي، مقسومًا على طول الدورة، هو بالضبط القدرة المتوسطة التي تدفع ثمنها فعليًا. تبقى سعتا الجهد والتيار نفسهما، لكن الشغل الحقيقي يقل كلما خرجا عن التزامن. +حين تكون $\varphi$ صفرًا، كما في حالة السخان حيث يتزامن الجهد والتيار، بالكاد ينخفض المنحنى دون الصفر. ارفع $\varphi$ نحو 1.57 rad (90°) فتكبر الأجزاء السالبة حتى تكاد تلغي الأجزاء الموجبة، تمامًا كمحرك المروحة المتأخر. اضبط النافذة الزمنية على دورة كاملة واحدة، $a=0$ و$b=0.02$ ثانية. راقب صافي المساحة المظللة يتقلص كلما ارتفع $\varphi$. هذا الصافي، مقسومًا على طول الدورة، هو بالضبط القدرة المتوسطة التي تدفع ثمنها فعليًا. تبقى سعتا الجهد والتيار نفسهما، لكن الشغل الحقيقي يقل كلما خرجا عن التزامن. ## Formal @@ -59,13 +59,17 @@ variables: ## Real world ### فواتير الكهرباء + تقيس عدادات الكهرباء القدرة الحقيقية (المتوسطة) فقط، لا القدرة الظاهرية الأكبر $V_{\text{rms}}I_{\text{rms}}$ التي تُسحب حين يقل معامل القدرة عن 1. ### المحركات الصناعية -يتأخر التيار عن الجهد في أحمال المحركات الحثية الكبيرة، فتضيف المصانع بطاريات مكثفات لتصحيح معامل القدرة وتقليل التيار المهدر. + +يتأخر التيار عن الجهد في أحمال المحركات الحثية الكبيرة، فتضيف المصانع مجموعات مكثفات لتصحيح معامل القدرة وتقليل التيار المهدر. ### العاكسات والأنظمة الشمسية + تتحكم العاكسات المتصلة بالشبكة في الطور باستمرار، فتُبقي معامل القدرة قريبًا من 1 وترفع القدرة الحقيقية المسلَّمة إلى أقصاها. ### تصنيفات RMS + تصنيفات الجهد والتيار للأجهزة، مثل «230 V»، هي قيم RMS اختيرت بدقة لتجعل $P=V_{\text{rms}}I_{\text{rms}}\cos\varphi$ تطابق صيغة القدرة المألوفة للتيار المستمر. diff --git a/content/lessons/electricity/ac-power/en.md b/content/lessons/electricity/ac-power/en.md index e87edd45..5a399ce2 100644 --- a/content/lessons/electricity/ac-power/en.md +++ b/content/lessons/electricity/ac-power/en.md @@ -20,14 +20,14 @@ variables: ## Try it 1. Watch the two spinning arrows: voltage leads, current trails φ behind. Their product is the blue power curve below, and the shaded patch between a and b is the energy delivered in that window. -2. Raise the slider "phase lag φ" toward its maximum. The arrows pull apart, the curve dips below zero more and more, and the lamp dims although V0 and I0 never changed. -3. Set a = 0 and b = 0.02 s (one full cycle) and read the window average. It matches ½V0I0·cos φ — and shrinks as φ grows. +2. Raise the slider "phase lag φ" from 0.8 toward 1.57 rad (90°). The arrows pull apart, the curve dips below zero more and more, and the lamp dims although V0 and I0 never changed. Past 90° the average turns negative: the device is now sending energy back. +3. Set φ = 0.8, a = 0 and b = 0.02 s (one full cycle) and read the window average: about 17.4 W with V0 = 10 V and I0 = 5 A. It matches ½V0I0·cos φ — and shrinks as φ grows. ## Real-life examples -1. **An electric heater (purely resistive).** Voltage and current stay perfectly in step (V0 = 10 V, I0 = 5 A, φ = 0), so every watt delivered turns into heat — no wasted power. -2. **An induction motor under load.** Current lags noticeably behind voltage (V0 = 15 V, I0 = 6 A, φ = 0.9 rad), so the motor draws more current than its useful work alone would suggest. -3. **A capacitor bank correcting a factory's power factor.** Adding capacitors brings the lag back down close to zero (V0 = 12 V, I0 = 4 A, φ = 0.2 rad), so nearly all the delivered power becomes useful work again. +1. **An electric heater (purely resistive).** Voltage and current stay perfectly in step (V0 = 10 V, I0 = 5 A, φ = 0), so the average power is the full 25 W, and all of it turns into heat. +2. **An induction motor under load.** Current lags noticeably behind voltage (V0 = 15 V, I0 = 6 A, φ = 0.9 rad), so the average power is only about 28 W, although V0 and I0 could deliver 45 W in step. +3. **A capacitor bank correcting a factory's power factor.** Adding capacitors brings the lag back down close to zero (V0 = 12 V, I0 = 4 A, φ = 0.2 rad), so the average power is about 23.5 W out of a possible 24 W. ## Test yourself @@ -39,7 +39,7 @@ variables: Picture your home's 230-volt supply driving an electric heater: voltage and current rise and fall together, in step, and every watt delivered goes straight into heat. Now picture the same supply driving a large fan motor instead — the current lags a little behind the voltage, out of step, and part of the power sloshes back and forth without doing any useful work. The picture on screen shows this lag directly: the shaded area between the two markers $a$ and $b$ is the energy delivered in that time window, and it is signed, so parts where the blue curve dips below zero are moments when energy briefly flows backward into the wall socket. -With the phase lag $\varphi$ at zero (voltage and current in step, like the heater) the curve barely dips negative. Drag $\varphi$ up toward its largest value and the negative lobes grow until they nearly cancel the positive ones, like the lagging fan motor. Set the window to one full cycle, $a=0$ and $b=0.02$ seconds, and watch the net shaded area shrink as $\varphi$ rises: that net area, divided by the cycle length, is exactly the average power you actually pay for — the same voltage and current amplitudes, but less real work whenever they fall out of step. +With the phase lag $\varphi$ at zero (voltage and current in step, like the heater) the curve barely dips negative. Drag $\varphi$ up toward 1.57 rad (90°) and the negative lobes grow until they nearly cancel the positive ones, like the lagging fan motor. Set the window to one full cycle, $a=0$ and $b=0.02$ seconds, and watch the net shaded area shrink as $\varphi$ rises: that net area, divided by the cycle length, is exactly the average power you actually pay for — the same voltage and current amplitudes, but less real work whenever they fall out of step. ## Formal @@ -60,13 +60,17 @@ For a pure resistor $\varphi=0$ and all delivered energy is dissipated; for a pu ## Real world ### Electricity bills + Meters bill real (average) power, not the larger apparent power $V_{\text{rms}}I_{\text{rms}}$ drawn when the power factor is below 1. ### Industrial motors + Large inductive motor loads lag current behind voltage; factories add capacitor banks to correct the power factor and cut wasted current. ### Inverters and solar systems + Grid-tied inverters actively control phase to keep the power factor near 1 and maximise real power delivered. ### RMS ratings + Appliance voltage and current ratings (like "230 V") are RMS values chosen precisely so $P=V_{\text{rms}}I_{\text{rms}}\cos\varphi$ matches the familiar DC power formula. diff --git a/content/lessons/electricity/batteries-and-internal-resistance/ar.md b/content/lessons/electricity/batteries-and-internal-resistance/ar.md index 422de7c6..3919b5ad 100644 --- a/content/lessons/electricity/batteries-and-internal-resistance/ar.md +++ b/content/lessons/electricity/batteries-and-internal-resistance/ar.md @@ -17,14 +17,14 @@ charts: [] ## Try it -1. ارفع «المقاومة الداخلية r». تنخفض «V»، جهد الطرفين، دون «القوة الدافعة الكهربائية ε»، رغم أن القوة الدافعة نفسها لم تتغير إطلاقًا. -2. ارفع «مقاومة الحمل R» بدلًا من ذلك. تقترب «V» من «القوة الدافعة الكهربائية ε» مجددًا، لأن تيارًا أقل يمر الآن عبر المقاومة الداخلية نفسها. +1. اجعل «القوة الدافعة الكهربائية ε» تساوي 12.6 V و«مقاومة الحمل R» تساوي 0.5 Ω، ثم ارفع «المقاومة الداخلية r» من 0.02 Ω إلى 0.1 Ω. ينخفض «V»، جهد الطرفين، من 12.1 V إلى 10.5 V، مع أن القوة الدافعة نفسها لم تتغير. +2. أبقِ r عند 0.1 Ω وارفع «مقاومة الحمل R» من 0.5 Ω إلى 5 Ω. يعود «V» إلى نحو 12.35 V، لأن تيارًا أقل يمر الآن عبر المقاومة الداخلية نفسها. 3. قارن إعداد البطارية الدافئة المسبق بإعداد البطارية الباردة. يهبط جهد الطرفين أكثر بكثير حين ترتفع «المقاومة الداخلية r». ## Real-life examples 1. **بطارية سيارة دافئة تشغّل المحرك.** بقوة دافعة كهربائية 12.6 V ومقاومة داخلية ضئيلة 0.02 Ω، لا يُهبط سحب محرك التشغيل الثقيل 24.2 A جهد الطرفين إلا إلى 12.1 V. -2. **بطارية سيارة باردة تشغّل المحرك.** يرفع الطقس البارد المقاومة الداخلية للبطارية نفسها إلى 0.1 Ω. يهبط حمل محرك التشغيل نفسه بجهد الطرفين الآن إلى 10.5 V بالكامل. +2. **بطارية سيارة باردة تشغّل المحرك.** يرفع الطقس البارد المقاومة الداخلية للبطارية نفسها إلى 0.1 Ω. الحمل نفسه يُنزل جهد الطرفين الآن إلى 10.5 V. 3. **بطارية AA تشغّل مصباحًا يدويًا.** بقوة دافعة كهربائية أصغر بكثير 1.5 V وحمل متواضع 5 Ω، بالكاد يهبط جهد الطرفين، إلى 1.456 V. ## Test yourself @@ -37,7 +37,7 @@ charts: [] كل بطارية حقيقية هي في الواقع مصدر قوة دافعة كهربائية مثالي، مع مقاومة صغيرة مبنية بجانبه مباشرة، غير مرئية من الخارج، تُسمى مقاومتها الداخلية. بمجرد أن يتدفق تيار فعلي، "يُستهلك" جزء من دفع البطارية في دفع ذلك التيار عبر مقاومتها الداخلية، قبل أن يصل الباقي إلى الطرفين إطلاقًا. الجهد الذي يقرؤه مقياس من الخارج، «V»، أقل قليلًا دائمًا من كامل «القوة الدافعة الكهربائية ε» بمجرد تدفق التيار، رغم أن القوة الدافعة نفسها لا تتغير أبدًا. -هذا التأثير ضئيل لبطارية سيارة جديدة ودافئة، مقاومتها الداخلية نحو 0.02 Ω فقط. يُغلّظ الطقس البارد كيمياء البطارية الداخلية، ويرفع تلك المقاومة عدة أضعاف. بالضبط حين تحتاج السيارة تيارًا كبيرًا وقصيرًا لتدوير محرك التشغيل، يهبط جهد الطرفين أشد الهبوط. لهذا قد تكافح بطارية هامشية، تعمل جيدًا طوال الصيف، فجأة لتشغيل السيارة في أول صباح متجمد. +هذا التأثير ضئيل لبطارية سيارة جديدة ودافئة، مقاومتها الداخلية نحو 0.02 Ω فقط. يبطّئ الطقس البارد التفاعلات الكيميائية داخل البطارية، فيرفع تلك المقاومة عدة أضعاف. بالضبط حين تحتاج السيارة تيارًا كبيرًا وقصيرًا لتدوير محرك التشغيل، يهبط جهد الطرفين أشد الهبوط. لهذا قد تكافح بطارية هامشية، تعمل جيدًا طوال الصيف، فجأة لتشغيل السيارة في أول صباح متجمد. ## Formal @@ -58,13 +58,17 @@ charts: [] ## Real world ### محركات تشغيل السيارات + يسحب محرك التشغيل لحظيًا أكثر من 100 A بكثير، وهذا بالضبط الموقف الذي تهم فيه المقاومة الداخلية أكثر ما تهم، لأن حتى $r$ صغيرة تسبب هبوط جهد $Ir$ كبيرًا تحت تيار ثقيل كهذا. ### أجهزة اختبار البطاريات + يطبّق جهاز اختبار البطارية عمدًا حملًا معلومًا، ويقيس مدى هبوط الجهد، لأن ذلك الهبوط يكشف المقاومة الداخلية مباشرة. هذه طريقة عملية وسريعة للحكم على صحة البطارية دون فتحها. ### حزم البطاريات القابلة لإعادة الشحن + تُصنَّف حزم بطاريات أجهزة الكمبيوتر المحمولة والهواتف بمقاومة داخلية منخفضة بما يكفي، لتوصيل أقصى طلب تيار للهاتف دون أن يهبط الجهد بما يكفي لإعادة تشغيل الجهاز. ### الخلايا الشمسية + لخلية شمسية واحدة أيضًا مقاومة داخلية معتبرة، ولهذا يهبط جهد خرجها المفيد مع سحب تيار أكبر منها تحت شمس ساطعة، تمامًا كبطارية تحت حمل. diff --git a/content/lessons/electricity/batteries-and-internal-resistance/en.md b/content/lessons/electricity/batteries-and-internal-resistance/en.md index 95ce2567..e25173b6 100644 --- a/content/lessons/electricity/batteries-and-internal-resistance/en.md +++ b/content/lessons/electricity/batteries-and-internal-resistance/en.md @@ -21,8 +21,8 @@ charts: [] ## Try it -1. Raise «internal resistance r». «V» (terminal voltage) drops below «EMF ε», even though the EMF itself never changed. -2. Raise «load resistance R» instead. «V» climbs back up closer to «EMF ε», because less current now flows through the same internal resistance. +1. Set «EMF ε» to 12.6 V and «load resistance R» to 0.5 Ω, then raise «internal resistance r» from 0.02 Ω to 0.1 Ω. «V» (terminal voltage) drops from 12.1 V to 10.5 V, even though the EMF itself never changed. +2. Keep r at 0.1 Ω and raise «load resistance R» from 0.5 Ω to 5 Ω. «V» climbs back to about 12.35 V, because less current now flows through the same internal resistance. 3. Compare the warm-battery preset with the cold-battery one: the terminal voltage sags far more once «internal resistance r» rises. ## Real-life examples @@ -41,7 +41,7 @@ charts: [] Every real battery is really a perfect EMF source with a small resistor built in right next to it, invisible from the outside, called its internal resistance. As soon as current actually flows, some of the battery's push gets "used up" just driving that current through its own internal resistance, before the rest ever reaches the terminals — so the voltage a meter reads outside, «V», is always a little less than the full «EMF ε» once current is flowing, even though the EMF itself never changes. -The effect is tiny for a fresh, warm car battery, whose internal resistance is only around 0.02 Ω. Cold weather thickens the battery's internal chemistry and raises that resistance several-fold, so exactly when a car most needs a big, brief current to crank the starter motor, the terminal voltage sags hardest — which is why a marginal battery that works fine all summer can suddenly struggle to start the car on the first freezing morning. +The effect is tiny for a fresh, warm car battery, whose internal resistance is only around 0.02 Ω. Cold weather slows the chemical reactions inside the battery and raises that resistance several-fold, so exactly when a car most needs a big, brief current to crank the starter motor, the terminal voltage sags hardest — which is why a marginal battery that works fine all summer can suddenly struggle to start the car on the first freezing morning. ## Formal @@ -62,13 +62,17 @@ A battery's internal resistance is not fixed: it rises as the battery discharges ## Real world ### Car starter motors + A starter motor briefly draws well over 100 A, which is exactly the situation where internal resistance matters most, since even a small $r$ causes a large $Ir$ voltage sag under such a heavy current. ### Battery testers + A battery tester deliberately applies a known load and measures how far the voltage sags, because that sag directly reveals the internal resistance — a fast, practical way to judge a battery's health without opening it up. ### Rechargeable battery packs + Laptop and phone battery packs are rated with an internal resistance low enough that they can supply a phone's peak current demand without the voltage sagging enough to reset the device. ### Solar cells + A single solar cell has a meaningful internal resistance too, which is why its usable output voltage sags as more current is drawn from it under bright sun, exactly like a battery under load. diff --git a/content/lessons/electricity/batteries-and-internal-resistance/lesson.yaml b/content/lessons/electricity/batteries-and-internal-resistance/lesson.yaml index 4c766000..17dede17 100644 --- a/content/lessons/electricity/batteries-and-internal-resistance/lesson.yaml +++ b/content/lessons/electricity/batteries-and-internal-resistance/lesson.yaml @@ -3,13 +3,13 @@ subject: electricity difficulty: high-school equation: V = \varepsilon - Ir concepts: -- emf -- internal-resistance -- terminal-voltage + - emf + - internal-resistance + - terminal-voltage prerequisites: -- ohms-law + - ohms-law related: -- voltage-and-energy + - voltage-and-energy visualization: type: batteries-and-internal-resistance options: {} @@ -34,15 +34,15 @@ parameters: value: 5 unit: Ω variables: -- V -- \varepsilon -- I -- r -- R + - V + - \varepsilon + - I + - r + - R derivation: -- V = \varepsilon - Ir -- I = \frac{\varepsilon}{R+r} -- V = IR + - V = \varepsilon - Ir + - I = \frac{\varepsilon}{R+r} + - V = IR presets: - emf: 12.6 r: 0.02 diff --git a/content/lessons/electricity/capacitors/ar.md b/content/lessons/electricity/capacitors/ar.md index 90ab100e..c94e1cff 100644 --- a/content/lessons/electricity/capacitors/ar.md +++ b/content/lessons/electricity/capacitors/ar.md @@ -15,9 +15,9 @@ charts: [] ## Try it -1. ارفع «الجهد V». تصعد «Q = CV» في خط مستقيم: ضعف الجهد يعطي ضعف الشحنة المخزَّنة. -2. ارفع «الجهد V» مرة أخرى وراقب «E». تصعد أسرع بكثير من الشحنة، لأن الطاقة تعتمد على مربع الجهد. -3. ارفع «السعة C» بدلًا من ذلك، وأبقِ «الجهد V» ثابتًا. تصعد «Q» و«E» معًا في خط مستقيم هذه المرة، فالسعة وحدها تكبّرهما بالتساوي. +1. اجعل «السعة C» تساوي 150 µF وارفع «الجهد V» من 100 V إلى 200 V. تتضاعف «Q = CV» من 15 mC إلى 30 mC: ضعف الجهد يعطي ضعف الشحنة المخزَّنة. +2. كرّر التغيير نفسه وراقب «E». ترتفع من 0.75 J إلى 3 J، أي أربعة أضعاف، لأن الطاقة تعتمد على مربع الجهد. +3. أبقِ «الجهد V» عند 200 V وارفع «السعة C» من 150 µF إلى 300 µF. هذه المرة تتضاعف «Q» و«E» معًا، إلى 60 mC و6 J، فالسعة تكبّرهما بالتساوي. ## Real-life examples @@ -56,13 +56,17 @@ charts: [] ## Real world ### فلاشات الكاميرا + يشحن الفلاش مكثفه ببطء، على مدى ثانية أو ثانيتين، بتيار صغير من البطارية. ثم يُفرغ معظمه في أقل من جزء من الألف من الثانية عبر أنبوب الفلاش، وهي دفعة قدرة لا تستطيع البطارية وحدها إيصالها مباشرة أبدًا. ### تنعيم مزودات الطاقة + تمتص المكثفات الموضوعة عبر خرج مزود طاقة مستمر التموجات الصغيرة، فتُبقي الجهد ثابتًا حتى مع تغيّر التيار الذي تسحبه بقية الدارة لحظة بلحظة. ### شاشات اللمس + تقيس شاشات اللمس السعوية التغيّر الضئيل في السعة الذي يسببه إصبع عند كل نقطة على الزجاج، لأن موصلية الإصبع نفسها تضيف نفسها مؤقتًا إلى مساحة الصفيحة المحلية. ### أجهزة إزالة الرجفان + يشحن جهاز إزالة الرجفان الطبي مكثفًا كبيرًا على مدى عدة ثوانٍ، ثم يُفرغه عبر الصدر في جزء من الثانية، موصلًا قدرة لحظية أكبر بكثير مما تستطيع البطارية بداخله توفيره وحدها. diff --git a/content/lessons/electricity/capacitors/en.md b/content/lessons/electricity/capacitors/en.md index 7749b1e5..f872627e 100644 --- a/content/lessons/electricity/capacitors/en.md +++ b/content/lessons/electricity/capacitors/en.md @@ -17,9 +17,9 @@ charts: [] ## Try it -1. Raise «voltage V». «Q = CV» climbs in a straight line — twice the voltage, twice the stored charge. -2. Raise «voltage V» again and watch «E». It climbs far faster than the charge does, because energy depends on voltage squared. -3. Raise «capacitance C» instead, keeping «voltage V» fixed. Both «Q» and «E» climb in a straight line this time — capacitance alone scales them evenly. +1. Set «capacitance C» to 150 µF and raise «voltage V» from 100 V to 200 V. «Q = CV» doubles from 15 mC to 30 mC — twice the voltage, twice the stored charge. +2. Repeat the same change and watch «E». It rises from 0.75 J to 3 J, four times as much, because energy depends on voltage squared. +3. Keep «voltage V» at 200 V and raise «capacitance C» from 150 µF to 300 µF. This time «Q» and «E» both double, to 60 mC and 6 J — capacitance scales them evenly. ## Real-life examples @@ -58,13 +58,17 @@ Real capacitors reach useful capacitances — microfarads, not picofarads — ma ## Real world ### Camera flashes + A flash charges its capacitor slowly, over a second or two, through a small current from the battery, then discharges nearly all of it in under a millisecond through the flash tube — a burst of power the battery alone could never deliver directly. ### Power supply smoothing + Capacitors placed across a DC power supply's output soak up small ripples, keeping the voltage steady even as the current drawn by the rest of the circuit changes moment to moment. ### Touchscreens + Capacitive touchscreens measure the tiny change in capacitance a finger causes at each point on the glass, since a finger's own conductivity briefly adds itself to the local plate area. ### Defibrillators + A medical defibrillator charges a large capacitor over several seconds and then discharges it through the chest in a fraction of a second, delivering far more instantaneous power than the battery inside it could supply on its own. diff --git a/content/lessons/electricity/capacitors/lesson.yaml b/content/lessons/electricity/capacitors/lesson.yaml index a088bcc7..d22eb2bf 100644 --- a/content/lessons/electricity/capacitors/lesson.yaml +++ b/content/lessons/electricity/capacitors/lesson.yaml @@ -3,13 +3,13 @@ subject: electricity difficulty: high-school equation: Q = CV concepts: -- capacitance -- charge -- energy + - capacitance + - charge + - energy prerequisites: -- voltage-and-energy + - voltage-and-energy related: -- rc-circuit + - rc-circuit visualization: type: capacitors options: {} @@ -31,14 +31,14 @@ parameters: value: 300 unit: V variables: -- Q -- C -- V -- E + - Q + - C + - V + - E derivation: -- Q = CV -- E = \frac{V}{2}Q -- E = \frac{1}{2}CV^2 + - Q = CV + - E = \frac{V}{2}Q + - E = \frac{1}{2}CV^2 presets: - C: 150 V: 300 diff --git a/content/lessons/electricity/charge-and-current/ar.md b/content/lessons/electricity/charge-and-current/ar.md index 1e600f93..8d69f6c8 100644 --- a/content/lessons/electricity/charge-and-current/ar.md +++ b/content/lessons/electricity/charge-and-current/ar.md @@ -20,15 +20,15 @@ charts: [] ## Try it -1. ارفع «التيار I». تتسارع النقاط داخل السلك، لأن تيارًا أكبر يعني شحنة أكبر تمر كل ثانية. -2. ارفع «الزمن t». تصعد قراءة «Q = It» بسرعة، لأن الشحنة تتجمع كلما طال زمن التيار. -3. صغّر «مقطع السلك A» كثيرًا. سرعة النقاط بالكاد تتغير، لكن الرقم الحقيقي أسفلها يقفز، لأن التيار نفسه يضطر للمرور عبر إلكترونات أقل. +1. اجعل «التيار I» يساوي 2 A و«الزمن t» يساوي 60 s. تعرض قراءة «Q = It» القيمة 120 C. ارفع التيار إلى 4 A: تتحرك النقاط أسرع وتتضاعف القراءة إلى 240 C. +2. أعد التيار إلى 2 A وارفع «الزمن t» من 60 s إلى 120 s. تتضاعف القراءة مرة أخرى إلى 240 C: كلما طال زمن مرور التيار مرّت شحنة أكثر. +3. عند 2 A، اجعل «مقطع السلك A» يساوي 1.5 mm². تعرض قراءة سرعة الانجراف نحو 0.098 mm/s. صغّر A إلى 0.5 mm²: تصير السرعة ثلاثة أضعاف، نحو 0.294 mm/s، لأن السلك الأرفع فيه إلكترونات حرة أقل، فيتحرك كل منها أسرع. النقاط على الشاشة لا تتغير، لأن سرعتها تتبع التيار فقط. ## Real-life examples 1. **كابل شحن الهاتف.** كابل USB رفيع يحمل نحو 0.5 A. إذا بقي موصولًا دقيقة واحدة، يتدفق 30 C من الشحنة إلى البطارية. -2. **سلك الغلاية الكهربائية.** تسحب الغلاية نحو 8 A عبر سلك أسمك بكثير. في 5 ثوانٍ فقط يتدفق 40 C، وهي الشحنة نفسها التي يحتاج كابل الهاتف دقيقة كاملة ليوصلها. -3. **شريط LED.** يسحب متر من شريط LED نحو 0.2 A عبر سلك رفيع. في نصف دقيقة لا يتجاوز ذلك 6 C، ولهذا يبقى سلكه رفيعًا جدًا. +2. **سلك الغلاية الكهربائية.** تسحب الغلاية نحو 8 A عبر سلك أسمك بكثير. في 5 ثوانٍ فقط يتدفق 40 C، وهذا أكثر مما أوصله كابل الهاتف في دقيقة كاملة. +3. **شريط LED.** يسحب متر من شريط LED نحو 0.2 A عبر سلك رفيع. في نصف دقيقة لا يتجاوز ذلك 6 C. التيار صغير، ولهذا يكفيه سلك رفيع. ## Test yourself @@ -38,9 +38,9 @@ charts: [] ## Intuition -تخيّل سلكًا ممتلئًا بالماء من طرفه إلى طرفه. افتح الصنبور، ويخرج الماء من الطرف البعيد فورًا تقريبًا. لا تندفع قطرة واحدة طوال الأنبوب، بل تدفع كل قطرة التي أمامها في اللحظة نفسها. سلك النحاس يشبه هذا الأنبوب، مملوء بإلكترونات حرة، نحو $8.5 \times 10^{28}$ إلكترونًا في كل متر مكعب. ارفع «التيار I» فتتسارع النقاط على الشاشة، وهي تمثّل تدفق شحنة أكبر، لكن الإلكترونات نفسها لا تركض أبدًا. +تخيّل خرطومًا ممتلئًا بالماء من طرفه إلى طرفه. افتح الصنبور، فيخرج الماء من الطرف البعيد فورًا تقريبًا. لم تقطع قطرة واحدة الخرطوم كله، بل تدفع كل قطرة التي أمامها في اللحظة نفسها. سلك النحاس يشبه هذا الخرطوم، مملوء بإلكترونات حرة، نحو $8.5 \times 10^{28}$ إلكترونًا في كل متر مكعب. ارفع «التيار I» فتتسارع النقاط على الشاشة، وهي تمثّل تدفق شحنة أكبر، لكن الإلكترونات نفسها لا تركض أبدًا. -احسب سرعة الإلكترونات الحقيقية وستُفاجأ. في سلك عادي يحمل تيارًا معتادًا، تكون سرعة الانجراف جزءًا صغيرًا من المليمتر في الثانية. هذا أبطأ من حلزون، وأبطأ بآلاف المرات من الإشارة الكهربائية التي تصل إلى المصباح فور الضغط على المفتاح. صغّر «مقطع السلك A»، فيضطر كل إلكترون للانجراف أسرع ليعوّض قلة عدد رفاقه. جرّب ذلك وراقب قراءة سرعة الانجراف تقفز بينما النقاط المرئية بالكاد تتحرك. +احسب سرعة الإلكترونات الحقيقية وستُفاجأ. في سلك عادي يحمل تيارًا معتادًا، تكون سرعة الانجراف جزءًا صغيرًا من المليمتر في الثانية. هذا أبطأ من حلزون، وأبطأ بمليارات المرات من الإشارة الكهربائية التي تصل إلى المصباح فور الضغط على المفتاح. صغّر «مقطع السلك A»، فيضطر كل إلكترون للانجراف أسرع ليعوّض قلة عدد رفاقه. جرّب ذلك وراقب قراءة سرعة الانجراف تقفز بينما النقاط المرئية بالكاد تتحرك. ## Formal @@ -55,19 +55,23 @@ charts: [] ## Derivation 1. يُعرَّف التيار بأنه الشحنة على الزمن: $I = Q/t$. -2. يحمل الإلكترونات الحرة في قطعة سلك طولها $L$ تلك الشحنة: $Q = nAeL$، ومن ثم $I = nAe(L/t)$. +2. تحمل الإلكترونات الحرة في قطعة سلك طولها $L$ تلك الشحنة: $Q = nAeL$، ومن ثم $I = nAe(L/t)$. 3. بما أن $L/t$ هو ببساطة متوسط سرعة الإلكترونات $v_d$، نحصل على $I = nAev_d$. وبإعادة الترتيب نجد سرعة الانجراف نفسها: $v_d = I/(nAe)$. ## Real world ### مقاسات الأسلاك -تُصنَّف الكابلات بمساحة مقطعها، لأن السلك الأرفع يجبر التيار نفسه على المرور عبر إلكترونات أقل. هذا يرفع الحرارة الناتجة عن المقاومة، ولهذا يكون كابل شاحن الهاتف رفيعًا وكابل تغذية الفرن سميكًا. + +تُصنَّف الكابلات بمساحة مقطعها، لأن مقاومة السلك الأرفع أكبر، فيسخن أكثر إذا مرّ فيه التيار نفسه. ولهذا يكون كابل شاحن الهاتف رفيعًا وكابل تغذية الفرن سميكًا. ### قواطع الدارة + يفصل القاطع حين يرتفع التيار لا الشحنة، لأن التيار هو ما يحدد سرعة تراكم الحرارة في الأسلاك خلف الجدار. ### الطلاء الكهربائي + تتابع ورش الطلاء الكهربائي إجمالي الشحنة، $Q = It$، لتتحكم بدقة في كمية المعدن المترسبة، لأن كتلة الطلاء تتناسب مع الشحنة المتدفقة. ### سعة البطارية + بطارية مصنَّفة بـ"3000 mAh" تخبرك فعليًا بإجمالي الشحنة التي تستطيع إعطاءها: 3 A لمدة ساعة واحدة، أو 1 A لثلاث ساعات، قبل أن تفرغ. diff --git a/content/lessons/electricity/charge-and-current/en.md b/content/lessons/electricity/charge-and-current/en.md index 411a6d30..2fe8ee69 100644 --- a/content/lessons/electricity/charge-and-current/en.md +++ b/content/lessons/electricity/charge-and-current/en.md @@ -23,15 +23,15 @@ charts: [] ## Try it -1. Raise «current I». The dots in the wire move faster: more current means more charge sliding past every second. -2. Raise «time t». The «Q = It» readout climbs — charge just keeps piling up the longer the current flows. -3. Shrink «wire cross-section A» right down. The drift speed readout barely changes the dots on screen, but the real number underneath it jumps, because the same current now has to squeeze through far fewer electrons. +1. Set «current I» to 2 A and «time t» to 60 s. The «Q = It» readout shows 120 C. Raise the current to 4 A: the dots move faster and the readout doubles to 240 C. +2. Return to 2 A and raise «time t» from 60 s to 120 s. The readout doubles again, to 240 C: the longer the current flows, the more charge has passed. +3. With 2 A, set «wire cross-section A» to 1.5 mm². The drift-speed readout shows about 0.098 mm/s. Shrink A to 0.5 mm²: it triples to about 0.294 mm/s, because a thinner wire holds fewer free electrons and each one must move faster. The dots on screen do not change; their speed follows the current only. ## Real-life examples 1. **Phone charging cable.** A thin USB cable carries about 0.5 A; left plugged in for a minute, 30 C of charge has flowed into the battery. -2. **Kettle's mains lead.** A kettle draws roughly 8 A through a much thicker cable; in just 5 seconds, 40 C already flows — the same charge the phone cable took a full minute to deliver. -3. **LED strip.** A metre of LED strip sips about 0.2 A through a thin wire; over half a minute that is only 6 C, which is why its wire can stay so thin. +2. **Kettle's mains lead.** A kettle draws roughly 8 A through a much thicker cable; in just 5 seconds, 40 C already flows — more than the phone cable delivered in a full minute. +3. **LED strip.** A metre of LED strip sips about 0.2 A through a thin wire; over half a minute that is only 6 C. The current is small, which is why its wire can stay so thin. ## Test yourself @@ -43,7 +43,7 @@ charts: [] Picture the wire as a hose already completely full of water: when you turn the tap, water comes out the far end almost instantly, not because any single drop raced down the hose, but because every drop in the whole line nudges the next one forward at once. A copper wire is like that hose already packed with free electrons — about $8.5 \times 10^{28}$ of them in every cubic metre. Raise «current I» on screen and the dots move faster, standing in for a bigger charge flow, but the electrons themselves are never sprinting. -Work out the actual speed and it is startling: for an everyday current through an ordinary wire, the drift velocity is a small fraction of a millimetre per second — slower than a snail, and thousands of times slower than the electrical "push" that reaches a lightbulb the instant you flick a switch. Shrinking «wire cross-section A» packs the same current through fewer electrons, so each one has to drift faster to keep up — try it and watch the drift-speed readout jump while the visible dots barely change. +Work out the actual speed and it is startling: for an everyday current through an ordinary wire, the drift velocity is a small fraction of a millimetre per second — slower than a snail, and billions of times slower than the electrical "push" that reaches a lightbulb the instant you flick a switch. Shrinking «wire cross-section A» packs the same current through fewer electrons, so each one has to drift faster to keep up — try it and watch the drift-speed readout jump while the visible dots barely change. ## Formal @@ -64,13 +64,17 @@ The signal that turns on a distant bulb travels near the speed of light, because ## Real world ### Wire gauges -Cables are rated by cross-sectional area precisely because a thinner wire forces the same current through fewer electrons, raising resistive heating — which is why a phone charger's cable is thin but a cooker's supply cable is thick. + +Cables are rated by cross-sectional area because a thinner wire has more resistance, so the same current heats it more — which is why a phone charger's cable is thin but a cooker's supply cable is thick. ### Circuit breakers + A breaker trips when current, not charge, gets too high, because current is what determines how fast heat builds up in the wires behind the wall. ### Electroplating + Electroplating shops track total charge, $Q = It$, to control exactly how much metal gets deposited, since the mass plated is proportional to the charge that has flowed. ### Battery capacity + A battery rated "3000 mAh" is really rating total charge it can deliver — 3 amps for one hour, or 1 amp for three, before it runs flat. diff --git a/content/lessons/electricity/charge-and-current/lesson.yaml b/content/lessons/electricity/charge-and-current/lesson.yaml index dd382bb1..41f936ab 100644 --- a/content/lessons/electricity/charge-and-current/lesson.yaml +++ b/content/lessons/electricity/charge-and-current/lesson.yaml @@ -3,13 +3,13 @@ subject: electricity difficulty: beginner equation: I = \frac{Q}{t} concepts: -- charge -- current -- drift-velocity + - charge + - current + - drift-velocity prerequisites: [] related: -- ohms-law -- voltage-and-energy + - ohms-law + - voltage-and-energy visualization: type: charge-and-current options: {} @@ -37,18 +37,18 @@ parameters: value: 60 unit: s variables: -- I -- Q -- t -- n -- A -- e -- L -- v_d + - I + - Q + - t + - n + - A + - e + - L + - v_d derivation: -- I = \frac{Q}{t} -- Q = nAeL \;\Rightarrow\; I = nAe\frac{L}{t} -- \frac{L}{t} = v_d \;\Rightarrow\; v_d = \frac{I}{nAe} + - I = \frac{Q}{t} + - Q = nAeL \;\Rightarrow\; I = nAe\frac{L}{t} + - \frac{L}{t} = v_d \;\Rightarrow\; v_d = \frac{I}{nAe} presets: - I: 0.5 A: 0.2 diff --git a/content/lessons/electricity/electric-power-and-energy-bills/ar.md b/content/lessons/electricity/electric-power-and-energy-bills/ar.md index 5c4196e8..71db5139 100644 --- a/content/lessons/electricity/electric-power-and-energy-bills/ar.md +++ b/content/lessons/electricity/electric-power-and-energy-bills/ar.md @@ -16,9 +16,9 @@ charts: [] ## Try it -1. ارفع «قدرة الجهاز P» نحو 2200 W، قدرة الغلاية. تصعد قراءة التكلفة الشهرية بسرعة حتى لبضع ساعات فقط. -2. ارفع «ساعات الاستخدام شهريًا t» نحو 720 ساعة، ساعات الثلاجة، فهي تعمل طوال الشهر. حتى قدرة متواضعة تتراكم لتكلفة شهرية حقيقية. -3. اخفض «قدرة الجهاز P» إلى 9 W، قدرة مصباح LED. مهما طالت «ساعات الاستخدام شهريًا t»، بالكاد تتحرك التكلفة. +1. اجعل «قدرة الجهاز P» تساوي 2200 W، وهي قدرة الغلاية، و«ساعات الاستخدام شهريًا t» تساوي 5، والسعر 0.28. تعرض القراءات 11 kWh وتكلفة 3.08 دولار: القدرة العالية تكلّف مالًا حتى في ساعات قليلة. +2. اجعل P تساوي 150 W، وهي قدرة الثلاجة، وt تساوي 720 ساعة، فهي تعمل طوال الشهر. تعرض القراءات 108 kWh و30.24 دولارًا: القدرة الصغيرة تتراكم حين تطول الساعات. +3. اخفض P إلى 9 W، وهي قدرة مصباح LED، مع t = 120 ساعة. التكلفة 0.30 دولار فقط. وحتى عند أقصى المنزلق، 730 ساعة، تبقى أقل من دولارين. ## Real-life examples @@ -57,13 +57,17 @@ charts: [] ## Real world ### ملصقات كفاءة الطاقة + تُصنِّف أنظمة ملصقات الطاقة، كنظام الاتحاد الأوروبي وما شابهه، الأجهزة أساسًا بعدد الكيلوواط ساعة التي تستهلكها في التشغيل المعتاد سنويًا، لأن هذا، لا تصنيف القدرة وحده، هو ما يتنبأ بتكلفة التشغيل الحقيقية. ### العدادات الذكية + تتابع العدادات الذكية استهلاك القدرة باستمرار، وتضربه في الزمن عند كل نطاق سعري، فتمنح المنزل مجموعًا تراكميًا حيًا للفاتورة بدلًا من تقدير واحد في نهاية الشهر. ### قدرة الاستعداد + لا تزال الأجهزة المتروكة في وضع الاستعداد تسحب قدرة ثابتة صغيرة كل ساعة من الشهر، ولهذا قد تتراكم أجهزة صغيرة كثيرة "دائمة التشغيل" لتشكل جزءًا ملحوظًا من الفاتورة، رغم أن كل واحدة تبدو تافهة. ### الألواح الشمسية + تطرح الألواح الشمسية المنزلية فعليًا من ساعات طاقة الشبكة المستخدمة كل شهر، ولهذا بالضبط تُحسَب مدة استرداد تكلفتها بنفس حساب القدرة في الزمن في السعر، بالاتجاه المعاكس. diff --git a/content/lessons/electricity/electric-power-and-energy-bills/en.md b/content/lessons/electricity/electric-power-and-energy-bills/en.md index 63bcceab..c7cf89c7 100644 --- a/content/lessons/electricity/electric-power-and-energy-bills/en.md +++ b/content/lessons/electricity/electric-power-and-energy-bills/en.md @@ -19,9 +19,9 @@ charts: [] ## Try it -1. Raise «appliance power P» toward a kettle's 2200 W. The monthly cost readout climbs fast even for just a few hours. -2. Raise «hours used per month t» toward a fridge's 720 (it runs all month). Even a modest power adds up to a real monthly cost. -3. Drop «appliance power P» to an LED bulb's 9 W. However long «hours used per month t» runs, the cost barely moves. +1. Set «appliance power P» to a kettle's 2200 W, «hours used per month t» to 5 and the price to 0.28. The readouts show 11 kWh and a cost of 3.08 dollars: a high power costs real money even for a few hours. +2. Set P to a fridge's 150 W and t to 720 hours (it runs all month). The readouts show 108 kWh and 30.24 dollars: a modest power adds up when the hours are long. +3. Drop P to an LED bulb's 9 W with t = 120 hours. The cost is only 0.30 dollars. Even at the slider's maximum of 730 hours it stays under 2 dollars. ## Real-life examples @@ -60,13 +60,17 @@ Utilities often charge a lower "off-peak" price $c$ at night, when demand is low ## Real world ### Energy labels + The EU and similar energy-label systems rate appliances mainly by how many kWh they use in typical operation each year, precisely because that — not the power rating alone — predicts the real running cost. ### Smart meters + Smart meters track power draw continuously and multiply by the time at each price band, giving a household a live running total of the bill instead of one estimate at the end of the month. ### Standby power + Devices left on standby still draw a small constant power for every hour of the month, which is why many small "always-on" gadgets can add up to a noticeable slice of a bill despite each one seeming trivial. ### Solar panels + A home solar panel effectively subtracts from the hours of grid power used each month, which is exactly why its payback time is calculated using this same power-times-time-times-price arithmetic run in reverse. diff --git a/content/lessons/electricity/electric-power-and-energy-bills/lesson.yaml b/content/lessons/electricity/electric-power-and-energy-bills/lesson.yaml index bb73f073..d223094c 100644 --- a/content/lessons/electricity/electric-power-and-energy-bills/lesson.yaml +++ b/content/lessons/electricity/electric-power-and-energy-bills/lesson.yaml @@ -3,13 +3,13 @@ subject: electricity difficulty: beginner equation: \text{Cost} = \frac{Ptc}{1000} concepts: -- power -- energy -- kilowatt-hour + - power + - energy + - kilowatt-hour prerequisites: -- ohms-law + - ohms-law related: -- voltage-and-energy + - voltage-and-energy visualization: type: electric-power-and-energy-bills options: {} @@ -34,14 +34,14 @@ parameters: value: 0.28 unit: $/kWh variables: -- P -- t -- E -- c + - P + - t + - E + - c derivation: -- E = Pt -- E_{kWh} = \frac{Pt}{1000} -- \text{Cost} = E_{kWh}c + - E = Pt + - E_{kWh} = \frac{Pt}{1000} + - \text{Cost} = E_{kWh}c presets: - P: 2200 t: 5 diff --git a/content/lessons/electricity/electrical-safety/ar.md b/content/lessons/electricity/electrical-safety/ar.md index 0e5ffce1..fa1d916d 100644 --- a/content/lessons/electricity/electrical-safety/ar.md +++ b/content/lessons/electricity/electrical-safety/ar.md @@ -14,9 +14,9 @@ charts: [] ## Try it -1. اخفض «مقاومة الجسم Rb» نحو 1000 Ω، مقاومة الجلد الرطب تقريبًا. يقفز «Ib» صعودًا لجهد اللمس نفسه بالضبط. -2. ارفع «مقاومة الجسم Rb» بدلًا من ذلك نحو 100000 Ω، مقاومة الجلد الجاف تقريبًا. الجهد نفسه بالكاد يُنتج أي تيار الآن. -3. راقب «Ib» يتجاوز 30 mA. هذا هو التيار الذي صُمِّم جهاز RCD بالضبط لاكتشافه وقطعه خلال أجزاء من الألف من الثانية. +1. ابدأ عند 230 V و«مقاومة الجسم Rb» تساوي 100000 Ω، وهي مقاومة الجلد الجاف تقريبًا: يقرأ «Ib» القيمة 2.3 mA. اخفض Rb نحو 1000 Ω، مقاومة الجلد الرطب تقريبًا. يقفز «Ib» إلى 230 mA لجهد اللمس نفسه. +2. أبقِ Rb عند 1000 Ω واخفض «جهد اللمس V» إلى 12 V. ينخفض التيار إلى 12 mA: مع الجلد الرطب، حتى الجهد المنخفض ليس آمنًا تمامًا. +3. عُد إلى 230 V وارفع Rb ببطء من 1000 Ω. ينزل «Ib» تحت 30 mA قرب 7500 Ω. فوق 30 mA يفصل مؤشر RCD: هذا هو التيار الذي صُمِّم جهاز RCD لاكتشافه وقطعه خلال جزء من الثانية. ## Real-life examples @@ -55,13 +55,17 @@ charts: [] ## Real world ### أجهزة RCD (أجهزة التيار المتبقي) + يراقب جهاز RCD باستمرار الفرق الضئيل بين تيار السلك الحي والمحايد، ويفصل الدارة في اللحظة التي يتجاوز فيها ذلك الفرق نحو 30 mA، فيحمي الشخص حتى حين لا يلاحظ صمام أو قاطع شيئًا إطلاقًا. ### التأريض + يمنح التأريض تيار العطل مسارًا متعمَّدًا منخفض المقاومة جدًا للعودة إلى المصدر، بحيث يسحب العطل تيارًا كافيًا لإحراق الصمام أو فصل القاطع فورًا، بدلًا من انتظار أن يصبح جسم شخص ذلك المسار بدلًا منه. ### قواعد تمديدات الحمام + تتطلب الحمامات دارات فائقة الانخفاض في الجهد، وتأريضًا إضافيًا، وحماية RCD، وذلك تحديدًا لأن مقاومة الجلد الرطب المنخفضة تحوّل صدمة يمكن النجاة منها في العادة إلى صدمة خطيرة. ### معدات الحماية الشخصية والأدوات المعزولة + تعمل القفازات المعزولة ومقابض الأدوات بإضافة مقاومة كبيرة عمدًا على التوالي مع الجسم، بحيث ينتج حتى جهد لمس كبير تيارًا ضئيلًا آمنًا فقط. diff --git a/content/lessons/electricity/electrical-safety/en.md b/content/lessons/electricity/electrical-safety/en.md index 44b869b0..aedc4036 100644 --- a/content/lessons/electricity/electrical-safety/en.md +++ b/content/lessons/electricity/electrical-safety/en.md @@ -17,9 +17,9 @@ charts: [] ## Try it -1. Drop «body resistance Rb» toward wet skin's roughly 1000 Ω. «Ib» rockets upward for the very same touch voltage. -2. Raise «body resistance Rb» toward dry skin's roughly 100,000 Ω instead. The same voltage now barely produces a current at all. -3. Watch «Ib» cross 30 mA: that is the exact current an RCD is designed to detect and cut off within milliseconds. +1. Start at 230 V with «body resistance Rb» at dry skin's roughly 100,000 Ω: «Ib» reads 2.3 mA. Drop Rb toward wet skin's roughly 1000 Ω. «Ib» rockets up to 230 mA for the very same touch voltage. +2. Keep Rb at 1000 Ω and lower «touch voltage V» to 12 V. The current falls to 12 mA: with wet skin, even a low voltage is not harmless. +3. Return to 230 V and raise Rb slowly from 1000 Ω. «Ib» drops below 30 mA near 7500 Ω. Above 30 mA the RCD indicator trips: that is the current an RCD is designed to detect and cut off in a fraction of a second. ## Real-life examples @@ -58,13 +58,17 @@ A standard fuse or circuit breaker is sized to protect the building's wiring fro ## Real world ### RCDs (residual-current devices) + An RCD monitors the tiny difference between live and neutral current continuously and disconnects the circuit the instant that difference exceeds about 30 mA, protecting a person even when a fuse or breaker would never notice. ### Earthing (grounding) + Earthing gives a fault current a deliberate, very low-resistance path back to source, so that a fault draws enough current to blow a fuse or trip a breaker immediately, rather than waiting for a person's body to become that path instead. ### Bathroom wiring rules + Bathrooms require extra-low-voltage circuits, extra earthing and RCD protection precisely because wet skin's low resistance turns an otherwise survivable shock into a dangerous one. ### PPE and insulated tools + Insulated gloves and tool handles work by adding a deliberately huge resistance in series with the body, so that even a substantial touch voltage produces only a negligible, safe current. diff --git a/content/lessons/electricity/electrical-safety/lesson.yaml b/content/lessons/electricity/electrical-safety/lesson.yaml index ba9e799d..8c0cc138 100644 --- a/content/lessons/electricity/electrical-safety/lesson.yaml +++ b/content/lessons/electricity/electrical-safety/lesson.yaml @@ -3,14 +3,14 @@ subject: electricity difficulty: beginner equation: I_b = \frac{V}{R_b} concepts: -- fuses -- circuit-breakers -- earthing -- rcd + - fuses + - circuit-breakers + - earthing + - rcd prerequisites: -- ohms-law + - ohms-law related: -- batteries-and-internal-resistance + - batteries-and-internal-resistance visualization: type: electrical-safety options: {} @@ -26,16 +26,16 @@ parameters: min: 500 max: 500000 step: 500 - value: 1000 + value: 100000 unit: Ω variables: -- I_b -- V -- R_b + - I_b + - V + - R_b derivation: -- I_b \propto V -- R_b \equiv \frac{V}{I_b} \;\Rightarrow\; I_b = \frac{V}{R_b} -- I_b > 0.03 \;\Rightarrow\; \text{the RCD trips} + - I_b \propto V + - R_b \equiv \frac{V}{I_b} \;\Rightarrow\; I_b = \frac{V}{R_b} + - I_b > 0.03 \;\Rightarrow\; \text{the RCD trips} presets: - V: 230 Rb: 100000 diff --git a/content/lessons/electricity/kirchhoffs-laws/ar.md b/content/lessons/electricity/kirchhoffs-laws/ar.md index ec5e91a1..0637ca8a 100644 --- a/content/lessons/electricity/kirchhoffs-laws/ar.md +++ b/content/lessons/electricity/kirchhoffs-laws/ar.md @@ -20,13 +20,13 @@ charts: [] ## Try it -1. راقب «I1» و«I2» و«I3» في القراءات: يساوي I2 + I3 دائمًا I1 بالضبط، وهذه قاعدة كيرشوف للتيار. -2. ارفع «مقاومة الفرع R2». ينخفض I2، لكن قاعدة العقدة تظل صحيحة: لا يزال I2 + I3 يساوي I1. +1. ابدأ بالقيم V = 12 V وR1 = 10 Ω وR2 = 30 Ω وR3 = 60 Ω. تعرض القراءات I1 = 0.4 A وI2 = 0.267 A وI3 = 0.133 A. مجموع I2 وI3 يساوي I1 بالضبط، وهذه قاعدة كيرشوف للتيار. +2. ارفع «مقاومة الفرع R2» من 30 Ω إلى 60 Ω. ينخفض I1 إلى 0.3 A وينقسم الآن بالتساوي، 0.15 A في كل فرع. ما زال I2 + I3 يساوي I1. 3. اجعل «مقاومة الفرع R3» أكبر بكثير من «مقاومة الفرع R2». يأخذ معظم التيار الآن المسار الأسهل عبر R2. ## Real-life examples -1. **دارة منزلية 12 فولت.** مع R1 = 10 Ω وR2 = 30 Ω وR3 = 60 Ω، يخرج 0.4 A إجمالًا من البطارية وينقسم إلى 0.267 A و0.133 A. +1. **فرعان غير متساويين.** مع R1 = 10 Ω وR2 = 30 Ω وR3 = 60 Ω، يخرج 0.4 A إجمالًا من البطارية وينقسم إلى 0.267 A و0.133 A. 2. **فرعان متطابقان.** مع R2 = R3 = 20 Ω، ينقسم التيار الإجمالي 0.6 A بالتساوي تمامًا، 0.3 A في كل فرع. 3. **فرع أسهل بكثير من الآخر.** مع R2 = 10 Ω وR3 = 90 Ω، يأخذ المسار الأسهل عبر R2 تقريبًا كل التيار الإجمالي البالغ 0.545 A، أي 0.491 A منه. @@ -61,13 +61,17 @@ charts: [] ## Real world ### تمديدات المنزل -تشكّل الدارة الحلقية ودارات الإضاءة في المنزل شبكة من هذا النوع بالضبط، حيث تنقسم التغذية الرئيسية من لوحة الصمامات إلى دارات فرعية كثيرة، تخضع كلها للقانونين نفسيهما مهما تعقّد التمديد. + +تشكّل دارات المقابس والإضاءة في المنزل شبكة من هذا النوع بالضبط، حيث تنقسم التغذية الرئيسية من لوحة الصمامات إلى دارات فرعية كثيرة، تخضع كلها للقانونين نفسيهما مهما تعقّد التمديد. ### برامج محاكاة الدارات + تحل برامج تصميم الإلكترونيات معادلات كيرشوف لكل عقدة وحلقة في الدارة، وأحيانًا آلاف منها، لتتنبأ بدقة بما ستفعله الشريحة قبل أن يبنيها أحد. ### موازنة البطاريات + تعتمد حزم البطاريات ذات الخلايا الموصولة على التوازي على قانون التيار. إذا تغيّرت مقاومة خلية واحدة، يعيد التيار توزيع نفسه تلقائيًا بين البقية، بحيث يظل مجموع التيارات الداخلة يساوي الخارجة. ### شبكات الاستشعار + تُقرأ شبكات الاستشعار المقاومية، مثل شاشات اللمس، بهذين القانونين بالضبط، بالعمل عكسيًا من التيارات المقاسة عند الحواف لمعرفة أين يضيف اللمس مقاومة إضافية. diff --git a/content/lessons/electricity/kirchhoffs-laws/en.md b/content/lessons/electricity/kirchhoffs-laws/en.md index 957c2c2e..1acbd0cb 100644 --- a/content/lessons/electricity/kirchhoffs-laws/en.md +++ b/content/lessons/electricity/kirchhoffs-laws/en.md @@ -23,13 +23,13 @@ charts: [] ## Try it -1. Watch «I1», «I2» and «I3» in the readouts: I2 + I3 always equals I1, exactly — that is Kirchhoff's junction rule. -2. Raise «branch resistor R2». I2 falls, but I3 and the junction rule still hold: I2 + I3 still equals I1. +1. Start with V = 12 V, R1 = 10 Ω, R2 = 30 Ω and R3 = 60 Ω. The readouts show I1 = 0.4 A, I2 = 0.267 A and I3 = 0.133 A. I2 + I3 equals I1 exactly — that is Kirchhoff's junction rule. +2. Raise «branch resistor R2» from 30 Ω to 60 Ω. I1 falls to 0.3 A and now splits evenly, 0.15 A in each branch. I2 + I3 still equals I1. 3. Make «branch resistor R3» much bigger than «branch resistor R2». Almost all the current now takes the easier R2 path. ## Real-life examples -1. **Household 12 V circuit.** With R1 = 10 Ω, R2 = 30 Ω and R3 = 60 Ω, a total of 0.4 A leaves the battery and splits into 0.267 A and 0.133 A. +1. **Two unequal branches.** With R1 = 10 Ω, R2 = 30 Ω and R3 = 60 Ω, a total of 0.4 A leaves the battery and splits into 0.267 A and 0.133 A. 2. **Two identical branches.** With R2 = R3 = 20 Ω, the 0.6 A total current splits perfectly evenly, 0.3 A down each branch. 3. **One branch much easier than the other.** With R2 = 10 Ω and R3 = 90 Ω, nearly all of the 0.545 A total — 0.491 A — takes the easier R2 path. @@ -64,13 +64,17 @@ These two laws are really statements of conservation: the current law is conserv ## Real world ### House wiring -A home's ring main and lighting circuits form exactly this kind of network, with the fuse box's main feed splitting into many branch circuits that all obey the same two laws, however complicated the wiring gets. + +A home's socket and lighting circuits form exactly this kind of network, with the main feed at the fuse box splitting into many branch circuits that all obey the same two laws, however complicated the wiring gets. ### Circuit simulation software + Software that designs electronics solves Kirchhoff's equations for every junction and loop in a circuit — sometimes thousands of them — to predict exactly what a chip will do before anyone builds it. ### Battery balancing + Battery packs with cells wired in parallel rely on the current law: if one cell's resistance changes, current automatically redistributes across the others so the currents in still sum to the current out. ### Sensor networks + Resistive sensor grids, like touchscreens, are read out using exactly these laws, working backwards from measured currents at the edges to figure out where a touch is applying an extra resistance. diff --git a/content/lessons/electricity/kirchhoffs-laws/lesson.yaml b/content/lessons/electricity/kirchhoffs-laws/lesson.yaml index 5c4c98a4..d0bb81bd 100644 --- a/content/lessons/electricity/kirchhoffs-laws/lesson.yaml +++ b/content/lessons/electricity/kirchhoffs-laws/lesson.yaml @@ -3,14 +3,14 @@ subject: electricity difficulty: university equation: I_1 = I_2 + I_3 concepts: -- kirchhoffs-current-law -- kirchhoffs-voltage-law -- circuit-analysis + - kirchhoffs-current-law + - kirchhoffs-voltage-law + - circuit-analysis prerequisites: -- ohms-law -- series-parallel + - ohms-law + - series-parallel related: -- resistance-and-resistivity + - resistance-and-resistivity visualization: type: kirchhoffs-laws options: {} @@ -41,17 +41,17 @@ parameters: value: 60 unit: Ω variables: -- V -- R_1 -- R_2 -- R_3 -- I_1 -- I_2 -- I_3 + - V + - R_1 + - R_2 + - R_3 + - I_1 + - I_2 + - I_3 derivation: -- I_1 = I_2 + I_3 -- V = I_1R_1 + I_2R_2 -- I_2R_2 = I_3R_3 + - I_1 = I_2 + I_3 + - V = I_1R_1 + I_2R_2 + - I_2R_2 = I_3R_3 presets: - V: 12 R1: 10 diff --git a/content/lessons/electricity/ohms-law/ar.md b/content/lessons/electricity/ohms-law/ar.md index a40ce8bd..eb6c5ae7 100644 --- a/content/lessons/electricity/ohms-law/ar.md +++ b/content/lessons/electricity/ohms-law/ar.md @@ -20,15 +20,15 @@ charts: ## Try it -1. ارفع «الجهد V». تتسارع النقاط، فدفع أكبر يعني تيارًا أكبر. -2. ارفع «المقاومة R». تتباطأ النقاط، فطريق أصعب يعني تيارًا أقل. -3. اقرأ «I = V/R» تحت الرسم. هو دائمًا الجهد مقسومًا على المقاومة. +1. اجعل «الجهد V» يساوي 9 V و«المقاومة R» تساوي 30 Ω. تقرأ «I = V/R» القيمة 0.3 A. ارفع V إلى 18 V: تتسارع النقاط ويتضاعف التيار إلى 0.6 A. دفع أكبر يعني تيارًا أكبر. +2. أعد الجهد إلى 9 V وارفع R إلى 60 Ω. تتباطأ النقاط وينخفض التيار إلى النصف، 0.15 A. طريق أصعب يعني تيارًا أقل. +3. جرّب أي قيمتين أخريين واقرأ «I = V/R» تحت الرسم. هو دائمًا الجهد مقسومًا على المقاومة. ## Real-life examples 1. **مصباح يدوي صغير.** دفعة متواضعة قدرها 3 V عبر فتيل مقاومته 15 Ω (I = 0.2 A) تكفي بالضبط لجعل الفتيل يتوهج. -2. **مصباح أمامي لسيارة.** بطارية 12 V عبر مصباح مقاومته 4 Ω (I = 3 A) تدفع تيارًا أكبر بكثير، ولهذا تحترق المصابيح الأمامية أسرع من مصابيح الجيب. -3. **مقاومة تحديد التيار في شاحن هاتف.** شاحن 5 V عبر مقاومة 25 Ω (I = 0.2 A) يبقي التيار منخفضًا بما يكفي لحماية البطارية. +2. **مصباح أمامي لسيارة.** بطارية 12 V عبر مصباح مقاومته 4 Ω (I = 3 A) تدفع تيارًا أكبر 15 مرة من تيار المصباح اليدوي، ولهذا يكون مصباح السيارة أسطع بكثير ويحتاج إلى أسلاك أسمك. +3. **مصباح USB صغير.** منفذ USB جهده 5 V موصول بمصباح مقاومته 25 Ω (I = 0.2 A) يعطي تيار المصباح اليدوي نفسه: الجهد أعلى، لكن المقاومة أعلى أيضًا. ## Test yourself @@ -38,9 +38,9 @@ charts: ## Intuition -بطارية 9 فولت جديدة تدفع تيارًا أكبر في المصباح من بطارية 3 فولت شبه فارغة. الدفعة الأقوى تعني تدفق شحنة أكبر. حرّك المنزلق لأعلى ولأسفل لضبط الجهد $V$ على الرسم. راقب النقاط وهي تتحرك حول الحلقة، فتتسارع كلما ارتفع $V$، لأن الدفعة الأكبر تنتج تيارًا أكبر. +بطارية 9 فولت جديدة تدفع تيارًا أكبر في المصباح من بطارية 3 فولت. الدفعة الأقوى تعني تدفق شحنة أكبر. حرّك المنزلق لأعلى ولأسفل لضبط الجهد $V$ على الرسم. راقب النقاط وهي تتحرك حول الحلقة، فتتسارع كلما ارتفع $V$، لأن الدفعة الأكبر تنتج تيارًا أكبر. -تخيّل الآن عصر خرطوم حديقة بدلًا من ذلك. الضغط نفسه من المضخة يدفع ماء أقل عبر خرطوم أضيق. تدوير مقبض المقاوم يفعل الشيء نفسه كهربائيًا. مقاومة أكبر، ويُرمز لها بـ $R$، تخنق الدفعة نفسها إلى تيار أصغر. يتوهج المقاوم أيضًا بشكل أسطع قليلًا كلما ارتفعت القدرة، وهذا مقدار الحرارة التي يبددها. حرّك المنزلقين كليهما وراقبهما يتغيران معًا. هذه أسرع طريقة تشعر بها بعلاقة الجهد والمقاومة والتيار ببعضها. +تخيّل الآن عصر خرطوم حديقة بدلًا من ذلك. الضغط نفسه من المضخة يدفع ماء أقل عبر خرطوم أضيق. تدوير مقبض المقاوم يفعل الشيء نفسه كهربائيًا. مقاومة أكبر، ويُرمز لها بـ $R$، تخنق الدفعة نفسها إلى تيار أصغر. يتوهج المقاوم أيضًا بشكل أسطع قليلًا كلما ارتفعت القدرة، وهذا مقدار الحرارة التي يبددها. حرّك المنزلقين كليهما وراقبهما يتغيران معًا. هذه أسرع طريقة لتفهم كيف يرتبط الجهد والمقاومة والتيار. ## Formal @@ -61,13 +61,17 @@ charts: ## Real world ### شواحن الهواتف + يحوّل الشاحن جهد المصدر الرئيسي إلى جهد آمن وثابت بحيث يتدفق إلى البطارية تيار شحن محدود ويمكن التنبؤ به. ### أجهزة الاستشعار + كثير من أجهزة الاستشعار مقاومات تتغير قيمتها مع الضوء أو الحرارة أو الانفعال، ويكشف قياس التيار الناتج عن الكمية الفيزيائية المتغيرة. ### مزودات الطاقة + تحافظ المزودات المنظَّمة على ثبات $V$ عبر الأحمال المتغيرة، بحيث يظل $I = V/R$ يعطي التيار الصحيح مع تغيّر $R$. ### الصمامات وعناصر التسخين + يُصمَّم سلك الصمام بحيث تسخّنه القدرة $P = I^2R$ عند تياره المقنَّن بما يكفي لينصهر ويقطع الدارة، ويستخدم عنصر الغلاية التسخين نفسه لغلي الماء. diff --git a/content/lessons/electricity/ohms-law/en.md b/content/lessons/electricity/ohms-law/en.md index 57d43f23..e3ecfd24 100644 --- a/content/lessons/electricity/ohms-law/en.md +++ b/content/lessons/electricity/ohms-law/en.md @@ -23,15 +23,15 @@ charts: ## Try it -1. Raise «voltage V». The dots speed up: more push, more current. -2. Raise «resistance R». The dots slow down: harder path, less current. -3. Read «I = V/R» under the picture. It is always the voltage divided by the resistance. +1. Set «voltage V» to 9 V and «resistance R» to 30 Ω. «I = V/R» reads 0.3 A. Raise V to 18 V: the dots speed up and the current doubles to 0.6 A. More push, more current. +2. Return to 9 V and raise R to 60 Ω. The dots slow down and the current halves to 0.15 A. Harder path, less current. +3. Try any other pair of values and read «I = V/R» under the picture. It is always the voltage divided by the resistance. ## Real-life examples 1. **A small torch bulb.** A modest push of 3 V through a 15 Ω bulb filament (I = 0.2 A) gives just enough current to make the filament glow. -2. **A car headlight.** A 12 V battery through a 4 Ω headlight (I = 3 A) pushes far more current, which is why headlights burn out faster than torch bulbs. -3. **A phone charger's current-limiting resistor.** A 5 V charger through a 25 Ω resistor (I = 0.2 A) keeps the current low enough to protect the battery. +2. **A car headlight.** A 12 V battery through a 4 Ω headlight (I = 3 A) pushes fifteen times more current than the torch bulb, which is why a headlight is so much brighter and needs thicker wires. +3. **A small USB lamp.** A 5 V USB port across a 25 Ω lamp (I = 0.2 A) drives the same current as the torch bulb: the voltage is higher, but so is the resistance. ## Test yourself @@ -41,7 +41,7 @@ charts: ## Intuition -A fresh 9-volt battery connected to a light bulb pushes more current through it than a weak, nearly dead 3-volt battery would — the harder push means a bigger flow of charge. On screen, drag up and down on the circuit to set the voltage, labelled $V$, and watch the dots travelling around the loop: they speed up as $V$ rises, because a bigger push drives a bigger current. +A fresh 9-volt battery connected to a light bulb pushes more current through it than a 3-volt battery would — the harder push means a bigger flow of charge. On screen, drag up and down on the circuit to set the voltage, labelled $V$, and watch the dots travelling around the loop: they speed up as $V$ rises, because a bigger push drives a bigger current. Now imagine squeezing a garden hose instead: the same pump pressure pushes less water through a narrower hose. Turning the resistor's dial does the same thing electrically — a larger resistance, labelled $R$, chokes the same push down to a smaller current. The resistor also glows a little brighter as the power climbs, which is the heat it dissipates; watching it change as you drag both sliders is the quickest way to feel how voltage, resistance and current relate. @@ -64,13 +64,17 @@ Ohm’s law is a material model, not a fundamental law: microscopically $\mathbf ## Real world ### Phone chargers + A charger converts mains voltage down to a safe, steady voltage so a predictable, current-limited charge flows into the battery. ### Sensors + Many sensors are resistors whose value changes with light, heat or strain; measuring the resulting current reveals the physical quantity. ### Power supplies + Regulated supplies hold $V$ steady across changing loads, so $I = V/R$ still delivers the right current as $R$ varies. ### Fuses and heating elements + A fuse wire is sized so that at its rated current $P = I^2R$ heats it enough to melt and break the circuit; a kettle element uses the same heating to boil water. diff --git a/content/lessons/electricity/ohms-law/lesson.yaml b/content/lessons/electricity/ohms-law/lesson.yaml index 91137c7a..b1fcf8d0 100644 --- a/content/lessons/electricity/ohms-law/lesson.yaml +++ b/content/lessons/electricity/ohms-law/lesson.yaml @@ -3,14 +3,14 @@ subject: electricity difficulty: high-school equation: V = IR concepts: -- voltage -- current -- resistance -- power + - voltage + - current + - resistance + - power prerequisites: -- slope + - slope related: -- newtons-second-law + - newtons-second-law visualization: type: ohm-circuit options: {} @@ -28,21 +28,21 @@ parameters: value: 30 unit: Ω variables: -- V -- I -- R -- P + - V + - I + - R + - P derivation: -- I \propto V -- R \equiv \frac{V}{I} \;\Rightarrow\; V = IR -- P = VI = I(IR) = I^2R = \left(\frac{V}{R}\right)^{\!2}\! R = \frac{V^2}{R} + - I \propto V + - R \equiv \frac{V}{I} \;\Rightarrow\; V = IR + - P = VI = I(IR) = I^2R = \left(\frac{V}{R}\right)^{\!2}\! R = \frac{V^2}{R} charts: -- domain: - - 0 - - 24 - marker: V - series: - - x/R + - domain: + - 0 + - 24 + marker: V + series: + - x/R primary: V presets: - V: 3 diff --git a/content/lessons/electricity/rc-circuit/ar.md b/content/lessons/electricity/rc-circuit/ar.md index 44312ac9..082695b8 100644 --- a/content/lessons/electricity/rc-circuit/ar.md +++ b/content/lessons/electricity/rc-circuit/ar.md @@ -21,9 +21,9 @@ charts: ## Try it -1. اسحب عبر المخطط الصغير (أو حرّك الزمن x). في البداية تندفع نقاط التيار حول الحلقة بسرعة، وفي النهاية تزحف — اللحظات الأولى تنجز معظم العمل. -2. ارفع منزلق «المقاومة R». يكبر الثابت الزمني، وتتباطأ النقاط، وتجمع اللوحتان شحنتَي + و− بتدرّج أبطأ بكثير. -3. اضبط الزمن x على R×C (بالثواني). اقرأ جهد المكثف، فتجده بلغ نحو 63% من جهد المصدر. +1. اسحب عبر المخطط الصغير (أو حرّك الزمن x). في البداية تندفع نقاط التيار حول الحلقة بسرعة، وفي النهاية تزحف. معظم الشحن يحدث في اللحظات الأولى. +2. ارفع منزلق «المقاومة R» من 2 kΩ إلى 4 kΩ. يتضاعف الثابت الزمني τ = RC من 2 s إلى 4 s، وتتباطأ النقاط، وتجمع اللوحتان شحنتَي + و− بتدرّج أبطأ بكثير. +3. أعد R إلى 2 kΩ واجعل الزمن x يساوي 2 s، وهذا يساوي τ. اقرأ جهد المكثف: 5.69 V، أي نحو 63% من جهد المصدر 9 V. ## Real-life examples @@ -62,13 +62,17 @@ charts: ## Real world ### المؤقتات والومّاضات + يقيس مؤقت 555، ومعه آلاف دارات التأخير، الزمن بطريقة واحدة. ينتظر حتى يبلغ جهد المكثّف عتبة محددة، فيبدّل خرجه عندها. ### المرشحات + تُنعّم دارات المقاومة والمكثّف جهد مصادر الطاقة، وتزيل الهسهسة والهدير من الصوت. ### الشاشات اللمسية + يضيف إصبعك سعة صغيرة إلى الشاشة، فيلاحظ المتحكم أن زمن الشحن تغيّر، ويعرف أين لمست. ### فلاشات الكاميرا وأجهزة إزالة الرجفان + يشحن الجهاز مكثّفًا كبيرًا ببطء عبر مقاومة، ثم يفرّغ شحنته كلها في لحظة واحدة. diff --git a/content/lessons/electricity/rc-circuit/en.md b/content/lessons/electricity/rc-circuit/en.md index 6d18f778..0ba285d8 100644 --- a/content/lessons/electricity/rc-circuit/en.md +++ b/content/lessons/electricity/rc-circuit/en.md @@ -24,8 +24,8 @@ charts: ## Try it 1. Drag across the small chart (or slide the time x). Early on, the current dots race around the loop; by the end they crawl — the first moments do most of the work. -2. Raise the slider "resistance R". The time constant grows, the dots slow down, and the plates collect their + and − far more gradually. -3. Set the time x to R×C (in seconds). Read the capacitor's voltage: it has reached about 63% of the supply. +2. Raise the slider "resistance R" from 2 kΩ to 4 kΩ. The time constant τ = RC doubles from 2 s to 4 s, the dots slow down, and the plates collect their + and − far more gradually. +3. Return R to 2 kΩ and set the time x to 2 s, which equals τ. Read the capacitor's voltage: 5.69 V, about 63% of the 9 V supply. ## Real-life examples @@ -64,13 +64,17 @@ In the frequency domain the same circuit is a first-order low-pass filter, $H(j\ ## Real world ### Timers and blinkers + The 555 timer and countless delay circuits measure time by waiting for an RC curve to cross a threshold. ### Filters + RC networks smooth power supplies and remove hiss or rumble in audio. ### Touch screens + Your finger adds capacitance; the controller notices the charging time change. ### Camera flashes and defibrillators + Charge slowly through a resistor, release quickly into the load. diff --git a/content/lessons/electricity/resistance-and-resistivity/ar.md b/content/lessons/electricity/resistance-and-resistivity/ar.md index 58142ee8..458d72c9 100644 --- a/content/lessons/electricity/resistance-and-resistivity/ar.md +++ b/content/lessons/electricity/resistance-and-resistivity/ar.md @@ -16,14 +16,14 @@ charts: [] ## Try it -1. اسحب «الطول L» لأعلى. ترتفع «R»، لأن سلكًا أطول يعني تصادمات أكثر في الطريق. -2. اسحب «مساحة المقطع A» لأعلى. تنخفض «R»، لأن سلكًا أسمك يمنح التيار مسارات متوازية أكثر. -3. بدّل «المادة» من النحاس إلى النيكروم. تقفز «R» نحو مئة ضعف للشكل نفسه بالضبط. +1. ابدأ بالنحاس، واجعل «الطول L» يساوي 1 m و«مساحة المقطع A» تساوي 1 mm². تقرأ «R» نحو 0.0168 Ω. ارفع L إلى 2 m: تتضاعف R إلى 0.0336 Ω، لأن الإلكترونات تلقى ضعف التصادمات في الطريق. +2. أعد L إلى 1 m وارفع A إلى 2 mm². تنخفض R إلى النصف، 0.0084 Ω، لأن السلك الأسمك يعطي التيار مكانًا أوسع يمر فيه. +3. أعد A إلى 1 mm² وبدّل «المادة» من النحاس إلى النيكروم. تقفز R من 0.0168 Ω إلى 1.1 Ω، أي نحو 65 ضعفًا للشكل نفسه بالضبط. ## Real-life examples 1. **سلك نحاس منزلي.** سلك نحاسي طوله 1 m ومساحة مقطعه 1 mm² مقاومته نحو 0.017 Ω فقط. يُختار النحاس تحديدًا لأنه يقاوم قليلًا جدًا. -2. **عنصر تسخين المحمصة.** سلك نيكروم رفيع طوله 4 m، مطوي داخل محمصة، مقاومته نحو 44 Ω، يقاوم التيار بقوة كافية ليتوهج أحمر حارًا. +2. **عنصر تسخين المحمصة.** سلك نيكروم رفيع طوله 4 m، مطوي داخل محمصة، مقاومته نحو 44 Ω، فيسخن حتى يتوهج باللون الأحمر. 3. **ملف تسخين صغير.** ملف نيكروم أرفع، طوله 1 m، تصل مقاومته إلى نحو 11 Ω. يقاوم النيكروم نحو 65 ضعف مقاومة النحاس للشكل نفسه. ## Test yourself @@ -36,7 +36,7 @@ charts: [] تخيّل الإلكترونات الحاملة للتيار أناسًا يتزاحمون في ممر مليء بالعوائق. مدّد «الطول L»، فتصبح هناك عوائق أكثر بين البداية والنهاية، وتضيع طاقة أكبر في الطريق، فترتفع المقاومة في خط مستقيم مع الطول. وسّع «مساحة المقطع A» بدلًا من ذلك، وكأنك تفتح ممرات إضافية جنبًا إلى جنب. يجد الحشد نفسه الآن مساحة أكبر للانتشار، فكل مسار أقل ازدحامًا، وتنخفض المقاومة الكلية. -لكن الشكل يروي نصف القصة فقط. بدّل «المادة» من النحاس إلى النيكروم، دون أن تلمس «الطول L» أو «مساحة المقطع A» إطلاقًا، ومع ذلك تقفز المقاومة قرابة مئة ضعف. تعيق ذرات النيكروم الإلكترونات المتحركة بعناد أكبر بكثير من ذرات النحاس. هذا العناد، أي المقاومية، خاصية للمادة وحدها، ولهذا بالضبط تُلف المحمصات ومجففات الشعر بسلك نيكروم لا نحاس. +لكن الشكل يروي نصف القصة فقط. بدّل «المادة» من النحاس إلى النيكروم، دون أن تلمس «الطول L» أو «مساحة المقطع A» إطلاقًا، ومع ذلك تقفز المقاومة نحو 65 ضعفًا. تعيق ذرات النيكروم الإلكترونات المتحركة بعناد أكبر بكثير من ذرات النحاس. هذا العناد، أي المقاومية، خاصية للمادة وحدها، ولهذا بالضبط تُلف المحمصات ومجففات الشعر بسلك نيكروم لا نحاس. ## Formal @@ -46,7 +46,7 @@ charts: [] ## Advanced -ترتفع المقاومية نفسها مع الحرارة في معظم المعادن، لأن الذرات الأسخن تهتز أكثر وتشتت الإلكترونات المنجرفة أكثر. عنصر النيكروم المتوهج أحمر حارًا في المحمصة يقاوم فعليًا أكثر بشكل ملحوظ من السلك نفسه باردًا. +ترتفع المقاومية نفسها مع الحرارة في معظم المعادن، لأن الذرات الأسخن تهتز أكثر وتشتت الإلكترونات المنجرفة أكثر. سلك النحاس عند 100°C يقاوم أكثر بنحو 30% منه عند 20°C. أما النيكروم فتتغير مقاومته قليلًا جدًا حين يسخن، وهذا سبب آخر لاستخدامه في عناصر التسخين. ## Derivation @@ -57,13 +57,17 @@ charts: [] ## Real world ### المحمصات والغلايات + تختار أجهزة التسخين عمدًا مادة مقاومة مثل النيكروم، بحجم يجعل التيار المار بها يبدد قدرة كافية كحرارة، لتتوهج أو تغلي الماء. ### سلك الصمام + الصمام سلك قصير رفيع، محسوب بدقة بحيث تكون مقاومته عالية بما يكفي لتسخين تيار خطير حتى ينصهر، فيقطع الدارة قبل أن يفعل أي شيء آخر. ### أسلاك التمديد + كابل تمديد طويل ورفيع له مقاومة أكبر بكثير من الكابل القصير السميك داخل الجدار، ولهذا قد ترتفع حرارة أسلاك التمديد الرخيصة الرفيعة تحت حمل ثقيل. ### المقاومات + المقاومات المستخدمة في كل لوحة دارات هي مجرد مواد مُشكَّلة ومُطعَّمة بعناية، صُممت لتصل $R = \rho L/A$ فيها إلى قيمة دقيقة معروفة. diff --git a/content/lessons/electricity/resistance-and-resistivity/en.md b/content/lessons/electricity/resistance-and-resistivity/en.md index 212916b2..a6fca557 100644 --- a/content/lessons/electricity/resistance-and-resistivity/en.md +++ b/content/lessons/electricity/resistance-and-resistivity/en.md @@ -19,9 +19,9 @@ charts: [] ## Try it -1. Drag «length L» up. «R» climbs — a longer wire means more collisions along the way, so more resistance. -2. Drag «cross-section A» up. «R» falls — a thicker wire gives current more parallel paths, so less resistance. -3. Flip «material» from copper to nichrome. «R» jumps by nearly a hundred times for the very same shape. +1. Start with copper, «length L» = 1 m and «cross-section A» = 1 mm². «R» reads about 0.0168 Ω. Raise L to 2 m: R doubles to 0.0336 Ω, because electrons meet twice as many collisions along the way. +2. Return L to 1 m and raise A to 2 mm². R halves to 0.0084 Ω, because a thicker wire gives the current more room side by side. +3. Return A to 1 mm² and flip «material» from copper to nichrome. R jumps from 0.0168 Ω to 1.1 Ω, about 65 times more for the very same shape. ## Real-life examples @@ -39,7 +39,7 @@ charts: [] Picture current-carrying electrons as people squeezing down a corridor full of obstacles. Stretch «length L» and there are simply more obstacles between start and finish, so more energy gets lost along the way — resistance rises in a straight line with length. Widen «cross-section A» instead and it is like opening extra corridors side by side: the same crowd now has more room to spread out, so each path is less congested and the overall resistance drops. -Shape only tells half the story, though. Flip «material» from copper to nichrome without touching «length L» or «cross-section A» at all, and the resistance still leaps by close to a hundred times, because nichrome's atoms simply obstruct moving electrons far more stubbornly than copper's do. That stubbornness — resistivity — is a property of the material alone, which is exactly why toasters and hair dryers are wound from nichrome wire, not copper. +Shape only tells half the story, though. Flip «material» from copper to nichrome without touching «length L» or «cross-section A» at all, and the resistance still leaps by about 65 times, because nichrome's atoms simply obstruct moving electrons far more stubbornly than copper's do. That stubbornness — resistivity — is a property of the material alone, which is exactly why toasters and hair dryers are wound from nichrome wire, not copper. ## Formal @@ -49,7 +49,7 @@ Copper has $\rho \approx 1.68\times10^{-8}\ \Omega\cdot\text{m}$, while nichrome ## Advanced -Resistivity itself rises with temperature in most metals, since hotter atoms vibrate more and scatter the drifting electrons more often; a nichrome element glowing red-hot in a toaster actually resists noticeably more than the same wire cold. +Resistivity itself rises with temperature in most metals, since hotter atoms vibrate more and scatter the drifting electrons more often; a copper wire at 100°C resists about 30% more than the same wire at 20°C. Nichrome changes far less when it heats up, which is one more reason it is used for heating elements. ## Derivation @@ -60,13 +60,17 @@ Resistivity itself rises with temperature in most metals, since hotter atoms vib ## Real world ### Toasters and kettles + Heating appliances deliberately choose a resistive material like nichrome, sized so that the current driven through it dissipates enough power as heat to glow or boil water. ### Fuse wire + A fuse is a short, thin, carefully sized wire whose resistance is just high enough that a dangerous current heats it past its melting point, breaking the circuit before anything else does. ### Extension leads + A long, thin extension cable has meaningfully more resistance than the short, thick cable inside a wall, which is why cheap thin extension leads can overheat under a heavy load. ### Resistors + The resistors used in every circuit board are just carefully shaped and doped materials, engineered so their $R = \rho L/A$ lands on a precise, labelled value. diff --git a/content/lessons/electricity/resistance-and-resistivity/lesson.yaml b/content/lessons/electricity/resistance-and-resistivity/lesson.yaml index 249d00c1..28a9179d 100644 --- a/content/lessons/electricity/resistance-and-resistivity/lesson.yaml +++ b/content/lessons/electricity/resistance-and-resistivity/lesson.yaml @@ -3,14 +3,14 @@ subject: electricity difficulty: high-school equation: R = \rho\frac{L}{A} concepts: -- resistance -- resistivity -- resistors + - resistance + - resistivity + - resistors prerequisites: -- ohms-law + - ohms-law related: -- kirchhoffs-laws -- electric-power-and-energy-bills + - kirchhoffs-laws + - electric-power-and-energy-bills visualization: type: resistance-and-resistivity options: {} @@ -37,14 +37,14 @@ parameters: step: 1 value: 0 variables: -- R -- \rho -- L -- A + - R + - \rho + - L + - A derivation: -- R \propto L -- R \propto \frac{1}{A} -- R = \rho\frac{L}{A} + - R \propto L + - R \propto \frac{1}{A} + - R = \rho\frac{L}{A} presets: - L: 1 A: 1 diff --git a/content/lessons/electricity/rlc-resonance/ar.md b/content/lessons/electricity/rlc-resonance/ar.md index 57f72ac4..4d136185 100644 --- a/content/lessons/electricity/rlc-resonance/ar.md +++ b/content/lessons/electricity/rlc-resonance/ar.md @@ -17,13 +17,13 @@ variables: ## Try it -1. اسحب على منحنى الرنين (أو حرّك f). راقب النقاط في الحلقة: بالكاد ترتجف عند الطرفين وتتراقص بعنف عند عبورك المنتصف. -2. أنزل منزلق «المقاومة R». تزداد القمة ارتفاعًا وضيقًا، ويرتطم شريط السعة بأقصاه عند f0 تمامًا. +1. ابدأ عند f = 100 Hz: يقرأ التيار نحو 0.203 A، والنقاط بالكاد ترتجف. اسحب على منحنى الرنين (أو حرّك f) إلى 159 Hz: تتأرجح النقاط بقوة ويصل التيار إلى 1 A. +2. أنزل منزلق «المقاومة R» من 10 Ω إلى 5 Ω. تزداد القمة ارتفاعًا وضيقًا: يتضاعف التيار عند f0 إلى 2 A، وترتفع Q من 5 إلى 10. 3. اقرأ التردد تحت الراية الخضراء. هذا هو التردد الرنيني f0، حيث يلغي الملفُّ والمكثفُ أحدهما الآخر. ## Real-life examples -1. **جهاز راديو يبحث عن محطة.** بمقاومة منخفضة (L = 50 mH، C = 20 µF، R = 5 Ω)، تبلغ الاستجابة ذروة حادة عند تردد واحد، فيلتقط المستقبل محطة واحدة ويرفض جاراتها. +1. **جهاز راديو يبحث عن محطة.** بمقاومة منخفضة (L = 50 mH، C = 20 µF، R = 5 Ω)، تبلغ الاستجابة ذروة حادة عند تردد واحد، وهو هنا قرب 159 Hz. الراديو الحقيقي يستخدم الفكرة نفسها عند ترددات أعلى بكثير ليلتقط محطة واحدة ويستبعد المحطات المجاورة. 2. **لوحة شحن هاتف لاسلكية.** بمقاومة متوسطة (L = 100 mH، C = 50 µF، R = 20 Ω)، تُضبط ملفات الإرسال والاستقبال على التردد الرنيني نفسه لنقل الطاقة بكفاءة عبر الفجوة الصغيرة. 3. **ملف كاشف المعادن.** بـ L = 150 mH، C = 5 µF، R = 15 Ω، يُغيّر جسم معدني قريب الحث الفعلي للملف، فتتحرك القمة الرنينية بطريقة تستطيع الدائرة استشعارها. @@ -58,13 +58,17 @@ variables: ## Real world ### ضبط الراديو + أدر المقبض فيتغيّر C (أو L)، ليتحرك $f_0$ نحو المحطة التي تريد التقاطها من الأثير. ### نقل الطاقة اللاسلكي + تُضبط ملفات الإرسال والاستقبال على التردد الرنيني نفسه لنقل الطاقة بكفاءة عبر فجوة. ### أجهزة كشف المعادن + يُغيّر جسم معدني قريب الحث الفعلي للملف، فيُزيح الرنين بطريقة تستطيع الدائرة استشعارها. ### مرشحات الصوت وموازنات الترددات + تعزّز مراحل رنينية شبيهة بدائرة RLC نطاقًا ضيقًا من الترددات حول $f_0$ أو تخفضه. diff --git a/content/lessons/electricity/rlc-resonance/en.md b/content/lessons/electricity/rlc-resonance/en.md index 575087ff..2afaa208 100644 --- a/content/lessons/electricity/rlc-resonance/en.md +++ b/content/lessons/electricity/rlc-resonance/en.md @@ -19,13 +19,13 @@ variables: ## Try it -1. Drag along the resonance curve (or slide f). Watch the dots in the loop: they barely tremble at the edges and slosh wildly as you pass the middle. -2. Lower the slider "resistance R". The peak grows taller and narrower, and the amplitude bar slams to full right at f0. +1. Start at f = 100 Hz: the current reads about 0.203 A and the dots barely tremble. Drag along the resonance curve (or slide f) to 159 Hz: the dots slosh wildly and the current reaches 1 A. +2. Lower the slider "resistance R" from 10 Ω to 5 Ω. The peak grows taller and narrower: the current at f0 doubles to 2 A and Q rises from 5 to 10. 3. Read the frequency under the green flag — that is the resonant frequency f0, where the coil and the capacitor cancel. ## Real-life examples -1. **A radio tuner searching for a station.** With low resistance (L = 50 mH, C = 20 µF, R = 5 Ω), the response peaks sharply at one frequency, letting the receiver pick out a single station and reject its neighbours. +1. **A radio tuner searching for a station.** With low resistance (L = 50 mH, C = 20 µF, R = 5 Ω), the response peaks sharply at one frequency, here near 159 Hz. A real radio uses the same idea at far higher frequencies to pick out a single station and reject its neighbours. 2. **A wireless phone-charging pad.** With moderate resistance (L = 100 mH, C = 50 µF, R = 20 Ω), transmitter and receiver coils are tuned to the same resonant frequency so energy transfers efficiently across the small gap. 3. **A metal detector's coil.** With L = 150 mH, C = 5 µF, R = 15 Ω, a nearby metal object shifts the coil's effective inductance, moving the resonant peak in a way the circuit can sense. @@ -60,13 +60,17 @@ The sharpness of the peak is captured by the quality factor $Q=\dfrac{1}{R}\sqrt ## Real world ### Radio tuning + Turning a dial changes C (or L) to move $f_0$ to the station you want to pick out of the air. ### Wireless power transfer + Transmitter and receiver coils are tuned to the same resonant frequency to transfer energy efficiently over a gap. ### Metal detectors + A metal object nearby shifts the coil's effective inductance, detuning the resonance in a way the circuit can sense. ### Audio filters and equalisers + RLC-like resonant stages boost or cut a narrow band of frequencies around $f_0$. diff --git a/content/lessons/electricity/rlc-resonance/lesson.yaml b/content/lessons/electricity/rlc-resonance/lesson.yaml index fd153ae0..ac4f57e6 100644 --- a/content/lessons/electricity/rlc-resonance/lesson.yaml +++ b/content/lessons/electricity/rlc-resonance/lesson.yaml @@ -44,7 +44,7 @@ parameters: min: 10 max: 400 step: 1 - value: 159 + value: 100 unit: Hz variables: - L diff --git a/content/lessons/electricity/series-parallel/ar.md b/content/lessons/electricity/series-parallel/ar.md index 965ace3b..cd08b16a 100644 --- a/content/lessons/electricity/series-parallel/ar.md +++ b/content/lessons/electricity/series-parallel/ar.md @@ -16,15 +16,15 @@ variables: ## Try it -1. اضغط على الرسم لاختيار وضع التوالي. راقب النقاط نفسها تمر عبر المقاومتين، الواحدة تلو الأخرى. -2. اضغط مرة أخرى لوضع التوازي. راقب النقاط تنقسم عند نقطة التفرّع إلى مسارين منفصلين. -3. ارفع «المقاومة R1». في وضع التوازي يصبح فرعها أخف كثافة. وفي وضع التوالي تتباطأ الحلقة كلها. +1. ابدأ بوضع التوالي مع V = 12 V وR1 = 20 Ω وR2 = 60 Ω. النقاط نفسها تمر عبر المقاومتين، الواحدة تلو الأخرى. تعرض R_total القيمة 80 Ω وتعرض I_total القيمة 0.15 A. +2. اضغط على الرسم للانتقال إلى وضع التوازي. تنقسم النقاط عند نقطة التفرّع إلى مسارين منفصلين. تنخفض R_total إلى 15 Ω ويرتفع I_total إلى 0.8 A. +3. ارفع «المقاومة R1». في وضع التوازي تتباطأ نقاط فرعها وحده. وفي وضع التوالي تتباطأ الحلقة كلها. ## Real-life examples 1. **أضواء السلاسل القديمة (توالي).** موصولة مصباحًا تلو الآخر (وضع التوالي، R1 = 20 Ω، R2 = 60 Ω، V = 12 V)، كان مصباح واحد معطّل يعطّل السلسلة كلها فيما مضى. 2. **مآخذ الحائط المنزلية (توازي).** المقاومتان نفسهما موصولتان جنبًا إلى جنب بدلًا من ذلك (وضع التوازي، R1 = 20 Ω، R2 = 60 Ω، V = 12 V) تجعل كل جهاز يعمل باستقلالية، ويرى جهد 12 V كاملًا بصرف النظر عن الأجهزة الأخرى. -3. **مستشعر ضوء بمقسّم جهد (توالي).** مقاومة ثابتة 30 Ω على التوالي مع مستشعر مقاومته 10 Ω (V = 9 V) تُنشئ جهدًا عبر المستشعر تستطيع الدائرة قراءته لكشف تغيّرات الضوء أو الحرارة. +3. **مستشعر ضوء بمقسّم جهد (توالي).** مقاومة ثابتة 30 Ω على التوالي مع مستشعر مقاومته 10 Ω (V = 9 V) تعطي 2.25 V على المستشعر، وهو جهد تستطيع الدائرة قراءته لكشف تغيّرات الضوء أو الحرارة. ## Test yourself @@ -34,9 +34,9 @@ variables: ## Intuition -كانت أضواء عيد الميلاد القديمة توصَل مصباحًا تلو الآخر في حلقة واحدة. افكك أي مصباح فتُظلم السلسلة كلها، لأنه لا يوجد سوى مسار واحد للتيار وقد انقطع لتوّه. اضغط على الرسم على الشاشة لاختيار وضع التوالي، وراقب النقاط المتحركة. في التوالي يوجد مسار واحد فقط، فتحمل المقاومتان $R_1$ و$R_2$ النقاط نفسها بالسرعة نفسها. يمر التيار نفسه عبر كل عنصر في الحلقة، الواحد تلو الآخر. +كانت حبال أضواء الزينة القديمة توصَل مصباحًا تلو الآخر في حلقة واحدة. فُكَّ أي مصباح فتنطفئ السلسلة كلها، لأنه لا يوجد سوى مسار واحد للتيار وقد انقطع لتوّه. يبدأ الرسم على الشاشة بوضع التوالي. راقب النقاط المتحركة. في التوالي يوجد مسار واحد فقط، فتحمل المقاومتان $R_1$ و$R_2$ النقاط نفسها بالسرعة نفسها. يمر التيار نفسه عبر كل عنصر في الحلقة، الواحد تلو الآخر. -اضغط على الرسم مرة أخرى للتبديل إلى وضع التوازي، تمامًا كمآخذ الحائط في غرفة. يتصل كل مأخذ مباشرة عبر السلكين نفسيهما، فلا يؤثر فصل مصباح واحد على البقية. راقب النقاط تنقسم عند نقطة التفرّع. يحصل الفرع ذو المقاومة الأصغر على نقاط أكثف وأسرع حركة، لأنه يقدّم معارضة أقل فيجذب تيارًا أكبر. تصبح المقاومتان الآن موصولتين مباشرة عبر كامل جهد البطارية $V$، بدلًا من تقاسمه. +اضغط على الرسم مرة أخرى للتبديل إلى وضع التوازي، تمامًا كمآخذ الحائط في غرفة. يتصل كل مأخذ مباشرة عبر السلكين نفسيهما، فلا يؤثر فصل مصباح واحد على البقية. راقب النقاط تنقسم عند نقطة التفرّع. يحصل الفرع ذو المقاومة الأصغر على نقاط أسرع حركة، لأن مقاومته أقل فيمر فيه تيار أكبر. تصبح المقاومتان الآن موصولتين مباشرة عبر كامل جهد البطارية $V$، بدلًا من تقاسمه. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### التمديدات الكهربائية المنزلية + تُوصل المآخذ الكهربائية على التوازي حتى يرى كل جهاز كامل جهد الشبكة الكهربائية ويعمل باستقلالية عن الأجهزة الأخرى. ### أضواء السلاسل القديمة + كانت مُوصلة على التوالي، فكان مصباح واحد معطل يُعطّل السلسلة كلها. هذا مثال واضح على ضعف التوصيل على التوالي. ### مستشعرات مقسّم الجهد + يُنشئ توصيل مقاومة ثابتة على التوالي مع مقاومة متغيّرة (مقاومة حرارية أو ضوئية) جهدًا يتتبّع درجة الحرارة أو الإضاءة. ### حزم البطاريات + تجمع الخلايا على التوالي الجهد، وتجمع الخلايا على التوازي السعة، ويجمع مصمّمو الحزم بين الاثنين. diff --git a/content/lessons/electricity/series-parallel/en.md b/content/lessons/electricity/series-parallel/en.md index f2ac2d75..9a502e7f 100644 --- a/content/lessons/electricity/series-parallel/en.md +++ b/content/lessons/electricity/series-parallel/en.md @@ -19,15 +19,15 @@ variables: ## Try it -1. Tap the diagram to select series mode. Watch the same dots flow through both resistors, one after another. -2. Tap again for parallel mode. Watch the dots split at the junction into two separate streams. -3. Raise "resistance R1". In parallel mode its branch gets sparser; in series mode the whole loop slows down. +1. Start in series mode with V = 12 V, R1 = 20 Ω and R2 = 60 Ω. The same dots flow through both resistors, one after another. R_total reads 80 Ω and I_total reads 0.15 A. +2. Tap the diagram for parallel mode. The dots split at the junction into two separate streams. R_total drops to 15 Ω and I_total rises to 0.8 A. +3. Raise "resistance R1". In parallel mode only the dots in its own branch slow down; in series mode the whole loop slows down. ## Real-life examples 1. **Old-style string lights (series).** Wired one bulb after another (mode = series, R1 = 20 Ω, R2 = 60 Ω, V = 12 V), a single broken bulb once broke the whole string of lights. 2. **Household wall outlets (parallel).** The same two resistors wired side-by-side instead (mode = parallel, R1 = 20 Ω, R2 = 60 Ω, V = 12 V) let each appliance work independently, seeing the full 12 V regardless of the others. -3. **A voltage-divider light sensor (series).** A fixed 30 Ω resistor in series with a 10 Ω sensor (V = 9 V) creates a voltage across the sensor that a circuit can read to detect changes in light or temperature. +3. **A voltage-divider light sensor (series).** A fixed 30 Ω resistor in series with a 10 Ω sensor (V = 9 V) creates 2.25 V across the sensor, a voltage that a circuit can read to detect changes in light or temperature. ## Test yourself @@ -37,9 +37,9 @@ variables: ## Intuition -Old-style Christmas lights were wired one bulb after another in a single loop: unscrew any one bulb and the whole string goes dark, because there is only one path for the current and it just got broken. Tap the diagram on screen to select series mode and watch the moving dots: in series there is only one path, so both resistors, $R_1$ and $R_2$, carry exactly the same dots at the same speed — the same current flows through everything in the loop, one after another. +Old-style Christmas lights were wired one bulb after another in a single loop: unscrew any one bulb and the whole string goes dark, because there is only one path for the current and it just got broken. The diagram on screen starts in series mode. Watch the moving dots: in series there is only one path, so both resistors, $R_1$ and $R_2$, carry exactly the same dots at the same speed — the same current flows through everything in the loop, one after another. -Now tap the diagram again to flip to parallel mode, like the wall outlets in a room: each one connects straight across the same two wires, so unplugging one lamp does nothing to the others. Watch the dots split at the junction: the branch with the smaller resistance gets denser, faster-moving dots, because it offers less opposition and draws more current, while both resistors now sit directly across the full battery voltage $V$ instead of sharing it. +Now tap the diagram again to flip to parallel mode, like the wall outlets in a room: each one connects straight across the same two wires, so unplugging one lamp does nothing to the others. Watch the dots split at the junction: the branch with the smaller resistance gets faster-moving dots, because it offers less opposition and draws more current, while both resistors now sit directly across the full battery voltage $V$ instead of sharing it. ## Formal @@ -60,13 +60,17 @@ The voltage divider $V_2 = V\dfrac{R_2}{R_1+R_2}$ and current divider $I_1 = I\d ## Real world ### Household wiring + Outlets are wired in parallel so each appliance sees the full mains voltage and works independently of the others. ### Old-style string lights + Wired in series, one broken bulb once broke the whole string — a classic demonstration of why series is fragile. ### Voltage-divider sensors + A fixed resistor in series with a variable one (thermistor, photoresistor) creates a voltage that tracks temperature or light. ### Battery packs + Cells in series add voltage; cells in parallel add capacity — pack designers combine both. diff --git a/content/lessons/electricity/smith-chart/ar.md b/content/lessons/electricity/smith-chart/ar.md index 0fa5a942..e9787abd 100644 --- a/content/lessons/electricity/smith-chart/ar.md +++ b/content/lessons/electricity/smith-chart/ar.md @@ -67,13 +67,17 @@ variables: ## Real world ### ضبط هوائي جهاز لاسلكي + يُظهر محلل الهوائي نقطة على مخطط سميث. يقصّ الهاوي السلك أو يدير الموالف حتى تقف النقطة في المركز، فتخرج قدرة الجهاز بدل أن ترجع إليه. ### الهوائي داخل هاتفك + هوائي الهاتف شريط معدني طوله بضعة سنتيمترات، وهو وحده بعيد جدًا عن 50 Ω. شبكة مواءمة من ملفين أو ثلاثة ومكثفات صغيرة، مصممة على هذا المخطط، تنقل نقطته إلى المركز في كل نطاق يستعمله الهاتف. ### حماية جهاز الإرسال + جهاز إذاعة بقدرة 1 kW مع VSWR يساوي 3 يرجع إليه 250 W من قدرته حرارةً. تراقب الأجهزة VSWR وتتوقف فوق 2 تقريبًا، ولهذا يُكتشف كابل الهوائي المقطوع خلال ثوانٍ. ### أشباح على شاشات التلفاز القديمة + في التلفاز التناظري كان الكابل غير المناسب يعيد جزءًا من الصورة ذهابًا وإيابًا في الكابل فتصل متأخرة قليلًا، نسخة ثانية باهتة من الصورة منزاحة إلى اليمين. ولهذا اعتمد عالم التلفاز كابل 75 Ω لتبقى هذه الأصداء صغيرة. diff --git a/content/lessons/electricity/smith-chart/en.md b/content/lessons/electricity/smith-chart/en.md index 1a2723b7..76859f93 100644 --- a/content/lessons/electricity/smith-chart/en.md +++ b/content/lessons/electricity/smith-chart/en.md @@ -67,13 +67,17 @@ Phillip Smith drew the chart in 1939 at Bell Labs, when every impedance calculat ## Real world ### Tuning a ham radio antenna + An antenna analyser shows a dot on a Smith chart. The operator trims the wire or turns a tuner until the dot sits in the centre, and the transmitter's power goes out instead of coming back. ### The antenna inside your phone + A phone antenna is a strip of metal a few centimetres long, far from 50 Ω on its own. A matching network of two or three tiny coils and capacitors, designed on this chart, moves its point to the centre for every band the phone uses. ### Protecting a transmitter + A 1 kW broadcast transmitter with a VSWR of 3 gets 250 W of its own power back as heat. Transmitters watch the VSWR and shut down above about 2, which is why a broken antenna cable is noticed within seconds. ### Ghosts on old TV screens + On analogue TV a mismatched cable sent part of the picture back and forth along the cable, arriving a little late: a faint second copy of the image, shifted to the right. The TV world settled on 75 Ω cable to keep those echoes small. diff --git a/content/lessons/electricity/smith-chart/lesson.yaml b/content/lessons/electricity/smith-chart/lesson.yaml index a2b6b893..ac9b5730 100644 --- a/content/lessons/electricity/smith-chart/lesson.yaml +++ b/content/lessons/electricity/smith-chart/lesson.yaml @@ -3,16 +3,16 @@ subject: electricity difficulty: university equation: \Gamma = \frac{Z_L - Z_0}{Z_L + Z_0} concepts: -- smith-chart -- reflection-coefficient -- impedance-matching -- transmission-line -- standing-wave-ratio + - smith-chart + - reflection-coefficient + - impedance-matching + - transmission-line + - standing-wave-ratio prerequisites: -- rlc-resonance + - rlc-resonance related: -- ac-power -- standing-waves + - ac-power + - standing-waves visualization: type: smith-chart visualization3d: @@ -37,31 +37,31 @@ parameters: value: 0 unit: λ variables: -- \Gamma -- Z_L -- Z_0 -- z -- r -- x -- j + - \Gamma + - Z_L + - Z_0 + - z + - r + - x + - j derivation: -- z = \frac{Z_L}{Z_0} = r + jx -- \Gamma = \frac{z - 1}{z + 1} -- '\text{VSWR} = \frac{1 + |\Gamma|}{1 - |\Gamma|}' -- \Gamma(d) = \Gamma(0)\, e^{-j\,4\pi d/\lambda} + - z = \frac{Z_L}{Z_0} = r + jx + - \Gamma = \frac{z - 1}{z + 1} + - '\text{VSWR} = \frac{1 + |\Gamma|}{1 - |\Gamma|}' + - \Gamma(d) = \Gamma(0)\, e^{-j\,4\pi d/\lambda} charts: [] primary: R presets: -- R: 100 - X: 50 - d: 0 -- R: 75 - X: 0 - d: 0 -- R: 100 - X: 50 - d: 0.125 + - R: 100 + X: 50 + d: 0 + - R: 75 + X: 0 + d: 0 + - R: 100 + X: 50 + d: 0.125 challenges: -- check: ((R/50)^2 - 1 + (X/50)^2)^2 + (2*X/50)^2 < 0.01 * ((R/50 + 1)^2 + (X/50)^2)^2 -- check: abs((((R/50)^2 - 1 + (X/50)^2)^2 + (2*X/50)^2) / ((R/50 + 1)^2 + (X/50)^2)^2 - 0.25) < 0.01 -- check: abs(R - 100) < 0.5 and abs(X - 50) < 0.5 and abs(d - 0.125) < 0.003 + - check: ((R/50)^2 - 1 + (X/50)^2)^2 + (2*X/50)^2 < 0.01 * ((R/50 + 1)^2 + (X/50)^2)^2 + - check: abs((((R/50)^2 - 1 + (X/50)^2)^2 + (2*X/50)^2) / ((R/50 + 1)^2 + (X/50)^2)^2 - 0.25) < 0.01 + - check: abs(R - 100) < 0.5 and abs(X - 50) < 0.5 and abs(d - 0.125) < 0.003 diff --git a/content/lessons/electricity/voltage-and-energy/ar.md b/content/lessons/electricity/voltage-and-energy/ar.md index f34e8d61..3ba92c79 100644 --- a/content/lessons/electricity/voltage-and-energy/ar.md +++ b/content/lessons/electricity/voltage-and-energy/ar.md @@ -16,19 +16,19 @@ charts: [] ## Try it -1. ارفع «الجهد V». تصعد قراءة «E = QV»: الشحنة نفسها تحمل الآن طاقة أكبر. -2. ارفع «الشحنة المنقولة Q». تصعد قراءة الطاقة أيضًا في خط مستقيم: ضعف الشحنة يعطي ضعف الطاقة، عند الجهد نفسه. -3. اضبط «الجهد V» على 3.7، وقارن قراءة الطاقة بإعداد 9 V المسبق للشحنة نفسها. تعطي بطارية 9 V أكثر من ضعف الطاقة. +1. اجعل «الجهد V» يساوي 9 V و«الشحنة المنقولة Q» تساوي 10 C. تعرض قراءة «E = QV» القيمة 90 J. ارفع الجهد إلى 18 V: الشحنة نفسها تحمل الآن 180 J. +2. أعد الجهد إلى 9 V وارفع «الشحنة المنقولة Q» من 10 C إلى 20 C. تتضاعف الطاقة إلى 180 J: ضعف الشحنة يعطي ضعف الطاقة عند الجهد نفسه. +3. اجعل «الجهد V» يساوي 3.7 V مع Q = 10 C. تعرض القراءة 37 J، مقابل 90 J عند 9 V للشحنة نفسها. بطارية 9 V تعطي أكثر من ضعف الطاقة. ## Real-life examples 1. **بطارية 9 فولت.** بطارية صغيرة 9 V تدفع 10 C من الشحنة حول دارة، فتعطي 90 J من الطاقة. -2. **بطارية الهاتف (ليثيوم أيون، 3.7 فولت).** تحمل الـ20 C من الشحنة نفسها 74 J فقط عند 3.7 V، ولهذا تجمع الهواتف عدة خلايا معًا لتصل إلى جهد مفيد. +2. **بطارية الهاتف (ليثيوم أيون، 3.7 فولت).** عند 3.7 V تحمل 20 C من الشحنة 74 J فقط. بطارية 9 V تعطي الشحنة نفسها 180 J. 3. **بطارية AA (1.5 فولت).** خلية AA واحدة تدفع 5 C وتعطي 7.5 J فقط، ولهذا تحتاج المصابيح اليدوية وأجهزة التحكم عدة خلايا AA على التوالي. ## Test yourself -1. أوصِل 90 J بالضبط من الطاقة. +1. أوصِل 120 J بالضبط من الطاقة. 2. اضبط الجهد على 3.7 V بالضبط، مطابقًا لخلية بطارية الهاتف. 3. أوصِل أكثر من 200 J من الطاقة، وانقل أقل من 15 C من الشحنة. @@ -36,7 +36,7 @@ charts: [] تخيّل البطارية مضخة ماء عند سفح تل. هي لا تصنع الماء، بل ترفع كل لتر يمر بها إلى ارتفاع معيّن، فتمنحه طاقة إضافية ثابتة. تفعل البطارية الشيء نفسه مع الشحنة، فيحصل كل كولوم يمر بها على دفعة الطاقة نفسها بالضبط، يحددها «الجهد V». اسحب «الجهد V» لأعلى في الرسم، وكأنك ترفع ارتفاع المضخة، فتحمل الشحنة نفسها الآن طاقة أكبر بوضوح، كما تُظهر قراءة «E = QV». -يمكن لبطاريتين أن تدفعا كمية الشحنة نفسها بالضبط، وتوصلا مع ذلك طاقات مختلفة جدًا، لمجرد اختلاف جهدهما. تمنح بطارية 9 فولت كل كولوم يمر بها أكثر من ضعف الطاقة التي تمنحها خلية هاتف 3.7 فولت. لهذا بالضبط تستطيع بطارية 9 فولت تشغيل محرك صغير أو مصباح ساطع، بينما تترك خلية 3.7 فولت وحدها كليهما يدور بالكاد. +يمكن لبطاريتين أن تدفعا كمية الشحنة نفسها بالضبط، وتوصلا مع ذلك طاقات مختلفة جدًا، لمجرد اختلاف جهدهما. تمنح بطارية 9 فولت كل كولوم يمر بها أكثر من ضعف الطاقة التي تمنحها خلية هاتف 3.7 فولت. ولهذا يستخدم الجهاز الذي يحتاج إلى طاقة أكبر من كل كولوم عدة خلايا متتالية، فتُجمع جهودها. ## Formal @@ -57,13 +57,17 @@ charts: [] ## Real world ### حزم البطاريات + تصل بطاريات أجهزة الكمبيوتر المحمولة والأدوات الكهربائية عدة خلايا على التوالي لتجمع جهودها، لأن خلية واحدة نادرًا ما تمنح كل كولوم طاقة كافية لأداء عمل مفيد. ### شحن السيارات الكهربائية + تعمل حزم بطاريات السيارات الكهربائية بجهد 300–800 V بدلًا من 12 V المعتادة في السيارة. هكذا يحمل كل كولوم طاقة أكبر بكثير، فيوصل الشاحن الطاقة نفسها بتيار أقل وكابلات أرفع. ### الصدمات الساكنة -قد تصل الصدمة الساكنة إلى آلاف الفولتات ومع ذلك بالكاد تُشعَر، لأن الشحنة الفعلية المتورطة ضئيلة جدًا. تظل $E = QV$ صغيرة حتى لو كان $V$ هائلًا، ما دامت $Q$ ضئيلة بما يكفي. + +قد تصل الصدمة الساكنة إلى آلاف الفولتات ومع ذلك بالكاد تُشعَر، لأن الشحنة التي تنتقل فيها ضئيلة جدًا. تظل $E = QV$ صغيرة حتى لو كان $V$ هائلًا، ما دامت $Q$ ضئيلة بما يكفي. ### خطوط نقل الطاقة + تعمل خطوط نقل الطاقة الطويلة بمئات الآلاف من الفولتات، ليحمل كل كولوم طاقة هائلة. هكذا تصل القدرة نفسها إلى المدن بتيار أصغر بكثير وأقل هدرًا. diff --git a/content/lessons/electricity/voltage-and-energy/en.md b/content/lessons/electricity/voltage-and-energy/en.md index 9fcc4617..e27fdb8a 100644 --- a/content/lessons/electricity/voltage-and-energy/en.md +++ b/content/lessons/electricity/voltage-and-energy/en.md @@ -19,19 +19,19 @@ charts: [] ## Try it -1. Raise «voltage V». The «E = QV» readout climbs — the same charge now carries more energy. -2. Raise «charge moved Q». The energy readout climbs too, in a straight line: double the charge, double the energy, for the same voltage. -3. Set «voltage V» to 3.7 and compare the energy reading with the 9 V preset for the same charge — the 9 V battery delivers well over twice as much. +1. Set «voltage V» to 9 V and «charge moved Q» to 10 C. The «E = QV» readout shows 90 J. Raise the voltage to 18 V: the same charge now carries 180 J. +2. Return to 9 V and raise «charge moved Q» from 10 C to 20 C. The energy doubles to 180 J: double the charge, double the energy, for the same voltage. +3. Set «voltage V» to 3.7 V with Q = 10 C. The readout shows 37 J, against 90 J at 9 V for the same charge — the 9 V battery delivers well over twice as much. ## Real-life examples 1. **9 V battery.** A small 9 V battery pushing 10 C of charge round a circuit delivers 90 J of energy. -2. **Phone battery (Li-ion, 3.7 V).** The same 20 C of charge only carries 74 J at 3.7 V — phones use several such cells together to reach a useful voltage. +2. **Phone battery (Li-ion, 3.7 V).** At 3.7 V, 20 C of charge carries only 74 J. A 9 V battery would give the same charge 180 J. 3. **AA battery (1.5 V).** A single AA cell pushing 5 C delivers just 7.5 J, which is why torches and remotes need several AA cells in series. ## Test yourself -1. Deliver exactly 90 J of energy. +1. Deliver exactly 120 J of energy. 2. Set the voltage to exactly 3.7 V, matching a phone's battery cell. 3. Deliver more than 200 J of energy while moving less than 15 C of charge. @@ -39,7 +39,7 @@ charts: [] Think of a battery as a water pump at the bottom of a hill: it does not create water, it lifts each litre that passes through it up to a certain height, giving it a fixed amount of extra energy. A battery does the same to charge — every coulomb that passes through gets exactly the same energy boost, set by «voltage V». On screen, dragging «voltage V» up is like raising the pump's height: the same charge now carries noticeably more energy, shown in the «E = QV» readout. -Two batteries can push the very same amount of charge and still deliver very different amounts of energy, purely because their voltage differs. A 9 V battery gives every coulomb passing through it more than twice the energy that a 3.7 V phone cell gives — which is exactly why a 9 V battery can drive a small motor or a bright bulb, while a lone 3.7 V cell would leave both barely turning. +Two batteries can push the very same amount of charge and still deliver very different amounts of energy, purely because their voltage differs. A 9 V battery gives every coulomb passing through it more than twice the energy that a 3.7 V phone cell gives — which is why a device that needs more energy from each coulomb uses several cells in a row: their voltages add. ## Formal @@ -60,13 +60,17 @@ Voltage is really a difference in electric potential between two points, and onl ## Real world ### Battery packs + Laptop and power-tool batteries wire several cells in series specifically to add up their voltages, since one cell alone rarely gives each coulomb enough energy to do useful work. ### Electric vehicle charging + EV battery packs run at 300–800 V rather than a car's usual 12 V precisely so that each coulomb carries far more energy, letting a charger deliver the same energy with much less current — and thinner cables. ### Static shocks + A static shock can be thousands of volts yet barely felt, because so little charge is actually involved; $E = QV$ can still be tiny even when $V$ is huge, if $Q$ is tiny enough. ### Power lines + Long-distance power lines run at hundreds of thousands of volts so that each coulomb carries huge energy, letting the same power reach cities with a much smaller, less wasteful current. diff --git a/content/lessons/electricity/voltage-and-energy/lesson.yaml b/content/lessons/electricity/voltage-and-energy/lesson.yaml index 31bb9292..aec4eee5 100644 --- a/content/lessons/electricity/voltage-and-energy/lesson.yaml +++ b/content/lessons/electricity/voltage-and-energy/lesson.yaml @@ -3,14 +3,14 @@ subject: electricity difficulty: beginner equation: V = \frac{E}{Q} concepts: -- voltage -- energy -- charge + - voltage + - energy + - charge prerequisites: -- charge-and-current + - charge-and-current related: -- ohms-law -- batteries-and-internal-resistance + - ohms-law + - batteries-and-internal-resistance visualization: type: voltage-and-energy options: {} @@ -29,15 +29,15 @@ parameters: value: 10 unit: C variables: -- V -- E -- Q -- I -- t + - V + - E + - Q + - I + - t derivation: -- V = \frac{E}{Q} -- E = QV -- Q = It \;\Rightarrow\; E = VIt + - V = \frac{E}{Q} + - E = QV + - Q = It \;\Rightarrow\; E = VIt presets: - V: 9 Q: 10 @@ -47,7 +47,7 @@ presets: Q: 5 challenges: - check: V*Q - target: 90 + target: 120 - check: V target: 3.7 - check: V*Q > 200 and Q < 15 diff --git a/content/lessons/electromagnetism/amperes-law-and-solenoid/ar.md b/content/lessons/electromagnetism/amperes-law-and-solenoid/ar.md index ff07a747..2bdf7aac 100644 --- a/content/lessons/electromagnetism/amperes-law-and-solenoid/ar.md +++ b/content/lessons/electromagnetism/amperes-law-and-solenoid/ar.md @@ -8,7 +8,7 @@ parameters: x: المسافة من محور السلك x n: عدد اللفات لكل متر n variables: - - سماحية الفراغ المغناطيسية + - نفاذية الفراغ المغناطيسية - المجال المغناطيسي - التيار في السلك والتيار المحصور داخل حلقة أمبير - نصف قطر السلك @@ -23,27 +23,27 @@ charts: ## Try it -1. تخيّل سلك شاحن هاتف يحمل تيارًا قدره 10 A، وهو تقريبًا ما تسحبه غلاية كهربائية. -2. ارفع منزلق «التيار I». يكبر المجال قرب السلك، ويظهر ذلك في المنحنى فورًا عند كل مسافة. -3. اسحب منزلق «المسافة من محور السلك x» إلى ما بعد حافة السلك. يحدد منزلق «نصف قطر السلك R» موضع هذه الحافة. يتوقف المنحنى عن الارتفاع ويبدأ بالانخفاض بدلًا من ذلك. +1. تخيّل سلك غلاية كهربائية يمرّ فيه تيار قدره 10 A. أبقِ «التيار I» عند 10 A، و«نصف قطر السلك R» عند 0.005 m، و«المسافة من محور السلك x» عند 0.01 m. تعرض القراءة f(x) = 0.2، أي أن المجال عند هذه المسافة 0.2 mT. +2. ارفع منزلق «التيار I» إلى 12 A. يرتفع المنحنى عند كل المسافات، وتعرض القراءة f(x) = 0.24. +3. أنزل منزلق «المسافة من محور السلك x» إلى 0.005 m، وهي حافة السلك التي يحددها منزلق «نصف قطر السلك R». تبلغ القراءة أعلى قيمة لها: 0.48. تابع إلى 0.0025 m داخل السلك، فتعود القراءة إلى 0.24. ## Real-life examples -1. **سلك تمديد كهربائي منزلي.** يحمل نحو 10 A لتشغيل سخان، عبر سلك سُمكه 3 مم، وحتى على بعد 2 سم منه يمكنك أن تكشف مجاله ببوصلة. -2. **كابل شحن سريع لسيارة كهربائية.** يمرّر 32 A عبر كابل سميك قطره 6 مم، فيكون مجاله أقوى، ويمكن قياسه حتى عبر 5 سم من العزل. -3. **مغناطيس كهربائي في مختبر.** لُفّ 4000 لفة من السلك في كل متر من الملف، ومرّر فيه 20 A، فتحصل على مجال قوي وثابت يُستخدم لالتقاط قطع معدنية. +1. **سلك تمديد كهربائي منزلي.** يحمل نحو 10 A لتشغيل سخان، عبر سلك نصف قطره 3 مم. على بعد 2 سم من السلك يبلغ المجال 0.1 mT، أي نحو ضعف مجال الأرض، فتتأثر به إبرة البوصلة. +2. **كابل شحن سيارة كهربائية.** يمرّ فيه 32 A عبر سلك سميك نصف قطره 6 مم، فيكون مجاله أقوى: نحو 0.13 mT حتى على بعد 5 سم. +3. **مغناطيس كهربائي في مختبر.** لُفّ 4000 لفة من السلك في كل متر من الملف، ومرّر فيه 20 A، فتحصل على مجال قوي وثابت قدره نحو 100 mT، يُستخدم لالتقاط القطع المعدنية. ## Test yourself 1. اصنع ملفًا لولبيًا، أي ملفًا محكم اللف، يبلغ مجاله نحو 50 mT. -2. جد تيارًا ومسافة يجعلان المجال قرب السلك مباشرة نحو 5 mT. -3. باستخدام سلك سميك (نصف قطره 15 مم على الأقل)، جد تيارًا ومسافة يعطيان مجالًا لا يقل عن 3 mT. +2. جد تيارًا ومسافة يجعلان القراءة f(x)، وهي مجال السلك بوحدة mT، نحو 0.4. +3. استخدم سلكًا سميكًا (نصف قطره 15 مم على الأقل)، وجد تيارًا ومسافة خارج السلك يعطيان مجالًا لا يقل عن 0.5 mT. ## Intuition -سلك شاحن هاتف يحمل تيارًا قدره 10 A يصنع حوله مجالًا مغناطيسيًا، رغم أنك لا تراه ولا تشعر به بلا بوصلة. اسحب منزلق «المسافة من محور السلك x» مبتعدًا عن المركز. ما دمت داخل السلك يرتفع المجال بخط مستقيم، لأن ابتعادك يحصر مزيدًا فمزيدًا من التيار. وبمجرد أن تتجاوز $x$ نصف قطر السلك $R$، يصبح كل التيار محصورًا بالفعل، فيبدأ المجال بالانخفاض بدلًا من ذلك. +سلك غلاية كهربائية يمرّ فيه تيار قدره 10 A يصنع حوله مجالًا مغناطيسيًا، رغم أنك لا تراه ولا تشعر به بلا بوصلة. اسحب منزلق «المسافة من محور السلك x» مبتعدًا عن المركز. ما دمت داخل السلك يرتفع المجال بخط مستقيم، لأن ابتعادك يحصر مزيدًا فمزيدًا من التيار. وبمجرد أن تتجاوز $x$ نصف قطر السلك $R$، يصبح كل التيار محصورًا بالفعل، فيبدأ المجال بالانخفاض بدلًا من ذلك. -انظر الآن إلى الرسم الثاني، الذي يستبدل السلك المفرد بملف لولبي، أي لفات سلك محكمة حول قضيب. يرسم هذا الرسم كيف يتغيّر مجال الملف مع التيار $I$، وتتبع النقطة المعلَّمة موضع هذا التيار الآن. ارفع منزلق «عدد اللفات لكل متر n». كلما أحكمت لفّ الملف حشرت مزيدًا من التيار في الحلقة نفسها، فيكبر المجال حتى دون رفع $I$. +انظر الآن إلى الرسم الثاني، الذي يستبدل السلك المفرد بملف لولبي، أي لفات سلك محكمة حول قضيب. يرسم هذا الرسم كيف يتغيّر مجال الملف مع التيار $I$، وتتبع النقطة المعلَّمة موضع هذا التيار الآن. ارفع منزلق «عدد اللفات لكل متر n». كلما زدت اللفات في المتر الواحد مرّ التيار نفسه مرات أكثر في الطول نفسه، فيكبر المجال حتى دون رفع $I$. ## Formal @@ -64,13 +64,17 @@ charts: ## Real world ### المغناطيسات الكهربائية -يرفع ملف سلك ملفوف كهذا الملف اللولبي، بتيار كافٍ، خردة معدنية في ساحات التخريد. وينطفئ فور قطع التيار عنه. + +يرفع ملف سلك ملفوف كهذا الملف اللولبي، بتيار كافٍ، الخردة المعدنية في ساحات الخردة. ويتوقف عن الجذب فور قطع التيار عنه. ### أجهزة الرنين المغناطيسي + ينتج ملف لولبي كبير فائق التوصيل مجالًا مغناطيسيًا قويًا ومنتظمًا جدًا. يحتاج جهاز الرنين هذا المجال لمحاذاة أنوية الهيدروجين في الجسم واستشعارها. ### الصمامات والمرحلات اللولبية + يسحب مجال ملف لولبي صغير مكبسًا معدنيًا لفتح صمام أو إغلاق مفتاح فور مرور التيار في الملف. ### المحركات الكهربائية + تجمع المحركات بين المجال المغناطيسي لملف يحمل تيارًا وقوة لورنتز المؤثرة على تيارات مجاورة، فينتج دوران مستمر. يربط هذا الدرس بدرسَي «قوة لورنتز» و«قانون فاراداي». diff --git a/content/lessons/electromagnetism/amperes-law-and-solenoid/en.md b/content/lessons/electromagnetism/amperes-law-and-solenoid/en.md index bd321651..fcfdf77c 100644 --- a/content/lessons/electromagnetism/amperes-law-and-solenoid/en.md +++ b/content/lessons/electromagnetism/amperes-law-and-solenoid/en.md @@ -24,25 +24,25 @@ charts: ## Try it -1. Picture a phone charger cable carrying 10 A, about as much current as a kettle draws. -2. Drag «current I» up. The field near the wire, shown by the curve, grows right away at every distance. -3. Drag «distance from the wire's axis x» past the wire's edge, set by «wire radius R». The curve stops climbing and starts falling instead. +1. Picture a kettle's power wire carrying 10 A. Keep «current I» at 10 A, «wire radius R» at 0.005 m and «distance from the wire's axis x» at 0.01 m. The readout shows f(x) = 0.2: the field at that distance is 0.2 mT. +2. Drag «current I» up to 12 A. The curve rises at every distance and the readout shows f(x) = 0.24. +3. Drag «distance from the wire's axis x» down to 0.005 m, the wire's edge set by «wire radius R». The readout peaks at 0.48. Go on to 0.0025 m, inside the wire, and it falls back to 0.24. ## Real-life examples -1. **A household extension cord.** It carries about 10 A to run a heater, through a cable 3 mm thick, and even 2 cm away you could still detect its field with a compass. -2. **An EV fast-charging cable.** It pushes 32 A through a thick 6 mm cable, so the field is stronger and can still be measured through 5 cm of insulation. -3. **A lab electromagnet.** Wind 4000 turns of wire into every metre of a coil, drive 20 A through it, and you get a strong, steady field used to pick up metal parts. +1. **A household extension cord.** It carries about 10 A to run a heater, through a wire of radius 3 mm. At 2 cm from the wire the field is 0.1 mT, about twice the Earth's field, so a compass needle would notice it. +2. **An electric-car charging cable.** It pushes 32 A through a thick wire of radius 6 mm, so the field is stronger: about 0.13 mT even 5 cm away. +3. **A lab electromagnet.** Wind 4000 turns of wire into every metre of a coil, drive 20 A through it, and you get a strong, steady field of about 100 mT, used to pick up metal parts. ## Test yourself 1. Build a solenoid — a tightly wound coil — whose field reaches about 50 mT. -2. Find a current and a distance where the field right next to the wire is about 5 mT. -3. Using a thick cable (radius at least 15 mm), find a current and distance that still give a field of at least 3 mT. +2. Find a current and a distance where the readout f(x), the wire's field in mT, is about 0.4. +3. Using a thick wire (radius at least 15 mm), find a current and a distance outside the wire that still give a field of at least 0.5 mT. ## Intuition -A phone charger cable carrying 10 A makes a magnetic field around it, even though you cannot see or feel it without a compass. Drag «distance from the wire's axis x» outward: while you are still inside the wire, the field climbs in a straight line, because moving out sweeps up more and more of the current. Once $x$ passes the wire's radius $R$, all of the current is already inside your loop, so the field starts falling instead. +A kettle's power wire carrying 10 A makes a magnetic field around it, even though you cannot see or feel it without a compass. Drag «distance from the wire's axis x» outward: while you are still inside the wire, the field climbs in a straight line, because moving out sweeps up more and more of the current. Once $x$ passes the wire's radius $R$, all of the current is already inside your loop, so the field starts falling instead. Now look at the second chart, which swaps the single wire for a solenoid: a coil wound tightly around a rod. It plots the coil's field against the current $I$, and the marked point tracks where that current sits right now. Drag «turns per metre n» up: winding the coil tighter packs more current into the same loop, so the field grows even without raising $I$. @@ -65,13 +65,17 @@ Deep inside a long solenoid the field is remarkably uniform and given by the sim ## Real world ### Electromagnets + A coil of wire wound like the solenoid here, carrying enough current, lifts scrap metal in junkyards and switches off the instant the current is cut. ### MRI scanners + A large superconducting solenoid produces the strong, extremely uniform magnetic field an MRI machine needs to align and probe the body's hydrogen nuclei. ### Solenoid valves and relays + A small solenoid's field pulls a metal plunger to open a valve or close a switch the instant current flows through the coil. ### Electric motors + Motors combine a current-carrying coil's magnetic field with the Lorentz force on nearby currents to produce continuous rotation, linking this lesson to 'lorentz-force' and 'faradays-law'. diff --git a/content/lessons/electromagnetism/amperes-law-and-solenoid/lesson.yaml b/content/lessons/electromagnetism/amperes-law-and-solenoid/lesson.yaml index ffa13392..5c000d18 100644 --- a/content/lessons/electromagnetism/amperes-law-and-solenoid/lesson.yaml +++ b/content/lessons/electromagnetism/amperes-law-and-solenoid/lesson.yaml @@ -14,13 +14,13 @@ related: visualization: type: function-plot options: - expr: 'x < R ? 2e-7*I*x/R^2 : 2e-7*I/x' + expr: 'x < R ? 2e-4*I*x/R^2 : 2e-4*I/x' domain: - 0.0005 - 0.05 range: - 0 - - 0.0005 + - 0.5 mode: plain visualization3d: type: solenoid @@ -67,19 +67,19 @@ charts: - 4*pi*1e-7*n*x*1000 primary: I presets: -- I: 10 - R: 0.003 - x: 0.02 -- I: 32 - R: 0.006 - x: 0.05 -- n: 4000 - I: 20 + - I: 10 + R: 0.003 + x: 0.02 + - I: 32 + R: 0.006 + x: 0.05 + - n: 4000 + I: 20 challenges: -- check: '4*pi*1e-7*n*I*1000' - target: 50 - tol: 5 -- check: '2e-7*I/x*1000' - target: 5 - tol: 1 -- check: 'R >= 0.015 and 2e-7*I/x*1000 >= 3' + - check: '4*pi*1e-7*n*I*1000' + target: 50 + tol: 5 + - check: 'x < R ? 2e-4*I*x/R^2 : 2e-4*I/x' + target: 0.4 + tol: 0.02 + - check: 'R >= 0.015 and x >= R and 2e-4*I/x >= 0.5' diff --git a/content/lessons/electromagnetism/coulombs-law/ar.md b/content/lessons/electromagnetism/coulombs-law/ar.md index 325bf017..d8dbf6f1 100644 --- a/content/lessons/electromagnetism/coulombs-law/ar.md +++ b/content/lessons/electromagnetism/coulombs-law/ar.md @@ -17,27 +17,27 @@ variables: ## Try it -1. تخيّل بالونين، كلًا منهما فُرك بالشعر حتى حمل نحو 3 µC من الشحنة، ووُضعا على بعد 1.5 m. -2. اسحب منزلق «الشحنة q2» من سالبة إلى موجبة. شحنة الاختبار السوداء، وأسهم المجال حولها، تنقلب من الانجذاب إلى الابتعاد. -3. باعِد بين البالونين بمنزلق «المسافة الفاصلة d». تصغر القوة بسرعة، فضعف المسافة يعني ربع القوة فقط. +1. تخيّل بالونين فُركا بالشعر والمسافة بينهما 1.5 m. اضبط «الشحنة q1» على 3 µC، و«الشحنة q2» على −3 µC، و«المسافة الفاصلة d» على 1.5 m. تعرض قراءة القوة بين الشحنتين (force between charges) القيمة 0.036 N مع كلمة attract، أي تجاذب. +2. اسحب منزلق «الشحنة q2» من −3 إلى 3 µC. تبقى القراءة 0.036 N، لكن الكلمة تصير repel، أي تنافر. والسهم السميك على شحنة الاختبار السوداء يدور إلى اتجاه جديد. +3. اسحب منزلق «المسافة الفاصلة d» من 1.5 m إلى 3 m. تنخفض القوة من 0.036 N إلى 0.009 N، فضعف المسافة يعني ربع القوة فقط. ## Real-life examples -1. **بالونان فُركا بالشعر.** شُحنا بشحنتين متعاكستين نحو ±3 µC ووُضعا على بعد 1.5 m، فيتجاذبان، وهذا هو التصاق البالون بالحائط نفسه الذي تعرفه. -2. **كرتان معدنيتان مشحونتان.** شُحنتا بشحنة متماثلة قدرها +5 µC لكل منهما ووُضعتا على بعد 4 m، فتتنافران بقوة صغيرة لكنها حقيقية. -3. **بقعتا شحنة داخل سحابة عاصفة.** منطقتان متعاكستا الشحنة، نحو −4 µC و+2 µC، تفصل بينهما 6 m قبل أن يقفز البرق بينهما. +1. **بالونان فُركا بالشعر.** شُحنا بشحنتين متعاكستين نحو ±3 µC ووُضعا على بعد 1.5 m، فيتجاذبان بقوة نحو 0.036 N. وهي القوة نفسها التي تجعل البالون يلتصق بالحائط. +2. **كرتان معدنيتان مشحونتان.** شُحنتا بشحنة متماثلة قدرها +5 µC لكل منهما ووُضعتا على بعد 4 m، فتتنافران بقوة صغيرة لكنها حقيقية: نحو 0.014 N. +3. **مولّد الكهرباء الساكنة في المدرسة.** تحمل قبّته المعدنية نحو −4 µC. كرة معدنية شحنتها +2 µC في آخر الغرفة، على بعد 6 m، تنجذب إليها أيضًا، لكن بقوة نحو 0.002 N فقط. ## Test yourself -1. قرِّب الشحنتين حتى تصل القوة بينهما إلى نحو 0.05 N. -2. أبقِ الشحنتين متماثلتين في الإشارة وعلى بعد 3 m على الأقل. وادفعهما مع ذلك بقوة تنافر لا تقل عن 0.02 N. -3. قرِّب الشحنتين حتى تتجاوز القوة بينهما 0.2 N. +1. اختر قيمتَي الشحنتين والمسافة بينهما لتصير القوة بينهما نحو 0.05 N. +2. أبقِ الشحنتين متماثلتين في الإشارة وعلى بعد 3 m على الأقل، واجعل قوة التنافر بينهما مع ذلك لا تقل عن 0.02 N. +3. كبِّر الشحنتين وقرِّبهما حتى تتجاوز القوة بينهما 0.2 N. ## Intuition -تخيّل بالونين، كلًا منهما مشحون بنحو 3 µC بعد فركه جيدًا بالشعر، ووُضعا على بعد 1.5 m. حرِّك شحنة الاختبار السوداء في أرجاء المشهد: الأسهم القصيرة تمثّل المجال، وتشير إلى الاتجاه الذي ستُدفع إليه شحنة موجبة صغيرة، وتخفت حيث يكون المجال ضعيفًا. بالقرب من أي بالون تتزاحم الأسهم نحو الداخل أو الخارج، وعلى مسافة أبعد تمتزج في تدفق واحد لطيف من الزوج. +تخيّل بالونين، كلًا منهما مشحون بنحو 3 µC بعد فركه جيدًا بالشعر، ووُضعا على بعد 1.5 m. حرِّك شحنة الاختبار السوداء في أرجاء المشهد: الأسهم القصيرة تمثّل المجال، وتشير إلى الاتجاه الذي ستُدفع إليه شحنة موجبة صغيرة، وتخفت حيث يكون المجال ضعيفًا. بالقرب من أي بالون تتزاحم الأسهم نحو الداخل أو الخارج، وعلى مسافة أبعد تندمج في نمط واحد هادئ حول الشحنتين معًا. -راقب الآن خطوط القوة الرفيعة على شحنة الاختبار، إحداها جذب نحو «الشحنة q1» والأخرى نحو «الشحنة q2»، مع سهم سميك يمثّل مجموعهما. اسحب منزلق «الشحنة q2» من سالبة إلى موجبة، فيتحول الخطان الرفيعان من التجاذب معًا إلى التنافر بعيدًا، وتنقلب أسهم المجال قرب نقطة المنتصف أيضًا. +راقب الآن خطوط القوة الرفيعة على شحنة الاختبار، أحدهما قوة «الشحنة q1» والآخر قوة «الشحنة q2»، مع سهم سميك يمثّل مجموعهما. اسحب منزلق «الشحنة q2» من سالبة إلى موجبة، فينقلب خطها الرفيع: كان يسحب شحنة الاختبار نحوها فصار يدفعها بعيدًا عنها، وتنقلب أسهم المجال حول «الشحنة q2» أيضًا. ## Formal @@ -58,13 +58,17 @@ variables: ## Real world ### آلات النسخ والطابعات الليزرية + تجذب أسطوانة مشحونة جسيمات الحبر بالضبط حيث حيّد الضوء (أو لم يحيّد) شحنتها. ### البرق + يبني فصل الشحنات داخل سحابة عاصفة مجالًا قويًا بما يكفي لتأيين الهواء والتفريغ في صاعقة. ### المرسّبات الكهروستاتيكية والطلاء بالرش + يوجّه مجال مطبّق جسيمات مشحونة نحو سطح موصول بالأرض. ### الذرات والروابط + يُشكّل الجذب نفسه بصيغة $1/r^2$ بين النواة والإلكترونات (المحجوب جزئيًا بالإلكترونات الأخرى) الروابط الكيميائية. diff --git a/content/lessons/electromagnetism/coulombs-law/en.md b/content/lessons/electromagnetism/coulombs-law/en.md index 47c33a42..7b7a30c8 100644 --- a/content/lessons/electromagnetism/coulombs-law/en.md +++ b/content/lessons/electromagnetism/coulombs-law/en.md @@ -19,27 +19,27 @@ variables: ## Try it -1. Picture two balloons, each rubbed on hair until they hold about 3 µC of charge, held 1.5 m apart. -2. Drag «charge q2» from negative to positive. The black test charge, and the field arrows around it, flip from being pulled in to being pushed away. -3. Drag «separation d» apart. The force shrinks fast — twice the distance means a quarter of the force. +1. Picture two balloons rubbed on hair and held 1.5 m apart. Set «charge q1» to 3 µC, «charge q2» to −3 µC and «separation d» to 1.5 m. The readout "force between charges" shows 0.036 N (attract). +2. Drag «charge q2» from −3 to 3 µC. The readout still shows 0.036 N, but now says (repel), and the thick force arrow on the black test charge swings round to a new direction. +3. Drag «separation d» from 1.5 m to 3 m. The force drops from 0.036 N to 0.009 N: twice the distance means a quarter of the force. ## Real-life examples -1. **Two balloons rubbed on hair.** Charged oppositely to about ±3 µC and held 1.5 m apart, they pull toward each other — the same static cling that makes a balloon stick to a wall. -2. **Two charged metal spheres.** Charged alike to +5 µC each and set 4 m apart, they push each other away with a small but real force. -3. **Charge patches inside a storm cloud.** Oppositely charged regions, roughly −4 µC and +2 µC, sit 6 m apart before a lightning bolt jumps between them. +1. **Two balloons rubbed on hair.** Charged oppositely to about ±3 µC and held 1.5 m apart, they pull toward each other with about 0.036 N — the same static cling that makes a balloon stick to a wall. +2. **Two charged metal spheres.** Charged alike to +5 µC each and set 4 m apart, they push each other away with a small but real force of about 0.014 N. +3. **A school static-electricity machine.** Its metal dome holds about −4 µC. A metal ball with +2 µC on the far side of the room, 6 m away, is still pulled toward it, but only with about 0.002 N. ## Test yourself -1. Pull the two charges to a separation where the force between them is about 0.05 N. +1. Choose the two charges and their separation so that the force between them is about 0.05 N. 2. Keep the charges alike in sign and at least 3 m apart, but still push them apart with a force of at least 0.02 N. -3. Bring the charges close enough that the force between them passes 0.2 N. +3. Make the charges large and bring them close enough that the force between them passes 0.2 N. ## Intuition Picture two balloons, each charged to about 3 µC after a good rub on your hair, held 1.5 m apart. Drag the black test charge around the scene: the short arrows are the field, pointing the way a small positive charge would be pushed, and they fade out where the field is weak. Near either balloon the arrows crowd in or out; farther away they blend into one gentle flow from the pair. -Now watch the thin force lines on the test charge, one pulling toward «charge q1» and one toward «charge q2», with a thick arrow showing their sum. Drag «charge q2» from negative to positive: the two thin lines swap from pulling together to pushing apart, and the field arrows near the midpoint flip too. +Now watch the thin force lines on the test charge, one for the force from «charge q1» and one for the force from «charge q2», with a thick arrow showing their sum. Drag «charge q2» from negative to positive: its thin line flips from pulling the test charge toward it to pushing it away, and the field arrows around «charge q2» flip too. ## Formal @@ -60,13 +60,17 @@ Superposition holds because Maxwell's equations are linear in the sources: $\nab ## Real world ### Photocopiers and laser printers + A charged drum attracts toner particles exactly where light has (or has not) neutralised it. ### Lightning + Charge separation in a storm cloud builds a field strong enough to ionise air and discharge in a bolt. ### Electrostatic precipitators and spray painting + Charged particles are steered by an applied field onto a grounded surface. ### Atoms and bonds + The same $1/r^2$ attraction between nucleus and electrons (screened by other electrons) shapes chemical bonding. diff --git a/content/lessons/electromagnetism/coulombs-law/lesson.yaml b/content/lessons/electromagnetism/coulombs-law/lesson.yaml index 5e649af4..dfd9adbc 100644 --- a/content/lessons/electromagnetism/coulombs-law/lesson.yaml +++ b/content/lessons/electromagnetism/coulombs-law/lesson.yaml @@ -62,18 +62,18 @@ derivation: charts: [] primary: d presets: -- q1: 3 - q2: -3 - d: 1.5 -- q1: 5 - q2: 5 - d: 4 -- q1: -4 - q2: 2 - d: 6 + - q1: 3 + q2: -3 + d: 1.5 + - q1: 5 + q2: 5 + d: 4 + - q1: -4 + q2: 2 + d: 6 challenges: -- check: 'abs(8.99e-3*q1*q2/d^2)' - target: 0.05 - tol: 0.01 -- check: 'q1*q2 > 0 and 8.99e-3*q1*q2/d^2 >= 0.02 and d >= 3' -- check: '8.99e-3*abs(q1*q2)/d^2 > 0.2' + - check: 'abs(8.99e-3*q1*q2/d^2)' + target: 0.05 + tol: 0.01 + - check: 'q1*q2 > 0 and 8.99e-3*q1*q2/d^2 >= 0.02 and d >= 3' + - check: '8.99e-3*abs(q1*q2)/d^2 > 0.2' diff --git a/content/lessons/electromagnetism/electric-motors/ar.md b/content/lessons/electromagnetism/electric-motors/ar.md index eb495dea..f1d6b7a4 100644 --- a/content/lessons/electromagnetism/electric-motors/ar.md +++ b/content/lessons/electromagnetism/electric-motors/ar.md @@ -1,7 +1,7 @@ --- title: المحركات الكهربائية summary: >- - ملف فيه تيار بين قطبي مغناطيس يلتوي. مفتاح صغير يحوّل الالتواء إلى دوران مستمر. + ملف يمرّ فيه تيار بين قطبي مغناطيس تؤثر فيه قوة تديره. ومفتاح صغير يجعل هذا الدوران مستمرًا. parameters: N: عدد لفات الملف N I: التيار المار في الملف I @@ -9,7 +9,7 @@ parameters: B: شدة مجال المغناطيس B theta: زاوية الملف عن المجال θ variables: - - عزم الالتواء، أي القوة الملتوية على الملف حول محور دورانه + - عزم الدوران، أي قوة التدوير المؤثرة في الملف حول محور دورانه - القوة على كل من ضلعي الملف المستقيمين الطويلين - طول ذينك الضلعين المستقيمين - عرض الملف، أي ذراع الرافعة التي تؤثر عليها القوة @@ -17,27 +17,27 @@ variables: ## Try it -1. يُظهر الرسم ملفًا مستطيلًا بين قطبي مغناطيس ثابتين، مع مبدّل كهربائي ذي حلقة مشقوقة وفرشاتين تغذيانه بالتيار. حرّك منزلق «زاوية الملف θ» دورة كاملة، وراقب سهم العزم يكبر وينكمش. -2. يبلغ العزم ذروته عند θ = 90° (ربع دورة)، حين يقف وجه الملف عموديًا على المجال، ويهبط إلى الصفر عند θ = 0° و θ = 180°، حين يشير وجه الملف مباشرة على امتداد المجال. +1. يُظهر الرسم ملفًا مستطيلًا بين قطبي مغناطيس ثابتين، مع مبدّل كهربائي ذي حلقة مشقوقة وفرشاتين تغذيانه بالتيار. في البداية تكون θ نحو 90° وتعرض القراءة τ = 0.02 N·m. حرّك منزلق «زاوية الملف عن المجال θ» دورة كاملة، وراقب سهم العزم يكبر ويصغر. +2. يبلغ العزم ذروته عند θ = 90° (ربع دورة)، حين تكون حافة الملف هي المتجهة نحو المجال، ويهبط إلى الصفر عند θ = 0° و θ = 180°، حين يواجه وجه الملف المجال مباشرة. اضبط المنزلق على 3.14 rad، أي 180°: تعرض القراءة τ = 0 N·m. 3. راقب المبدّل: كلما عبر الملف θ = 0° أو θ = 180°، تتبادل نقطتا تماسه الفرشاة التي تلمسانها، فينعكس اتجاه التيار، ولا ينعكس العزم أبدًا. هذا ما يبقي الملف يدور في الاتجاه نفسه طوال الدورة. ## Real-life examples 1. **محرك صغير للهوايات.** 100 لفة، تيار 0.5 A، ملف مساحته 10 سم²، داخل مجال 0.4 T، عند زاوية الذروة: عزم نحو 0.02 نيوتن·متر، يكفي تقريبًا لرفع عجلة سيارة لعبة صغيرة ببطء. -2. **محرك ترس روبوتات.** 300 لفة، تيار 1.5 A، ملف مساحته 20 سم²، داخل مجال 0.6 T: عزم نحو 0.54 نيوتن·متر، يكفي كعزم توقف لتشغيل روبوت صغير قبل أن يضاعفه أي علبة تروس. -3. **محرك اهتزاز هاتف دقيق.** 20 لفة فقط، تيار 0.1 A، ملف مساحته 5 ملم²، داخل مجال ضعيف 0.2 T: عزم نحو 0.0002 نيوتن·متر (0.2 ملي نيوتن·متر)، صغير لكنه يكفي لتدوير ثقل غير متمركز فيرجّ الهاتف. +2. **محرك روبوت بعلبة تروس.** 300 لفة، تيار 1.5 A، ملف مساحته 20 سم²، داخل مجال 0.6 T: عزم نحو 0.54 نيوتن·متر، يكفي لتحريك روبوت صغير حتى قبل أن تضاعفه علبة التروس. +3. **محرك الاهتزاز الصغير في الهاتف.** 20 لفة فقط، تيار 0.1 A، ملف مساحته 5 سم²، داخل مجال ضعيف 0.2 T: عزم نحو 0.0002 نيوتن·متر (0.2 ملي نيوتن·متر)، صغير لكنه يكفي لتدوير ثقل غير متمركز فيرجّ الهاتف. ## Test yourself -1. اصنع محركًا صغيرًا للهوايات ينتج عزمًا نحو 0.02 نيوتن·متر عند زاوية الذروة. -2. دون تغيير الزاوية كثيرًا، ادفع العزم فوق 0.5 نيوتن·متر باستخدام عدد اللفات والتيار وشدة المجال وحدها. +1. اصنع محركًا أقوى للهوايات ينتج عزمًا نحو 0.05 نيوتن·متر عند زاوية الذروة. +2. دون تغيير الزاوية كثيرًا، اجعل العزم يتجاوز 0.5 نيوتن·متر باستخدام عدد اللفات والتيار وشدة المجال وحدها. 3. اعثر على «النقطة الميتة» للمبدّل، وهي زاوية يهبط عندها العزم إلى الصفر تقريبًا. ## Intuition -تخيّل الملف ضلعين مستقيمين طويلين، أحدهما أعلى الحلقة والآخر أسفلها، يحملان التيار نفسه لكن في اتجاهين متعاكسين لأن التيار يدور حول الحلقة. كل ضلع داخل المجال المغناطيسي يشعر بدفعة جانبية، هي الدفعة نفسها التي رأيتها في درس قوة لورنتز، ولأن الضلعين على جانبين متقابلين من الحلقة فدفعتاهما متعاكستان أيضًا. جانب يُدفع للأعلى وآخر للأسفل، فبدل أن تحرّك الحلقة تلتويها. +تخيّل الملف ضلعين مستقيمين طويلين، أحدهما أعلى الحلقة والآخر أسفلها، يحملان التيار نفسه لكن في اتجاهين متعاكسين لأن التيار يدور حول الحلقة. كل ضلع داخل المجال المغناطيسي يشعر بدفعة جانبية، هي الدفعة نفسها التي رأيتها في درس قوة لورنتز، ولأن الضلعين على جانبين متقابلين من الحلقة فدفعتاهما متعاكستان أيضًا. جانب يُدفع للأعلى وآخر للأسفل، فلا تنتقل الحلقة من مكانها، بل تدور حول محورها. -يبلغ هذا الالتواء أقصاه حين يقف وجه الملف المسطح عموديًا على المجال (θ = 90°)، ويختفي حين يشير الوجه مباشرة على امتداد المجال (θ = 0° أو 180°)، أي حيث تشير الدفعات الجانبية للضلعين مباشرة عبر المحور لا حوله. لو تُرك الملف وحده لتأرجح ذهابًا وإيابًا ثم توقف عند تلك النقطة. المبدّل هو الحيلة التي تُبقيه دائرًا: حلقة مشقوقة تبدّل توصيلات الملف الكهربائية كل نصف دورة، فبينما كان العزم سينعكس ويسحب الملف للخلف، ينعكس اتجاه التيار في اللحظة نفسها، فيستمر الالتواء يدفع في الاتجاه نفسه. +يبلغ عزم الدوران هذا أقصاه حين تكون حافة الملف المسطح هي المتجهة نحو المجال (θ = 90°)، ويختفي حين يواجه وجه الملف المجال مباشرة (θ = 0° أو 180°)، لأن الدفعتين عندها تشدّان الملف من طرفيه ولا تديرانه. لو تُرك الملف وحده لتأرجح ذهابًا وإيابًا ثم توقف عند تلك النقطة. المبدّل هو الحيلة التي تُبقيه دائرًا: حلقة مشقوقة تبدّل توصيلات الملف الكهربائية كل نصف دورة، فبينما كان العزم سينعكس ويسحب الملف للخلف، ينعكس اتجاه التيار في اللحظة نفسها، فيستمر العزم يدير الملف في الاتجاه نفسه. ## Formal @@ -58,13 +58,17 @@ variables: ## Real world ### محركات الألعاب والهوايات + المحركات الصغيرة ذات التيار المستمر في سيارات اللعب والمراوح وأطقم الروبوتات هي هذه الفكرة نفسها تقريبًا: ملف واحد أو بضعة ملفات، ومجال من مغناطيس دائم، ومبدّل. ### محركات بدء تشغيل السيارات + محرك بدء تشغيل السيارة نسخة أكبر بكثير من الفكرة نفسها، مصمّمة لتوليد عزم هائل قصير المدة يدير محركًا باردًا. ### محركات السيارات الكهربائية + تستخدم معظم السيارات الكهربائية الحديثة محركات بلا فرش، تستبدل المبدّل الميكانيكي بإلكترونيات تبدّل اتجاه التيار، بصيغة العزم نفسها، لكن دون تماس منزلق يبلى. ### مكبرات الصوت + يقف ملف الصوت في مكبر الصوت داخل مجال مغناطيس ثابت تمامًا كملف المحرك، إلا أنه يتحرك ذهابًا وإيابًا على مسار مستقيم بدل الدوران، بدفعة القوة $F$ نفسها التي تُدير ملف المحرك. diff --git a/content/lessons/electromagnetism/electric-motors/en.md b/content/lessons/electromagnetism/electric-motors/en.md index 2ffe144e..54350472 100644 --- a/content/lessons/electromagnetism/electric-motors/en.md +++ b/content/lessons/electromagnetism/electric-motors/en.md @@ -19,19 +19,19 @@ variables: ## Try it -1. The picture shows a rectangular coil sitting between two fixed magnet poles, with a split-ring commutator and brushes feeding it current. Drag «coil's angle θ» around a full turn and watch the torque arrow grow and shrink. -2. Torque peaks at θ = 90° (a quarter turn), where the coil's face is edge-on to the field, and drops to zero at θ = 0° and θ = 180°, where the coil's face points straight along the field. +1. The picture shows a rectangular coil sitting between two fixed magnet poles, with a split-ring commutator and brushes feeding it current. At the start θ is about 90° and the readout shows τ = 0.02 N·m. Drag «the coil's angle from the field θ» around a full turn and watch the torque arrow grow and shrink. +2. Torque peaks at θ = 90° (a quarter turn), where the coil's face is edge-on to the field, and drops to zero at θ = 0° and θ = 180°, where the coil's face points straight along the field. Set the slider to 3.14 rad, which is 180°: the readout shows τ = 0 N·m. 3. Watch the commutator: every time the coil crosses θ = 0° or θ = 180°, its two contacts swap which brush they touch, flipping the current direction so the torque never reverses — that's what keeps the coil spinning the same way, all the way round. ## Real-life examples 1. **A small hobby motor.** 100 turns, 0.5 A, a 10 cm² loop, in a 0.4 T field, at peak angle: about 0.02 N·m of torque — roughly what it takes to slowly lift a small toy car's wheel. 2. **A robotics gearmotor.** 300 turns, 1.5 A, a 20 cm² loop, in a 0.6 T field: about 0.54 N·m — enough stall torque to drive a small robot before any gearbox multiplies it further. -3. **A phone's tiny vibration motor.** Just 20 turns, 0.1 A, a 5 mm² loop, in a weak 0.2 T field: about 0.0002 N·m (0.2 mN·m) — tiny, but enough to spin an off-centre weight and buzz the phone. +3. **A phone's tiny vibration motor.** Just 20 turns, 0.1 A, a 5 cm² loop, in a weak 0.2 T field: about 0.0002 N·m (0.2 mN·m) — tiny, but enough to spin an off-centre weight and buzz the phone. ## Test yourself -1. Build a small hobby motor that produces about 0.02 N·m of torque at its peak angle. +1. Build a stronger hobby motor that produces about 0.05 N·m of torque at its peak angle. 2. Without changing the angle much, push the torque above 0.5 N·m using turns, current, and field strength alone. 3. Find the commutator's "dead spot" — an angle where the torque drops to (almost) zero. @@ -60,13 +60,17 @@ Real motors use several coils at different angles around the same axle (not just ## Real world ### Toy and hobby motors + Small DC motors in toy cars, fans, and robotics kits are almost exactly this: one or a few coils, a permanent-magnet field, and a commutator. ### Car starter motors + A car's starter motor is a much larger version of the same idea, built to deliver a huge, brief torque to turn over a cold engine. ### Electric vehicle motors + Modern EVs mostly use brushless motors, which replace the mechanical commutator with electronics that switch the current — same torque formula, no sliding contacts to wear out. ### Loudspeakers + A speaker's voice coil sits in a fixed magnet's field exactly like a motor's coil, except it moves back and forth along a straight track instead of spinning, pushed by the same $F$ that turns a motor's coil. diff --git a/content/lessons/electromagnetism/electric-motors/lesson.yaml b/content/lessons/electromagnetism/electric-motors/lesson.yaml index 317948e7..aba554d5 100644 --- a/content/lessons/electromagnetism/electric-motors/lesson.yaml +++ b/content/lessons/electromagnetism/electric-motors/lesson.yaml @@ -60,24 +60,24 @@ derivation: charts: [] primary: theta presets: -- N: 100 - I: 0.5 - A: 0.001 - B: 0.4 - theta: 1.571 -- N: 300 - I: 1.5 - A: 0.002 - B: 0.6 - theta: 1.571 -- N: 20 - I: 0.1 - A: 0.0005 - B: 0.2 - theta: 1.571 + - N: 100 + I: 0.5 + A: 0.001 + B: 0.4 + theta: 1.571 + - N: 300 + I: 1.5 + A: 0.002 + B: 0.6 + theta: 1.571 + - N: 20 + I: 0.1 + A: 0.0005 + B: 0.2 + theta: 1.571 challenges: -- check: 'N*I*A*B*sin(theta)' - target: 0.02 - tol: 0.002 -- check: 'N*I*A*B*sin(theta) > 0.5' -- check: 'abs(sin(theta)) < 0.05' + - check: 'N*I*A*B*sin(theta)' + target: 0.05 + tol: 0.005 + - check: 'N*I*A*B*sin(theta) > 0.5' + - check: 'abs(sin(theta)) < 0.05' diff --git a/content/lessons/electromagnetism/electric-potential/ar.md b/content/lessons/electromagnetism/electric-potential/ar.md index 41012572..ab951cf5 100644 --- a/content/lessons/electromagnetism/electric-potential/ar.md +++ b/content/lessons/electromagnetism/electric-potential/ar.md @@ -1,7 +1,7 @@ --- title: الجهد الكهربائي وخطوط تساوي الجهد summary: >- - الرقم المكتوب على البطارية هو الجهد: كم تُدفع الشحنة عند كل نقطة. + الرقم المكتوب على البطارية هو الجهد: كم من الطاقة تحمل كل وحدة شحنة عند نقطة معيّنة. parameters: q1: الشحنة q1 q2: الشحنة q2 @@ -11,42 +11,42 @@ parameters: variables: - الجهد الكهربائي، الطاقة الكامنة لكل وحدة شحنة - ثابت كولوم - - تدرّج الجهد، وهو متجه يشير إلى أعلى + - تدرّج الجهد، وهو متجه يشير إلى الجهة التي يرتفع فيها الجهد --- ## Try it -1. تخيّل كرتين معدنيتين مشحونتين في ورشة عمل، تحمل كل منهما نحو 3 µC، على بعد 4 m. -2. اسحب نقطة الاختبار «نقطة الاختبار x» مبتعدًا عنهما. تستمر قراءة الجهد بالانخفاض طوال الطريق. -3. اخفض الآن منزلق «الشحنة q2» إلى قيمة سالبة. يمكن للقراءة الآن أن تبلغ صفرًا عند بعض النقاط، لا أن تنخفض فقط. +1. تخيّل كرتين معدنيتين مشحونتين في ورشة عمل، تحمل كل منهما نحو 3 µC، والمسافة بينهما 4 m. اضبط «الشحنة q1» و«الشحنة q2» على 3 µC، و«المسافة الفاصلة d» على 4 m، و«نقطة الاختبار x» على 0، و«نقطة الاختبار y» على 1.5. تعرض قراءة الجهد (potential V at point) القيمة 21576 V. +2. اسحب منزلق «نقطة الاختبار x» من 0 إلى 2، فتصير النقطة فوق الكرة الثانية تمامًا. يرتفع الجهد إلى نحو 24293 V. تابع إلى 4، فينخفض إلى نحو 15149 V لأنك ابتعدت عن الكرتين. +3. اخفض الآن منزلق «الشحنة q2» إلى −3 µC. تصير القراءة سالبة: نحو −6427 V. أعد «نقطة الاختبار x» إلى 0، في منتصف المسافة بين الكرتين، فتصير القراءة 0 V بالضبط. ## Real-life examples 1. **كرتان معدنيتان مشحونتان في ورشة عمل.** كلتاهما بشحنة +3 µC وتفصل بينهما 4 m، فيرتفع الجهد عند نقطة فوقهما إلى أكثر من 20000 V، وهذا قريب من تجربة كهرباء ساكنة صغيرة في الصف. -2. **لوحة استشعار مشحونة قرب لوحة مؤرَّضة.** لوحة بشحنة +4 µC وأخرى بشحنة −4 µC على بعد 2 m، ويتغيّر الجهد بسرعة إشارته كلما تحركت بينهما. +2. **لوح استشعار مشحون قرب لوح موصول بالأرض.** لوح بشحنة +4 µC وآخر بشحنة −4 µC على بعد 2 m. يكون الجهد موجبًا قرب الأول وسالبًا قرب الثاني: نحو −36750 V عند نقطة قريبة من اللوح السالب. 3. **قبة مولّد فان دي غراف.** مشحونة بـ +5 µC، وبجانبها بقعة شحنة سالبة صغيرة −1 µC على بعد 6 m، وتكفي القبة وحدها لرفع الجهد القريب منها فوق 30000 V، وهي الآلة نفسها التي تجعل الشعر يقف. ## Test yourself -1. حرّك نقطة الاختبار حتى تقرأ نحو 20000 V هناك (موجبة أو سالبة). +1. حرّك نقطة الاختبار حتى تصير قراءة الجهد عندها نحو 50000 V (موجبة أو سالبة). 2. باستخدام شحنتين متساويتين ومتعاكستين، ضع نقطة الاختبار حيث يكون الجهد صفرًا تقريبًا. 3. اجعل الجهد ينخفض دون −20000 V. ## Intuition -تخيّل كرتين معدنيتين مشحونتين في ورشة عمل، تحمل كل منهما +3 µC، وتفصل بينهما 4 m. اسحب نقطة الاختبار «نقطة الاختبار x» مبتعدًا عنهما: تنخفض قراءة الجهد طوال الطريق وبسلاسة، حتى مع أن أسهم المجال حولها يمكن أن تُلغي إحداها الأخرى تمامًا عند خط المنتصف للحظة. +تخيّل كرتين معدنيتين مشحونتين في ورشة عمل، تحمل كل منهما +3 µC، وتفصل بينهما 4 m. اسحب منزلق «نقطة الاختبار x» من 0 إلى 4: ترتفع قراءة الجهد ما دمت تقترب من إحدى الكرتين، ثم تنخفض بسلاسة حين تبتعد عنهما معًا. ولا تبلغ القراءة الصفر هنا أبدًا، حتى عند النقطة التي تقع في منتصف المسافة بين الكرتين تمامًا، حيث يُلغي مجال كل كرة مجال الأخرى. ليس للجهد اتجاه، فهو مجرّد رقم عند كل نقطة، تمامًا كالارتفاع على خريطة. والمجال هو البوصلة المبنية من تلك الخريطة. يشير دائمًا إلى الجهة التي ينخفض فيها الجهد بأسرع ما يكون، وهي فكرة سهم الانحدار نفسه، إلا أنه هنا يشير نحو الجهد الأدنى بدل الأرض الأدنى. ## Formal -بالنسبة إلى شحنة نقطية، $V(r) = k q/r$، مع اعتبار $V=0$ عند اللانهاية. وتُجمع جهود عدة شحنات كأرقام عادية (بلا حاجة للقلق بشأن الاتجاه)، خلافًا للمجالات. +بالنسبة إلى شحنة نقطية، $V(r) = k q/r$، مع اعتبار $V=0$ عند اللانهاية. وتُجمع جهود عدة شحنات كأرقام عادية (فالجهد لا اتجاه له)، خلافًا للمجالات. المجال هو سالب تدرّج الجهد: $\mathbf{E} = -\nabla V$، أي $E_x = -\partial V/\partial x$ وبالمثل لـ $y$. وتكون أسطح ثبات $V$ (خطوط تساوي الجهد) عمودية دائمًا على $\mathbf{E}$. ## Advanced -بما أن $\nabla\times\mathbf{E} = 0$ للشحنات الساكنة، فإن $\mathbf{E}$ مجال محافظ، ويوجد $V$ عالميًا بصيغة $V(\mathbf{r}) = -\int_\infty^{\mathbf r} \mathbf{E}\cdot d\boldsymbol{\ell}$، وهي مستقلة عن المسار. لكن هذا لا يصح بمجرد أن تتغيّر المجالات مع الزمن، إذ يُعيد قانون فاراداي إدخال دوران (curl)، فلا يعود جهد وحيد القيمة كافيًا. +بما أن $\nabla\times\mathbf{E} = 0$ للشحنات الساكنة، فإن $\mathbf{E}$ مجال محافظ، ويكون $V$ معرَّفًا في كل مكان بالصيغة $V(\mathbf{r}) = -\int_\infty^{\mathbf r} \mathbf{E}\cdot d\boldsymbol{\ell}$، وهي مستقلة عن المسار. لكن هذا لا يصح بمجرد أن تتغيّر المجالات مع الزمن، إذ يُعيد قانون فاراداي إدخال دوران (curl)، فلا يعود جهد وحيد القيمة كافيًا. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### الدوائر الكهربائية + الجهد على بطارية أو مأخذ كهرباء هو بالضبط هذا الجهد، ويُقاس بالنسبة إلى مرجع مختار (الأرضي). ### أجهزة الأشعة المهبطية وحزم الإلكترونات + تتسارع الإلكترونات عبر فرق جهد، فتكتسب طاقة حركية مقدارها $qV$. ### الخلايا العصبية + يبلغ جهد الغشاء عبر الخلية العصبية بضع عشرات من الميلي فولت، وتغيّره هو ما يُطلق جهد الفعل. ### مولدات فان دي غراف + تُحمل الشحنة عبر حزام متحرك حتى تبلغ القبة جهدًا هائلًا بالنسبة إلى الأرضي. diff --git a/content/lessons/electromagnetism/electric-potential/en.md b/content/lessons/electromagnetism/electric-potential/en.md index 370a2e06..3431a9e0 100644 --- a/content/lessons/electromagnetism/electric-potential/en.md +++ b/content/lessons/electromagnetism/electric-potential/en.md @@ -2,7 +2,7 @@ title: Electric potential and equipotentials summary: >- This is the "voltage" printed on every battery: a number that tells you how - much a charge would be pushed if placed at a given point. + much energy each unit of charge would have if placed at a given point. parameters: q1: charge q1 q2: charge q2 @@ -17,25 +17,25 @@ variables: ## Try it -1. Picture two charged metal spheres in a workshop, each carrying about 3 µC, 4 m apart. -2. Drag the test point «test point x» away from between them. The potential readout keeps falling, all the way out. -3. Now drag «charge q2» down to a negative value. The readout can now hit zero at some points, not just fall. +1. Picture two charged metal spheres in a workshop, each carrying about 3 µC, 4 m apart. Set «charge q1» and «charge q2» to 3 µC, «separation d» to 4 m, «test point x» to 0 and «test point y» to 1.5. The readout "potential V at point" shows 21576 V. +2. Drag «test point x» from 0 to 2, right above the second sphere. The potential rises to about 24293 V. Keep going to 4, and it falls to about 15149 V as you leave both spheres behind. +3. Now drag «charge q2» down to −3 µC. The readout turns negative, about −6427 V. Drag «test point x» back to 0, halfway between the spheres, and it reads exactly 0 V. ## Real-life examples 1. **Two charged metal spheres in a workshop.** Both at +3 µC and 4 m apart, they raise the potential at a point above them to over 20,000 V, similar in scale to a small static-electricity demonstration. -2. **A charged sensor plate near a grounded panel.** One plate at +4 µC, the other at −4 µC and 2 m away, the potential changes sign fast as you move between them. +2. **A charged sensor plate near a grounded panel.** One plate at +4 µC, the other at −4 µC and 2 m away, the potential is positive near the first and negative near the second: about −36,750 V at a point close to the negative plate. 3. **A Van de Graaff generator dome.** Charged to +5 µC next to a small stray −1 µC patch 6 m away, the dome alone can push the potential above 30,000 V nearby — the same machine used to make hair stand on end. ## Test yourself -1. Move the test point until the potential there reads about 20,000 V (positive or negative). +1. Move the test point until the potential there reads about 50,000 V (positive or negative). 2. Using two equal and opposite charges, place the test point where the potential is essentially zero. 3. Make the potential drop below −20,000 V. ## Intuition -Picture two charged metal spheres in a workshop, each carrying +3 µC, sitting 4 m apart. Drag the test point «test point x» away from between them: the potential readout falls the whole way, smoothly, even though the field arrows around it can momentarily cancel each other exactly on the midline. +Picture two charged metal spheres in a workshop, each carrying +3 µC, sitting 4 m apart. Drag «test point x» from 0 out to 4: the potential readout climbs while you get closer to a sphere, then falls smoothly as you leave both behind. It never reaches zero here, not even at the point exactly halfway between the spheres, where their two fields cancel. Potential has no direction — it is just a number at every point, like altitude on a map. The field is the compass built from that map: it always points the way the potential drops fastest, the same idea as a downhill arrow, just here it points toward lower potential instead of lower ground. @@ -58,13 +58,17 @@ Because $\nabla\times\mathbf{E} = 0$ for static charges, $\mathbf{E}$ is a conse ## Real world ### Circuits + Voltage on a battery or outlet is exactly this potential, measured relative to a chosen reference (ground). ### Cathode-ray and electron-beam devices + Electrons accelerate through a potential difference, gaining kinetic energy $qV$. ### Neurons + The membrane potential across a neuron is a few tens of millivolts, and its change drives the action potential. ### Van de Graaff generators + Charge is carried up a belt until the dome reaches a huge potential relative to ground. diff --git a/content/lessons/electromagnetism/electric-potential/lesson.yaml b/content/lessons/electromagnetism/electric-potential/lesson.yaml index 8fbde40b..a7ec41c6 100644 --- a/content/lessons/electromagnetism/electric-potential/lesson.yaml +++ b/content/lessons/electromagnetism/electric-potential/lesson.yaml @@ -62,24 +62,24 @@ derivation: charts: [] primary: px presets: -- q1: 3 - q2: 3 - d: 4 - px: 0 - py: 1.5 -- q1: 4 - q2: -4 - d: 2 - px: 1.5 - py: 0.5 -- q1: 5 - q2: -1 - d: 6 - px: -2 - py: 1 + - q1: 3 + q2: 3 + d: 4 + px: 0 + py: 1.5 + - q1: 4 + q2: -4 + d: 2 + px: 1.5 + py: 0.5 + - q1: 5 + q2: -1 + d: 6 + px: -2 + py: 1 challenges: -- check: 'abs(8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2)))' - target: 20000 - tol: 2000 -- check: 'abs(8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2))) < 200' -- check: '8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2)) < -20000' + - check: 'abs(8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2)))' + target: 50000 + tol: 5000 + - check: 'abs(8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2))) < 200' + - check: '8990*(q1/sqrt((px+d/2)^2+py^2) + q2/sqrt((px-d/2)^2+py^2)) < -20000' diff --git a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/ar.md b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/ar.md index 5445d82d..42bade9c 100644 --- a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/ar.md +++ b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/ar.md @@ -9,32 +9,32 @@ parameters: R: مقاومة مسار التيار في تلك الحلقة R variables: - القيمة الفعّالة (rms) للجهد المستحث - - القدرة المسلَّمة إلى مقاومة الحلقة + - القدرة الواصلة إلى مقاومة الحلقة --- ## Try it 1. يُظهر الرسم ملفًا صغيرًا يولّد مجالًا مترددًا عبر حلقة موصلة قريبة، قد تكون إناءً أو ملف استقبال هاتف أو عملة مدفونة، ومقياس حرارة أو إشارة يُظهر ما ينتج. -2. ارفع منزلق «سرعة تردد المجال f». تقفز القدرة بسرعة: ضاعف التردد فتتضاعف القدرة أربع مرات، لأنها تعتمد على $f^2$. -3. حرّك الآن منزلق «المقاومة R». لاحظ أن مسارًا أقل مقاومة، كإناء فولاذي مصمت، يحوّل الجهد المستحث نفسه إلى قدرة تسخين أكبر بكثير، بينما مسار أعلى مقاومة بالكاد يسخن. +2. ارفع منزلق «سرعة تردد المجال f» من 25000 Hz إلى 50000 Hz. تقفز قراءة القدرة من نحو 278 W إلى نحو 1110 W: ضاعف التردد فتتضاعف القدرة أربع مرات، لأنها تعتمد على $f^2$. +3. ارفع الآن منزلق «مقاومة مسار التيار في تلك الحلقة R» من 0.0001 Ω إلى 0.001 Ω. تنخفض القدرة من نحو 1110 W إلى نحو 111 W. فالمسار الأقل مقاومة، كإناء فولاذي مصمت، يحوّل الجهد المستحث نفسه إلى قدرة تسخين أكبر بكثير، أما المسار الأعلى مقاومة فيسخن أقل بكثير. ## Real-life examples 1. **موقد حث حراري يسخّن إناءً فولاذيًا.** مجال نحو 5 ملي تسلا بتردد ~25 kHz فوق رقعة من الإناء مساحتها 3 سم²، بمسار مقاومته منخفضة جدًا (~0.0001 Ω): نحو 280 واط تُصرف حرارةً في تلك الرقعة الصغيرة وحدها؛ يجمع الموقد الحقيقي رُقعًا كثيرة كهذه ليبلغ قدرته الكاملة نحو 2 كيلوواط. (هذا نموذج حلقة واحدة مبسّط وتقديري؛ التيارات الدوامية في إناء حقيقي أعقد بكثير.) 2. **شاحن هاتف لاسلكي (Qi).** مجال أضعف قدره 2 ملي تسلا بتردد 150 kHz فوق ملف استقبال مساحته 10 سم²، بدارة أعلى مقاومة (~0.24 Ω) تسلّم قدرة مفيدة لا حرارة فقط: نحو 7.4 واط، معدل شحن هاتف نموذجي. -3. **كاشف معادن يدوي يمسح فوق عملة معدنية.** مجال صغير جدًا قدره 0.1 ملي تسلا بتردد 7 kHz فوق حلقة بحجم عملة مساحتها 1 سم²: إشارة مستحثة نحو 0.3 مللي فولت فقط، صغيرة جدًا لتُحَس، لكن يسهل تضخيمها إلكترونيًا إلى صفارة. +3. **كاشف معادن يدوي يمسح فوق عملة معدنية.** مجال صغير جدًا قدره 0.1 ملي تسلا بتردد 7 kHz فوق حلقة بحجم عملة مساحتها 1 سم²: إشارة مستحثة نحو 0.3 مللي فولت فقط، أصغر من أن تشعر بها، لكن يسهل تضخيمها إلكترونيًا إلى صفارة. ## Test yourself -1. اصنع سخانًا بقوة موقد حث حراري، يسلّم نحو 300 واط إلى رقعة صغيرة واحدة. -2. اضبط الجهاز على نطاق الشحن اللاسلكي (100-200 kHz) وسلّم بين 5 و10 واط، معدل شحن هاتف واقعي. -3. اخفض التردد إلى 10 kHz أو أقل، كجهاز كشف معادن، ومع ذلك استحث إشارة فوق 0.1 مللي فولت. +1. اصنع سخانًا أقوى من مثال الموقد، يوصل نحو 1000 واط إلى رقعة صغيرة واحدة. +2. اضبط الجهاز على نطاق الشحن اللاسلكي (100-200 kHz) وأوصل قدرة بين 5 و10 واط، وهو معدل واقعي لشحن هاتف. +3. اخفض التردد إلى 10 kHz أو أقل، كما في كاشف المعادن، واجعل الإشارة المستحثة مع ذلك أكبر من 0.1 مللي فولت. ## Intuition -يعمل كل جهاز هنا بالفكرة نفسها التي رأيتها في المولد في الدرسين الماضيين: مجال مغناطيسي متغيّر يدفع تيارًا حول أي حلقة موصلة مغلقة قريبة، بحسب قانون فاراداي. يفعل المولد ذلك عمدًا، بتردد هادئ 50-60 Hz، يديره ملف دوّار. أما هذه الأجهزة فتفعل ذلك إلكترونيًا بدلًا من ذلك، فتبدّل التيار في ملف عشرات أو مئات آلاف المرات في الثانية، أسرع بكثير مما يقدر عليه أي محرك بالدوران، لأن التردد الأعلى يعني إشارة مستحثة أكبر بكثير للمجال نفسه. +يعمل كل جهاز هنا بالفكرة نفسها التي يعمل بها المولد: مجال مغناطيسي متغيّر يدفع تيارًا حول أي حلقة موصلة مغلقة قريبة، بحسب قانون فاراداي. يفعل المولد ذلك عمدًا، بتردد منخفض 50-60 Hz، بملف يدور. أما هذه الأجهزة فتفعل ذلك إلكترونيًا، فتبدّل التيار في ملف عشرات أو مئات آلاف المرات في الثانية، أسرع بكثير مما يقدر عليه أي محرك بالدوران، لأن التردد الأعلى يعني إشارة مستحثة أكبر بكثير للمجال نفسه. -ما يختلف بين الأمثلة الثلاثة هو فقط ما يحدث لذلك التيار المستحث بعد وجوده. في إناء فوق موقد حث حراري، الحلقة هي المعدن نفسه، بمقاومة منخفضة جدًا لدرجة أن جهدًا مستحثًا متواضعًا يدفع تيارًا يصرف قدرة تسخين حقيقية مباشرة في الإناء، دون أسلاك ولا تلامس، مجرد المجال. وفي ملف شحن الهاتف، تدفع الفيزياء نفسها تيارًا إلى دارة مصممة لتخزين تلك الطاقة في بطارية بدل إهدارها حرارة. وفي كاشف المعادن، الهدف ليس القدرة إطلاقًا؛ إذ تصبح عملة مدفونة أو حلقة سلك مصدرًا ثانويًا صغيرًا للمجال بمجرد استحثاث تيار فيها، وكل ما تحتاجه إلكترونيات الكاشف هو ملاحظة تلك الإشارة الإضافية الخافتة. +ما يختلف بين الأمثلة الثلاثة هو فقط ما يحدث لذلك التيار المستحث بعد وجوده. في إناء فوق موقد حث حراري، الحلقة هي المعدن نفسه، بمقاومة منخفضة جدًا لدرجة أن جهدًا مستحثًا متواضعًا يدفع تيارًا يصرف قدرة تسخين حقيقية مباشرة في الإناء، دون أسلاك ولا تلامس، بالمجال وحده. وفي ملف شحن الهاتف، تدفع الفيزياء نفسها تيارًا إلى دارة مصممة لتخزين تلك الطاقة في بطارية بدل إهدارها حرارة. وفي كاشف المعادن، الهدف ليس القدرة إطلاقًا؛ إذ تصبح عملة مدفونة أو حلقة سلك مصدرًا ثانويًا صغيرًا للمجال بمجرد استحثاث تيار فيها، وكل ما تحتاجه إلكترونيات الكاشف هو ملاحظة تلك الإشارة الإضافية الخافتة. ## Formal @@ -55,13 +55,17 @@ variables: ## Real world ### مواقد الحث الحراري + تُشغّل مواقد الحث الحراري ملفًا تحت السطح الزجاجي بعشرات الكيلوهرتز، فتستحث تيارات دوامية مباشرة في قاعدة إناء حديدي مغناطيسي وتسخّنه دون أن تسخن سطح الموقد نفسه إطلاقًا. ### الشحن اللاسلكي (Qi) + يشكّل ملف الإرسال في لوحة الشحن وملف الاستقبال في الهاتف محولًا ضعيف الاقتران عبر الهواء، يعمل عادة عند نحو 100-200 kHz. ### كواشف المعادن + يستحث المجال المتردد لملف البحث تيارات دوامية صغيرة جدًا في أي جسم معدني قريب، وهذا التيار بدوره يصنع مجاله الخافت الخاص الذي يلتقطه مستقبل الكاشف ويحوّله إلى إشارة. ### الختم واللحام بالحث + تستخدم المصانع تسخين الحث عالي التردد نفسه لختم أغطية الزجاجات المبطنة بالرقائق، ولحام أو معالجة أجزاء معدنية دون أي لهب أو تلامس كهربائي مباشر. diff --git a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/en.md b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/en.md index b77e6aa8..8978bc2a 100644 --- a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/en.md +++ b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/en.md @@ -17,8 +17,8 @@ variables: ## Try it 1. The picture shows a small coil driving an alternating field through a nearby conducting loop — a pan, a phone's receiver coil, or a buried coin — and a heat/signal gauge showing what comes out. -2. Drag «how fast the field alternates f» up. The power shoots up fast: double the frequency and the power quadruples, because it depends on $f^2$. -3. Now drag «resistance R» — notice a *lower* resistance path (like a pan's solid steel) turns the same induced voltage into far more heating power, while a higher-resistance path barely warms up at all. +2. Drag «how fast the field alternates f» from 25000 Hz up to 50000 Hz. The power readout jumps from about 278 W to about 1110 W: double the frequency and the power quadruples, because it depends on $f^2$. +3. Now drag «resistance of that loop's current path R» from 0.0001 Ω up to 0.001 Ω. The power falls from about 1110 W to about 111 W. A _lower_ resistance path (like a pan's solid steel) turns the same induced voltage into far more heating power, while a higher-resistance path warms up much less. ## Real-life examples @@ -28,13 +28,13 @@ variables: ## Test yourself -1. Build an induction-hob-strength heater, delivering around 300 W into one small patch. +1. Build a heater stronger than the hob example, delivering around 1000 W into one small patch. 2. Tune to the wireless-charging range (100–200 kHz) and deliver between 5 and 10 W, a realistic phone-charging rate. 3. Drop the frequency to 10 kHz or below, like a metal detector, but still induce a signal above 0.1 millivolts. ## Intuition -Every device here runs on the same idea as the generator in the last two lessons: a changing magnetic field pushes current around any nearby closed loop of conductor, by Faraday's law. A generator does this on purpose, at a leisurely 50–60 Hz, driven by a spinning coil. These devices do it electronically instead, switching current through a coil tens or hundreds of thousands of times a second — far faster than any motor could spin — because higher frequency means a far bigger induced signal for the same field strength. +Every device here runs on the same idea as a generator: a changing magnetic field pushes current around any nearby closed loop of conductor, by Faraday's law. A generator does this on purpose, at a leisurely 50–60 Hz, driven by a spinning coil. These devices do it electronically instead, switching current through a coil tens or hundreds of thousands of times a second — far faster than any motor could spin — because higher frequency means a far bigger induced signal for the same field strength. What differs between the three examples is only what happens to that induced current once it exists. In a pan on an induction hob, the loop is the metal itself, with a resistance so low that even a modest induced voltage drives a current that dumps real heating power straight into the pan — no wires, no contact, just the field. In a phone's charging coil, the same physics drives current into a proper circuit designed to store that energy in a battery rather than waste it as heat. And in a metal detector, the goal isn't power at all — a buried coin, wire loop, or ring becomes a tiny secondary source of field itself once current is induced in it, and the detector's electronics just need to notice that faint extra signal appearing. @@ -57,13 +57,17 @@ The low-resistance path that makes induction hobs so effective is a specific, de ## Real world ### Induction hobs + Induction cooktops drive a coil under the glass surface at tens of kilohertz, inducing eddy currents directly in a ferromagnetic pan's base and heating it without ever making the cooktop itself hot. ### Wireless (Qi) charging + A transmitter coil in the charging pad and a receiver coil in the phone form a loosely coupled transformer through the air, typically running around 100–200 kHz. ### Metal detectors + A search coil's alternating field induces tiny eddy currents in any nearby metal object, which in turn creates its own faint field that the detector's receiver picks up and turns into a signal. ### Induction sealing and welding + Factories use the same high-frequency induction heating to seal foil-lined bottle caps and to weld or temper metal parts without any flame or direct electrical contact. diff --git a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/lesson.yaml b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/lesson.yaml index 73aaef58..cd29100c 100644 --- a/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/lesson.yaml +++ b/content/lessons/electromagnetism/electromagnetic-induction-in-daily-life/lesson.yaml @@ -52,21 +52,21 @@ derivation: charts: [] primary: f presets: -- B: 0.005 - A: 0.0003 - f: 25000 - R: 0.0001 -- B: 0.002 - A: 0.001 - f: 150000 - R: 0.24 -- B: 0.0001 - A: 0.0001 - f: 7000 - R: 0.001 + - B: 0.005 + A: 0.0003 + f: 25000 + R: 0.0001 + - B: 0.002 + A: 0.001 + f: 150000 + R: 0.24 + - B: 0.0001 + A: 0.0001 + f: 7000 + R: 0.001 challenges: -- check: '(A*B*2*pi*f/sqrt(2))^2/R' - target: 300 - tol: 50 -- check: 'f >= 100000 and f <= 200000 and (A*B*2*pi*f/sqrt(2))^2/R > 5 and (A*B*2*pi*f/sqrt(2))^2/R < 10' -- check: 'f <= 10000 and (A*B*2*pi*f)/sqrt(2) > 0.0001' + - check: '(A*B*2*pi*f/sqrt(2))^2/R' + target: 1000 + tol: 100 + - check: 'f >= 100000 and f <= 200000 and (A*B*2*pi*f/sqrt(2))^2/R > 5 and (A*B*2*pi*f/sqrt(2))^2/R < 10' + - check: 'f <= 10000 and (A*B*2*pi*f)/sqrt(2) > 0.0001' diff --git a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md index f735058b..2333e647 100644 --- a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md +++ b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/ar.md @@ -12,37 +12,37 @@ variables: ## Try it -1. يُظهر الرسم شريطًا طويلًا مُسمّى، من موجات الراديو يسارًا إلى أشعة غاما يمينًا، مع مؤشر تحركه على طوله، وموجة صغيرة متعرّجة بجانبه تتمدد وتنضغط لتطابقه. -2. حرّك منزلق «e» من أقصى اليسار إلى أقصى اليمين. يجتاز المؤشر الراديو والموجات الدقيقة والأشعة تحت الحمراء وشريحة رقيقة من الضوء المرئي والأشعة فوق البنفسجية والأشعة السينية وغاما، ويتقلّص طول الموجة عشرة أضعاف مع كل خطوة مقدارها 1 على المنزلق. -3. راقب الموجة المتعرّجة وأنت تعبر النطاق المرئي: إنه جزء ضئيل جدًا من الطيف كله، ومع ذلك هو الجزء الوحيد الذي تراه عيناك مباشرة. +1. يُظهر الرسم شريطًا طويلًا كُتبت عليه أسماء الموجات، من موجات الراديو يسارًا إلى أشعة غاما يمينًا، مع مؤشر تحركه على طوله، وموجة صغيرة متعرّجة بجانبه تتمدد وتنضغط لتطابقه. +2. في البداية يكون منزلق «عدد قوى العشرة في طول الموجة e (طول الموجة = 10^e متر)» عند −2: تعرض القراءات λ = 0.01 m و f = 3.000e+10 Hz، وهذه موجة دقيقة (ميكروويف). حرّك المنزلق من 3 نزولًا إلى −12. يمرّ المؤشر على الراديو والموجات الدقيقة والأشعة تحت الحمراء وشريحة رقيقة من الضوء المرئي والأشعة فوق البنفسجية والأشعة السينية وغاما، ويصغر طول الموجة إلى عُشره مع كل خطوة مقدارها 1 على المنزلق. +3. توقف عند −6.3، حيث يظهر فوق الشريط الاسم «مرئي» ويكون طول الموجة 5.01e-7 m، أي نحو 500 نانومتر. هذا النطاق جزء ضئيل جدًا من الطيف كله، ومع ذلك هو الجزء الوحيد الذي تراه عيناك مباشرة. ## Real-life examples 1. **محطة إذاعة FM.** طول موجة نحو 3.2 m: تردد نحو 95 MHz، في منتصف موجات FM تقريبًا. 2. **الضوء الأخضر.** طول موجة نحو 500 نانومتر (5×10⁻⁷ m): تردد نحو 6×10¹⁴ Hz، أي 600 تريليون قمة موجية تصل عينك كل ثانية. -3. **أشعة سينية طبية.** طول موجة نحو 0.1 نانومتر (10⁻¹⁰ m): تردد نحو 3×10¹⁸ Hz، طاقة كافية لاختراق الأنسجة اللينة وتصوير عظامك بالظل. +3. **أشعة سينية طبية.** طول موجة نحو 0.1 نانومتر (10⁻¹⁰ m): تردد نحو 3×10¹⁸ Hz، وطاقتها تكفي لاختراق الأنسجة اللينة، فيظهر ظل عظامك في الصورة. ## Test yourself -1. اضبط طول الموجة بحيث يستقر التردد عند نحو 100 MHz، محطة إذاعة FM. -2. انزلق إلى نطاق الضوء المرئي، حيث يقع التردد بين نحو 4×10¹⁴ و7.5×10¹⁴ Hz. -3. ادفع التردد فوق 10¹⁹ Hz، إلى نطاق أشعة غاما. +1. اضبط طول الموجة ليصير التردد نحو 100 MHz، وهو تردد محطة إذاعة FM. +2. حرّك المؤشر إلى نطاق الضوء المرئي، حيث يقع التردد بين نحو 4×10¹⁴ و7.5×10¹⁴ Hz. +3. ارفع التردد إلى 3×10¹⁹ Hz أو أكثر، لتدخل نطاق أشعة غاما. ## Intuition -كل واحدة من هذه: إشارة الراديو الواصلة إلى سيارتك، والضوء الواصل إلى عينيك الآن، والأشعة السينية التي صوّرت عظمًا مكسورًا، هي الشيء الفيزيائي نفسه بالضبط: تموّج ذاتي الانتشار من مجالين كهربائي ومغناطيسي، تولّده أي شحنة متسارعة، وينتقل عبر الفراغ بالسرعة الثابتة نفسها $c$. الشيء الوحيد الذي يتغيّر من نوع لآخر هو طول الموجة، أي المسافة بين التموّجات. +كل واحدة من هذه: إشارة الراديو الواصلة إلى سيارتك، والضوء الواصل إلى عينيك الآن، والأشعة السينية التي صوّرت عظمًا مكسورًا، هي الشيء الفيزيائي نفسه بالضبط: تموّج ينتشر من تلقاء نفسه، مكوَّن من مجالين كهربائي ومغناطيسي، تولّده أي شحنة متسارعة، وينتقل عبر الفراغ بالسرعة الثابتة نفسها $c$. الشيء الوحيد الذي يتغيّر من نوع لآخر هو طول الموجة، أي المسافة بين التموّجات. -طول الموجة القصير يحشر قممًا أكثر في كل ثانية، فيعني ترددًا أعلى، ويعني أيضًا، كما سترى في دروس أكثر تقدمًا، موجة أعلى طاقة. هذه هي فكرة الطيف كله في جملة واحدة: موجات الراديو أطوالها من سنتيمترات إلى كيلومترات وتحمل إشارات البث بتكلفة زهيدة لمسافات هائلة؛ والضوء المرئي يشغل نطاقًا رفيعًا جدًا حول نصف ميكرومتر، مضبوطًا تقريبًا على ما تطوّرت عيناك لتكتشفه؛ والأشعة السينية وغاما أطوالها أصغر من الذرة، وطاقتها كافية لاختراق مواد تحجب الضوء العادي كليًا. +حين يقصر طول الموجة تمرّ قمم أكثر في كل ثانية، وهذا يعني ترددًا أعلى، ويعني أيضًا، كما سترى في دروس أكثر تقدمًا، موجة أعلى طاقة. هذه هي فكرة الطيف كله في جملة واحدة: موجات الراديو أطوالها من سنتيمترات إلى كيلومترات وتحمل إشارات البث بتكلفة زهيدة لمسافات هائلة؛ والضوء المرئي يشغل نطاقًا رفيعًا جدًا حول نصف ميكرومتر، وهو بالضبط النطاق الذي تستطيع عيناك رؤيته؛ والأشعة السينية وغاما أطوالها أصغر من الذرة، وطاقتها كافية لاختراق مواد تحجب الضوء العادي كليًا. ## Formal -معادلة الموجة التي تربط طول الموجة بالتردد هي $c = \lambda f$، حيث $c \approx 3\times10^8$ م/ث سرعة الضوء في الفراغ، وهي الثابت نفسه لكل جزء من الطيف. كتابة طول الموجة على صورة $\lambda = 10^{e}$ متر تجعل منزلقًا واحدًا يكتسح الطيف كله، من موجات راديو بمقياس الكيلومتر ($e \approx 3$) إلى أشعة غاما أصغر من النواة ($e \approx -15$). +معادلة الموجة التي تربط طول الموجة بالتردد هي $c = \lambda f$، حيث $c \approx 3\times10^8$ م/ث سرعة الضوء في الفراغ، وهي الثابت نفسه لكل جزء من الطيف. كتابة طول الموجة على صورة $\lambda = 10^{e}$ متر تجعل منزلقًا واحدًا يغطي الطيف كله، من موجات راديو طولها نحو كيلومتر ($e \approx 3$) إلى أشعة غاما أصغر بكثير من الذرة ($e \approx -12$). بإعادة الترتيب، $f = c/\lambda$: مضاعفة طول الموجة تنصّف التردد، وكل خطوة مقدارها 1 في $e$ تغيّر التردد بعامل قدره 10 بالضبط. ## Advanced -يحمل كل فوتون من الضوء طاقة $E = hf$، حيث $h$ ثابت بلانك، فالضوء ذو التردد الأعلى (الطول الأقصر) لا يعني فقط قممًا أكثر في الثانية، بل يعني أن كل فوتون يصطدم بقوة أكبر. لهذا يمكن للأشعة فوق البنفسجية أن تتلف خلايا الجلد، وتحتاج الأشعة السينية إلى دروع واقية، بينما لا تفعل موجات الراديو، بالشدة نفسها، أيًا منهما: الفوتونات نفسها ضعيفة ببساطة، مهما كان عددها. +يحمل كل فوتون من الضوء طاقة $E = hf$، حيث $h$ ثابت بلانك، فالضوء ذو التردد الأعلى (الطول الأقصر) لا يعني فقط قممًا أكثر في الثانية، بل يعني أن كل فوتون يحمل طاقة أكبر. لهذا يمكن للأشعة فوق البنفسجية أن تتلف خلايا الجلد، وتحتاج الأشعة السينية إلى دروع واقية، بينما لا تفعل موجات الراديو، بالشدة نفسها، أيًا منهما: فكل فوتون فيها ضعيف الطاقة، مهما كان عدد الفوتونات. ## Derivation @@ -53,13 +53,17 @@ variables: ## Real world ### بث الراديو والتلفاز + يستخدم بث AM وFM والتلفاز أطوال موجات من أمتار إلى كيلومترات، طويلة بما يكفي لتنحني حول التلال والمباني وتحمل الإشارة لمسافة بعيدة. ### أفران الميكروويف والواي فاي + يستخدم كلاهما تقريبًا الشريحة نفسها من الطيف، نحو 12 سم (2.45 GHz)، وهو تردد تمتصه جزيئات الماء بكفاءة، وهذا بالضبط سبب طهيه للطعام. ### الضوء المرئي والكاميرات + النطاق المرئي الضيق، نحو 400-700 نانومتر، هو ما تكتشفه العين والكاميرات العادية مباشرة؛ وتمتد كاميرات الأشعة تحت الحمراء أبعد قليلًا لتستشعر الحرارة. ### التصوير الطبي والأمني + تصوّر الأشعة السينية العظام وحقائب المطارات بالضبط لأن طول موجتها القصير يتيح لها اختراق مواد لينة تحجب الضوء المرئي كليًا. diff --git a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/en.md b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/en.md index 33fb9714..adacdf67 100644 --- a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/en.md +++ b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/en.md @@ -15,20 +15,20 @@ variables: ## Try it 1. The picture shows a long labelled bar from radio waves on the left to gamma rays on the right, with a marker you slide along it, and a small squiggly wave next to it that stretches or squeezes to match. -2. Drag «e» from the far left to the far right. The marker sweeps through radio, microwave, infrared, a thin sliver of visible light, ultraviolet, X-ray, and gamma — the wavelength shrinks by a factor of ten every single step of 1 on the slider. -3. Watch the squiggly wave as you cross into the visible band: it's a vanishingly small part of the whole spectrum, yet it's the only part your eyes can see directly. +2. At the start the slider «how many powers of ten the wavelength is, e (wavelength = 10^e metres)» is at −2: the readouts show λ = 0.01 m and f = 3.000e+10 Hz, a microwave. Drag it from 3 all the way down to −12. The marker sweeps through radio, microwave, infrared, a thin sliver of visible light, ultraviolet, X-ray, and gamma — the wavelength shrinks by a factor of ten every single step of 1 on the slider. +3. Stop at −6.3, where the label above the bar reads Visible and the wavelength is 5.01e-7 m, about 500 nanometres. This band is a vanishingly small part of the whole spectrum, yet it's the only part your eyes can see directly. ## Real-life examples 1. **An FM radio station.** Wavelength around 3.2 m: a frequency of about 95 MHz, right in the middle of the FM dial. -2. **Green light.** Wavelength around 500 nanometres (5×10⁻⁷ m): a frequency of about 6×10¹⁴ Hz —600 trillion wave crests reaching your eye every second. +2. **Green light.** Wavelength around 500 nanometres (5×10⁻⁷ m): a frequency of about 6×10¹⁴ Hz — 600 trillion wave crests reaching your eye every second. 3. **A medical X-ray.** Wavelength around 0.1 nanometres (10⁻¹⁰ m): a frequency of about 3×10¹⁸ Hz, energetic enough to pass through soft tissue and shadow-image your bones. ## Test yourself 1. Tune the wavelength so the frequency lands on about 100 MHz, an FM radio station. 2. Slide into the visible-light band, where the frequency is somewhere between about 4×10¹⁴ and 7.5×10¹⁴ Hz. -3. Push the frequency above 10¹⁹ Hz, into gamma-ray territory. +3. Push the frequency up to 3×10¹⁹ Hz or more, into gamma-ray territory. ## Intuition @@ -38,7 +38,7 @@ A short wavelength packs more wave crests into every second, so it means a high ## Formal -The wave equation linking wavelength and frequency is $c = \lambda f$, where $c \approx 3\times10^8$ m/s is the speed of light in vacuum, the same for every part of the spectrum. Writing the wavelength as $\lambda = 10^{e}$ metres lets one slider sweep the entire spectrum, from kilometre-scale radio waves ($e \approx 3$) to gamma rays smaller than a nucleus ($e \approx -15$). +The wave equation linking wavelength and frequency is $c = \lambda f$, where $c \approx 3\times10^8$ m/s is the speed of light in vacuum, the same for every part of the spectrum. Writing the wavelength as $\lambda = 10^{e}$ metres lets one slider sweep the entire spectrum, from kilometre-scale radio waves ($e \approx 3$) to gamma rays far smaller than an atom ($e \approx -12$). Rearranging, $f = c/\lambda$: doubling the wavelength halves the frequency, and every step of 1 in $e$ changes the frequency by a factor of exactly 10. @@ -55,13 +55,17 @@ Each photon of light carries energy $E = hf$, where $h$ is Planck's constant — ## Real world ### Radio and television broadcasting + AM, FM, and TV broadcasts use wavelengths from metres to kilometres, long enough to bend around hills and buildings and carry a signal a long way. ### Microwave ovens and Wi-Fi + Both use roughly the same slice of spectrum, around 12 cm (2.45 GHz) — a frequency that happens to be efficiently absorbed by water molecules, which is exactly why it cooks food. ### Visible light and cameras + The narrow visible band, roughly 400–700 nanometres, is what eyes and ordinary cameras detect directly; infrared cameras extend a little further to sense heat. ### Medical and security imaging + X-rays image bones and airport baggage precisely because their short wavelength lets them pass through soft materials that block visible light entirely. diff --git a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/lesson.yaml b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/lesson.yaml index 84acf045..56b48bb7 100644 --- a/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/lesson.yaml +++ b/content/lessons/electromagnetism/electromagnetic-waves-and-the-spectrum/lesson.yaml @@ -34,12 +34,12 @@ derivation: charts: [] primary: e presets: -- e: 0.5 -- e: -6.3 -- e: -10 + - e: 0.5 + - e: -6.3 + - e: -10 challenges: -- check: '3*10^(8-e)' - target: 100000000 - tol: 20000000 -- check: '3*10^(8-e) > 400000000000000 and 3*10^(8-e) < 750000000000000' -- check: '3*10^(8-e) > 10000000000000000000' + - check: '3*10^(8-e)' + target: 100000000 + tol: 20000000 + - check: '3*10^(8-e) > 400000000000000 and 3*10^(8-e) < 750000000000000' + - check: '3*10^(8-e) > 29000000000000000000' diff --git a/content/lessons/electromagnetism/faradays-law/ar.md b/content/lessons/electromagnetism/faradays-law/ar.md index a2fa2e25..2bc0d37e 100644 --- a/content/lessons/electromagnetism/faradays-law/ar.md +++ b/content/lessons/electromagnetism/faradays-law/ar.md @@ -1,7 +1,7 @@ --- title: قانون فاراداي للحث summary: >- - أدر ملفًا داخل مغناطيس فيخرج منه جهد. هكذا تولَّد الكهرباء كلها. + أدر ملفًا داخل مغناطيس فيخرج منه جهد. هكذا تولَّد معظم الكهرباء. parameters: B: شدة المجال B A: مساحة الحلقة A @@ -17,27 +17,27 @@ variables: ## Try it -1. تخيّل دينامو دراجة، وهو ملف صغير من 50 لفة. يدور الملف مرتين كل ثانية داخل مجال مغناطيسي متوسط ويضيء مصباحًا. -2. حرّك النقطة على طول المنحنى. الخط المماس، أي الميل، هو الجهد الذي يولّده الملف في تلك اللحظة. -3. ارفع منزلق «تردد الدوران f». يكبر المنحنى ويزداد الجهد الذي يولّده الملف معه. +1. تخيّل دينامو دراجة، وهو ملف صغير من 50 لفة يدور داخل مجال مغناطيسي ويضيء مصباحًا. اترك المنزلقات الأخرى كما هي واضبط «الزمن t» على 0.5 s. المنحنى هو التدفق المغناطيسي عبر لفة واحدة من الملف. هنا يعبر المنحنى الصفر، وتعرض قراءة الميل −3.1416. +2. حرّك النقطة على المنحنى إلى «الزمن t» = 1 s، أي إلى قاع الموجة. يصير الخط المماس أفقيًا: الميل صفر، فلا يولّد الملف جهدًا في تلك اللحظة. الجهد هو الميل مضروبًا في عدد اللفات. +3. أعد «الزمن t» إلى 0.5 s وارفع منزلق «تردد الدوران f» من 0.5 إلى 1.5 Hz. تتقارب الموجات وتكبر قراءة الميل إلى 9.4248، أي ثلاثة أضعاف، فيصير الجهد ثلاثة أضعاف. ## Real-life examples -1. **دينامو دراجة.** ملف من 50 لفة يدور مرتين كل ثانية داخل مجال 0.2 T، بحلقة صغيرة مساحتها 0.2 m²، فينتج جهدًا ذروته نحو 6 V، يكفي لإضاءة مصباح. -2. **مولّد في محطة كهرباء.** ملف ضخم من 200 لفة يدور بسرعة داخل مجال قوي قدره 2 T، بحلقة مساحتها 2 m²، فينتج جهدًا ذروته نحو 10000 V قبل أن تخفضه المحولات لتغذية المنازل. +1. **دينامو دراجة.** ملف من 50 لفة يدور دورة واحدة كل ثانيتين داخل مجال 0.2 T، بحلقة صغيرة مساحتها 0.2 m²، فينتج جهدًا ذروته نحو 6 V، يكفي لإضاءة مصباح. +2. **مولّد في محطة كهرباء.** ملف ضخم من 200 لفة يدور مرتين كل ثانية داخل مجال قوي قدره 2 T، بحلقة مساحتها 2 m²، فينتج جهدًا ذروته نحو 10000 V قبل أن تخفضه المحولات لتغذية المنازل. 3. **ملف موقد الحث الحراري.** ملف من 100 لفة يتبدل اتجاهه مرة كل ثانية داخل مجال 1 T فوق مساحة 0.3 m²، فينتج نحو 190 V، وهو ما يكفي لتوليد التيارات التي تسخّن الإناء. ## Test yourself 1. اصنع مولدًا يُدار باليد ينتج جهدًا ذروته نحو 6 V، كدينامو الدراجة. -2. دون تغيير كبير في المجال أو المساحة أو عدد اللفات، ادفع جهد الذروة فوق 500 V بالسرعة وحدها. -3. أبقِ الملف صغيرًا (مساحته 0.5 m² كحد أقصى) والمجال ضعيفًا (1 T كحد أقصى)، ومع ذلك بلغ جهد ذروة فوق 20 V. +2. اترك شدة المجال والمساحة وعدد اللفات عند قيمها الأولى (1 T و1 m² و50 لفة)، واجعل جهد الذروة يتجاوز 500 V بمنزلق «تردد الدوران f» وحده. +3. أبقِ الملف صغيرًا (مساحته 0.5 m² كحد أقصى) والمجال ضعيفًا (1 T كحد أقصى)، واجعل جهد الذروة مع ذلك يتجاوز 20 V. ## Intuition تخيّل دينامو دراجة: ملف صغير يدور داخل مغناطيس مع دوران العجلة، ويضيء مصباحًا. المنحنى أعلاه يمثل التدفق عبر ذلك الملف، أي مقدار المجال المغناطيسي المار عبر الحلقة، ويرتفع وينخفض كموجة مع دوران الملف. حرّك النقطة على طول المنحنى. الخط المماس، أي الميل عند تلك النقطة، هو الجهد الذي يولّده الملف في تلك اللحظة بالضبط. يبلغ الميل أقصاه، وكذلك الجهد، عند اللحظة التي يعبر فيها التدفق الصفر، ويصبح أفقيًا، أي بجهد صفر، عند أعلى نقطة للتدفق وأدناها. -يرسم الرسم أدناه هذا الجهد مباشرة، متقدمًا على منحنى التدفق بربع دورة. ارفع منزلق «تردد الدوران f» فتتسارع موجة التدفق ويكبر منحنى الجهد معها. أدر الملف بسرعة الضعف فينتج ضعف الجهد، رغم أن المجال وحجم الملف لم يتغيّرا. +الجهد يتبع الميل، فهو موجة أيضًا، لكنها تسبق منحنى التدفق أو تتأخر عنه بربع دورة. ارفع منزلق «تردد الدوران f» فتتقارب موجات التدفق ويزداد الميل عند كل نقطة. أدر الملف بسرعة الضعف فينتج ضعف الجهد، رغم أن المجال وحجم الملف لم يتغيّرا. ## Formal @@ -58,13 +58,17 @@ variables: ## Real world ### المولدات الكهربائية + تُدير التوربينات ملفات داخل مجال مغناطيسي (أو العكس) لتوليد جُلّ الكهرباء التي تغذّي الشبكات بهذه الطريقة. ### المحولات الكهربائية + ينشئ تيار متردد في ملف تدفقًا متغيّرًا يستحث جهدًا في ملف مجاور، مما يرفع الجهد أو يخفضه. ### مواقد الحث الحراري + يستحث مجال متردد بسرعة تيارات دوامية مباشرة داخل الإناء، فيسخّنه دون وجود عنصر تسخين ساخن. ### الشحن اللاسلكي وتقنية RFID + يستحث تدفق متغيّر من ملف إرسال تيارًا في ملف استقبال قريب دون أي تلامس مادي. diff --git a/content/lessons/electromagnetism/faradays-law/en.md b/content/lessons/electromagnetism/faradays-law/en.md index 4ddc9723..99ec2816 100644 --- a/content/lessons/electromagnetism/faradays-law/en.md +++ b/content/lessons/electromagnetism/faradays-law/en.md @@ -18,27 +18,27 @@ variables: ## Try it -1. Picture a bike dynamo: a small coil, 50 turns, spinning twice a second in a modest magnetic field, lighting a bulb. -2. Drag the point along the curve. The tangent line — the slope — is the voltage the coil produces at that instant. -3. Raise «rotation frequency f». The curve grows taller and the voltage the coil makes goes up too. +1. Picture a bike dynamo: a small coil of 50 turns, spinning in a magnetic field and lighting a bulb. Leave the other sliders as they are and set «time t» to 0.5 s. The curve is the magnetic flux through one turn of the coil. Here it crosses zero and the slope readout shows −3.1416. +2. Drag the point along the curve to «time t» = 1 s, the bottom of the wave. The tangent line lies flat: the slope is zero, so the coil makes no voltage at that instant. The voltage is the slope multiplied by the number of turns. +3. Set «time t» back to 0.5 s and raise «rotation frequency f» from 0.5 to 1.5 Hz. The waves squeeze closer together and the slope readout grows to 9.4248: three times as steep, so three times the voltage. ## Real-life examples -1. **A bike dynamo.** A 50-turn coil spinning twice a second in a 0.2 T field, with a small 0.2 m² loop, produces a peak voltage of about 6 V — enough to light a bulb. -2. **A power-station generator.** A huge 200-turn coil spinning fast in a strong 2 T field, with a 2 m² loop, produces a peak of about 10,000 V before transformers step it down for homes. +1. **A bike dynamo.** A 50-turn coil making one turn every 2 seconds in a 0.2 T field, with a small 0.2 m² loop, produces a peak voltage of about 6 V — enough to light a bulb. +2. **A power-station generator.** A huge 200-turn coil spinning twice a second in a strong 2 T field, with a 2 m² loop, produces a peak of about 10,000 V before transformers step it down for homes. 3. **An induction cooktop coil.** A 100-turn coil switching once a second in a 1 T field over a 0.3 m² area makes about 190 V, enough to drive the currents that heat the pan. ## Test yourself 1. Build a hand-crank generator that produces a peak voltage of about 6 V, like a bike dynamo. -2. Without touching the field strength, area, or turns much, push the peak voltage above 500 V using speed alone. +2. Leave the field strength, area, and turns at their starting values (1 T, 1 m², 50 turns) and push the peak voltage above 500 V using «rotation frequency f» alone. 3. Keep the coil small (area at most 0.5 m²) and the field weak (at most 1 T), but still reach a peak voltage above 20 V. ## Intuition Picture a bike dynamo: a small coil spinning in a magnet as the wheel turns, lighting a bulb. The curve above is the flux through that coil — how much magnetic field passes through the loop — and it rises and falls like a wave as the coil spins. Drag the point along the curve: the tangent line, the slope at that spot, is the voltage the coil produces right then. It is steepest, and the voltage biggest, exactly where the flux crosses zero, and flat, with zero voltage, at the flux's highest and lowest points. -The chart below plots that voltage directly, a quarter-turn ahead of the flux curve. Raise «rotation frequency f» and the flux wave speeds up while the voltage curve grows taller: spin the coil twice as fast, and it produces twice the voltage, even though the field and coil size never changed. +The voltage follows the slope, so it is a wave too, a quarter-turn out of step with the flux curve. Raise «rotation frequency f» and the flux wave squeezes together, so every slope gets steeper: spin the coil twice as fast, and it produces twice the voltage, even though the field and coil size never changed. ## Formal @@ -59,13 +59,17 @@ Faraday's law in differential form is $\nabla\times\mathbf{E} = -\partial\mathbf ## Real world ### Generators + Turbines spin coils in a magnetic field (or vice versa) to generate essentially all grid electricity this way. ### Transformers + An alternating current in one coil creates a changing flux that induces a voltage in a neighbouring coil, stepping voltage up or down. ### Induction cooktops + A rapidly alternating field induces eddy currents directly in the pan, heating it without a hot element. ### Wireless charging and RFID + A changing flux from a transmitter coil induces current in a nearby receiver coil with no physical contact. diff --git a/content/lessons/electromagnetism/faradays-law/lesson.yaml b/content/lessons/electromagnetism/faradays-law/lesson.yaml index c7a3570c..29cc7870 100644 --- a/content/lessons/electromagnetism/faradays-law/lesson.yaml +++ b/content/lessons/electromagnetism/faradays-law/lesson.yaml @@ -69,21 +69,21 @@ derivation: charts: [] primary: f presets: -- 'N': 50 - B: 0.2 - A: 0.2 - f: 0.5 -- 'N': 200 - B: 2 - A: 2 - f: 2 -- 'N': 100 - B: 1 - A: 0.3 - f: 1 + - 'N': 50 + B: 0.2 + A: 0.2 + f: 0.5 + - 'N': 200 + B: 2 + A: 2 + f: 2 + - 'N': 100 + B: 1 + A: 0.3 + f: 1 challenges: -- check: 'N*B*A*2*pi*f' - target: 6 - tol: 1 -- check: 'N*B*A*2*pi*f > 500' -- check: 'A <= 0.5 and B <= 1 and N*B*A*2*pi*f > 20' + - check: 'N*B*A*2*pi*f' + target: 6 + tol: 1 + - check: 'N*B*A*2*pi*f > 500' + - check: 'A <= 0.5 and B <= 1 and N*B*A*2*pi*f > 20' diff --git a/content/lessons/electromagnetism/gauss-law/ar.md b/content/lessons/electromagnetism/gauss-law/ar.md index d44423b5..fb247f42 100644 --- a/content/lessons/electromagnetism/gauss-law/ar.md +++ b/content/lessons/electromagnetism/gauss-law/ar.md @@ -16,15 +16,15 @@ variables: ## Try it -1. تخيّل كرة صغيرة مشحونة للعرض التوضيحي، شحنتها 20 nC موزّعة على كرة قطرها 0.5 m. -2. اسحب منزلق «المسافة من المركز x» مبتعدًا عن الوسط. يرتفع المجال ما دمت داخل الكرة، ثم يبدأ بالانخفاض بمجرد تجاوزك سطحها. -3. ارفع الآن منزلق «نصف قطر الكرة R» مع إبقاء الشحنة ثابتة. تنخفض قمة المجال عند السطح، لأن الشحنة نفسها صارت منتشرة على حيّز أكبر. +1. تخيّل كرة مشحونة تُستخدم في عروض الفيزياء، شحنتها 20 nC موزّعة داخل كرة نصف قطرها 1 m. أبقِ «الشحنة الكلية Q» عند 20 nC و«نصف قطر الكرة R» عند 1 m، واضبط «المسافة من المركز x» على 1.5 m. تعرض القراءة f(x) = 79.9111، أي أن المجال هناك نحو 80 V/m. +2. اسحب منزلق «المسافة من المركز x» من 0.5 m إلى 1 m. يرتفع المجال من 89.9 إلى 179.8 V/m، وهي أعلى قيمة له، عند سطح الكرة تمامًا. تابع إلى 2 m فينخفض إلى 44.95 V/m. +3. أبقِ «المسافة من المركز x» عند 2 m وارفع منزلق «نصف قطر الكرة R» من 1 m إلى 2 m، فتصير عند السطح من جديد. المجال هناك الآن 44.95 V/m فقط بدل 179.8، لأن الشحنة نفسها صارت موزّعة على حيّز أكبر. ## Real-life examples -1. **كرة صغيرة مشحونة للعرض التوضيحي.** بشحنة 20 nC موزّعة على كرة قطرها 0.5 m، يبلغ المجال على بعد 2 m من المركز نحو 45 V/m فقط. -2. **قبة مولّد فان دي غراف.** مشحونة بـ 80 nC على كرة صغيرة قطرها 0.2 m، ويبلغ المجال على بعد متر واحد من المركز أكثر من 700 V/m. -3. **منطاد أرصاد جوية كبير مشحون.** بشحنة 50 nC موزّعة على كرة أكبر قطرها 1.5 m، يبلغ المجال في منتصف المسافة إلى السطح (على بعد 0.5 m) نحو 67 V/m، وهو أهدأ لأن الشحنة أكثر انتشارًا. +1. **كرة مشحونة في عرض فيزياء.** بشحنة 20 nC موزّعة داخل كرة نصف قطرها 1 m، يبلغ المجال على بعد 2 m من المركز نحو 45 V/m فقط. +2. **قبة مولّد فان دي غراف.** مشحونة بـ 80 nC على كرة صغيرة نصف قطرها 0.2 m، ويبلغ المجال على بعد متر واحد من المركز أكثر من 700 V/m. +3. **منطاد أرصاد جوية كبير مشحون.** بشحنة 50 nC موزّعة داخل كرة أكبر نصف قطرها 1.5 m، يبلغ المجال عند ثلث المسافة إلى السطح (على بعد 0.5 m من المركز) نحو 67 V/m، وهو أضعف لأن الشحنة أكثر انتشارًا. ## Test yourself @@ -34,7 +34,7 @@ variables: ## Intuition -تخيّل كرة صغيرة مشحونة تُستخدم في عروض الفيزياء، تحمل 20 nC من الشحنة موزّعة على كرة قطرها نصف متر. اسحب منزلق «المسافة من المركز x» مبتعدًا عن الوسط. ما دمت داخل الكرة يرتفع المجال بخط مستقيم، لأن ابتعادك يجتاز مزيدًا فمزيدًا من الشحنة. وبمجرد أن يتجاوز $x$ نصف قطر الكرة $R$، تصبح كل الشحنة محصورة بالفعل، فيبدأ المجال بالانخفاض بدلًا من ذلك، بالشكل نفسه الذي رأيته في قانون كولوم. +تخيّل كرة مشحونة تُستخدم في عروض الفيزياء، تحمل 20 nC من الشحنة موزّعة داخل كرة نصف قطرها 1 m. اسحب منزلق «المسافة من المركز x» مبتعدًا عن الوسط. ما دمت داخل الكرة يرتفع المجال بخط مستقيم، لأن الشحنة المحصورة بينك وبين المركز تزداد كلما ابتعدت. وبمجرد أن يتجاوز $x$ نصف قطر الكرة $R$، تصبح كل الشحنة محصورة بالفعل، فيبدأ المجال بالانخفاض بدلًا من ذلك، بالشكل نفسه الذي رأيته في قانون كولوم. ارفع الآن منزلق «نصف قطر الكرة R» مع إبقاء الشحنة ثابتة. الشحنة الكلية نفسها تنتشر الآن على كرة أكبر، فتنخفض قمة المجال عند السطح، رغم أن مقدار الشحنة لم يتغيّر، بل تغيّر مدى انتشارها فقط. @@ -46,24 +46,28 @@ variables: ## Advanced -قانون غاوس أحد معادلات ماكسويل، ويصح لأي توزيع شحنة وأي سطح مغلق، لا الكرات فقط. حيلة سطح غاوس الكروي تنجح بهذه البساطة هنا فقط لأن الشحنة نفسها متماثلة كرويًا، فيُجبَر $\mathbf{E}$ أن يكون شعاعيًا وثابت المقدار على كل كرة كهذه. بلا هذا التماثل يبقى القانون صحيحًا، لكن تكامل التدفق لم يعد ينهار إلى جبر بسيط. +قانون غاوس أحد معادلات ماكسويل، ويصح لأي توزيع شحنة وأي سطح مغلق، لا الكرات فقط. حيلة سطح غاوس الكروي تنجح بهذه البساطة هنا فقط لأن الشحنة نفسها متماثلة كرويًا، فيُجبَر $\mathbf{E}$ أن يكون شعاعيًا وثابت المقدار على كل كرة كهذه. بلا هذا التماثل يبقى القانون صحيحًا، لكن حساب تكامل التدفق لا يعود بهذه السهولة. ## Derivation -1. بالتماثل الكروي يكون المجال شعاعيًا ومنتظم المقدار على كرة نصف قطرها $x$، فينهار تكامل التدفق إلى $E(x)$ مضروبًا في مساحة الكرة. -2. داخل الكرة، تعني الكثافة الشحنية المنتظمة أن الشحنة المحصورة تتناسب مع الحجم المجتاز، $x^3/R^3$، فينتج مجال يرتفع خطيًا مع $x$. +1. بالتماثل الكروي يكون المجال شعاعيًا ومنتظم المقدار على كرة نصف قطرها $x$، فيصير تكامل التدفق ببساطة $E(x)$ مضروبًا في مساحة الكرة. +2. داخل الكرة، تعني الكثافة الشحنية المنتظمة أن الشحنة المحصورة تتناسب مع الحجم المحصور، $x^3/R^3$، فينتج مجال يرتفع خطيًا مع $x$. 3. خارج الكرة، كل $Q$ محصورة بالفعل بمعزل عن $x$، فيعود المجال إلى شكل كولوم العادي العكسي التربيعي. ## Real world ### أقفاص فاراداي + يبقي غلاف موصل مغلق مجاله الداخلي صفرًا، بمعزل عن الشحنة أو المجال خارجه. وهذا بالضبط ما يفرضه قانون غاوس على أي منطقة محصورة خالية من الشحنة. ### مولدات فان دي غراف + تنتقل الشحنة الزائدة المرشوشة على كرة موصلة مجوفة بأكملها إلى السطح الخارجي، تاركةً المجال والجهد ثابتين في الداخل. وهذه نتيجة مباشرة للقانون نفسه. ### الكابلات المحورية + نستبدل سطح غاوس الكروي بآخر أسطواني، فنحصل على المجال بين الموصل الداخلي للكابل ودرعه الخارجي بحجة التماثل نفسها تمامًا. ### استرجاع قانون كولوم + نقلّص الكرة المشحونة إلى نقطة فنسترجع مجال $1/x^2$ لشحنة نقطية مفردة، وهو ما دُرس في درس «قانون كولوم». يحتوي قانون غاوس عليه كحالة خاصة. diff --git a/content/lessons/electromagnetism/gauss-law/en.md b/content/lessons/electromagnetism/gauss-law/en.md index 719dd653..9e78c688 100644 --- a/content/lessons/electromagnetism/gauss-law/en.md +++ b/content/lessons/electromagnetism/gauss-law/en.md @@ -18,15 +18,15 @@ variables: ## Try it -1. Picture a small charged demonstration ball, 20 nC of charge spread over a 0.5 m sphere. -2. Drag «distance from the centre x» outward from the middle. The field climbs while you're still inside the sphere, then starts falling once you pass its surface. -3. Now raise «sphere radius R» while the charge stays fixed. The peak field at the surface drops — the same charge is now spread over more space. +1. Picture a charged demonstration ball, 20 nC of charge spread through a sphere of radius 1 m. Leave «total charge Q» at 20 nC and «sphere radius R» at 1 m, and set «distance from the centre x» to 1.5 m. The readout shows f(x) = 79.9111: the field there is about 80 V/m. +2. Drag «distance from the centre x» from 0.5 m out to 1 m. The field climbs from 89.9 to 179.8 V/m, its peak, right at the surface. Go on to 2 m and it falls to 44.95 V/m. +3. Keep «distance from the centre x» at 2 m and raise «sphere radius R» from 1 m to 2 m, so you are at the surface again. The field there is now only 44.95 V/m instead of 179.8 — the same charge is spread over more space. ## Real-life examples -1. **A small charged demonstration ball.** With 20 nC spread over a 0.5 m sphere, the field 2 m from the centre is a modest 45 V/m. -2. **A Van de Graaff dome.** Charged to 80 nC on a compact 0.2 m sphere, the field just 1 m from the centre reaches over 700 V/m. -3. **A large charged weather balloon.** With 50 nC spread over a bigger 1.5 m sphere, the field halfway to the surface (0.5 m out) is about 67 V/m — gentler, because the charge is more spread out. +1. **A charged demonstration ball.** With 20 nC spread through a sphere of radius 1 m, the field 2 m from the centre is a modest 45 V/m. +2. **A Van de Graaff dome.** Charged to 80 nC on a compact sphere of radius 0.2 m, the field just 1 m from the centre reaches over 700 V/m. +3. **A large charged weather balloon.** With 50 nC spread through a bigger sphere of radius 1.5 m, the field a third of the way to the surface (0.5 m out) is about 67 V/m — gentler, because the charge is more spread out. ## Test yourself @@ -36,7 +36,7 @@ variables: ## Intuition -Picture a small charged ball used in physics demonstrations, carrying 20 nC of charge spread over a sphere half a metre across. Drag «distance from the centre x» outward from the middle: while you are still inside the sphere, the field climbs in a straight line, because moving out sweeps past more and more of the charge. The moment $x$ passes the sphere's radius $R$, every bit of charge is already enclosed, and the field starts falling off instead, the same shape as in Coulomb's law. +Picture a charged ball used in physics demonstrations, carrying 20 nC of charge spread through a sphere of radius 1 m. Drag «distance from the centre x» outward from the middle: while you are still inside the sphere, the field climbs in a straight line, because moving out sweeps past more and more of the charge. The moment $x$ passes the sphere's radius $R$, every bit of charge is already enclosed, and the field starts falling off instead, the same shape as in Coulomb's law. Now raise «sphere radius R» while the charge stays fixed: the same total charge is now smeared over a bigger sphere, so the peak field right at the surface drops, even though the amount of charge never changed — only how spread out it is. @@ -59,13 +59,17 @@ Gauss's law is one of Maxwell's equations and holds for any charge distribution ## Real world ### Faraday cages + A closed conducting shell keeps its interior field at zero regardless of the charge or field outside, which is exactly what Gauss's law demands for any charge-free enclosed region. ### Van de Graaff generators + Extra charge sprayed onto a hollow conducting sphere migrates entirely to the outer surface, leaving the field and potential inside constant — a direct consequence of the same law. ### Coaxial cables + Swapping the spherical Gaussian surface for a cylindrical one gives the field between a cable's inner conductor and its outer shield by the identical symmetry argument. ### Recovering Coulomb's law + Shrinking the charged sphere to a point recovers the $1/x^2$ field of a single point charge studied in the 'coulombs-law' lesson — Gauss's law contains it as a special case. diff --git a/content/lessons/electromagnetism/gauss-law/lesson.yaml b/content/lessons/electromagnetism/gauss-law/lesson.yaml index 80311de3..b3192d94 100644 --- a/content/lessons/electromagnetism/gauss-law/lesson.yaml +++ b/content/lessons/electromagnetism/gauss-law/lesson.yaml @@ -56,20 +56,20 @@ derivation: charts: [] primary: x presets: -- Q: 20 - R: 0.5 - x: 2 -- Q: 80 - R: 0.2 - x: 1 -- Q: 50 - R: 1.5 - x: 0.5 + - Q: 20 + R: 1 + x: 2 + - Q: 80 + R: 0.2 + x: 1 + - Q: 50 + R: 1.5 + x: 0.5 challenges: -- check: '8.99*Q/x^2' - target: 100 - tol: 10 -- check: 'R >= 1 and x < R and abs(8.99*Q*x/R^3 - 50) < 5' -- check: '8.99*Q/x^2' - target: 2 - tol: 0.5 + - check: '8.99*Q/x^2' + target: 100 + tol: 10 + - check: 'R >= 1 and x < R and abs(8.99*Q*x/R^3 - 50) < 5' + - check: '8.99*Q/x^2' + target: 2 + tol: 0.5 diff --git a/content/lessons/electromagnetism/generators-and-ac/ar.md b/content/lessons/electromagnetism/generators-and-ac/ar.md index 0e4059e1..d5c204e9 100644 --- a/content/lessons/electromagnetism/generators-and-ac/ar.md +++ b/content/lessons/electromagnetism/generators-and-ac/ar.md @@ -16,27 +16,27 @@ variables: ## Try it -1. يُظهر الرسم ملفًا يدور بين قطبي مغناطيس، وطرفاه متصلان بحلقتين انزلاقيتين وفرشاتين تنقلان التيار إلى مصباح، وعلى اليمين موجة الجهد التي ينتجها هذا الدوران عبر الزمن. -2. ارفع منزلق «سرعة الدوران rpm». تكبر الموجة (جهد ذروة أعلى) وتضيق في الوقت نفسه (تردد أعلى): أدر الملف بضعف السرعة فيتضاعف كلاهما. -3. حرّك منزلق «الزمن t» على طول الموجة. تُظهر النقطة على المنحنى الجهد في تلك اللحظة، ويدور رسم الملف الصغير ليطابقها: الجهد صفر بالضبط حين يقف الملف عموديًا على المجال، ويبلغ ذروته حين يواجهه بكامل وجهه. +1. يُظهر الرسم ملفًا يدور بين قطبي مغناطيس، وطرفاه متصلان بحلقتين انزلاقيتين وفرشاتين تنقلان التيار إلى مصباح، وتحته موجة الجهد التي ينتجها هذا الدوران مع مرور الزمن. +2. ارفع منزلق «سرعة الدوران، بعدد اللفات في الدقيقة» من 1500 إلى 3000. تتضاعف قراءة V_peak من 392.7 V إلى 785.4 V، ويتضاعف التردد من 25 Hz إلى 50 Hz، فتتقارب قمم الموجة. يعيد الرسم تكبير الموجة لتملأ المكان نفسه، فاقرأ ارتفاعها من V_peak. أدر الملف بضعف السرعة فيتضاعف الجهد والتردد معًا. +3. حرّك منزلق «الزمن t» إلى 0.005 s. تقف النقطة على قمة الموجة، وتساوي قراءة v(t) قيمة V_peak، أي 785.4 V. تابع إلى 0.01 s: دار الملف الصغير ربع دورة أخرى، فصارت القراءة 0 V وانطفأ المصباح. ## Real-life examples 1. **مولد مصباح يُدار باليد.** 200 لفة، مغناطيس 0.3 T، ملف صغير مساحته 2 سم²، يُدار بسرعة 300 دورة/دقيقة (5 دورات في الثانية): جهد ذروة نحو 3.8 V، يكفي لإضاءة LED أو شحن بطارية ببطء. -2. **توربين رياح منزلي صغير.** 150 لفة، مغناطيس 0.4 T، ملف مساحته 10 سم²، يدور بسرعة 600 دورة/دقيقة: جهد ذروة نحو 37.7 V، يمر عبر محوّل قبل أن يصل إلى أسلاك المنزل. +2. **توربين رياح منزلي صغير.** 150 لفة، مغناطيس 0.4 T، ملف مساحته 10 سم²، يدور بسرعة 600 دورة/دقيقة: جهد ذروة نحو 37.7 V، يمر عبر عاكس (إنفرتر) قبل أن يصل إلى أسلاك المنزل. 3. **مولد توربيني في محطة كهرباء.** 250 لفة، مجال 0.6 T، ملف كبير مساحته 800 سم²، يدور بسرعة 3000 دورة/دقيقة بالضبط: نحو 3770 V بتردد 50 Hz. هذا نموذج مبسّط لحلقة واحدة؛ المولد الحقيقي ينتج جهد أطرافه الخام من حلقات كثيرة كهذه، وترفعه المحولات أكثر قبل النقل. ## Test yourself 1. اصنع مولدًا يُدار باليد ينتج جهد ذروة نحو 4 V. -2. اضبط سرعة الدوران بحيث يستقر التردد الكهربائي عند 50 Hz، وهو التردد الذي تعمل به معظم شبكات الكهرباء حول العالم. -3. أبقِ الملف صغيرًا (مساحته 0.01 m² كحد أقصى) والمجال معتدلًا (0.4 T كحد أقصى)، ومع ذلك بلغ جهد ذروة فوق 50 V بالسرعة وحدها. +2. اضبط سرعة الدوران ليصير التردد الكهربائي 50 Hz، وهو التردد الذي تعمل به معظم شبكات الكهرباء حول العالم. +3. أبقِ الملف صغيرًا (مساحته 0.01 m² كحد أقصى) والمجال معتدلًا (0.4 T كحد أقصى)، واجعل جهد الذروة مع ذلك يتجاوز 50 V بزيادة السرعة وحدها. ## Intuition -المولد محرك يعمل بالعكس: بدل أن تُدخل تيارًا فيدور الملف، تدير الملف أنت بيدك أو بالماء أو الرياح أو البخار، فيخرج التيار من عنده. بينما يدور الملف، تتغيّر باستمرار كمية المجال المغناطيسي المارة عبره: أقصى ما تتغيّر حين يقف الملف عموديًا على المجال، وصفر للحظة حين يواجهه بكامل وجهه فلا تتغيّر عندها إطلاقًا. وبحسب قانون فاراداي، تغيّر التدفق هذا بالضبط هو ما يدفع الإلكترونات حول الحلقة، ولهذا يكون الجهد موجة جيبية: فهو يتبع سرعة تغيّر التدفق عند كل لحظة من الدوران، لا التدفق نفسه. +المولد محرك يعمل بالعكس: بدل أن تُدخل تيارًا فيدور الملف، تدير الملف أنت بيدك أو بالماء أو الرياح أو البخار، فيخرج التيار من عنده. بينما يدور الملف، تتغيّر باستمرار كمية المجال المغناطيسي المارة عبره: تتغيّر بأسرع ما يكون حين تكون حافة الملف هي المتجهة نحو المجال، ولا تتغيّر للحظة حين يواجه وجهُ الملف المجالَ تمامًا. وبحسب قانون فاراداي، تغيّر التدفق هذا بالضبط هو ما يدفع الإلكترونات حول الحلقة، ولهذا يكون الجهد موجة جيبية: فهو يتبع سرعة تغيّر التدفق عند كل لحظة من الدوران، لا التدفق نفسه. -يتصل طرفا الملف بحلقتين انزلاقيتين، وهما حلقتان كاملتان غير مشقوقتين، خلافًا لمبدّل المحرك ذي الحلقة المشقوقة، ولذلك يستمر التيار الذي ينتجه المولد بالانعكاس كل نصف دورة بسلاسة، فيصبح تيارًا متردّدًا (AC). أدر الملف أسرع فيحدث أمران معًا: يتغيّر المجال أسرع عند كل لحظة من الدورة فيرتفع جهد الذروة، وتتكرر الموجة الكاملة صعودًا وهبوطًا أكثر فيرتفع التردد أيضًا. تُبنى توربينات محطات الكهرباء لتدور بالسرعة المضبوطة بالضبط كي يخرج التردد 50 Hz (أو 60 Hz في بعض الدول)، وهو الرقم الذي تُبنى عليه كل ساعة ومحرك ومحوّل على تلك الشبكة. +يتصل طرفا الملف بحلقتين انزلاقيتين، وهما حلقتان كاملتان غير مشقوقتين، خلافًا لمبدّل المحرك ذي الحلقة المشقوقة، ولذلك يستمر التيار الذي ينتجه المولد بالانعكاس كل نصف دورة بسلاسة، فيصبح تيارًا متردّدًا (AC). أدر الملف أسرع فيحدث أمران معًا: يتغيّر المجال أسرع عند كل لحظة من الدورة فيرتفع جهد الذروة، وتتكرر الموجة الكاملة صعودًا وهبوطًا أكثر فيرتفع التردد أيضًا. تُبنى توربينات محطات الكهرباء لتدور بسرعة محددة بدقة كي يخرج التردد 50 Hz (أو 60 Hz في بعض الدول)، وهو الرقم الذي تُبنى عليه كل ساعة ومحرك ومحوّل على تلك الشبكة. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### محطات الكهرباء + يعمل الفحم والغاز والطاقة النووية والمحطات الكهرومائية جميعًا بالطريقة نفسها تقريبًا في الخطوة الأخيرة: شيء يُدير توربينًا، والتوربين يُدير ملف مولد، فيخرج تيار متردّد بتردد 50 أو 60 Hz. ### توربينات الرياح والطاقة المائية + تستخدم توربينات الرياح والمولدات المائية الصغيرة المبدأ نفسه، دوران ملف، لكن بسرعات أبطأ ومتغيّرة، فيحتاج خرجها غالبًا إلكترونيات لمطابقة تردد الشبكة الثابت. ### دينامو الدراجة والشواحن اليدوية + الدينامو أو مصباح الشحن اليدوي هو الفكرة نفسها على نطاق صغير جدًا: تُدير شيئًا بيدك فينتج ملف صغير تيارًا متردّدًا يكفي لإضاءة LED. ### مولدات السيارات + مولد السيارة (الدينامو) مولد تيار متردّد بملف دوّار أيضًا، وتحوّل السيارة ذلك التيار المتردّد إلى تيار مستمر لشحن البطارية وتشغيل الإلكترونيات. diff --git a/content/lessons/electromagnetism/generators-and-ac/en.md b/content/lessons/electromagnetism/generators-and-ac/en.md index add63dc1..a117c3d6 100644 --- a/content/lessons/electromagnetism/generators-and-ac/en.md +++ b/content/lessons/electromagnetism/generators-and-ac/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. The picture shows a coil spinning between two magnet poles, its ends connected to two slip rings and brushes that carry the current out to a lamp — and, to the right, the voltage wave that spinning produces over time. -2. Drag «rotation speed rpm» up. The wave gets both taller (a bigger peak voltage) and tighter (a higher frequency) at the same time — spin the coil twice as fast and both double. -3. Drag «time t» along the wave. The marker on the curve shows the instantaneous voltage, and the little coil schematic turns to match: the voltage is zero exactly when the coil is edge-on to the field, and peaks when it's face-on. +1. The picture shows a coil spinning between two magnet poles, its ends connected to two slip rings and brushes that carry the current out to a lamp — and, below it, the voltage wave that spinning produces over time. +2. Drag «rotation speed, in turns per minute» from 1500 up to 3000. The V_peak readout doubles from 392.7 V to 785.4 V and the frequency doubles from 25 Hz to 50 Hz, so the wave gets tighter. The picture rescales the wave to fit, so read its height from V_peak — spin the coil twice as fast and both double. +3. Drag «time t» to 0.005 s. The marker sits on top of the wave and the v(t) readout equals V_peak, 785.4 V. Drag on to 0.01 s: the little coil has made another quarter turn, the voltage reads 0 V and the lamp goes dark. ## Real-life examples @@ -59,13 +59,17 @@ The root-mean-square (rms) voltage — the steady-DC-equivalent value your multi ## Real world ### Power stations + Coal, gas, nuclear, and hydroelectric plants nearly all work the same way at the very last step: something spins a turbine, the turbine spins a generator coil, and out comes 50 or 60 Hz AC. ### Wind and hydro turbines + Wind turbines and small hydro generators use the same spinning-coil principle at far lower, more variable speeds, so their output usually needs electronics to match the grid's fixed frequency. ### Bicycle dynamos and hand-crank chargers + A dynamo or a hand-crank flashlight is the same idea at a tiny scale — spin something by hand and a small coil produces just enough AC to light an LED. ### Car alternators + A car's alternator is a spinning-coil AC generator too; the car then rectifies that AC into DC to charge the battery and run the electronics. diff --git a/content/lessons/electromagnetism/generators-and-ac/lesson.yaml b/content/lessons/electromagnetism/generators-and-ac/lesson.yaml index d0943a54..849fbebe 100644 --- a/content/lessons/electromagnetism/generators-and-ac/lesson.yaml +++ b/content/lessons/electromagnetism/generators-and-ac/lesson.yaml @@ -40,7 +40,7 @@ parameters: min: 60 max: 3600 step: 30 - value: 3000 + value: 1500 unit: rpm t: min: 0 @@ -59,21 +59,21 @@ derivation: charts: [] primary: rpm presets: -- N: 200 - B: 0.3 - A: 0.002 - rpm: 300 -- N: 150 - B: 0.4 - A: 0.01 - rpm: 600 -- N: 250 - B: 0.6 - A: 0.08 - rpm: 3000 + - N: 200 + B: 0.3 + A: 0.002 + rpm: 300 + - N: 150 + B: 0.4 + A: 0.01 + rpm: 600 + - N: 250 + B: 0.6 + A: 0.08 + rpm: 3000 challenges: -- check: 'N*B*A*2*pi*(rpm/60)' - target: 4 - tol: 0.5 -- check: 'abs(rpm/60 - 50) < 1' -- check: 'A <= 0.01 and B <= 0.4 and N*B*A*2*pi*(rpm/60) > 50' + - check: 'N*B*A*2*pi*(rpm/60)' + target: 4 + tol: 0.5 + - check: 'abs(rpm/60 - 50) < 1' + - check: 'A <= 0.01 and B <= 0.4 and N*B*A*2*pi*(rpm/60) > 50' diff --git a/content/lessons/electromagnetism/lorentz-force/ar.md b/content/lessons/electromagnetism/lorentz-force/ar.md index af5a83e4..a615ca35 100644 --- a/content/lessons/electromagnetism/lorentz-force/ar.md +++ b/content/lessons/electromagnetism/lorentz-force/ar.md @@ -16,9 +16,9 @@ variables: ## Try it -1. تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). -2. راقب الجسيم عند ضبط منزلق «المجال الكهربائي E» على 0. يرسم دائرة تامة، مرة بعد مرة. -3. اسحب منزلق «الشحنة q» من موجبة إلى سالبة. ينحني الجسيم الآن في الاتجاه المعاكس. +1. تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). أبقِ «الشحنة q» عند 1، و«السرعة v» عند 5، و«المجال المغناطيسي B» عند 1 T، و«المجال الكهربائي E» عند 0. ينحني الجسيم في قوس واسع ثم يخرج من الصورة، وتعرض القراءات نصف القطر (radius) 150 px والانحراف (deflects) إلى أسفل: down. +2. أبقِ «المجال الكهربائي E» عند 0 وأنزل منزلق «السرعة v» إلى 1. ينخفض نصف القطر إلى 30 px، فتصير الدورة كلها داخل الصورة ويدور الجسيم مرة بعد مرة. +3. اسحب منزلق «الشحنة q» من 1 إلى −1. تتغيّر قراءة الانحراف (deflects) من down إلى up، أي إلى أعلى، وينحني الجسيم الآن في الاتجاه المعاكس. ## Real-life examples @@ -28,15 +28,15 @@ variables: ## Test yourself -1. اضبط الشحنة والسرعة والمجال حتى تبلغ القوة المغناطيسية نحو 5 × 10⁻¹³ N. -2. اصنع منتقي سرعة. مع تشغيل المجال المغناطيسي، اضبط المجال الكهربائي حتى تمرّ الجسيمات بسرعتك المختارة في خط مستقيم. -3. اضبط المنزلقات الآن حتى تنخفض القوة المغناطيسية إلى قيمة أهدأ، نحو 1 × 10⁻¹⁴ N. +1. اضبط الشحنة والسرعة والمجال حتى تبلغ القوة المغناطيسية نحو 5 × 10⁻¹³ N. كل وحدة واحدة في قراءة «F = qvB» تساوي 1.6 × 10⁻¹⁴ N، فاجعل القراءة نحو 31. +2. اصنع منتقي سرعة. أبقِ المجال المغناطيسي يعمل، واضبط المجال الكهربائي حتى يصير حاصل قسمة «المجال الكهربائي E» على «المجال المغناطيسي B» مساويًا «السرعة v». +3. اضبط المنزلقات الآن حتى تنخفض القوة المغناطيسية إلى قيمة أصغر بكثير، نحو 1 × 10⁻¹⁴ N، أي قراءة نحو 0.6. ## Intuition -تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). عند ضبط منزلق «المجال الكهربائي E» على 0، يرسم الجسيم دائرة تامة. لا تفعل القوة المغناطيسية سوى تغيير اتجاه حركته، فلا تُسرّعه ولا تُبطئه أبدًا، لأن الدفع يكون دائمًا جانبيًا على الحركة. اضبط منزلق «الشحنة q» على 0 فتختفي القوة كليًا، فلا شحنة ولا دفع ولا سوى خط مستقيم. +تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). عند ضبط منزلق «المجال الكهربائي E» على 0، يرسم الجسيم دائرة تامة. لا تفعل القوة المغناطيسية سوى تغيير اتجاه حركته، فلا تُسرّعه ولا تُبطئه أبدًا، لأنها تدفعه دائمًا من الجانب، عموديًا على اتجاه حركته. اضبط منزلق «الشحنة q» على 0 فتختفي القوة كليًا: لا شحنة، فلا دفع، ويسير الجسيم في خط مستقيم. -اقلب إشارة $q$ أو $B$ فينحني الجسيم في الاتجاه المعاكس، ويرسم الدائرة نفسها كصورة في المرآة. شغّل $E$ فتتوقف الدائرة عن الانغلاق على نفسها. يضيف الدفع الجانبي الثابت الآن انجرافًا فوق الحركة الدائرية، فيرسم مسارًا حلزونيًا هائمًا. وهذا بالضبط ما يفعله منتقي السرعة، إذ يسمح لسرعة واحدة فقط بالمرور في خط مستقيم. +اقلب إشارة $q$ أو $B$ فينحني الجسيم في الاتجاه المعاكس، ويرسم الدائرة نفسها كصورة في المرآة. شغّل $E$ فتتوقف الدائرة عن الانغلاق على نفسها. فالمجال الكهربائي يدفع الجسيم دفعًا ثابتًا في اتجاه واحد، فتنزاح الدورات جانبًا ويرسم الجسيم حلقات متتالية لا تعود إلى مكانها. وهذا بالضبط ما يفعله منتقي السرعة، إذ يسمح لسرعة واحدة فقط بالمرور في خط مستقيم. ## Formal @@ -57,13 +57,17 @@ variables: ## Real world ### مطيافات الكتلة + تنحني الأيونات ذات نسب الكتلة إلى الشحنة المختلفة بأنصاف أقطار مختلفة داخل مجال B معلوم، فتكشف عن كتلتها. ### الشفق القطبي + تلتف جسيمات الرياح الشمسية المشحونة حلزونيًا على طول خطوط المجال المغناطيسي للأرض نحو القطبين، فتُثير الغلاف الجوي ليتوهج. ### مُنتقيات السرعة + تسمح مجالات E و B المتقاطعة بمرور الجسيمات عند سرعة واحدة فقط، $v=E/B$، وتُستخدم لتحضير حزم الجسيمات. ### السيكلوترونات ومطيافات الكتلة + تستفيد مسرّعات الجسيمات من كون الدور السيكلوتروني مستقلًا عن السرعة للحفاظ على تزامن الجسيمات وهي تلتف متباعدة إلى الخارج. diff --git a/content/lessons/electromagnetism/lorentz-force/en.md b/content/lessons/electromagnetism/lorentz-force/en.md index 3594537d..c832e63a 100644 --- a/content/lessons/electromagnetism/lorentz-force/en.md +++ b/content/lessons/electromagnetism/lorentz-force/en.md @@ -1,7 +1,7 @@ --- title: Lorentz force and cyclotron motion summary: >- - This is how MRI scanners sort atoms and mass spectrometers weigh molecules: + This is how old TV tubes aimed their electron beams and how mass spectrometers weigh molecules: a magnetic field steers a moving charged particle without ever speeding it up. parameters: @@ -10,7 +10,7 @@ parameters: B: magnetic field B E: electric field E variables: - - 'the particle''s charge, in multiples of the elementary charge' + - "the particle's charge, in multiples of the elementary charge" - the particle's speed - 'magnetic field strength, into the screen when positive' - 'uniform electric field strength, pointing up the screen' @@ -18,9 +18,9 @@ variables: ## Try it -1. Picture an electron, curving inside the magnetic field of an old CRT television tube. -2. Watch the particle with «electric field E» set to 0. It traces a perfect circle, over and over. -3. Drag «charge q» from positive to negative. The particle now curves the other way around. +1. Picture an electron, curving inside the magnetic field of an old CRT television tube. Leave «charge q» at 1, «speed v» at 5, «magnetic field B» at 1 T and «electric field E» at 0. The particle bends along a wide arc and leaves the picture; the readouts show radius 150 px and deflects down. +2. Keep «electric field E» at 0 and drag «speed v» down to 1. The radius readout drops to 30 px, so the whole loop now fits in the picture and the particle goes round and round. +3. Drag «charge q» from 1 to −1. The "deflects" readout changes from down to up, and the particle now curves the other way around. ## Real-life examples @@ -30,9 +30,9 @@ variables: ## Test yourself -1. Tune the charge, speed, and field so the magnetic force is about 5 × 10⁻¹³ N. -2. Build a velocity selector: with the magnetic field on, tune the electric field so particles moving at your chosen speed pass straight through. -3. Now tune the sliders so the magnetic force drops to a much gentler 1 × 10⁻¹⁴ N. +1. Tune the charge, speed, and field so the magnetic force is about 5 × 10⁻¹³ N. One unit on the "F = qvB" readout is 1.6 × 10⁻¹⁴ N, so aim for a reading of about 31. +2. Build a velocity selector: with the magnetic field on, tune the electric field so that «electric field E» divided by «magnetic field B» equals «speed v». +3. Now tune the sliders so the magnetic force drops to a much smaller 1 × 10⁻¹⁴ N, a reading of about 0.6. ## Intuition @@ -59,13 +59,17 @@ A velocity selector balances $qE = qvB$, passing only particles with $v = E/B$ u ## Real world ### Mass spectrometers + Ions of different mass-to-charge ratio curve with different radii in a known B, revealing their mass. ### Auroras + Charged solar-wind particles spiral along Earth's magnetic field lines toward the poles, exciting the atmosphere to glow. ### Velocity selectors + Crossed E and B fields pass only particles at one speed, $v=E/B$, used to prepare particle beams. ### Cyclotrons and mass spectrometers + Particle accelerators use the fact that the cyclotron period is independent of speed to keep particles in sync as they spiral outward. diff --git a/content/lessons/electromagnetism/lorentz-force/lesson.yaml b/content/lessons/electromagnetism/lorentz-force/lesson.yaml index 0e0f51d0..0bb1f2d0 100644 --- a/content/lessons/electromagnetism/lorentz-force/lesson.yaml +++ b/content/lessons/electromagnetism/lorentz-force/lesson.yaml @@ -56,23 +56,23 @@ derivation: charts: [] primary: B presets: -- q: -1 - v: 6 - B: 1 - E: 0 -- q: 1 - v: 8 - B: 1.5 - E: 0 -- q: 2 - v: 3 - B: 1 - E: 3 + - q: -1 + v: 6 + B: 1 + E: 0 + - q: 1 + v: 8 + B: 1.5 + E: 0 + - q: 2 + v: 3 + B: 1 + E: 3 challenges: -- check: 'abs(q*v*B*1.602e-14)' - target: 5e-13 - tol: 1e-13 -- check: 'B != 0 and abs(v - E/B) < 0.2' -- check: 'abs(q*v*B*1.602e-14)' - target: 1e-14 - tol: 3e-15 + - check: 'abs(q*v*B*1.602e-14)' + target: 5e-13 + tol: 1e-13 + - check: 'B != 0 and abs(v - E/B) < 0.2' + - check: 'abs(q*v*B*1.602e-14)' + target: 1e-14 + tol: 3e-15 diff --git a/content/lessons/electromagnetism/magnets-and-field-lines/ar.md b/content/lessons/electromagnetism/magnets-and-field-lines/ar.md index f20d028a..e7ef1889 100644 --- a/content/lessons/electromagnetism/magnets-and-field-lines/ar.md +++ b/content/lessons/electromagnetism/magnets-and-field-lines/ar.md @@ -7,28 +7,28 @@ parameters: m2: قوة المغناطيس الثاني m₂ r: المسافة بين المغناطيسين r variables: - - نفاذية الفراغ، وهي ثابت طبيعي ثابت القيمة + - نفاذية الفراغ، وهي ثابت طبيعي لا تتغيّر قيمته - شدة المجال المغناطيسي عند المسافة r من المغناطيس الأول، بوحدة التسلا - - القوة بين المغناطيسين، موجبة حين تتنافران + - القوة بين المغناطيسين، موجبة حين يتنافران --- ## Try it 1. يُظهر الرسم مغناطيسين متقابلين، وقطب كل منهما الشمالي (الأحمر) متجه نحو الآخر. لاحظ كيف تنحني خطوط المجال إلى الخارج، مبتعدة عن الفجوة الضيقة بين القطبين الشماليين. -2. حرّك منزلق «المسافة r» فأصغرها. يزداد التدافع بسرعة: صغّر الفجوة إلى ثلثها فتقفز القوة إلى 81 ضعفًا، لأنها تعتمد على $1/r^4$. -3. ارفع منزلق «قوة المغناطيس الثاني m₂». تزداد القوة أيضًا، لكن بنفس النسبة فقط: ضاعف m₂ فتتضاعف القوة لا أكثر. +2. اضبط منزلق «المسافة بين المغناطيسين r» على 0.15 m: تعرض قراءة القوة 0.0012 N. أنزله الآن إلى 0.05 m فتصير القوة 0.096 N. يزداد التنافر بسرعة: صغّر الفجوة إلى ثلثها فتقفز القوة إلى 81 ضعفًا، لأنها تعتمد على $1/r^4$. +3. ارفع منزلق «قوة المغناطيس الثاني m₂» من 1 إلى 2. تزداد القوة أيضًا، من 0.096 N إلى 0.192 N، لكن بالنسبة نفسها فقط: ضاعف m₂ فتتضاعف القوة لا أكثر. ## Real-life examples 1. **مغناطيسان مدرسيان متباعدان.** m₁ = m₂ = 0.3 A·m²، على بعد 15 سم: التدافع بينهما نحو 0.1 مللينيوتن فقط، بالكاد تشعر به بين أصابعك. -2. **قرصا نيوديميوم صغيران يكادان يتلامسان.** m₁ = m₂ = 2 A·m²، على بعد 1.5 سم: تقفز القوة إلى نحو 47 نيوتن، أي وزن كيس بسعة 5 كغ تقريبًا، فيصعب فصلهما باليد. -3. **قطعتا لعبة مغناطيسية على بعد سنتيمترات قليلة.** m₁ = m₂ = 0.5 A·m²، على بعد 4 سم: نحو 0.06 نيوتن، دفعة واضحة لكن لطيفة، أشبه بقذف عملة معدنية. +2. **قرصا نيوديميوم صغيران يكادان يتلامسان.** m₁ = m₂ = 2 A·m²، على بعد 1.5 سم: تقفز القوة إلى نحو 47 نيوتن، أي وزن كيس كتلته 5 كغ تقريبًا، فيصعب تقريبهما باليد أكثر. +3. **قطعتا لعبة مغناطيسية على بعد سنتيمترات قليلة.** m₁ = m₂ = 0.5 A·m²، على بعد 4 سم: نحو 0.06 نيوتن، دفعة خفيفة لكنها واضحة، كنقرة إصبع على عملة معدنية. ## Test yourself -1. ادفع المغناطيسين بعيدًا عن بعضهما بقوة نحو 1 نيوتن، أي وزن تفاحة تقريبًا. -2. بلغ مجالًا مغناطيسيًا نحو 0.01 T (10 مللي تسلا) عند المسافة r من المغناطيس الأول وحده. -3. أبقِ المغناطيسين ضعيفين (m₁ و m₂ لا يتجاوزان 0.1 A·m² لكل منهما)، ومع ذلك ادفعهما بقوة تتجاوز 0.2 نيوتن. +1. اجعل قوة التنافر بين المغناطيسين نحو 1 نيوتن، أي وزن تفاحة تقريبًا. +2. اجعل المجال المغناطيسي للمغناطيس الأول وحده نحو 0.01 T (10 مللي تسلا) عند المسافة r منه. +3. أبقِ المغناطيسين ضعيفين (m₁ و m₂ لا يتجاوزان 0.1 A·m² لكل منهما)، واجعل قوة التنافر بينهما مع ذلك تتجاوز 0.2 نيوتن. ## Intuition @@ -38,9 +38,9 @@ variables: ## Formal -يتصرف مغناطيس صغير كثنائي قطب مغناطيسي عزمه $m$ (بوحدة A·m²): على امتداد محوره، وعند مسافة $r$، يصنع مجالًا $B(r) = \frac{\mu_0}{2\pi}\frac{m}{r^3}$، حيث $\mu_0$ نفاذية الفراغ، وهي ثابت طبيعي ثابت القيمة. يتلاشى المجال بسرعة، إذ يتناسب عكسيًا مع مكعب المسافة، لذلك تشعر بمغناطيس قوي وهو ملامس لجلدك لكنك بالكاد تحسه على بعد سنتيمترات قليلة. +يتصرف مغناطيس صغير كثنائي قطب مغناطيسي عزمه $m$ (بوحدة A·m²): على امتداد محوره، وعند مسافة $r$، يصنع مجالًا $B(r) = \frac{\mu_0}{2\pi}\frac{m}{r^3}$، حيث $\mu_0$ نفاذية الفراغ، وهي ثابت طبيعي لا تتغيّر قيمته. يتلاشى المجال بسرعة، إذ يتناسب عكسيًا مع مكعب المسافة، لذلك تشعر بمغناطيس قوي وهو ملامس لجلدك لكنك بالكاد تحسه على بعد سنتيمترات قليلة. -حين يصطف ثنائيا قطب على المحور نفسه وقطباهما المتشابهان متقابلان، يتدافعان بقوة $F = \frac{3\mu_0}{2\pi}\frac{m_1 m_2}{r^4}$. إدارة أحد المغناطيسين تقلب الإشارة، فتصبح القوة نفسها جذبًا بدل الدفع. في الحالتين تتلاشى القوة أسرع من المجال نفسه، إذ تتناسب عكسيًا مع $1/r^4$، ولهذا يجب أن يقترب المغناطيسان كثيرًا قبل أن تشعر بأي أثر يُذكر. +حين يصطف ثنائيا قطب على المحور نفسه وقطباهما المتشابهان متقابلان، يتدافعان بقوة $F = \frac{3\mu_0}{2\pi}\frac{m_1 m_2}{r^4}$. إدارة أحد المغناطيسين تقلب الإشارة، فتصبح القوة نفسها جذبًا بدل الدفع. في الحالتين تتلاشى القوة أسرع من المجال نفسه، إذ تتناسب مع $1/r^4$، ولهذا يجب أن يقترب المغناطيسان كثيرًا قبل أن تشعر بأي أثر يُذكر. ## Advanced @@ -55,13 +55,17 @@ variables: ## Real world ### البوصلة + إبرة البوصلة مغناطيس صغير يدور ليصطف مع مجال الأرض الثنائي القطب الهائل والضعيف، فيشير تقريبًا نحو الشمال المغناطيسي. ### المحركات ومكبرات الصوت -تدفع مغناطيسات ثابتة، موضوعة بحيث تقابل أقطابها ملفًا، مجال ذلك الملف وتجذبه لتدوير محرك كهربائي أو تحريك مخروط مكبر صوت (انظر الدرس التالي). + +تدفع مغناطيسات ثابتة، موضوعة بحيث تقابل أقطابها ملفًا، مجال ذلك الملف وتجذبه لتدوير محرك كهربائي أو تحريك مخروط مكبر صوت (انظر درس المحركات الكهربائية). ### أجهزة الرنين المغناطيسي -تستخدم أجهزة الرنين المغناطيسي في المستشفيات مغناطيسات فائقة التوصيل هائلة، أقوى من مغناطيس الثلاجة بملايين المرات، لتصطف ذرات الهيدروجين في جسمك فتصورها الموجات الراديوية. + +تستخدم أجهزة الرنين المغناطيسي في المستشفيات مغناطيسات فائقة التوصيل هائلة، أقوى من مغناطيس الثلاجة بمئات المرات، لتجعل ذرات الهيدروجين في جسمك تصطف، فتصوّرها موجات الراديو. ### مغناطيس الثلاجة وقطع اللعب + جذبة مغناطيس الثلاجة اليومية، أو طقطقة قطع اللعب المغناطيسية، هي التجاذب والتنافر نفسهما بين القطبين، لكن على مقياس تحسه بيدك. diff --git a/content/lessons/electromagnetism/magnets-and-field-lines/en.md b/content/lessons/electromagnetism/magnets-and-field-lines/en.md index 4db3fc93..0c34b437 100644 --- a/content/lessons/electromagnetism/magnets-and-field-lines/en.md +++ b/content/lessons/electromagnetism/magnets-and-field-lines/en.md @@ -17,8 +17,8 @@ variables: ## Try it 1. The picture shows two bar magnets facing each other with their N poles (red) pointed inward. Watch how the field lines bow outward, squeezed away from the narrow gap between the two N poles. -2. Drag «distance r» smaller. The push between the magnets grows fast — shrink the gap to a third of its size and the force jumps to 81 times as strong, because it depends on 1/r⁴. -3. Raise «magnet 2's strength m₂». The force grows too, but only in step with it: double m₂ and the force merely doubles. +2. Set «distance between the magnets r» to 0.15 m: the force readout shows 0.0012 N. Now drag it down to 0.05 m and the force reads 0.096 N. The push grows fast — shrink the gap to a third of its size and the force jumps to 81 times as strong, because it depends on 1/r⁴. +3. Raise «magnet 2's strength m₂» from 1 to 2. The force grows too, from 0.096 N to 0.192 N, but only in step with it: double m₂ and the force merely doubles. ## Real-life examples @@ -57,13 +57,17 @@ Real bar magnets aren't perfect point dipoles — a long thin magnet's field clo ## Real world ### Compasses + A compass needle is a tiny bar magnet that swings to line up with Earth's own huge, weak dipole field, pointing roughly toward magnetic north. ### Motors and loudspeakers -Fixed magnets, arranged with their poles facing a coil, push and pull on that coil's own field to spin an electric motor or move a speaker cone (see the next lesson). + +Fixed magnets, arranged with their poles facing a coil, push and pull on that coil's own field to spin an electric motor or move a speaker cone (see the electric motors lesson). ### MRI scanners -Hospital MRI machines use enormous superconducting magnets — millions of times stronger than a fridge magnet — to align hydrogen atoms in your body so radio waves can image them. + +Hospital MRI machines use enormous superconducting magnets — hundreds of times stronger than a fridge magnet — to align hydrogen atoms in your body so radio waves can image them. ### Fridge magnets and toy blocks + The everyday tug of a fridge magnet, or the snap of magnetic building blocks, is this same pole-to-pole attraction and repulsion, just at a scale you can feel with your hands. diff --git a/content/lessons/electromagnetism/magnets-and-field-lines/lesson.yaml b/content/lessons/electromagnetism/magnets-and-field-lines/lesson.yaml index 4ace59fc..54f7be1f 100644 --- a/content/lessons/electromagnetism/magnets-and-field-lines/lesson.yaml +++ b/content/lessons/electromagnetism/magnets-and-field-lines/lesson.yaml @@ -46,20 +46,20 @@ derivation: charts: [] primary: r presets: -- m1: 0.3 - m2: 0.3 - r: 0.15 -- m1: 2 - m2: 2 - r: 0.015 -- m1: 0.5 - m2: 0.5 - r: 0.04 + - m1: 0.3 + m2: 0.3 + r: 0.15 + - m1: 2 + m2: 2 + r: 0.015 + - m1: 0.5 + m2: 0.5 + r: 0.04 challenges: -- check: '6e-7*m1*m2/r^4' - target: 1 - tol: 0.1 -- check: '2e-7*m1/r^3' - target: 0.01 - tol: 0.002 -- check: 'm1 <= 0.1 and m2 <= 0.1 and 6e-7*m1*m2/r^4 > 0.2' + - check: '6e-7*m1*m2/r^4' + target: 1 + tol: 0.1 + - check: '2e-7*m1/r^3' + target: 0.01 + tol: 0.002 + - check: 'm1 <= 0.1 and m2 <= 0.1 and 6e-7*m1*m2/r^4 > 0.2' diff --git a/content/lessons/electromagnetism/transformers/ar.md b/content/lessons/electromagnetism/transformers/ar.md index 8a812800..86acb324 100644 --- a/content/lessons/electromagnetism/transformers/ar.md +++ b/content/lessons/electromagnetism/transformers/ar.md @@ -16,14 +16,14 @@ variables: ## Try it -1. يُظهر الرسم ملفين ملفوفين حول قلب حديدي مشترك. عُدّ اللفات: الأولي (يسار) له «لفات الملف الأولي N_p»، والثانوي (يمين) له «لفات الملف الثانوي N_s»، وتحتهما خط كهرباء صغير يُظهر كم من القدرة المرسلة يتحول إلى حرارة مهدورة. -2. حرّك منزلق «لفات الملف الثانوي N_s» حتى يتجاوز «لفات الملف الأولي N_p». يرتفع جهد الخرج فوق جهد الدخل: زيادة لفات الملف الثانوي تصنع محوّلًا رافعًا للجهد. -3. حرّك الآن منزلق «الجهد الداخل V_p» للأعلى، مع إبقاء القدرة نفسها. راقب شريط فقد الخط ينكمش بسرعة: إرسال القدرة نفسها بجهد أعلى يحتاج تيارًا أقل بكثير، والتيار هو ما يسخّن الخط، لا الجهد. +1. يُظهر الرسم ملفين ملفوفين حول قلب حديدي مشترك. الأولي (يسار) يتبع منزلق «لفات الملف الأولي N_p»، والثانوي (يمين) يتبع منزلق «لفات الملف الثانوي N_s»، ويُرسم كل منهما بلفات قليلة فقط. وتحتهما خط كهرباء صغير يُظهر كم من القدرة المرسلة يتحول إلى حرارة مهدورة. في البداية تعرض القراءات 1000 : 50 و V_s = 550 V. +2. ارفع منزلق «لفات الملف الثانوي N_s» من 50 إلى 2000، فيتجاوز «لفات الملف الأولي N_p» وهي 1000. يرتفع جهد الخرج من 550 V إلى 22000 V، أي ضعف جهد الدخل 11000 V: زيادة لفات الملف الثانوي تصنع محوّلًا رافعًا للجهد. +3. ارفع الآن منزلق «الجهد الداخل إلى الملف الأولي V_p» من 11000 V إلى 110000 V، مع إبقاء القدرة نفسها. تنخفض قراءة الفقد من نحو 41322 W (4.13%) إلى نحو 413 W، ويقصر شريط الفقد في الخط بسرعة: إرسال القدرة نفسها بجهد أعلى يحتاج تيارًا أقل بكثير، والتيار هو ما يسخّن الخط، لا الجهد. ## Real-life examples 1. **محوّل جرس الباب.** 1000 لفة تهبط إلى 50 لفة، يغذّيه جهد المنزل 230 V: يخرج نحو 11.5 V، آمن بما يكفي لتشغيل جرس باب أو قطار لعبة من مقبس الحائط. -2. **خط توزيع 11000 V يحمل 1 ميغاواط.** يُرسل بهذا الجهد المنخفض نسبيًا عبر خط مقاومته 5 Ω: تيار نحو 91 A، ويضيع نحو 41 كيلوواط، أي نحو 4% من القدرة، حرارةً قبل وصولها حتى. +2. **خط توزيع 11000 V يحمل 1 ميغاواط.** يُرسل بهذا الجهد المنخفض نسبيًا عبر خط مقاومته 5 Ω: تيار نحو 91 A، ويضيع نحو 41 كيلوواط، أي نحو 4% من القدرة، على شكل حرارة قبل أن تصل. 3. **القدرة نفسها 1 ميغاواط تُرسل بجهد 400000 V.** الخط نفسه والقدرة نفسها: يهبط التيار إلى نحو 2.5 A، ويهبط الفقد إلى نحو 31 واط فقط، وهو مهمل تمامًا. لهذا تعمل خطوط النقل بجهود عالية جدًا. ## Test yourself @@ -36,13 +36,13 @@ variables: لُفّ ملفين منفصلين من السلك حول حلقة حديدية واحدة، وغذِّ أحدهما (الأولي) بتيار متردّد: يصنع التيار المتغيّر تدفقًا مغناطيسيًا متغيّرًا في الحديد، ويمرّ ذلك التدفق نفسه عبر الملف الثاني (الثانوي) أيضًا لأنهما يتشاركان القلب نفسه. وبحسب قانون فاراداي، يستحث التدفق المتغيّر جهدًا في أي ملف يمر عبره، فيكتسب الملف الثانوي جهده الخاص المستحث دون أن يلامس سلكه الملف الأولي إطلاقًا. -ولأن الملفين يقعان في التدفق المتغيّر نفسه، تكتسب كل لفة سلك، في أي من الملفين، الجهد الصغير نفسه بالضبط. لُفّ الملف الثانوي بلفات أكثر من الأولي فتجمع مزيدًا من تلك الجهود الصغيرة، فيخرج جهد أكبر مما دخل، وهذا محوّل رافع للجهد. لفات أقل تعطي جهدًا أصغر، وهذا محوّل خافض. والمقابل العادل هو أن القدرة الداخلة تساوي القدرة الخارجة في محوّل مثالي، فكل جهد تكسبه تخسره تيارًا، وكل جهد تخسره تكسبه تيارًا. +ولأن الملفين يقعان في التدفق المتغيّر نفسه، تكتسب كل لفة سلك، في أي من الملفين، الجهد الصغير نفسه بالضبط. لُفّ الملف الثانوي بلفات أكثر من الأولي فتجمع مزيدًا من تلك الجهود الصغيرة، فيخرج جهد أكبر مما دخل، وهذا محوّل رافع للجهد. لفات أقل تعطي جهدًا أصغر، وهذا محوّل خافض. لكن لذلك ثمن: القدرة الداخلة تساوي القدرة الخارجة في محوّل مثالي، فكل جهد تكسبه تخسره تيارًا، وكل جهد تخسره تكسبه تيارًا. ## Formal في محوّل مثالي، تساوي نسبة الجهد نسبة اللفات: $\frac{V_s}{V_p}=\frac{N_s}{N_p}$، فـ $V_s = V_p\frac{N_s}{N_p}$. ولإرسال قدرة ثابتة $P$ عبر خط بجهد $V_p$، يجب أن يكون التيار $I = \dfrac{P}{V_p}$، ولأي سلك حقيقي مقاومة $R$ تبدد $P_{loss}=I^2R=\left(\dfrac{P}{V_p}\right)^2R$ حرارة. -ولأن $P_{loss}$ يتناقص بتربيع الجهد، فمضاعفة جهد النقل تخفض الفقد إلى ربعه، والقفزة 35 ضعفًا من 11000 V إلى 400000 V، وهي تقريبًا النسبة في المثالين الثاني والثالث، تخفض الفقد نحو 35² ≈ 1225 ضعفًا. +ولأن $P_{loss}$ يتناقص بتربيع الجهد، فمضاعفة جهد النقل تخفض الفقد إلى ربعه، والقفزة 36 ضعفًا من 11000 V إلى 400000 V، وهي تقريبًا النسبة في المثالين الثاني والثالث، تخفض الفقد نحو 36² ≈ 1300 ضعف. ## Advanced @@ -57,13 +57,17 @@ variables: ## Real world ### شبكة الكهرباء + تنتج المولدات القدرة بآلاف الفولتات، وترفعها المحولات الرافعة إلى مئات آلاف الفولتات للنقل عبر مسافات طويلة، ثم تعيدها المحولات الخافضة قرب منزلك إلى 230 (أو 120) فولت. ### شواحن الهواتف والحواسيب المحمولة -تستخدم الشواحن الحديثة محولات تبديل عالية التردد صغيرة بدل النوع البسيط هنا، لكن فكرة نسبة اللفات نفسها لا تزال جوهرها، مصغّرة ومُسرَّعة فقط. + +تستخدم الشواحن الحديثة محولات تبديل عالية التردد صغيرة بدل النوع البسيط هنا، لكن فكرة نسبة اللفات نفسها لا تزال أساس عملها، لكن بحجم أصغر وتردد أعلى. ### أجراس الأبواب وقطارات اللعب + تخفض المحولات منخفضة الجهد جهد المنزل 230 V إلى 6-24 V آمنة لأجراس الأبواب وإضاءة الحدائق وسكك القطارات النموذجية. ### الميكروفونات ومعدات الصوت + تُستخدم محولات صغيرة أيضًا لمطابقة مستويات الجهد والتيار بين أجهزة صوت مختلفة، دون أي كسب في القدرة إطلاقًا. diff --git a/content/lessons/electromagnetism/transformers/en.md b/content/lessons/electromagnetism/transformers/en.md index c2b27fb1..3638aaf3 100644 --- a/content/lessons/electromagnetism/transformers/en.md +++ b/content/lessons/electromagnetism/transformers/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. The picture shows two coils wound on a shared iron core — count the loops: the primary (left) has «turns on the primary N_p», the secondary (right) has «turns on the secondary N_s» — plus a small power line below showing how much of the sent power turns to waste heat. -2. Drag «turns on the secondary N_s» up past «turns on the primary N_p». The output voltage climbs above the input: more turns on the secondary means a step-up transformer. -3. Now drag «voltage into the primary V_p» up, keeping the same power. Watch the line-loss bar shrink fast: sending the same power at a higher voltage needs far less current, and it's current — not voltage — that heats the line. +1. The picture shows two coils wound on a shared iron core — the primary (left) follows «turns on the primary coil N_p», the secondary (right) follows «turns on the secondary coil N_s», each drawn as just a few loops — plus a small power line below showing how much of the sent power turns to waste heat. At the start the readouts show 1000 : 50 and V_s = 550 V. +2. Drag «turns on the secondary coil N_s» from 50 up to 2000, past «turns on the primary coil N_p» at 1000. The output voltage climbs from 550 V to 22000 V, twice the 11000 V input: more turns on the secondary means a step-up transformer. +3. Now drag «voltage into the primary V_p» from 11000 V up to 110000 V, keeping the same power. The loss readout falls from about 41322 W (4.13%) to about 413 W, and the line-loss bar shrinks fast: sending the same power at a higher voltage needs far less current, and it's current — not voltage — that heats the line. ## Real-life examples @@ -38,13 +38,13 @@ variables: Wrap two separate coils of wire around the same iron ring and feed AC into one of them (the primary): the changing current makes a changing magnetic flux in the iron, and that same flux threads through the second coil (the secondary) too, since they share the same core. By Faraday's law, a changing flux induces a voltage in any coil it passes through — so the secondary gets its own voltage, induced with no wires touching the primary at all. -Because both coils sit in the *same* changing flux, each turn of wire, on either coil, picks up exactly the same tiny voltage. Wind the secondary with more turns than the primary and you stack up more of those tiny voltages, so a bigger voltage comes out than went in — a step-up transformer. Fewer turns gives less voltage out — step-down. The catch (and it's a fair one): power in equals power out in an ideal transformer, so whatever voltage you gain, you lose in current, and whatever voltage you lose, you gain in current. +Because both coils sit in the _same_ changing flux, each turn of wire, on either coil, picks up exactly the same tiny voltage. Wind the secondary with more turns than the primary and you stack up more of those tiny voltages, so a bigger voltage comes out than went in — a step-up transformer. Fewer turns gives less voltage out — step-down. The catch (and it's a fair one): power in equals power out in an ideal transformer, so whatever voltage you gain, you lose in current, and whatever voltage you lose, you gain in current. ## Formal For an ideal transformer, the voltage ratio equals the turns ratio: $\frac{V_s}{V_p}=\frac{N_s}{N_p}$, so $V_s = V_p\frac{N_s}{N_p}$. To send a fixed power $P$ down a line at voltage $V_p$, the current must be $I = \dfrac{P}{V_p}$ — and any real wire has some resistance $R$, dissipating $P_{loss}=I^2R=\left(\dfrac{P}{V_p}\right)^2R$ as heat. -Because $P_{loss}$ falls with the *square* of the voltage, doubling the transmission voltage cuts the loss to a quarter, and the 35-times jump from 11,000 V to 400,000 V (roughly the ratio in the second and third real-life examples) cuts the loss by roughly 35² ≈ 1,225 times. +Because $P_{loss}$ falls with the _square_ of the voltage, doubling the transmission voltage cuts the loss to a quarter, and the 36-times jump from 11,000 V to 400,000 V (roughly the ratio in the second and third real-life examples) cuts the loss by roughly 36² ≈ 1,300 times. ## Advanced @@ -59,13 +59,17 @@ Real transformers aren't perfectly ideal: the iron core itself loses a little en ## Real world ### The power grid + Generators produce power at thousands of volts, step-up transformers push it to hundreds of thousands of volts for the long haul, and step-down transformers near your home bring it back to 230 (or 120) V. ### Phone and laptop chargers + Modern chargers use small, high-frequency switching transformers rather than the simple kind here, but the same turns-ratio idea is still at their core, just shrunk down and sped up. ### Doorbells and toy trains + Low-voltage transformers step 230 V mains down to a safe 6–24 V for doorbells, garden lighting, and model railways. ### Microphones and audio equipment + Small transformers are also used just to match voltage and current levels between different pieces of audio equipment, with no power gain at all. diff --git a/content/lessons/electromagnetism/transformers/lesson.yaml b/content/lessons/electromagnetism/transformers/lesson.yaml index 84c1d451..06a68295 100644 --- a/content/lessons/electromagnetism/transformers/lesson.yaml +++ b/content/lessons/electromagnetism/transformers/lesson.yaml @@ -58,24 +58,24 @@ derivation: charts: [] primary: Vp presets: -- Np: 1000 - Ns: 50 - Vp: 230 - P: 100 - R: 5 -- Np: 1000 - Ns: 1000 - Vp: 11000 - P: 1000000 - R: 5 -- Np: 1000 - Ns: 1000 - Vp: 400000 - P: 1000000 - R: 5 + - Np: 1000 + Ns: 50 + Vp: 230 + P: 100 + R: 5 + - Np: 1000 + Ns: 1000 + Vp: 11000 + P: 1000000 + R: 5 + - Np: 1000 + Ns: 1000 + Vp: 400000 + P: 1000000 + R: 5 challenges: -- check: 'Vp*Ns/Np' - target: 12 - tol: 1 -- check: 'P >= 900000 and P <= 1100000 and R >= 4 and R <= 6 and (P/Vp)^2*R < 5000' -- check: 'Vp >= 10000 and Vp <= 12000 and Vp*Ns/Np >= 200000' + - check: 'Vp*Ns/Np' + target: 12 + tol: 1 + - check: 'P >= 900000 and P <= 1100000 and R >= 4 and R <= 6 and (P/Vp)^2*R < 5000' + - check: 'Vp >= 10000 and Vp <= 12000 and Vp*Ns/Np >= 200000' diff --git a/content/lessons/engineering/beam-bending/ar.md b/content/lessons/engineering/beam-bending/ar.md index b651dc7e..e6a2a42d 100644 --- a/content/lessons/engineering/beam-bending/ar.md +++ b/content/lessons/engineering/beam-bending/ar.md @@ -19,15 +19,15 @@ variables: ## Try it -1. راقب العارضة، وحرّك $x$ على طولها لترى مقدار انحنائها عند كل نقطة. -2. ارفع $F$، وهو الحمل عند الطرف. يتدلّى الطرف أكثر، وينحني أشدّ ما يكون عند الطرف الحر. -3. ارفع $L$، طول العارضة، بدلًا من ذلك. يتدلّى الطرف أسرع بكثير ممّا تدلّى مع $F$، لأن الطول أهمّ بكثير من الحمل. +1. ابدأ بالقيم $F$ = 1000 نيوتن و$L$ = 2 متر و$E$ = 200 جيجاباسكال و$I$ = 20 سم⁴. حرّك $x$ من 0 إلى 2. القراءة f(x) هي مقدار الهبوط بالمليمتر: تبدأ من 0 عند الجدار وتصل إلى نحو 66.7 عند الطرف. +2. أبقِ $x$ = 2 وارفع $F$، وهو الحمل عند الطرف، إلى 1500 نيوتن. زاد الحمل بمقدار النصف، فزاد الهبوط بمقدار النصف أيضًا: تصير القراءة 100. +3. أعِد $F$ إلى 1000 نيوتن، ثم ارفع $L$، طول العارضة، إلى 3 أمتار وحرّك $x$ إلى 3. زاد الطول بمقدار النصف فقط، لكن القراءة صارت 225، أي أكثر من ثلاثة أضعاف الهبوط الأول. الطول أهمّ بكثير من الحمل. ## Real-life examples -1. **رفّ كتب خشبي.** ضع 20 كيلوغرامًا من الكتب (≈200 نيوتن) على رفّ خشب طري طوله متر واحد (E ≈ 10 جيجاباسكال). يترهّل الرفّ بوضوح عند حافته الأمامية، ولهذا تحتاج الرفوف الرقيقة مقطعًا أسمك، أو دعامة في المنتصف. -2. **لوح الغطس.** يقف غطّاس وزنه 80 كيلوغرامًا (≈800 نيوتن) على لوح غطس طوله نحو 4 أمتار. ينحني اللوح بوضوح تحت وزنه، لكن مادة شبيهة بالفايبرغلاس (E ≈ 70 جيجاباسكال) تقوّيه، فيرتدّ بدل أن يبقى منحنيًا. -3. **عارضة جسر فولاذية.** احمل عارضة فولاذية على شكل حرف I، طولها 5 أمتار (E ≈ 200 جيجاباسكال)، بحمل ثقيل قدره 5000 نيوتن. بالكاد تنحني مقارنة بعارضة خشبية بالحجم نفسه، لأن صلابة الفولاذ وشكل المقطع معًا يقاومان الانحناء أكثر بكثير. +1. **رفّ كتب خشبي.** ضع 20 كيلوغرامًا من الكتب (≈200 نيوتن) على رفّ خشب طري طوله متر واحد (E ≈ 10 جيجاباسكال). يهبط طرف الرفّ الحر نحو 13 مم، وهذا يُرى بالعين، ولهذا تحتاج الرفوف الرقيقة مقطعًا أسمك، أو دعامة في المنتصف. +2. **لوح الغطس.** يقف غطّاس وزنه 80 كيلوغرامًا (≈800 نيوتن) على لوح غطس طوله نحو 4 أمتار. يهبط طرف اللوح نحو 244 مم تحت وزنه، لكنه مصنوع من مادة شبيهة بالألياف الزجاجية (E ≈ 70 جيجاباسكال)، فيرتدّ ولا يبقى منحنيًا. +3. **عارضة فولاذية.** ضع حملًا ثقيلًا قدره 5000 نيوتن على عارضة فولاذية على شكل حرف I طولها متران (E ≈ 200 جيجاباسكال). يهبط طرفها نحو 33 مم فقط. اخفض $E$ إلى 10 جيجاباسكال، وهي صلابة الخشب الطري، فتهبط العارضة نفسها 20 ضعفًا. صلابة الفولاذ وشكل المقطع معًا يقاومان الانحناء أكثر بكثير. ## Test yourself @@ -37,19 +37,19 @@ variables: ## Intuition -تخيّل رفّ كتب خشبيًا طوله نحو متر واحد يترهّل تحت وزن 20 كيلوغرامًا من الكتب، أي نحو 200 نيوتن تضغط عند حافته البعيدة. المنحنى على الشاشة هو $y$، مقدار انحناء كل نقطة على طول العارضة. اسحب $F$، وهو الحمل عند الطرف، لأعلى. يتدلّى الطرف أكثر، وينحني أشدّ ما يكون عند ذلك الطرف الحر، لأن لا شيء بعده يقاوم الانحناء. +تخيّل رفّ كتب خشبيًا طوله نحو متر واحد يترهّل تحت وزن 20 كيلوغرامًا من الكتب، أي نحو 200 نيوتن تضغط عند حافته البعيدة. المنحنى على الشاشة هو $y$، مقدار انحناء كل نقطة على طول العارضة. اسحب $F$، وهو الحمل عند الطرف، لأعلى. يتدلّى الطرف أكثر. المنحنى أشدّ ميلًا عند ذلك الطرف الحر، لكن العارضة نفسها تنثني أكثر ما تنثني عند الجدار، لأن ذراع الحمل هناك أطول ما يكون. -الآن اسحب $L$، طول العارضة، لأعلى بدلًا من ذلك. ينمو التدلّي أسرع بكثير ممّا نما مع $F$. مضاعفة الطول تجعل الطرف يتدلّى تقريبًا ثماني مرات أبعد. ارفع $E$ أو $I$ بدلًا من ذلك، أي صلابة المادة أو شكل المقطع العرضي، فينحني الحمل نفسه بالعارضة أقلّ بكثير، ولهذا بالضبط يكون حلّ ترهّل رفّ لوحًا أسمك، لا مشبكًا أقوى. +الآن اسحب $L$، طول العارضة، لأعلى بدلًا من ذلك. يزداد التدلّي أسرع بكثير ممّا زاد مع $F$. مضاعفة الطول تجعل هبوط الطرف نحو ثمانية أضعاف. ارفع $E$ أو $I$ بدلًا من ذلك، أي صلابة المادة أو شكل المقطع العرضي، فتنحني العارضة تحت الحمل نفسه أقلّ بكثير. ولهذا نعالج الرفّ المترهّل بلوح أسمك، لا بمشبك أقوى. ## Formal الانحناء على طول العارضة هو $y(x) = \frac{Fx^2(3L-x)}{6EI}$، وانحناء الطرف هو $y_{\max} = \frac{FL^3}{3EI}$. تتناسب الصلابة ضدّ الانحناء مع حاصل الضرب $EI$، لا مع $E$ أو $I$ منفردًا أبدًا. -بما أن $y_{\max}$ ينمو مع $L^3$، تتدلّى عارضة طولها ضعف الأخرى ثماني مرات أبعد تحت الحمل نفسه. الطول يتفوّق على أي خيار تصميم آخر. +بما أن $y_{\max}$ يزداد مع $L^3$، يهبط طرف عارضة طولها ضعف الأخرى ثمانية أضعاف تحت الحمل نفسه. الطول أقوى أثرًا من أي خيار آخر في التصميم. ## Advanced -ضاعف ارتفاع العارضة فتضاعف تقريبًا $I$ لمقطع مستطيل. لكن شكّل الكمية نفسها من المادة في مقطع أطول وأنحف، كعارضة على شكل حرف I، فتدفع المادة بعيدًا عن المركز حيث لا تقاوم الانحناء إلا قليلًا. هذا يرفع $I$ أكثر بكثير لكل وحدة مادة مما يستطيعه مستطيل مصمت أبدًا. +ضاعف ارتفاع عارضة مقطعها مستطيل فيصير $I$ ثمانية أضعاف، أما مضاعفة عرضها فتضاعفه مرة واحدة فقط. والأفضل أن تشكّل الكمية نفسها من المادة في مقطع أطول وأنحف، كعارضة على شكل حرف I، فتدفع المادة بعيدًا عن المركز حيث لا تقاوم الانحناء إلا قليلًا. هذا يرفع $I$ أكثر بكثير لكل وحدة مادة مما يستطيعه مستطيل مصمت أبدًا. ## Derivation @@ -60,13 +60,17 @@ variables: ## Real world ### الجسور والعوارض على شكل I + تضع العوارض الإنشائية على شكل حرف I معظم مادتها أبعد ما يمكن عن خط المركز. هذا يعظّم $I$ لوزن معيّن من الفولاذ، وهو بالضبط الشكل الذي تفضّله نظرية الانحناء. ### لوح الغطس + لوح الغطس عارضة كابولية كهذه. ينحني اللوح الأطول ويرتدّ أكثر بكثير من لوح أقصر تحت الغطّاس نفسه، لأن التدلّي يتكعّب مع الطول. ### أجنحة الطائرات + يحسب المهندسون أبعاد عارضة الجناح بهذا الحساب نفسه، فيوازنون بين $E$ و$I$ والطول مقابل أحمال الرفع التي يجب أن يتحمّلها الجناح دون انحناء مفرط. ### الرفوف -يترهّل الرفّ تحت وزن الكتب بهذه المعادلة نفسها. أضف دعامة في المنتصف، فتنصّف $L$ فعليًّا، ويقلّ الترهّل نحو ثمانية أضعاف. + +يترهّل الرفّ تحت وزن الكتب بهذه المعادلة نفسها. أضف دعامة في المنتصف، فيصير $L$ نصف ما كان، ويقلّ الترهّل إلى نحو الثُّمن. diff --git a/content/lessons/engineering/beam-bending/en.md b/content/lessons/engineering/beam-bending/en.md index 84a18424..f9e417ce 100644 --- a/content/lessons/engineering/beam-bending/en.md +++ b/content/lessons/engineering/beam-bending/en.md @@ -20,15 +20,15 @@ variables: ## Try it -1. Watch the beam. Drag $x$ along its length to see how much it has bent at each point. -2. Drag $F$ (the end load) up. The tip droops further, with the bend steepest at the free end. -3. Now drag $L$ (the beam's length) up instead. The tip sags much faster than it did with $F$ — length matters far more. +1. Start with $F$ = 1000 N, $L$ = 2 m, $E$ = 200 GPa and $I$ = 20 cm⁴. Drag $x$ from 0 to 2. The readout f(x) is the sag in millimetres: it climbs from 0 at the wall to about 66.7 at the tip. +2. Keep $x$ = 2 and raise $F$ (the end load) to 1500 N. Half as much load again gives half as much sag again: f(x) reads 100. +3. Set $F$ back to 1000 N, raise $L$ (the beam's length) to 3 m and drag $x$ to 3. The beam is only half as long again, yet f(x) reads 225 — more than three times the sag. Length matters far more than load. ## Real-life examples -1. **A wooden bookshelf.** A 1 m shelf loaded with about 20 kg of books (≈200 N) and made of soft wood (E ≈ 10 GPa) sags visibly at the front edge — which is why thin wooden shelves need a thicker cross-section or a support in the middle. -2. **A diving board.** A springboard about 4 m long flexes noticeably under an 80 kg diver (≈800 N), stiffened by a fiberglass-like material (E ≈ 70 GPa) so it snaps back rather than staying bent. -3. **A steel bridge support beam.** A 5 m steel I-beam (E ≈ 200 GPa) carrying a heavy 5,000 N load barely deflects compared to a wooden beam of the same size, because both its stiffness and its I-beam shape resist bending far more. +1. **A wooden bookshelf.** A 1 m shelf loaded with about 20 kg of books (≈200 N) and made of soft wood (E ≈ 10 GPa) sags about 13 mm at the free end, enough to see — which is why thin wooden shelves need a thicker cross-section or a support in the middle. +2. **A diving board.** A springboard about 4 m long dips about 244 mm at the tip under an 80 kg diver (≈800 N), stiffened by a fiberglass-like material (E ≈ 70 GPa) so it snaps back rather than staying bent. +3. **A steel support beam.** A 2 m steel I-beam (E ≈ 200 GPa) carrying a heavy 5,000 N load sags only about 33 mm at the tip. Lower $E$ to 10 GPa, soft wood, and the same beam would sag 20 times as far: steel's stiffness and the I-beam shape together resist bending far more. ## Test yourself @@ -38,7 +38,7 @@ variables: ## Intuition -Picture a wooden bookshelf, about 1 meter long, sagging under 20 kg of books — roughly 200 newtons pressing down at the far edge. The curve on screen is $y$, how far each point on the beam has bent, plotted along its length; drag $F$, the load at the end, up and the tip droops further, bending most sharply right at that free end, since nothing beyond it pushes back. +Picture a wooden bookshelf, about 1 meter long, sagging under 20 kg of books — roughly 200 newtons pressing down at the far edge. The curve on screen is $y$, how far each point on the beam has bent, plotted along its length; drag $F$, the load at the end, up and the tip droops further. The curve is steepest at that free end, but the beam is bent hardest back at the wall, where the load has the longest lever arm. Now drag $L$, the beam's length, up instead: the droop grows far faster than it did with $F$ — doubling the length makes the tip sag roughly eight times as far. Raise $E$ or $I$ instead, the material's stiffness or the cross-section's shape, and the same load bends the beam much less, which is exactly why fixing a sagging shelf means a thicker board, not a stronger clamp. @@ -50,7 +50,7 @@ Because $y_{\max}$ grows with $L^3$, a beam twice as long sags eight times as fa ## Advanced -Doubling a beam's height roughly doubles $I$ for a rectangular section, but shaping the same amount of material into a taller, thinner cross-section (an I-beam) pushes material away from the centre where it barely resists bending, raising $I$ far more per unit of material than a solid rectangle ever could. +Doubling a beam's height makes $I$ eight times larger for a rectangular section, while doubling its width only doubles it. Better still, shaping the same amount of material into a taller, thinner cross-section (an I-beam) pushes material away from the centre where it barely resists bending, raising $I$ far more per unit of material than a solid rectangle ever could. ## Derivation @@ -61,13 +61,17 @@ Doubling a beam's height roughly doubles $I$ for a rectangular section, but shap ## Real world ### Bridges and I-beams + Structural I-beams put most of their material as far as possible from the centre line, maximizing $I$ for a given weight of steel — exactly the shape bending theory says pays off most. ### Diving boards + A diving board is a cantilever like this one: a longer board bends and springs back much more than a shorter one under the same diver, by the cube-of-length rule. ### Aircraft wings + Wing spars are sized by exactly this bending calculation, balancing $E$, $I$ and length against the lift loads a wing must survive without excessive flex. ### Bookshelves + A shelf sagging under the weight of books is this same formula at work; adding a support in the middle effectively halves $L$, cutting the sag by roughly a factor of eight. diff --git a/content/lessons/engineering/beam-bending/lesson.yaml b/content/lessons/engineering/beam-bending/lesson.yaml index 97162ca3..ca89b907 100644 --- a/content/lessons/engineering/beam-bending/lesson.yaml +++ b/content/lessons/engineering/beam-bending/lesson.yaml @@ -13,7 +13,7 @@ related: [] visualization: type: function-plot options: - expr: "x <= L ? F*x^2*(3*L - x)/(6*E*1e9*I*1e-8)*1000 : 0" + expr: 'x <= L ? F*x^2*(3*L - x)/(6*E*1e9*I*1e-8)*1000 : 0' domain: [0, 5] range: [0, 300] mode: plain @@ -75,10 +75,10 @@ presets: I: 100 x: 4 - F: 5000 - L: 5 + L: 2 E: 200 - I: 150 - x: 5 + I: 200 + x: 2 challenges: - check: abs(x-L)<0.05 and abs(F*x^2*(3*L-x)/(6*E*1e9*I*1e-8)*1000 - 50) < 5 - check: L<3 and x>=L-0.05 and F*x^2*(3*L-x)/(6*E*1e9*I*1e-8)*1000 > 100 diff --git a/content/lessons/engineering/bridges-and-trusses/ar.md b/content/lessons/engineering/bridges-and-trusses/ar.md index c42d89e0..a05e1038 100644 --- a/content/lessons/engineering/bridges-and-trusses/ar.md +++ b/content/lessons/engineering/bridges-and-trusses/ar.md @@ -5,7 +5,7 @@ summary: >- parameters: W: W — الحمل عند الطرف L: L — طول الذراع الأفقي - h: h — المسافة التي ينزل بها الدعامة على الجدار + h: h — المسافة التي تنزلها الدعامة على الجدار variables: - W — الحمل الذي يشدّ للأسفل عند طرف الحامل - L — طول الذراع الأفقي، من الجدار إلى الحمل @@ -17,15 +17,15 @@ variables: ## Try it -1. ارفع $h$، وهو المسافة التي تلتقي عندها الدعامة بالجدار، لتجعلها أكثر انحدارًا. راقب $F_{brace}$ و$F_{arm}$. تنخفض القوتان بشدّة، لأن الدعامة الأكثر انحدارًا تحمل الحمل نفسه بقوة داخلية أقلّ بكثير. -2. ارفع الآن $L$، طول الذراع، بدلًا من ذلك، وأبقِ $h$ ثابتًا. ترتفع القوتان معًا، لأن الامتداد الأطول يكلّف دائمًا قوة أكبر في كلّ عضو. -3. ارفع $W$، وهو الحمل. تنمو $F_{brace}$ و$F_{arm}$ بالتناسب تمامًا مع $W$. ضاعِف الحمل فتتضاعف قوة كلّ عضو. +1. ابدأ بالقيم $W$ = 300 نيوتن و$L$ = 0.6 متر و$h$ = 0.4 متر: زاوية الدعامة 34°، وقوة الدعامة 541 نيوتن، وقوة الذراع 450 نيوتن. ارفع $h$، وهي المسافة التي تنزلها الدعامة على الجدار، إلى 1.2 متر، فتصير الدعامة أشدّ انحدارًا (63°). تنخفض القوتان إلى 335 نيوتن و150 نيوتن، لأن الدعامة الأشدّ انحدارًا تحمل الحمل نفسه بقوة داخلية أقلّ بكثير. +2. أعِد $h$ إلى 0.4 متر، وارفع $L$، طول الذراع، إلى 1.2 متر. ترتفع القوتان إلى 949 نيوتن و900 نيوتن، لأن الذراع الأطول يكلّف دائمًا قوة أكبر في كلّ عضو. +3. أعِد $L$ إلى 0.6 متر، وضاعِف $W$، وهو الحمل، إلى 600 نيوتن. تتضاعف القوتان تمامًا، من 541 نيوتن و450 نيوتن إلى 1082 نيوتن و900 نيوتن. ضاعِف الحمل فتتضاعف قوة كلّ عضو. ## Real-life examples 1. **حامل رفّ صغير.** يحمل الحامل 150 نيوتن من الكتب على ذراع طوله 30 سم. تلتقي الدعامة بالجدار على بُعد 20 سم أسفل الذراع (θ ≈ 34°). تحمل الدعامة نحو 270 نيوتن انضغاطًا، ويحمل الذراع نحو 225 نيوتن شدًّا. 2. **حامل شرفة طويل.** ذراع طوله 1.2 متر يحمل 800 نيوتن، ودعامته تلتقي الجدار على بُعد 60 سم أسفله فقط (θ ≈ 27°، زاوية أكثر انبساطًا). ترتفع قوة الدعامة إلى نحو 1789 نيوتن، وقوة الذراع إلى نحو 1600 نيوتن. هذه قوة أكبر بكثير للحمل نفسه. -3. **الشرفة نفسها، لكن بدعامة شديدة الانحدار.** انقل الحمل نفسه، 300 نيوتن، إلى ذراع طوله 0.6 متر فقط. اجعل الدعامة تنزل 1.2 متر كاملة أسفله (θ ≈ 63°، زاوية أشدّ انحدارًا بكثير). تنخفض قوة الدعامة إلى نحو 335 نيوتن، وقوة الذراع إلى 150 نيوتن فقط. +3. **حامل قصير بدعامة شديدة الانحدار.** ضع حملًا قدره 300 نيوتن على ذراع طوله 0.6 متر، واجعل الدعامة تنزل 1.2 متر كاملة أسفله (θ ≈ 63°، زاوية أشدّ انحدارًا بكثير). تحمل الدعامة نحو 335 نيوتن فقط، ويحمل الذراع 150 نيوتن فقط. ## Test yourself @@ -37,17 +37,17 @@ variables: صِل ثلاثة قضبان من أطرافها. تحصل على شكل لا يستطيع تغيير هيئته أبدًا، إلا أن يتمدّد أحد القضبان أو ينضغط. المثلث صلب بذاته. صِل بدل ذلك أربعة قضبان في مربّع، فيستطيع أن يميل جانبيًّا إلى متوازي أضلاع دون أن يتغيّر طول أيّ قضيب. الإطار المربّع البسيط لا يقاوم هذا النوع من الميل الجانبي. ولهذا بالضبط تتمايل البوابات ورفوف الكتب الخالية من دعامة قطرية. -تؤدّي هذه الدعامة القطرية الواحدة على حامل الرفّ هذه المهمّة بالضبط. بدونها يضطرّ الذراع الأفقي وحده إلى مقاومة الحمل بالانحناء، تمامًا كما تفعل العارضة في درس «انحناء العارضة». أما مع وجود الدعامة فينقسم الحمل إلى مسارين مستقيمين، أي انضغاط ينزل عبر الدعامة وشدّ يمتدّ على طول الذراع. لا يحتاج أيّ عضو منهما إلى الانحناء، بل فقط إلى الدفع أو السحب على طول نفسه. وهذه هي الميزة الكاملة للجملون، فهو يحوّل الانحناء إلى شدّ وانضغاط خالصين، وهما ما تقاومه أيّ مادة بشكل أفضل بكثير. +تؤدّي هذه الدعامة القطرية الواحدة على حامل الرفّ هذه المهمّة بالضبط. بدونها يضطرّ الذراع الأفقي وحده إلى مقاومة الحمل بالانحناء، تمامًا كما تفعل العارضة في درس «انحناء العارضة». أما مع وجود الدعامة فينقسم الحمل إلى مسارين مستقيمين، أي انضغاط ينزل عبر الدعامة وشدّ يمتدّ على طول الذراع. لا يحتاج أيّ عضو منهما إلى الانحناء، بل يكفيه أن يدفع أو يسحب على امتداد طوله. وهذه هي فائدة الجملون كلها: يحوّل الانحناء إلى شدّ وانضغاط فقط، وأيّ مادة تقاومهما أفضل بكثير ممّا تقاوم الانحناء. ## Formal عند المفصل المحمَّل، توازن الدعامة وحدها الشدّ الرأسي للحمل بالكامل، لأن الذراع أفقي ولا يحمل أيّ قوة رأسية. لذلك $F_{brace}\sin\theta = W$، ومن ثمّ $F_{brace} = \frac{W}{\sin\theta}$. والزاوية $\theta = \arctan\frac{h}{L}$ تتحدّد بهندسة الحامل وحدها. -بعد ذلك يجب على الذراع أن يلغي الشدّ الأفقي للدعامة كي لا ينزلق المفصل جانبيًّا، فينتج $F_{arm} = F_{brace}\cos\theta = \frac{W}{\tan\theta}$. الدعامة الشديدة الانحدار، أي حين تكبر الزاوية $\theta$، تجعل $\sin\theta$ قريبة من 1 و$\tan\theta$ كبيرة، فتصغر كلتا القوتين. أما الدعامة المنبسطة فتجعلهما تكبران دون حدود كلما اقتربت $\theta \to 0$. +بعد ذلك يجب على الذراع أن يلغي الشدّ الأفقي للدعامة كي لا ينزلق المفصل جانبيًّا، فينتج $F_{arm} = F_{brace}\cos\theta = \frac{W}{\tan\theta}$. الدعامة الشديدة الانحدار، أي حين تكبر الزاوية $\theta$، تجعل $\sin\theta$ قريبة من 1 و$\tan\theta$ كبيرة، فتصغر كلتا القوتين. أما الدعامة المنبسطة فتجعلهما تكبران بلا حدّ كلما اقتربت الزاوية من الصفر، $\theta \to 0$. ## Advanced -كلّ عضو في جملون مثلّث المفاصل بشكل صحيح يحمل قوة محورية خالصة لا غير، بلا أيّ انحناء. لهذا يمكن صنع أعضاء الجملونات الفولاذية من قضبان نحيفة نسبيًّا، بدل المقاطع الثقيلة السميكة التي تحتاجها عارضة منحنية بالامتداد نفسه. +في جملون مقسَّم كلّه إلى مثلثات ومفاصله حرّة الدوران، يحمل كلّ عضو قوة على امتداد طوله فقط، بلا أيّ انحناء. لهذا يمكن صنع أعضاء الجملونات الفولاذية من قضبان نحيفة نسبيًّا، بدل المقاطع الثقيلة السميكة التي تحتاجها عارضة تقاوم الحمل بالانحناء وتغطي المسافة نفسها. ## Derivation @@ -58,13 +58,17 @@ variables: ## Real world ### حوامل الرفوف والمظلّات -هذا هو المثلث نفسه في هذا الدرس، ذراع أفقي ودعامة قطرية، يحوّلان حملًا كان سيُنحني ذراعًا غير مدعوم إلى شدّ وانضغاط بسيطين. + +هذا هو المثلث نفسه في هذا الدرس، ذراع أفقي ودعامة قطرية، يحوّلان حملًا كان سيثني ذراعًا بلا دعامة إلى شدّ وانضغاط بسيطين. ### جملونات الأسقف -يحمل جملون السقف المثلّث في المنزل وزن السقف عبر شبكة من المثلثات نزولًا إلى الجدران. يستخدم هذا خشبًا أو فولاذًا أقلّ بكثير مما تحتاجه عارضة منحنية واحدة صلبة لتغطية العرض نفسه. + +يحمل جملون السقف المثلّث في المنزل وزن السقف عبر شبكة من المثلثات نزولًا إلى الجدران. يستخدم هذا خشبًا أو فولاذًا أقلّ بكثير مما تحتاجه عارضة واحدة مصمتة تقاوم الحمل بالانحناء لتغطية العرض نفسه. ### جملونات الجسور + تكرّر جسور وارِن وبرات المثلث نفسه مرارًا عبر الامتداد، بحيث يعمل كلّ عضو بشدّ أو انضغاط خالص، ويبقى الهيكل كلّه خفيفًا مقارنة بمتانته. ### هياكل الدراجات + إطار الدراجة الماسي هو في الحقيقة مثلثان يتشاركان ضلعًا واحدًا. لهذا يبقى الإطار صلبًا تحت وزن الراكب، إذا كان تثليثه جيدًا، مستخدمًا أنابيب رفيعة خفيفة بدل عارضة واحدة سميكة. diff --git a/content/lessons/engineering/bridges-and-trusses/en.md b/content/lessons/engineering/bridges-and-trusses/en.md index b84310e9..7c9a7b27 100644 --- a/content/lessons/engineering/bridges-and-trusses/en.md +++ b/content/lessons/engineering/bridges-and-trusses/en.md @@ -18,15 +18,15 @@ variables: ## Try it -1. Drag $h$ (how far down the brace attaches) up, making the brace steeper. Watch both $F_{brace}$ and $F_{arm}$ fall sharply — a steeper brace carries the same load with far less internal force. -2. Now drag $L$ (the arm's length) up instead, keeping $h$ fixed. Both forces climb — a longer reach always costs more force in every member. -3. Drag $W$ (the load) up. Both $F_{brace}$ and $F_{arm}$ grow in exact proportion to $W$ — double the load, double every member's force. +1. Start at $W$ = 300 N, $L$ = 0.6 m, $h$ = 0.4 m: the brace angle reads 34°, the brace force 541 N and the arm force 450 N. Drag $h$ (how far down the brace attaches) up to 1.2 m, making the brace steeper (63°). The forces fall to 335 N and 150 N — a steeper brace carries the same load with far less internal force. +2. Set $h$ back to 0.4 m and drag $L$ (the arm's length) up to 1.2 m. The forces climb to 949 N and 900 N — a longer reach always costs more force in every member. +3. Set $L$ back to 0.6 m and double $W$ (the load) to 600 N. Both forces double exactly, from 541 N and 450 N to 1082 N and 900 N — double the load, double every member's force. ## Real-life examples 1. **A small shelf bracket.** Holding 150 N of books at a 30 cm arm, with the brace meeting the wall 20 cm below (θ ≈ 34°), the brace carries about 270 N in compression and the arm about 225 N in tension. 2. **A long balcony bracket.** A 1.2 m arm carrying an 800 N load, braced 60 cm below (θ ≈ 27°, a shallower angle), pushes the brace up to about 1789 N and the arm to about 1600 N — far more force for the same kind of load. -3. **The same balcony, braced steeply instead.** Moving the same 300 N load onto a 0.6 m arm with the brace dropping a full 1.2 m below (θ ≈ 63°, a much steeper angle) cuts the brace force to about 335 N and the arm to just 150 N. +3. **A short bracket, braced steeply.** A 300 N load on a 0.6 m arm, with the brace dropping a full 1.2 m below (θ ≈ 63°, a much steeper angle), puts only about 335 N in the brace and just 150 N in the arm. ## Test yourself @@ -59,13 +59,17 @@ Every member of a properly triangulated, pin-jointed truss carries pure axial fo ## Real world ### Shelf and awning brackets + The exact triangle in this lesson: a horizontal arm and a diagonal brace, turning a load that would bend an unbraced arm into simple tension and compression. ### Roof trusses + A house roof's triangular truss carries the roof's weight down through a web of triangles into the walls, using far less timber or steel than a single solid bending beam would need to span the same width. ### Bridge trusses + Warren and Pratt truss bridges repeat the same triangle over and over across a span, so every member works in pure tension or compression and the whole structure stays light for its strength. ### Bicycle frames + A bicycle's diamond frame is really two triangles sharing an edge, which is why a well-triangulated frame stays rigid under a rider's weight using thin, light tubing instead of a single thick beam. diff --git a/content/lessons/engineering/decibels/ar.md b/content/lessons/engineering/decibels/ar.md index 0b4ad666..e84e225c 100644 --- a/content/lessons/engineering/decibels/ar.md +++ b/content/lessons/engineering/decibels/ar.md @@ -18,27 +18,27 @@ charts: ## Try it -1. قارن الشريطين. النسبة $x$ نفسها غير مرئية على الشريط الخطي الخام، لكنها تجلس على درجة أنيقة من السلّم، على ارتفاع $L$ ديسيبل. -2. اسحب $x$ من 1 نحو مليون. يتسلق مؤشر السلّم بخطوات متساوية — درجة لكل ×10 — بينما لا يستيقظ الشريط الخطي إلا في النهاية. -3. كل مضاعفة لـ$x$ ترفع $L$ بمقدار 3 ديسيبل نفسه، دائمًا، أيًّا كانت نقطة البداية. +1. ابدأ عند $x$ = 1000 وقارن الشريطين. النسبة أرفع من أن تُرى على الشريط الخطي، لكن المؤشر على السلّم يقف تمامًا عند درجة 30 ديسيبل. +2. ارفع $x$ إلى نحو 10,000، ثم 100,000، ثم إلى آخر المنزلق. يصعد مؤشر السلّم درجة في كل مرة: 40 ثم 50 ثم 60 ديسيبل، أي درجة لكل ×10. أما الشريط الخطي فلا يمتلئ إلا في النهاية. +3. عُد إلى نحو 1000 (30 ديسيبل)، ثم ضاعف $x$ إلى نحو 2000 ثم 4000 ثم 8000. يقرأ $L$ القيم 33 ثم 36 ثم 39 ديسيبل: كل مضاعفة تضيف 3 ديسيبل، أيًّا كانت نقطة البداية. ## Real-life examples -1. **رفع صوت السماعة قليلًا.** ضاعف القدرة الكهربائية المرسلة إلى سماعة (x = 2). يرتفع مستوى الصوت 3 ديسيبل بالضبط، وهي قفزة صغيرة لكنها محسوسة بالجهارة. -2. **مرحلة تضخيم صوتي.** يرفع مضخّم أوّلي قدرة إشارة ميكروفون ضعيفة ألف ضعف (x = 1000). هذا يمنحها كسبًا قدره 30 ديسيبل، وهو نمطي لمرحلة تضخيم واحدة. +1. **رفع صوت السماعة قليلًا.** ضاعف القدرة الكهربائية المرسلة إلى سماعة (x = 2). يرتفع مستوى الصوت 3 ديسيبل، وهي زيادة صغيرة في علوّ الصوت لكن الأذن تلاحظها. +2. **مرحلة تضخيم صوتي.** يرفع مضخّم أوّلي قدرة إشارة ميكروفون ضعيفة ألف ضعف (x = 1000). هذا يمنحها كسبًا قدره 30 ديسيبل، وهو كسب معتاد لمرحلة تضخيم واحدة. 3. **سلسلة معيدات ضوئية طويلة في الألياف البصرية.** تفقد إشارة ضوئية مليون ضعف من قدرتها (x = 1,000,000) عبر كابل طويل. تعيدها المضخّمات الضوئية بإضافة 60 ديسيبل من الكسب. ## Test yourself -1. جِد نسبة القدرة التي تعطي مستوى 45 ديسيبل بالضبط. +1. جِد نسبة قدرة تعطي مستوى لا يبعد عن 45 ديسيبل أكثر من 1 ديسيبل. 2. جِد نسبة القدرة التي تعطي مستوى قريبًا من 50 ديسيبل. 3. جِد نسبة يتجاوز عندها المستوى 55 ديسيبل مع بقائها دون نصف أقصى نسبة على المنزلق. ## Intuition -يقيس الهمس نحو 20 ديسيبل، ويقيس محرّك طائرة نفاثة نحو 140 ديسيبل، وهو فرق هائل لدرجة أن وصفه بالقدرة الخام يحتاج كتابة الرقم 1 متبوعًا باثنتي عشرة صفرًا. السلّم على الشاشة يُظهر $L$، المستوى بالديسيبل، لـ$x$، نسبة القدرة التي تقيسها إلى قدرة مرجعية ثابتة. اسحب $x$ من 1 نحو مليون فيتسلق المؤشر درجة بعد درجة متساوية، لأن كل عامل إضافي مقداره عشرة في القدرة يضيف فقط 10 ديسيبل ثابتة أخرى، مهما كبرت النسبة أصلًا. +تكتكة الساعة نحو 20 ديسيبل، ومحرّك الطائرة النفاثة نحو 140 ديسيبل. الفرق بينهما هائل: لو كتبناه بنسبة القدرة نفسها لاحتجنا إلى الرقم 1 متبوعًا باثني عشر صفرًا. السلّم على الشاشة يُظهر $L$، المستوى بالديسيبل، لـ$x$، نسبة القدرة التي تقيسها إلى قدرة مرجعية ثابتة. اسحب $x$ من 1 نحو مليون فيتسلق المؤشر درجة بعد درجة متساوية، لأن كل عامل إضافي مقداره عشرة في القدرة يضيف فقط 10 ديسيبل ثابتة أخرى، مهما كبرت النسبة أصلًا. -هذا الانضغاط هو بالضبط ما تفعله أذناك طبيعيًّا. يحتاج الصوت إلى نحو عشرة أضعاف القدرة ليبدو أعلى بضعفين، فمقياس يضغط مدى قدرة هائلًا إلى خطوات صغيرة متساوية التباعد يطابق كيف يُدرَك الصوت فعلًا. قفزة من 1 إلى 10 على المنزلق تبدو على السلّم بالحجم نفسه لقفزة من 100,000 إلى 1,000,000، وكلتاهما تضيفان 10 ديسيبل بالضبط. +هذا الانضغاط هو بالضبط ما تفعله أذناك طبيعيًّا. يحتاج الصوت إلى نحو عشرة أضعاف القدرة ليبدو أعلى مرتين. لذلك فإن مقياسًا يضغط مدى هائلًا من القدرة في خطوات صغيرة متساوية يطابق ما تسمعه الأذن فعلًا. قفزة من 1 إلى 10 على المنزلق تبدو على السلّم بالحجم نفسه لقفزة من 100,000 إلى 1,000,000، وكلتاهما تضيفان 10 ديسيبل بالضبط. ## Formal @@ -59,13 +59,17 @@ charts: ## Real world ### الجهارة والسمع -تمتدّ الأصوات اليومية من همس قرب 20 ديسيبل إلى محرّك طائرة نفاثة قرب 140 ديسيبل. الفرق بينهما عامل قدره $10^{12}$ في القدرة، يحوّله مقياس الديسيبل إلى أرقام يسهل التعامل معها. + +تمتدّ الأصوات اليومية من تكتكة ساعة قرب 20 ديسيبل إلى محرّك طائرة نفاثة قرب 140 ديسيبل. الفرق بينهما عامل قدره $10^{12}$ في القدرة، يحوّله مقياس الديسيبل إلى أرقام يسهل التعامل معها. ### مؤشّرات إشارة الهاتف + نقيس قوة إشارة الهاتف بوحدة dBm، أي ديسيبل بالنسبة إلى ملّي واط واحد. الانتقال من −70 dBm إلى −80 dBm انخفاض بعشرة أضعاف في قدرة الإشارة الفعلية، لا انخفاضًا صغيرًا. ### مواصفات المضخّمات والكوابل + يصنّف المهندسون معدّات الصوت والترددات الراديوية بالديسيبل كسبًا أو فقدًا. هذا يتيح لهم جمع أو طرح مراحل على طول سلسلة الإشارة، بدل ضرب نسب القدرة الخام. ### حدود سلامة السمع + تحدَّد حدود الضجيج في مكان العمل بالديسيبل، لأن قفزة 3 ديسيبل فقط تضاعف قدرة الصوت الواصلة إلى الأذن. لذلك يقصر وقت التعرّض المسموح به إلى النصف مع كل زيادة 3 ديسيبل. diff --git a/content/lessons/engineering/decibels/en.md b/content/lessons/engineering/decibels/en.md index 6e855264..e7f49e4d 100644 --- a/content/lessons/engineering/decibels/en.md +++ b/content/lessons/engineering/decibels/en.md @@ -20,25 +20,25 @@ charts: ## Try it -1. Compare the two bars. The same ratio $x$ is invisible on the raw linear bar yet sits at a clean rung of the ladder, $L$ decibels up. -2. Drag $x$ from 1 toward a million. The ladder marker climbs in equal steps — one rung per ×10 — while the linear bar only wakes up at the very end. -3. Notice that every time you double $x$, $L$ climbs by the same 3 dB, no matter where you started. +1. Start at $x$ = 1000 and compare the two bars. On the raw linear bar the ratio is too thin to see, yet on the ladder the marker sits right on the 30 dB rung. +2. Drag $x$ up to about 10,000, then 100,000, then the top of the slider. The ladder marker climbs one rung each time — 40, 50, 60 dB, one rung per ×10 — while the linear bar only fills up at the very end. +3. Go back to about 1000 (30 dB), then double $x$ to about 2000, 4000 and 8000. $L$ reads 33, 36 and 39 dB: every doubling adds the same 3 dB, no matter where you started. ## Real-life examples -1. **Turning up a speaker just slightly.** Doubling the electrical power sent to a speaker (x = 2) raises the sound level by exactly 3 dB — a small but just-noticeable jump in loudness. +1. **Turning up a speaker just slightly.** Doubling the electrical power sent to a speaker (x = 2) raises the sound level by 3 dB — a small but just-noticeable jump in loudness. 2. **An audio amplifier stage.** A preamp that boosts a weak microphone signal's power a thousandfold (x = 1,000) delivers 30 dB of gain, typical of a single amplification stage. 3. **A long fiber-optic repeater chain.** By the time optical amplifiers restore a signal that has lost a millionfold in power (x = 1,000,000) over a long cable run, they have added back 60 dB of gain. ## Test yourself -1. Find the power ratio that gives a level of exactly 45 dB. +1. Find a power ratio that gives a level within 1 dB of 45 dB. 2. Find the power ratio that gives a level close to 50 dB. 3. Find a ratio where the level exceeds 55 dB while staying under half the maximum ratio on the slider. ## Intuition -A whisper measures about 20 dB and a jet engine about 140 dB — a difference so large that describing it in raw power would mean writing a 1 followed by twelve zeros. The ladder on screen shows $L$, the level in decibels, for $x$, the ratio of the power you're measuring to a fixed reference power. Drag $x$ from 1 up toward a million and the marker climbs rung by equal rung, because each extra factor of ten in power only adds another fixed 10 dB, no matter how huge the ratio has already become. +A ticking watch measures about 20 dB and a jet engine about 140 dB — a difference so large that describing it in raw power would mean writing a 1 followed by twelve zeros. The ladder on screen shows $L$, the level in decibels, for $x$, the ratio of the power you're measuring to a fixed reference power. Drag $x$ from 1 up toward a million and the marker climbs rung by equal rung, because each extra factor of ten in power only adds another fixed 10 dB, no matter how huge the ratio has already become. That squashing is exactly what your ears do naturally: a sound needs roughly ten times the power to seem twice as loud, so a scale that compresses huge power ranges into small, evenly spaced steps matches how loudness is actually perceived. A jump from 1 to 10 on the slider looks the same size on the ladder as a jump from 100,000 to 1,000,000 — both add exactly 10 dB. @@ -61,13 +61,17 @@ Human sensory response to sound, brightness and even the Richter scale for earth ## Real world ### Loudness and hearing -Everyday sounds range from a whisper near 20 dB to a jet engine near 140 dB — a factor of $10^{12}$ in power that the decibel scale turns into a manageable range of numbers. + +Everyday sounds range from a ticking watch near 20 dB to a jet engine near 140 dB — a factor of $10^{12}$ in power that the decibel scale turns into a manageable range of numbers. ### Phone signal bars + Phone signal strength is measured in dBm, decibels relative to one milliwatt; a change from −70 dBm to −80 dBm is a tenfold drop in actual signal power, not a small one. ### Amplifier and cable specs + Audio and radio-frequency equipment is rated in dB of gain or loss, so an engineer can add or subtract stages along a signal chain instead of multiplying raw power ratios. ### Hearing-safety limits + Workplace noise limits are set in dB because a jump of just 3 dB doubles the sound power reaching an ear, which is why permitted exposure time is cut in half for every 3 dB increase. diff --git a/content/lessons/engineering/feedback-and-stability/ar.md b/content/lessons/engineering/feedback-and-stability/ar.md index dfd13bd7..619a910f 100644 --- a/content/lessons/engineering/feedback-and-stability/ar.md +++ b/content/lessons/engineering/feedback-and-stability/ar.md @@ -18,27 +18,27 @@ variables: ## Try it -1. مع بقاء $d$ عند 1، ارفع $g$ ببطء من قرب الصفر. تستقرّ الغرفة بسلاسة في البداية، ثم تبدأ بتجاوز الهدف والتأرجح عائدة قبل أن تستقرّ. تصحيح أكبر في كلّ مرّة يعني تجاوزًا أكبر. -2. ادفع $g$ إلى ما بعد 1 مع بقاء $d = 1$. تتوقّف التأرجحات عن التقلّص وتبدأ بالنموّ. التغذية الراجعة نفسها التي كانت تصحّح الحرارة أصبحت الآن سبب اضطرابها. -3. الآن ارفع $d$ مع إبقاء $g$ ثابتًا قرب 0.7. الكسب نفسه تمامًا الذي كان يستقرّ سابقًا ينفلت الآن، لمجرّد أن المنظّم يستجيب لمعلومات أقدم فأقدم. +1. أبقِ $d$ عند 1 واجعل $g$ يساوي 0.2. ترتفع حرارة الغرفة بهدوء إلى 22 درجة مئوية ولا تتجاوزها. ارفع $g$ إلى 0.7: تتجاوز الحرارة الهدف إلى نحو 26 درجة، ثم تتأرجح حتى تستقرّ، ويبقى الحكم «مستقرّ». كلما كبر التصحيح كبر التجاوز. +2. ارفع $g$ إلى 1.2 مع بقاء $d = 1$، أي فوق حدّ الاستقرار التقريبي وهو 1. يكبر التأرجح بدل أن يصغر، ويصير الحكم «غير مستقرّ». التغذية الراجعة نفسها التي كانت تصحّح الحرارة أصبحت الآن سبب اضطرابها. +3. أعِد $g$ إلى 0.7 وارفع $d$ من 1 إلى 2. ينخفض حدّ الاستقرار التقريبي إلى 0.67 وينقلب الحكم إلى «غير مستقرّ». الكسب نفسه الذي كان يستقرّ ينفلت الآن، فقط لأن المنظّم يستجيب لمعلومات أقدم. ## Real-life examples -1. **منظّم حرارة مضبوط جيدًا.** بدءًا من 15 درجة مئوية بهدف 22 درجة، كسب لطيف قدره 0.15 وتأخّر خطوة واحدة فقط، يستقرّ بسلاسة عند 22 درجة بأقلّ تذبذب. -2. **منظّم أكثر توتّرًا، بالتأخّر نفسه.** الغرفة والهدف نفسهما، لكن بكسب قدره 0.7، يتجاوز 22 درجة، ثم يتأرجح عائدًا دونها، ويستمرّ بالتذبذب، كلّ تأرجح أصغر من سابقه، حتى يستقرّ أخيرًا. -3. **الكسب المتوتّر نفسه، لكن بمستشعر أكثر تأخّرًا.** لا يتغيّر شيء في الكسب عن المثال السابق، يبقى 0.7، لكن المستشعر يُبلغ الآن عن قراءات من ثلاث خطوات مضت بدل خطوة واحدة. التصحيح نفسه الذي كان يستقرّ سابقًا يكبر الآن مع كلّ تأرجح. لا تبلغ الغرفة أبدًا حرارة ثابتة عند 22 درجة. +1. **منظّم حرارة مضبوط جيدًا.** تبدأ الغرفة عند 15 درجة مئوية والهدف 22 درجة. بكسب خفيف قدره 0.15 وتأخّر خطوة واحدة فقط، تصل الحرارة إلى 22 درجة بهدوء ومن دون تأرجح يُذكر. +2. **منظّم أعنف في ردّه، بالتأخّر نفسه.** الغرفة نفسها والهدف نفسه، لكن الكسب 0.7. تتجاوز الحرارة 22 درجة، ثم تعود فتنزل دونها، وتظلّ تتأرجح، وكلّ تأرجح أصغر من سابقه، حتى تستقرّ أخيرًا. +3. **الكسب العنيف نفسه، لكن بمستشعر أكثر تأخّرًا.** لا يتغيّر شيء في الكسب عن المثال السابق، يبقى 0.7، لكن المستشعر يُبلغ الآن عن قراءات من ثلاث خطوات مضت بدل خطوة واحدة. التصحيح نفسه الذي كان يستقرّ سابقًا يكبر الآن مع كلّ تأرجح. لا تبلغ الغرفة أبدًا حرارة ثابتة عند 22 درجة. ## Test yourself -1. جِد كسبًا $g$ وتأخّرًا $d$ يبقيان مستقرَّين براحة (دون العتبة التقريبية $2/(d+1)$). -2. جِد كسبًا $g$ وتأخّرًا $d$ يتذبذبان وينموان، لكن دون أن يكون $g$ كبيرًا بشكل مفرط. -3. مع تأخّر $d$ لا يقلّ عن 3 خطوات، جِد مع ذلك كسبًا $g$ منخفضًا بما يكفي ليبقى مستقرًّا. +1. جِد كسبًا $g$ وتأخّرًا $d$ يبقى معهما النظام مستقرًّا بهامش واسع: $g$ أكبر من 0 لكنه أقلّ من نصف العتبة التقريبية $2/(d+1)$. +2. جِد كسبًا $g$ وتأخّرًا $d$ يجعلان الحرارة تتأرجح ويكبر تأرجحها، لكن دون أن يكون $g$ كبيرًا جدًّا. +3. مع تأخّر $d$ لا يقلّ عن 3 خطوات، جِد كسبًا $g$ منخفضًا بما يكفي ليبقى الحكم «مستقرّ». ## Intuition -تخيّل دشًّا يستغرق ماؤه بضع ثوانٍ ليتغيّر بعد إدارة المقبض. أدره قليلًا وانتظر، وتستطيع ضبط حرارة مريحة. أدره بحركات كبيرة متسرّعة، مستجيبًا لما شعرت به قبل ثوانٍ لا لما تشعر به الآن، فتتجاوز الحرارة الساخنة، تسحبه بعنف، تتجاوز الباردة، وقد تنتهي بإدارة المقبض بقوة أكبر فأكبر بينما تسوء التأرجحات بدل أن تتحسّن. +تخيّل دشًّا يستغرق ماؤه بضع ثوانٍ ليتغيّر بعد إدارة المقبض. أدره قليلًا وانتظر، فتصل إلى حرارة مريحة. أما إذا أدرته بحركات كبيرة متعجّلة، وأنت تستجيب لما شعرت به قبل ثوانٍ لا لما تشعر به الآن، فسيصير الماء أسخن ممّا تريد، فتعيد المقبض بقوة، فيصير أبرد ممّا تريد. وقد تجد نفسك تدير المقبض بقوة أكبر في كلّ مرّة، والتأرجح يسوء بدل أن يتحسّن. -منظّم حرارة يديره سخّان يحتاج وقتًا ليُدفئ غرفة يعمل بالطريقة نفسها تمامًا. إن استجاب برفق، تُتاح للتصحيحات الصغيرة فرصة لإظهار أثرها قبل إضافة التالية، فتستقرّ الغرفة عند الهدف بسلاسة. أما إن استجاب بقوة مفرطة، فكلّ تصحيح يكون مفرطًا أصلًا بحلول ظهور أثره. وهذا هو المعنى الحقيقي لـ«الكسب المرتفع جدًّا»، ليس أن الجهاز معطّل، بل أنه يستمرّ في الإفراط بتصحيح إفراطه السابق. +منظّم الحرارة الذي يشغّل سخّانًا يحتاج وقتًا ليدفئ الغرفة يعمل بالطريقة نفسها تمامًا. إن استجاب برفق، يظهر أثر كلّ تصحيح صغير قبل أن يضيف التصحيح التالي، فتصل الغرفة إلى الهدف بهدوء. أما إن استجاب بقوة زائدة، فيكون كلّ تصحيح قد زاد عن الحاجة قبل أن يظهر أثره. وهذا هو المعنى الحقيقي لعبارة «الكسب مرتفع جدًّا»: الجهاز ليس معطّلًا، لكنه يظلّ يبالغ في تصحيح مبالغته السابقة. ## Formal @@ -59,13 +59,17 @@ variables: ## Real world ### منظّمات التدفئة المنزلية -فرن يحتاج دقائق ليُدفئ غرفة، مقترن بمنظّم حرارة يستجيب بعدوانية مفرطة لكلّ قراءة، هو المصدر الواقعي الكلاسيكي للتأرجحات البطيئة التي تستغرق عدّة دقائق والتي تُظهرها بعض المنازل. + +سخّان يحتاج دقائق ليدفئ الغرفة، ومعه منظّم حرارة يستجيب بقوة زائدة لكلّ قراءة: هذا هو السبب المعتاد لتأرجح الحرارة البطيء الذي يستغرق عدّة دقائق في بعض المنازل. ### مثبّت السرعة في السيارات -يجب على مثبّت سرعة السيارة أن يستجيب لتغيّرات سرعة لا يستطيع استشعارها إلا بعد وقوعها بلحظة. تصحيح مفرط العدوانية على منحدر ينتج النمط نفسه من التجاوز والتأرجح الذي يظهره منظّم حرارة سيّئ الضبط. + +يجب على مثبّت سرعة السيارة أن يستجيب لتغيّرات سرعة لا يستطيع استشعارها إلا بعد وقوعها بلحظة. التصحيح الأقوى من اللازم على طريق صاعد ينتج النمط نفسه من التجاوز والتأرجح الذي يظهره منظّم حرارة سيّئ الضبط. ### التحكّم في ازدحام الشبكات -تُضبط معدّلات إرسال بيانات الإنترنت بتغذية راجعة لا تعلم بالازدحام إلا بعد تأخّر رحلة ذهاب وإياب واحدة أو أكثر. استجابة مفرطة العدوانية لتلك الإشارة المتأخّرة قد تجعل حركة البيانات تتذبذب بين سريعة جدًّا وبطيئة جدًّا. + +تُضبط معدّلات إرسال بيانات الإنترنت بتغذية راجعة لا تعلم بالازدحام إلا بعد تأخّر رحلة ذهاب وإياب واحدة أو أكثر. والاستجابة الأقوى من اللازم لتلك الإشارة المتأخّرة قد تجعل حركة البيانات تتذبذب بين سريعة جدًّا وبطيئة جدًّا. ### صفير التغذية الراجعة الصوتية + ميكروفون قريب جدًّا من مكبّر صوته الخاص يصنع حلقة تغذية راجعة بتأخّر يكاد ينعدم وكسب هائل، وهذا بالضبط النظام غير المستقرّ المنفلت الذي يتنبّأ به نموذج هذا الدرس عندما يتجاوز $g$ عتبته بكثير. diff --git a/content/lessons/engineering/feedback-and-stability/en.md b/content/lessons/engineering/feedback-and-stability/en.md index e4e6c656..54549c15 100644 --- a/content/lessons/engineering/feedback-and-stability/en.md +++ b/content/lessons/engineering/feedback-and-stability/en.md @@ -12,17 +12,17 @@ parameters: variables: - T — the room's temperature at a given step - n — the step number, each check-in the thermostat makes - - "g — the gain: how big a correction it makes per degree of error it can see" + - 'g — the gain: how big a correction it makes per degree of error it can see' - r — the target temperature (the setpoint) - - "d — the lag: how many steps late the reading it reacts to is" - - "e — the error: the gap between the target and the reading the thermostat can currently see" + - 'd — the lag: how many steps late the reading it reacts to is' + - 'e — the error: the gap between the target and the reading the thermostat can currently see' --- ## Try it -1. With $d$ at 1, drag $g$ up slowly from near 0. The room settles smoothly at first, then starts to overshoot and swing back before settling — a bigger correction each time means more overshoot. -2. Push $g$ past 1 with $d = 1$. The swings stop shrinking and start growing — the same feedback that used to fix the temperature is now the thing throwing it off. -3. Now drag $d$ up while keeping $g$ fixed around 0.7. The exact same gain that used to settle down now runs away, purely because the thermostat is reacting to older and older information. +1. With $d$ at 1, set $g$ to 0.2. The room eases up to 22 °C without overshooting. Raise $g$ to 0.7: now the room overshoots to about 26 °C and swings back before it settles, and the verdict still reads stable — a bigger correction each time means more overshoot. +2. Push $g$ to 1.2 with $d = 1$, past the rough stability limit of 1. The swings stop shrinking and start growing, and the verdict turns to unstable — the same feedback that used to fix the temperature is now the thing throwing it off. +3. Set $g$ back to 0.7 and raise $d$ from 1 to 2. The rough stability limit drops to 0.67 and the verdict flips to unstable. The exact same gain that used to settle down now runs away, purely because the thermostat is reacting to older information. ## Real-life examples @@ -32,9 +32,9 @@ variables: ## Test yourself -1. Find a gain $g$ and a lag $d$ that stay comfortably stable (below the rough threshold $2/(d+1)$). +1. Find a gain $g$ and a lag $d$ that stay comfortably stable: $g$ above 0 but below half the rough threshold $2/(d+1)$. 2. Find a gain $g$ and a lag $d$ that oscillate and grow, but without $g$ being absurdly large. -3. With a lag $d$ of at least 3 steps, still find a gain $g$ low enough to remain stable. +3. With a lag $d$ of at least 3 steps, still find a gain $g$ low enough for the verdict to read stable. ## Intuition @@ -46,7 +46,7 @@ A thermostat with a heater that takes time to warm a room works exactly the same Each step, the thermostat measures how far the room still is from the target, but only as it stood $d$ steps ago, $e = r - T_{n-1-d}$, and nudges the room's temperature by a fraction $g$ of that old error: $T_n = T_{n-1} + g\,e$. -With no lag ($d=0$), the temperature converges smoothly for $0 < g < 1$, oscillates but still settles for $1 < g < 2$, and grows without bound for $g > 2$. Adding lag makes the same gain more dangerous: the rough rule $g < \frac{2}{d+1}$ shows the safe gain shrinking as the delay $d$ grows — the exact threshold that separates preset 2 (stable) from preset 3 (unstable) above, at the same gain but a longer lag. +With no lag ($d=0$), the temperature converges smoothly for $0 < g < 1$, oscillates but still settles for $1 < g < 2$, and grows without bound for $g > 2$. Adding lag makes the same gain more dangerous: the rough rule $g < \frac{2}{d+1}$ shows the safe gain shrinking as the delay $d$ grows — the threshold that separates example 2 (stable) from example 3 (unstable) above, at the same gain but a longer lag. ## Advanced @@ -61,13 +61,17 @@ This rough threshold is exact for $d = 0$ and $d = 1$, but for longer lags real ## Real world ### Home heating thermostats + A furnace that takes minutes to warm a room, paired with a thermostat reacting too aggressively to each reading, is the classic real-world source of the slow, several-minute temperature swings some houses show. ### Cruise control + A car's cruise control has to react to speed changes it can only sense a moment after they happen; too aggressive a correction on a hill produces the same overshoot-and-swing pattern as an over-tuned thermostat. ### Network congestion control + Internet data-sending rates are adjusted by feedback that only learns about congestion after a delay of one or more round trips — too aggressive a reaction to that delayed signal can make traffic oscillate between too fast and too slow. ### Voice and audio feedback (a microphone squeal) + A microphone too close to its own speaker creates a feedback loop with almost no lag and enormous gain, which is exactly the unstable, runaway regime this lesson's model predicts for $g$ far past its threshold. diff --git a/content/lessons/engineering/feedback-and-stability/lesson.yaml b/content/lessons/engineering/feedback-and-stability/lesson.yaml index 1e7e1c23..009b10d8 100644 --- a/content/lessons/engineering/feedback-and-stability/lesson.yaml +++ b/content/lessons/engineering/feedback-and-stability/lesson.yaml @@ -64,6 +64,6 @@ presets: r: 22 T0: 15 challenges: - - check: g < 2/(d+1) + - check: g > 0 and g < 1/(d+1) - check: g > 2/(d+1) and g < 2 - - check: d >= 3 and g < 2/(d+1) + - check: d >= 3 and g > 0 and g < 1.6/(d+1) diff --git a/content/lessons/engineering/fourier-series/ar.md b/content/lessons/engineering/fourier-series/ar.md index f16f7ff2..91dd095e 100644 --- a/content/lessons/engineering/fourier-series/ar.md +++ b/content/lessons/engineering/fourier-series/ar.md @@ -7,7 +7,7 @@ parameters: x: x — الموضع على طول دورة واحدة variables: - f — الإشارة الدورية التي نعيد بناءها، وهي هنا موجة مربعة - - N — رقم أعلى توافقي تُدخله. اسحبه لأعلى لتضيف حدود جيبية أكثر + - N — رقم أعلى توافقي تُدخله. اسحبه لأعلى لتضيف حدودًا جيبية أكثر - 'k — رقم التوافقي، 1 هو الأساسي، و3 هو التوافقي الثالث، وهكذا' - >- a_k — نصيب التوافقي k من المجموع. في الموجة المربعة يساهم التوافقي الفردي @@ -16,25 +16,25 @@ variables: ## Try it -1. راقب المنحنى، فهو يبدأ موجة جيبية واحدة ملساء. -2. ارفع $N$، فتضيف حدودًا جيبية أكثر. تظهر على المنحنى قمم أكثر استواءً وأكتاف أحدّ، وتقترب الموجة من الشكل المربع. -3. حرّك $x$ لتنتقل على طول المنحنى، وتلاحظ تجاوزًا صغيرًا يبقى قرب القفزات حتى عند أعلى $N$. هذا هو تموّج جيبس. +1. اجعل $N$ يساوي 1 و$x$ يساوي 1.57. المنحنى موجة جيبية واحدة ملساء، والقراءة f(x) عند قمّتها 1.2732. +2. ارفع $N$ خطوة خطوة حتى 11، فتضيف حدودًا جيبية أكثر. تظهر على المنحنى قمم أكثر استواءً وأكتاف أحدّ، وتقترب الموجة من الشكل المربع. عند $x$ = 1.57 تصير القراءة f(x) على التوالي 0.8488 ثم 1.1035 ثم 0.9216 ثم 1.0631 ثم 0.9473: مرة فوق القمة المستوية 1 ومرة تحتها، وتقترب منها في كل مرة. +3. أبقِ $N$ عند 11 وحرّك $x$ إلى 0.26، أي بعد القفزة عند 0 بقليل. تصير القراءة 1.1813: تجاوز صغير يبقى قرب القفزات حتى عند أعلى $N$. هذا هو تموّج جيبس. ## Real-life examples 1. **نغمة جيبية نقية.** اجعل N = 1 فتبقي على الأساسي فقط. الموجة عندئذٍ نغمة ملساء أحادية التردد، كصوت شوكة رنّانة أو فلوت يُعزف بهدوء. 2. **جرس نغمة الكلارينيت.** صوت الكلارينيت مبنيّ شبه كليًّا من توافقيات فردية، تمامًا كهذا المجموع الجزئي عند N = 7. الحدود الإضافية تمنحه جرسًا أغنى، أقرب لصوت القصبة من نغمة جيبية نقية. -3. **إشارة ساعة رقمية.** قرّب هذا المجموع الجزئي عند N = 11 النبضة «المربعة» في دائرة رقمية. السلك الحقيقي يرشّح أعلى توافقياتها، وهذا أحد أسباب تدوّر حواف الساعة السريعة بدل أن تبقى حادة تمامًا. +3. **إشارة ساعة رقمية.** يقرّب هذا المجموع الجزئي عند N = 11 النبضة «المربعة» في دائرة رقمية. السلك الحقيقي يحجب أعلى توافقياتها، وهذا أحد أسباب استدارة حواف النبضات السريعة بدل أن تبقى حادة تمامًا. ## Test yourself 1. بالأساسي وحده (N = 1)، جِد $x$ حيث تبلغ الموجة قيمتها القصوى نحو 1.27. 2. ادفع $N$ إلى أقصاه (11) وجِد $x$ قريبًا من قفزة يتجاوز عندها المنحنى القيمة 1.1، رغم أن القمة المستوية التي يقترب منها هي 1 فقط. -3. جِد $x$ قرب ربع الدورة حيث يستقرّ المجموع الجزئي قريبًا من قيمة القمة المستوية 1. +3. ضع $x$ عند ربع الدورة (نحو 1.57)، وارفع $N$ حتى لا يبعد المجموع الجزئي عن قيمة القمة المستوية 1 أكثر من 0.08. ## Intuition -نبضة ساعة رقمية تبدو موجة مربعة نظيفة على راسم الذبذبات هي في الحقيقة مبنية من موجات جيبية نقية كثيرة تُجمع معًا، واحدة عند التردد الأساسي وأخرى عند مضاعفاته الفردية. يبدأ المنحنى على الشاشة موجة جيبية واحدة. اسحب $N$، أعلى توافقي تُدخله، لأعلى فتظهر عليه أكتاف أحدّ وقمم أكثر استواءً مع كل حدّ إضافي، مقتربًا من شكل الموجة المربعة. +نبضة ساعة رقمية تبدو موجة مربعة نظيفة على راسم الذبذبات هي في الحقيقة مبنية من موجات جيبية نقية كثيرة تُجمع معًا، واحدة عند التردد الأساسي وأخرى عند مضاعفاته الفردية. عند $N = 1$ يكون المنحنى على الشاشة موجة جيبية واحدة. اسحب $N$، أعلى توافقي تُدخله، لأعلى فتظهر عليه أكتاف أحدّ وقمم أكثر استواءً مع كل حدّ إضافي، مقتربًا من شكل الموجة المربعة. تظهر التوافقيات الفردية فقط في هذا المجموع، وكل واحد منها أضعف من سابقه. ارتفاع التوافقي الثالث ثلث ارتفاع الأول، والخامس خمسه، وهكذا. حتى عند $N = 11$ تبقى الزوايا تتجاوز الحدّ وتتموّج قليلًا قبل أن تستقرّ، فاسحب $x$ قرب قفزة لترى ذلك. هذه هي ظاهرة جيبس الشهيرة، ولا تصغر أبدًا عن نحو 9% من ارتفاع القفزة، مهما زدت عدد التوافقيات. @@ -42,28 +42,32 @@ variables: أي دالة دورية دورتها $2\pi$ يمكن كتابتها مجموعَ جيوب وجيوب تمام عند $x, 2x, 3x, \dots$. مفكوك الموجة المربعة يُبقي على المضاعفات الفردية فقط، $f(x) = \frac{4}{\pi}\sum_{k=1,3,5,\dots}^{N}\frac{\sin(kx)}{k}$، ويتقارب إلى الموجة المربعة عندما $N \to \infty$. -كل معامل $a_k = \frac{4}{\pi k}$ لـ$k$ فردي و$0$ لـ$k$ زوجي يحدّد شدة ذلك التوافقي. مضاعفة رقم التوافقي تقريبًا تنصّف مساهمته. +كل معامل $a_k = \frac{4}{\pi k}$ لـ$k$ فردي و$0$ لـ$k$ زوجي يحدّد شدة ذلك التوافقي. مضاعفة رقم التوافقي تجعل مساهمته النصف تقريبًا. ## Advanced -لا تتقارب المجاميع الجزئية تقاربًا منتظمًا عند القفزة. تقترب القفزة الزائدة من نسبة ثابتة من ارتفاع القفزة، نحو 9%، عندما $N \to \infty$. هذه حقيقة تحدّ من دقة أي نظام محدود النطاق الترددي في إعادة إنتاج حافة حقيقية، وهو قيد يظهر أيضًا في ضغط الصور وتصميم المرشحات الرقمية. +لا تتقارب المجاميع الجزئية تقاربًا منتظمًا عند القفزة. يقترب التجاوز من نسبة ثابتة من ارتفاع القفزة، نحو 9%، عندما $N \to \infty$. هذه حقيقة تحدّ من دقة أي نظام محدود النطاق الترددي في إعادة إنتاج حافة حقيقية، وهو قيد يظهر أيضًا في ضغط الصور وتصميم المرشحات الرقمية. ## Derivation 1. تأتي شدة كل توافقي من مطابقة الموجة المربعة مع $\sin(kx)$. تبقى التوافقيات الفردية بينما تُلغى الزوجية تمامًا. 2. المتسلسلة الكاملة اللانهائية تعيد بناء الموجة المربعة تمامًا في كل نقطة إلا عند القفزات نفسها. -3. الإبقاء على أول $N$ حدًّا فقط يعطي المجموع الجزئي المرسوم هنا، والتموّج الظاهر هو ما استُبعد. +3. الإبقاء على التوافقيات حتى $N$ فقط يعطي المجموع الجزئي المرسوم هنا، والتموّج الظاهر هو ما استُبعد. ## Real world ### الصوت وجرس النغمة + يعزف عازف كمان وعازف فلوت النغمة نفسها، فيشتركان في التردد الأساسي لكن يختلفان في شدة توافقياتهما. هذا المزيج من التوافقيات هو ما يجعل صوتيهما مختلفين. ### ضغط JPEG وMP3 + تفكّك الصيغتان الإشارة إلى مركّبات ترددية. تُبقيان فقط على ما يستطيع المشاهد أو المستمع إدراكه فعلًا، وتُهملان الباقي. هذا امتداد مباشر لهذا التفكيك. ### إشارات الساعة الرقمية -النبضة «المربعة» في دائرة رقمية هي في الحقيقة تردد أساسي مضافًا إليه سلّم من التوافقيات الفردية. السلك الحقيقي يرشّح أعلى هذه التوافقيات، وهذا أحد أسباب تدوّر حواف الساعة السريعة. + +النبضة «المربعة» في دائرة رقمية هي في الحقيقة تردد أساسي مضافًا إليه سلّم من التوافقيات الفردية. السلك الحقيقي يحجب أعلى هذه التوافقيات، وهذا أحد أسباب استدارة حواف النبضات السريعة. ### تموّج جيبس في المرشحات + حين يبني مهندس مرشحًا يقطع الاستجابة الترددية فجأة عند حدّ معيّن، يرث المرشّح التموّج الزائد نفسه قرب الحواف الحادة. لهذا يُدرّج مصمّمو المرشحات معاملاتهم بدل قطعها فجأة. diff --git a/content/lessons/engineering/fourier-series/en.md b/content/lessons/engineering/fourier-series/en.md index 1940ee3b..4719587b 100644 --- a/content/lessons/engineering/fourier-series/en.md +++ b/content/lessons/engineering/fourier-series/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Watch the curve start as one smooth sine wave. -2. Drag $N$ up. More sine terms get added, and the curve sprouts flatter tops and sharper shoulders, chasing a square wave. -3. Now drag $x$ to move along the curve. Notice the small overshoot that lingers near the jumps even at the highest $N$ — the Gibbs ripple. +1. Set $N$ to 1 and $x$ to 1.57. The curve is one smooth sine wave, and f(x) reads 1.2732 at its peak. +2. Drag $N$ up one step at a time to 11. More sine terms get added, and the curve sprouts flatter tops and sharper shoulders, chasing a square wave. At $x$ = 1.57, f(x) hops to 0.8488, 1.1035, 0.9216, 1.0631 and 0.9473 — above and below the flat top of 1, closer each time. +3. Keep $N$ at 11 and drag $x$ to 0.26, just right of the jump at 0. f(x) reads 1.1813: a small overshoot that lingers near the jumps even at the highest $N$ — the Gibbs ripple. ## Real-life examples @@ -31,11 +31,11 @@ variables: 1. Using just the fundamental (N = 1), find $x$ where the wave reaches its peak value of about 1.27. 2. Push $N$ to the maximum (11) and find an $x$ close to a jump where the curve overshoots above 1.1, even though the flat top it's chasing is only 1. -3. Find an $x$ near a quarter of the way through the cycle where the partial sum lands close to the flat-top value of 1. +3. Put $x$ a quarter of the way through the cycle (about 1.57) and raise $N$ until the partial sum lands within 0.08 of the flat-top value of 1. ## Intuition -A digital clock pulse that looks like a clean square wave on an oscilloscope is really built from many pure sine waves added together, one at the base frequency and others at odd multiples of it. The curve on screen starts as a single sine wave; drag $N$, the highest harmonic included, up and it sprouts sharper shoulders and flatter tops with each added term, chasing the square-wave shape. +A digital clock pulse that looks like a clean square wave on an oscilloscope is really built from many pure sine waves added together, one at the base frequency and others at odd multiples of it. At $N = 1$ the curve on screen is a single sine wave; drag $N$, the highest harmonic included, up and it sprouts sharper shoulders and flatter tops with each added term, chasing the square-wave shape. Only odd harmonics show up in this sum, and each one is weaker than the last: the third harmonic stands a third as tall as the first, the fifth a fifth as tall, and so on. Even at $N = 11$ the corners still overshoot and ring a little before settling — drag $x$ near a jump to see it — the famous Gibbs ripple, which never shrinks below about 9% of the jump's height, no matter how many harmonics you add. @@ -53,18 +53,22 @@ The partial sums never converge uniformly at a jump: the overshoot approaches a 1. Each harmonic's amplitude comes from matching the square wave against $\sin(kx)$; odd harmonics survive, even ones cancel exactly. 2. The full, infinite series reconstructs the square wave exactly everywhere except at the jumps themselves. -3. Keeping only the first $N$ terms gives the partial sum plotted here — the visible ripple is what got left out. +3. Keeping only the harmonics up to $N$ gives the partial sum plotted here — the visible ripple is what got left out. ## Real world ### Sound and timbre + A violin and a flute playing the same note share a fundamental frequency but differ in their harmonic amplitudes; that mix of harmonics is what makes them sound different. ### JPEG and MP3 compression + Both formats break a signal into frequency components and keep only the ones a viewer or listener can actually perceive, discarding the rest — a direct descendant of this decomposition. ### Digital clock signals + A "square" clock pulse in a circuit is really a fundamental plus a ladder of odd harmonics; a real wire filters out the highest ones, which is one reason fast clock edges round off. ### Gibbs ripple in filters + Any filter built by truncating a frequency response inherits the same overshoot near sharp edges, which is why filter designers taper their coefficients instead of cutting them off sharply. diff --git a/content/lessons/engineering/fourier-series/lesson.yaml b/content/lessons/engineering/fourier-series/lesson.yaml index 5d9c690a..ccb737a5 100644 --- a/content/lessons/engineering/fourier-series/lesson.yaml +++ b/content/lessons/engineering/fourier-series/lesson.yaml @@ -16,7 +16,7 @@ related: visualization: type: function-plot options: - expr: "4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))" + expr: '4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))' domain: [-7, 7] range: [-1.6, 1.6] mode: plain @@ -51,5 +51,5 @@ presets: x: 3 challenges: - check: abs(N-1)<0.5 and abs(4/pi*sin(x) - 1.27) < 0.05 - - check: "N>=11 and x>0 and x<1 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) > 1.1" - - check: "abs(x-1.5708)<0.05 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) > 0.92 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) < 1.08" + - check: 'N>=11 and x>0 and x<1 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) > 1.1' + - check: 'abs(x-1.5708)<0.05 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) > 0.92 and (4/pi*(sin(x) + (N >= 3 ? sin(3*x)/3 : 0) + (N >= 5 ? sin(5*x)/5 : 0) + (N >= 7 ? sin(7*x)/7 : 0) + (N >= 9 ? sin(9*x)/9 : 0) + (N >= 11 ? sin(11*x)/11 : 0))) < 1.08' diff --git a/content/lessons/engineering/gears-and-gear-ratios/ar.md b/content/lessons/engineering/gears-and-gear-ratios/ar.md index f13f2acb..1716b633 100644 --- a/content/lessons/engineering/gears-and-gear-ratios/ar.md +++ b/content/lessons/engineering/gears-and-gear-ratios/ar.md @@ -18,13 +18,13 @@ variables: ## Try it -1. حرّك $N_2$ (أسنان الترس المُقاد) لأعلى بينما يبقى $N_1$ صغيرًا. راقب $\omega_2$ وهو ينخفض و$\tau_2$ وهو يرتفع، فالترس الصغير يدير الآن ترسًا أكبر منه بكثير. -2. حرّك $\omega_1$ (سرعة القائد) صعودًا وهبوطًا. يتسارع الترسان معًا أو يتباطآن معًا، لكن نسبتهما لا تتغيّر أبدًا. -3. ارفع $\tau_1$ (عزم القائد). ينمو عزم الخرج $\tau_2$ بالمقدار نفسه الذي تنمو به نسبة التروس، دون أن يتغيّر شيء في الأسنان نفسها. +1. أبقِ $N_1$ عند 20 وارفع $N_2$ (أسنان الترس المُقاد) من 20 إلى 60. تصير نسبة التروس 1 : 3، وتنخفض سرعة الترس المُقاد $\omega_2$ من 300 دورة في الدقيقة إلى 100، ويرتفع عزمه $\tau_2$ من 20 نيوتن·متر إلى 60، فالترس الصغير يدير الآن ترسًا أكبر منه بكثير. +2. أبقِ $N_2$ عند 60 وارفع $\omega_1$ (سرعة القائد) من 300 دورة في الدقيقة إلى 600. تتضاعف سرعة الترس المُقاد أيضًا، من 100 إلى 200 دورة في الدقيقة، لكن نسبة التروس تبقى 1 : 3. +3. ارفع $\tau_1$ (عزم القائد) من 20 نيوتن·متر إلى 40. يرتفع عزم الترس المُقاد $\tau_2$ من 60 نيوتن·متر إلى 120، أي ثلاثة أضعاف $\tau_1$ دائمًا، لأن الأسنان لم يتغيّر فيها شيء. ## Real-life examples -1. **صعود تلّة على دراجة.** ادفس بمعدل 60 دورة في الدقيقة بعزم رجل نحو 20 نيوتن·متر، عبر ترس أمامي صغير بـ14 سنًّا يدير ترسًا خلفيًّا كبيرًا بـ42 سنًّا. يتضاعف العزم عند العجلة ثلاث مرات (إلى نحو 60 نيوتن·متر) وتنخفض سرعتها إلى 20 دورة في الدقيقة، وهذا بالضبط ما تحتاجه في صعود شديد الانحدار. +1. **صعود تلّة على دراجة.** أدِر الدوّاستين 60 دورة في الدقيقة، وساقاك تعطيان عزمًا نحو 20 نيوتن·متر، عبر ترس أمامي صغير بـ14 سنًّا يدير ترسًا خلفيًّا كبيرًا بـ42 سنًّا. يتضاعف العزم عند العجلة ثلاث مرات (إلى نحو 60 نيوتن·متر) وتنخفض سرعتها إلى 20 دورة في الدقيقة، وهذا بالضبط ما تحتاجه في صعود شديد الانحدار. 2. **ناقل الحركة النهائي في السيارة.** محرك يدور بـ3000 دورة في الدقيقة عبر ترس صغير بـ10 أسنان يدير حلقة كبيرة بـ40 سنًّا (بعزم نحو 150 نيوتن·متر عند الترس الصغير). تُقسَم السرعة عند العجلات إلى الربع فتصبح 750 دورة في الدقيقة، بينما يتضاعف العزم إلى نحو 600 نيوتن·متر. 3. **خلاط مطبخ يُدار باليد.** أدر المقبض بـ60 دورة في الدقيقة بجهد يد نحو 5 نيوتن·متر، عبر ترس مقبض بـ48 سنًّا يدير ترس خفّاقة بـ12 سنًّا. تدور الخفّاقات أسرع أربع مرات، أي 240 دورة في الدقيقة، لكن بربع العزم فقط. @@ -38,7 +38,7 @@ variables: تخيّل ترسين متشابكين، تتداخل أسنانهما بحيث لا يستطيع أيّ منهما الانزلاق متجاوزًا الآخر. أيّ طول من حافة الأسنان يمرّ من نقطة التماس على الترس الصغير كلّ ثانية، لا بدّ أن يمرّ المقدار نفسه على الترس الكبير، فهذه هي الطريقة الوحيدة لتبقى الأسنان متشابكة. لذلك يجب على الترس الصغير القليل الأسنان أن يدور مرّات أكثر بكثير من الترس الكبير الكثير الأسنان، فقط ليُمرّر عدد الأسنان نفسه عبر نقطة التماس. لذلك $\omega_2 = \omega_1 N_1/N_2$. -والآن تخيّل أنك تدفع مقبضًا يدير الترس القائد. إن كان الترس المُقاد يدور مرّات أقلّ مقابل كلّ دورة للقائد، فهو أيضًا يدفع للخلف بقوة أكبر مقابل كلّ دفعة تعطيها، فلا شيء يُخلَق من العدم. ولهذا بالضبط تدفس الدراجة في «الغيار المنخفض» بسرعة لكنها تصعد ببطء وقوة، بينما «الغيار العالي» يحتاج دورات أقلّ للعجلة لكنه يتطلّب قوة رجل أكبر بكثير. +والآن تخيّل أنك تدفع مقبضًا يدير الترس القائد. إن كان الترس المُقاد يدور مرّات أقلّ مقابل كلّ دورة للقائد، فهو أيضًا يدفع للخلف بقوة أكبر مقابل كلّ دفعة تعطيها، فلا شيء يُخلَق من العدم. ولهذا تدور الدوّاستان بسرعة في «الغيار المنخفض» والدراجة تصعد ببطء وقوة، أما في «الغيار العالي» فتدور الدوّاستان أقلّ مقابل كلّ دورة للعجلة، لكن ساقيك تبذلان قوة أكبر بكثير. ## Formal @@ -59,13 +59,17 @@ variables: ## Real world ### مُغيّرات سرعة الدراجة + الانتقال إلى ترس خلفي أكبر يرفع $N_2$، فيزيد عزم العجلة للصعود. الانتقال إلى ترس أصغر يرفع السرعة للسير السريع على الأرض المستوية. ### ناقلات حركة السيارات والشاحنات + تستخدم الغيارات المنخفضة نسبة أسنان كبيرة لمضاعفة العزم عند الانطلاق من السكون، بينما تخفّض الغيارات العالية النسبة قرب 1:1 حتى لا يضطرّ المحرك للدوران بسرعة مفرطة عند سرعة الطريق السريع. ### الساعات + تستخدم الساعة الميكانيكية سلسلة طويلة من نسب التروس الصغيرة لتحويل دورة واحدة بطيئة (عقرب الساعات) إلى دورات كثيرة سريعة (عقرب الثواني)، وكلّ مرحلة تضاعف السرعة قليلًا. ### توربينات الرياح + تفعل علبة تروس التوربين عكس ما تفعله في السيارة. تأخذ دوران الريش البطيء العالي العزم، بضع دورات في الدقيقة فقط، وتُسرِّعه عبر مراحل تروس كثيرة إلى آلاف الدورات في الدقيقة التي يحتاجها المولّد. diff --git a/content/lessons/engineering/gears-and-gear-ratios/en.md b/content/lessons/engineering/gears-and-gear-ratios/en.md index 6244699f..e2ecd8ee 100644 --- a/content/lessons/engineering/gears-and-gear-ratios/en.md +++ b/content/lessons/engineering/gears-and-gear-ratios/en.md @@ -1,7 +1,7 @@ --- title: Gears and gear ratios summary: >- - A small gear spinning inside a big one always trades speed for turning + A small gear turning a big one always trades speed for turning force — this lesson shows exactly how much of each you get. parameters: N1: N₁ — teeth on the driver gear @@ -19,9 +19,9 @@ variables: ## Try it -1. Drag $N_2$ (teeth on the driven gear) up while $N_1$ stays small. Watch $\omega_2$ fall and $\tau_2$ climb — the smaller gear is now driving a much bigger one. -2. Drag $\omega_1$ (driver speed) up and down. Both gears speed up or slow down together, but their ratio never changes. -3. Drag $\tau_1$ (driver torque) up. The output torque $\tau_2$ grows by exactly the same factor as the gear ratio — nothing about the teeth changed. +1. Leave $N_1$ at 20 and drag $N_2$ (teeth on the driven gear) up from 20 to 60. The gear ratio reads 1 : 3, the driven speed $\omega_2$ falls from 300 rpm to 100 rpm, and the driven torque $\tau_2$ climbs from 20 N·m to 60 N·m — the smaller gear is now driving a much bigger one. +2. Keep $N_2$ at 60 and raise $\omega_1$ (driver speed) from 300 rpm to 600 rpm. The driven speed doubles too, from 100 rpm to 200 rpm, but the gear ratio stays 1 : 3. +3. Raise $\tau_1$ (driver torque) from 20 N·m to 40 N·m. The driven torque $\tau_2$ goes from 60 N·m to 120 N·m — always three times $\tau_1$, because nothing about the teeth changed. ## Real-life examples @@ -60,13 +60,17 @@ Real gearboxes lose a few percent of power to friction between the teeth and in ## Real world ### Bicycle derailleurs + Shifting to a bigger rear sprocket increases $N_2$, raising the torque at the wheel for climbing; shifting to a smaller one raises speed for flat, fast riding. ### Car and truck transmissions + Low gears use a large tooth-count ratio to multiply torque for starting from a stop; high gears drop the ratio toward 1:1 so the engine does not have to spin absurdly fast at highway speed. ### Clocks and watches + A mechanical clock uses a long chain of small gear ratios to turn one slow rotation (the hour hand) into many fast ones (the second hand), each stage multiplying the speed a little. ### Wind turbines + A turbine's gearbox does the opposite of a car's: it takes the slow, high-torque turn of the blades (a few rpm) and speeds it up, through many gear stages, to the thousands of rpm a generator needs. diff --git a/content/lessons/engineering/gears-and-gear-ratios/lesson.yaml b/content/lessons/engineering/gears-and-gear-ratios/lesson.yaml index 86490f35..7bdd74f8 100644 --- a/content/lessons/engineering/gears-and-gear-ratios/lesson.yaml +++ b/content/lessons/engineering/gears-and-gear-ratios/lesson.yaml @@ -22,13 +22,13 @@ parameters: max: 60 step: 1 value: 20 - unit: "" + unit: '' N2: min: 8 max: 60 step: 1 value: 20 - unit: "" + unit: '' w1: min: 10 max: 3200 diff --git a/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/ar.md b/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/ar.md index 62d15eba..f5279eff 100644 --- a/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/ar.md +++ b/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/ar.md @@ -13,36 +13,36 @@ variables: - d_eff — المسافة من نقطة الارتكاز (المحور) إلى موضع دفعك - F_load — وزن الحمل الذي يُرفع - d_load — المسافة من نقطة الارتكاز إلى الحمل - - M — القدرة الميكانيكية، أي كم مرة تضاعف الرافعة قوتك + - M — الفائدة الآلية، أي كم مرة تضاعف الرافعة قوتك --- ## Try it -1. حرّك $d_{eff}$ (بُعد يدك عن نقطة الارتكاز) إلى الخارج. راقب $F_{eff}$، القوة التي تحتاجها، وهي تنخفض، بينما يرتفع $M$. -2. الآن حرّك $d_{load}$ لتقترب أكثر من نقطة الارتكاز بدلًا من ذلك. يحدث الأمر نفسه، يرتفع $M$، ويصبح الرفع أسهل. -3. ارفع $h$ (الارتفاع المطلوب رفع الحمل إليه). القوة $F_{eff}$ لا تتغيّر أبدًا، لكن المسافة التي يجب أن تقطعها يدك تكبر بالمعامل نفسه $M$، فالآلة لا تمنحك شيئًا من العدم أبدًا. +1. ابدأ بحمل وزنه 800 نيوتن و$d_{load}$ = 0.3 متر و$d_{eff}$ = 1.5 متر: الفائدة الآلية $M$ تساوي 5× وقوة الجهد $F_{eff}$ تساوي 160 نيوتن. أبعِد $d_{eff}$ (بُعد يدك عن نقطة الارتكاز) إلى 3 أمتار. يرتفع $M$ إلى 10×، وتنخفض $F_{eff}$، وهي القوة التي تحتاجها، إلى 80 نيوتن. +2. أعِد $d_{eff}$ إلى 1.5 متر، ثم قرّب $d_{load}$ من نقطة الارتكاز، من 0.3 متر إلى 0.15 متر. يحدث الأمر نفسه: يرتفع $M$ إلى 10×، وتنخفض قوة الجهد إلى 80 نيوتن. +3. أعِد $d_{load}$ إلى 0.3 متر، وارفع $h$ (الارتفاع المطلوب رفع الحمل إليه) من 10 سم إلى 20 سم. تبقى القوة $F_{eff}$ عند 160 نيوتن، لكن المسافة التي تقطعها يدك تزداد من 50 سم إلى 100 سم، فهي دائمًا $M$ مضروبًا في $h$. الآلة لا تعطيك شيئًا بلا مقابل. ## Real-life examples -1. **عتلة ترفع صخرة وزنها 150 كيلوغرامًا.** بجعل نقطة الارتكاز على بُعد 5 سم فقط من الصخرة (≈1500 نيوتن) ويدك على بُعد 90 سم، تبلغ القدرة الميكانيكية 18، فلا يلزم سوى نحو 83 نيوتن من الدفع، لكن طرفك يقطع 54 سم ليرفع الصخرة 3 سم فقط. -2. **عربة يد محمّلة.** بوجود نحو 600 نيوتن من التراب على بُعد 30 سم من العجلة (نقطة الارتكاز) ويداك على بُعد 1.2 متر، تبلغ القدرة الميكانيكية 4. تدفع بقوة 150 نيوتن فقط، لكن يديك تقطعان 60 سم لرفع الحمل 15 سم. -3. **عتلة طويلة تحت زاوية سيارة (نحو 3000 نيوتن).** بجعل محور العتلة على بُعد 10 سم من السيارة ويداك على بُعد مترين، تبلغ القدرة الميكانيكية 20 ولا يلزم سوى نحو 150 نيوتن من الدفع، مقابل أن يتأرجح طرفك 160 سم لرفع السيارة 8 سم فقط. +1. **عتلة ترفع صخرة وزنها 150 كيلوغرامًا.** بجعل نقطة الارتكاز على بُعد 5 سم فقط من الصخرة (≈1500 نيوتن) ويدك على بُعد 90 سم، تبلغ الفائدة الآلية 18، فلا يلزم سوى نحو 83 نيوتن من الدفع، لكن طرفك يقطع 54 سم ليرفع الصخرة 3 سم فقط. +2. **عربة يد محمّلة.** بوجود نحو 600 نيوتن من التراب على بُعد 30 سم من العجلة (نقطة الارتكاز) ويداك على بُعد 1.2 متر، تبلغ الفائدة الآلية 4. تدفع بقوة 150 نيوتن فقط، لكن يديك تقطعان 60 سم لرفع الحمل 15 سم. +3. **عتلة طويلة تحت زاوية سيارة (نحو 3000 نيوتن).** بجعل محور العتلة على بُعد 10 سم من السيارة ويداك على بُعد مترين، تبلغ الفائدة الآلية 20 ولا يلزم سوى نحو 150 نيوتن من الدفع، مقابل أن يتأرجح طرفك 160 سم لرفع السيارة 8 سم فقط. ## Test yourself 1. اختر $F_{load}$ و$d_{load}$ و$d_{eff}$ بحيث تكون قوة الجهد اللازمة نحو 100 نيوتن. -2. اصنع رافعة قدرتها الميكانيكية أكبر من 15، بينما ترفع حِملًا أثقل من 1000 نيوتن. -3. اصنع رافعة قدرتها الميكانيكية أقلّ من 1.5، تحتاج مع ذلك قوة جهد لا تقلّ عن 70% من وزن الحمل. +2. اصنع رافعة فائدتها الآلية أكبر من 15، وهي ترفع حِملًا أثقل من 1000 نيوتن. +3. اصنع رافعة فائدتها الآلية أقلّ من 1.5، تحتاج مع ذلك قوة جهد لا تقلّ عن 70% من وزن الحمل. ## Intuition -الرافعة قضيب صلب متوازن على نقطة ارتكاز. ادفع أحد طرفيها للأسفل فيدفع الطرف الآخر للأعلى. ما يقرّر مقدار القوة التي تحتاجها ليس الوزن وحده، بل بُعد كلّ طرف عن المحور. ضع يديك على بُعد ضعف بُعد الحمل عن نقطة الارتكاز، ولن تحتاج إلا نصف القوة، فالقضيب يتصرّف كمضاعِف للمسافة يتحوّل إلى مقسِّم للقوة. +الرافعة قضيب صلب متوازن على نقطة ارتكاز. ادفع أحد طرفيها للأسفل فيدفع الطرف الآخر للأعلى. ما يقرّر مقدار القوة التي تحتاجها ليس الوزن وحده، بل بُعد كلّ طرف عن المحور. ضع يديك على بُعد ضعف بُعد الحمل عن نقطة الارتكاز، فلا تحتاج إلا إلى نصف القوة: القضيب يضاعف المسافة، وفي المقابل يقسم القوة. -لكن لا شيء مجانيّ. حرّك الطرف البعيد لأسفل بمقدار معيّن، والطرف القريب (الأقرب ضعفين إلى المحور) لن يرتفع إلا نصف ذلك المقدار. فإذا كان ذراع الجهد أطول بـ18 مرة من ذراع الحمل، كما في مثال العتلة أعلاه، فأنت تدفع بقوة أقلّ 18 مرة، لكن عليك أيضًا أن تدفع مسافة أطول 18 مرة لترفع الصخرة الارتفاع نفسه. الرافعة تُبادل القوة بالمسافة، ولا تُلغي الشغل أبدًا. +لكن لا شيء مجانيّ. أنزِل الطرف البعيد مقدارًا معيّنًا، فلا يرتفع الطرف القريب (وهو على نصف البُعد من المحور) إلا نصف ذلك المقدار. فإذا كان ذراع الجهد أطول بـ18 مرة من ذراع الحمل، كما في مثال العتلة أعلاه، فأنت تدفع بقوة أقلّ 18 مرة، لكن عليك أيضًا أن تدفع مسافة أطول 18 مرة لترفع الصخرة الارتفاع نفسه. الرافعة تُبادل القوة بالمسافة، ولا تُلغي الشغل أبدًا. ## Formal -موازنة أثر الدوران (العزم) لكلا الطرفين حول نقطة الارتكاز تعطي $F_{eff}\,d_{eff} = F_{load}\,d_{load}$، ومن ثمّ فإن القدرة الميكانيكية هي $M = \frac{d_{eff}}{d_{load}} = \frac{F_{load}}{F_{eff}}$. نسبة طولَي الذراعين تساوي نسبة القوتين مقلوبةً تمامًا. +موازنة أثر الدوران (العزم) لكلا الطرفين حول نقطة الارتكاز تعطي $F_{eff}\,d_{eff} = F_{load}\,d_{load}$، ومن ثمّ فإن الفائدة الآلية هي $M = \frac{d_{eff}}{d_{load}} = \frac{F_{load}}{F_{eff}}$. نسبة طولَي الذراعين تساوي نسبة القوتين مقلوبةً تمامًا. إعادة الترتيب تعطي القوة التي تحتاج فعليًّا إلى توفيرها. $F_{eff} = \frac{F_{load}}{M}$. ويعمل نظام البكرات بالقاعدة نفسها تمامًا، لكن مقيسة بطول الحبل المسحوب بدل طول الذراع. سحب $M$ من الأمتار من الحبل مقابل كلّ متر يرتفعه الحمل يحتاج قوة أقلّ $M$ مرة لحمله. @@ -53,19 +53,23 @@ variables: ## Derivation 1. الرافعة الصلبة المتوازنة لها أثر دوران متساوٍ على جانبَي نقطة الارتكاز. دفعُ الجهد مضروبًا في طول ذراعه يساوي وزن الحمل مضروبًا في طول ذراعه، $F_{eff}\,d_{eff} = F_{load}\,d_{load}$. -2. قسمة الطرفين تعيد ترتيب هذا إلى القدرة الميكانيكية، $M = \frac{d_{eff}}{d_{load}} = \frac{F_{load}}{F_{eff}}$. كلما طال ذراع الجهد مقارنةً بذراع الحمل، كبُرت المضاعفة. -3. حلّ المعادلة مباشرة لإيجاد القوة الواجب توفيرها يعطي $F_{eff} = \frac{F_{load}}{M}$. قدرة ميكانيكية قدرها 10 تعني أن عُشر وزن الحمل فقط كافٍ لرفعه. +2. قسمة الطرفين تعيد ترتيب هذا إلى الفائدة الآلية، $M = \frac{d_{eff}}{d_{load}} = \frac{F_{load}}{F_{eff}}$. كلما طال ذراع الجهد مقارنةً بذراع الحمل، كبُرت المضاعفة. +3. حلّ المعادلة مباشرة لإيجاد القوة الواجب توفيرها يعطي $F_{eff} = \frac{F_{load}}{M}$. فائدة آلية قدرها 10 تعني أن عُشر وزن الحمل فقط كافٍ لرفعه. ## Real world ### العتلات وقضبان النزع -مسافة قصيرة من نقطة الارتكاز إلى الجسم العالق ومقبض طويل للدفع يمنحان قدرة ميكانيكية هائلة لنزع الصخور أو المسامير أو رفع زاوية سيارة. + +مسافة قصيرة من نقطة الارتكاز إلى الجسم العالق ومقبض طويل للدفع يمنحان فائدة آلية كبيرة جدًّا لنزع الصخور أو المسامير أو رفع زاوية سيارة. ### عربات اليد -تعمل العجلة كنقطة ارتكاز، فيجلس الحمل قريبًا منها بينما تدفع يداك من بعيد، فيستطيع شخص واحد رفع حِمل أثقل بكثير مما يستطيع حمله. -### بكرات الكتلة والحبل -كتلة وحبل بأربعة أجزاء حبل تحمل الحمل تمنح قدرة ميكانيكية قدرها 4، وهي المبادلة نفسها في الرافعة. سحب 4 أمتار من الحبل يرفع كتلة محرك مترًا واحدًا فقط، بقوة تساوي ربع وزنها. +تعمل العجلة كنقطة ارتكاز، فيكون الحمل قريبًا منها بينما تدفع يداك من بعيد، فيستطيع شخص واحد رفع حِمل أثقل بكثير مما يستطيع حمله. + +### مجموعات البكرات + +مجموعة بكرات يحمل الحملَ فيها أربعةُ أجزاء من الحبل تمنح فائدة آلية قدرها 4، وهي المبادلة نفسها في الرافعة. سحب 4 أمتار من الحبل يرفع محرّك سيارة مترًا واحدًا فقط، بقوة تساوي ربع وزنه. + +### أرجوحة الميزان والمقصّات -### الأراجيح والمقصّات -تُوازن الأرجوحة شخصين بحاصل $F \cdot d$ متساوٍ على كلّ جانب. تستخدم المقصّات والكمّاشات فكًّا قصيرًا ومقبضًا طويلًا حتى تتحوّل قبضة يد خفيفة إلى قوة قصّ أو إمساك شديدة. +تُوازن أرجوحة الميزان شخصين بحاصل $F \cdot d$ متساوٍ على كلّ جانب. تستخدم المقصّات والكمّاشات فكًّا قصيرًا ومقبضًا طويلًا حتى تتحوّل قبضة يد خفيفة إلى قوة قصّ أو إمساك شديدة. diff --git a/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/en.md b/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/en.md index cc85b595..776ee297 100644 --- a/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/en.md +++ b/content/lessons/engineering/levers-pulleys-and-mechanical-advantage/en.md @@ -13,14 +13,14 @@ variables: - d_eff — the distance from the fulcrum (pivot) to where you push - F_load — the weight of the load being lifted - d_load — the distance from the fulcrum to the load - - "M — the mechanical advantage: how many times the lever multiplies your force" + - 'M — the mechanical advantage: how many times the lever multiplies your force' --- ## Try it -1. Drag $d_{eff}$ (how far your hand is from the fulcrum) outward. Watch $F_{eff}$, the force you need, fall — and $M$ climb. -2. Now drag $d_{load}$ closer to the fulcrum instead. The same thing happens: $M$ rises, and lifting gets easier. -3. Drag $h$ (how high the load must rise) up. The force $F_{eff}$ never changes, but the distance your hand must travel grows by the same factor $M$ — the machine never gives you something for nothing. +1. Start with an 800 N load, $d_{load}$ = 0.3 m and $d_{eff}$ = 1.5 m: the mechanical advantage $M$ reads 5× and the effort force $F_{eff}$ 160 N. Drag $d_{eff}$ (how far your hand is from the fulcrum) out to 3 m. $M$ climbs to 10× and $F_{eff}$, the force you need, falls to 80 N. +2. Set $d_{eff}$ back to 1.5 m and drag $d_{load}$ closer to the fulcrum instead, from 0.3 m to 0.15 m. The same thing happens: $M$ rises to 10×, and the effort force falls to 80 N. +3. Set $d_{load}$ back to 0.3 m and raise $h$ (how high the load must rise) from 10 cm to 20 cm. The force $F_{eff}$ stays at 160 N, but the distance your hand must travel grows from 50 cm to 100 cm — always $M$ times $h$. The machine never gives you something for nothing. ## Real-life examples @@ -59,13 +59,17 @@ Real levers and pulleys lose a little of this advantage to friction at the pivot ## Real world ### Crowbars and pry bars + A short distance from the fulcrum to a stuck object and a long handle to push gives enormous mechanical advantage for prying up rocks, nails or car corners. ### Wheelbarrows + The wheel acts as the fulcrum, so the load sits close to it while your hands push from far away, letting one person lift a load that would be far too heavy to carry. ### Block-and-tackle pulleys + A block and tackle with four rope segments supporting the load gives a mechanical advantage of 4, the same trade as a lever: pulling 4 metres of rope lifts an engine block just 1 metre, with a quarter of its weight in force. ### Seesaws and scissors + A seesaw balances two people at equal $F \cdot d$ on each side; scissors and pliers use a short jaw and a long handle so a light hand-squeeze becomes a strong cutting or gripping force. diff --git a/content/lessons/engineering/low-pass-filter/ar.md b/content/lessons/engineering/low-pass-filter/ar.md index c00ae47f..8827247d 100644 --- a/content/lessons/engineering/low-pass-filter/ar.md +++ b/content/lessons/engineering/low-pass-filter/ar.md @@ -19,27 +19,27 @@ charts: ## Try it -1. اضبط تردد الإشارة منخفضًا وراقب الصندوق: تغادر موجة الخرج بكامل تأرجحها تقريبًا — المرشّح يُمرّر الترددات المنخفضة مباشرة. -2. ارفع $f_c$ (تردد القطع). تنزلق الزاوية كلها يمينًا، فتسمح بمرور ترددات أعلى قبل أن يبدأ الانحدار. -3. حرّك $x$، تردد الإشارة، عبر الزاوية قرب $f_c$. تنعصر موجة الخرج وتتخلف عن الدخل — الكسب يهبط، وإزاحة الطور تنمو نحو −90°. +1. ابدأ بتردد الإشارة عند 20 هرتز و$f_c$ عند 100 هرتز، وراقب الصندوق: تخرج الموجة ومعها 98.1% من تأرجحها. المرشّح يُمرّر الترددات المنخفضة كما هي تقريبًا. +2. ارفع $x$ (تردد الإشارة) إلى 200 هرتز: يخرج 44.7% فقط من التأرجح (−7 ديسيبل). ارفع الآن $f_c$ (تردد القطع) من 100 هرتز إلى 400 هرتز. ينتقل ركن المنحنى كله يمينًا، وتخرج إشارة 200 هرتز نفسها ومعها 89.4% من تأرجحها (−1 ديسيبل). +3. أعِد $f_c$ إلى 100 هرتز وحرّك $x$ عبر الركن. عند 100 هرتز تُظهر القراءات 70.7% و−3 ديسيبل و φ = −45°، وعند 1000 هرتز تُظهر 10% و−20 ديسيبل و φ = −84°. تصغر موجة الخرج وتتأخّر عن الدخل: الكسب يهبط، وإزاحة الطور تقترب من −90°. ## Real-life examples -1. **مقبض حدة يركّز على الجهير.** اضبط تردد القطع قرب 100 هرتز، فتمرّ نغمة جهير 50 هرتز كما هي تقريبًا، لأنها تقع دون تردد القطع. -2. **قناة صوت محدودة النطاق الترددي.** قناة تحتاج فقط لنقل الكلام ترشّح، في هذا النموذج المبسّط، ما فوق 300 هرتز تقريبًا. تخفت نغمة 800 هرتز كثيرًا، توفيرًا للنطاق الترددي. -3. **موزّع ترددات سماعة.** موزّع ترددات مكبّر الجهير، بتردد قطع قرب 150 هرتز، يمنع إشارة 1000 هرتز شبه تمامًا، فيحمي المكبّر من ترددات لا يستطيع إعادة إنتاجها جيدًا. +1. **مقبض حدة يركّز على الجهير.** اضبط تردد القطع قرب 100 هرتز، فتمرّ نغمة جهير 50 هرتز ومعها 89.4% من تأرجحها، لأنها تقع دون تردد القطع. +2. **قناة محدودة النطاق الترددي.** القناة التي تنقل نطاقًا ضيقًا فقط توفّر النطاق الترددي بحجب كل ما هو أعلى منه. في هذا النموذج المصغَّر تردد القطع 300 هرتز، فتخرج نغمة 800 هرتز ومعها 35.1% فقط من تأرجحها (خطوط الهاتف الحقيقية تقطع قرب 3400 هرتز). +3. **موزّع ترددات سماعة.** موزّع ترددات مكبّر الجهير، بتردد قطع قرب 150 هرتز، لا يُمرّر من إشارة 1000 هرتز إلا 14.8% من تأرجحها، فيحمي المكبّر من ترددات لا يستطيع إعادة إنتاجها جيدًا. ## Test yourself -1. اضبط تردد الإشارة مساويًا لتردد القطع. يجب أن ينخفض الكسب 3 ديسيبل بالضبط، وهذا تعريف تردد القطع. +1. اضبط تردد الإشارة مساويًا لتردد القطع. يجب أن ينخفض الكسب نحو 3 ديسيبل، وهذا تعريف تردد القطع. 2. جِد تردد إشارة أعلى من 10 أضعاف تردد القطع، حيث ينخفض الكسب أكثر من 20 ديسيبل. 3. اختر تردد قطع لا يقل عن 200 هرتز، وجِد تردد إشارة يدفع إزاحة الطور إلى نحو −75°. ## Intuition -أدر مقبض الحدة إلى الأسفل في جهاز استريو، فيخفت بريق الصنوج بينما يبقى خط الجهير بالجهارة نفسها، وهذا المقبض يضبط بهدوء تردد قطع مرشّح كهذا. على الشاشة تدخل الموجة الصندوق بكامل تأرجحها وتخرج معصورة: يحتفظ الخرج بمعظمها عند $x$ المنخفض، تردد الإشارة، ثم يخبو سريعًا كلما تجاوز $x$ قيمة $f_c$، تردد القطع المضبوط بالمنزلق — وملحق «بود» الصغير يسجل الهبوط نفسه بالديسيبل. +أدر مقبض الحدة إلى الأسفل في جهاز استريو، فيخفت بريق الصنوج بينما يبقى خط الجهير بالجهارة نفسها، فهذا المقبض يغيّر، من دون أن تنتبه، تردد القطع في مرشّح كهذا. على الشاشة تدخل الموجة الصندوق بكامل تأرجحها وتخرج أصغر: يحتفظ الخرج بمعظمها حين يكون $x$، تردد الإشارة، منخفضًا، ثم يخفت سريعًا كلما تجاوز $x$ قيمة $f_c$، تردد القطع الذي يضبطه المنزلق. ورسم «بود» الصغير يسجّل الهبوط نفسه بالديسيبل. -اسحب $f_c$ لأعلى فتنزلق الزاوية كلها يمينًا، فتسمح بمرور ترددات أعلى قبل أن يبدأ الانحدار. إلى جانب تغيّر مستوى الصوت، يؤخّر المرشّح الإشارة أيضًا. يُظهر مخطط الطور أدناه ذلك التأخير ينمو من قرب 0° عند الترددات المنخفضة نحو −90° حين يكون التردد أعلى بكثير من $f_c$. +اسحب $f_c$ لأعلى فينتقل ركن المنحنى كله يمينًا، فتسمح بمرور ترددات أعلى قبل أن يبدأ الانحدار. إلى جانب تغيّر مستوى الصوت، يؤخّر المرشّح الإشارة أيضًا. يُظهر مخطط الطور أدناه ذلك التأخير ينمو من قرب 0° عند الترددات المنخفضة نحو −90° حين يكون التردد أعلى بكثير من $f_c$. ## Formal @@ -60,13 +60,17 @@ charts: ## Real world ### الدارات RC + توصيل مقاومة ومكثّف معًا يشكّل هذا المرشّح بعينه، وتحدّد قيمتاهما $f_c$. راجع درس الدارة RC لترى كيف تجتمع R وC في ذلك الرقم الواحد. ### مقابض الحدة ونغمة الصوت + مقبض الحدة في جهاز استريو أو مضخّم غيتار يزيح تردد قطع مرشّح تمرير منخفض، فيتيح لك ضبط كمية الترددات العالية التي تبقى. -### الترشيح المضاد للتماثل قبل أخذ العينات +### الترشيح قبل أخذ العينات لمنع التردد الشبح + يضع كل محوّل من التناظري إلى الرقمي مرشّح تمرير منخفض أمام أخذ العينات لإزالة الترددات التي قد تتحوّل إلى نغمات زائفة لولا ذلك. ### موزّعات ترددات السماعات + يرسل موزّع ترددات السماعة الترددات المنخفضة فقط إلى مكبّر الجهير عبر مرشّح تمرير منخفض، فيحميه من ترددات عالية لا يستطيع إعادة إنتاجها جيدًا. diff --git a/content/lessons/engineering/low-pass-filter/en.md b/content/lessons/engineering/low-pass-filter/en.md index b09e0f75..9ca02442 100644 --- a/content/lessons/engineering/low-pass-filter/en.md +++ b/content/lessons/engineering/low-pass-filter/en.md @@ -20,19 +20,19 @@ charts: ## Try it -1. Set the signal frequency low and watch the box: the output wave leaves with nearly its full swing — the filter waves the lows straight through. -2. Drag $f_c$ (cutoff frequency) up. The whole corner slides right, letting higher frequencies through before the rolloff starts. -3. Now drag $x$ (signal frequency) across the corner near $f_c$. The output wave squashes and slips behind the input — gain falling, phase shift growing toward −90°. +1. Start with the signal frequency at 20 Hz and $f_c$ at 100 Hz, and watch the box: the output wave leaves with 98.1% of its swing — the filter waves the lows straight through. +2. Raise $x$ (signal frequency) to 200 Hz: only 44.7% of the swing gets out (−7 dB). Now drag $f_c$ (cutoff frequency) up from 100 Hz to 400 Hz. The whole corner slides right, and the same 200 Hz signal now leaves with 89.4% of its swing (−1 dB). +3. Set $f_c$ back to 100 Hz and drag $x$ across the corner. At 100 Hz the readouts show 70.7%, −3 dB and φ = −45°; at 1000 Hz they show 10%, −20 dB and φ = −84°. The output wave squashes and slips behind the input — gain falling, phase shift growing toward −90°. ## Real-life examples -1. **A bass-focused tone control.** Setting the cutoff near 100 Hz lets a 50 Hz bass note pass through almost untouched, since it sits below the cutoff. -2. **A bandwidth-limited voice channel.** A channel that only needs to carry speech filters out content above roughly 300 Hz in this simplified model, cutting an 800 Hz tone down substantially to save bandwidth. -3. **A speaker crossover.** A woofer's crossover, cutting off around 150 Hz, blocks a 1,000 Hz signal almost entirely, protecting the woofer from frequencies it cannot reproduce well. +1. **A bass-focused tone control.** Setting the cutoff near 100 Hz lets a 50 Hz bass note pass through with 89.4% of its swing, since it sits below the cutoff. +2. **A bandwidth-limited channel.** A channel that carries only a narrow band saves bandwidth by filtering out everything higher. In this scaled-down model the cutoff is 300 Hz, and an 800 Hz tone comes out with only 35.1% of its swing (real telephone lines cut off near 3,400 Hz). +3. **A speaker crossover.** A woofer's crossover, cutting off around 150 Hz, lets only 14.8% of a 1,000 Hz signal's swing through, protecting the woofer from frequencies it cannot reproduce well. ## Test yourself -1. Set the signal frequency equal to the cutoff frequency: the gain should drop by exactly 3 dB, the definition of the cutoff. +1. Set the signal frequency equal to the cutoff frequency: the gain should drop by about 3 dB, the definition of the cutoff. 2. Find a signal frequency more than 10 times the cutoff frequency where the gain has dropped by over 20 dB. 3. Using a cutoff of at least 200 Hz, find a signal frequency that pushes the phase shift to about −75°. @@ -61,13 +61,17 @@ A single resistor-capacitor stage like this one rolls off at $-20$ dB per decade ## Real world ### RC circuits + A single resistor and capacitor wired together form exactly this filter, with $f_c$ set by their values — see the rc-circuit lesson for how R and C combine into that one number. ### Treble and tone controls + The treble knob on a stereo or guitar amp shifts a low-pass filter's cutoff, letting you dial how much of the high end survives. ### Anti-aliasing before sampling + Every analogue-to-digital converter puts a low-pass filter in front of the sampler to remove frequencies that would otherwise alias into false tones. ### Speaker crossovers + A loudspeaker crossover sends only the low frequencies to the woofer with a low-pass filter, protecting it from high frequencies it cannot reproduce well. diff --git a/content/lessons/engineering/low-pass-filter/lesson.yaml b/content/lessons/engineering/low-pass-filter/lesson.yaml index 60a14f63..b9c8ac9f 100644 --- a/content/lessons/engineering/low-pass-filter/lesson.yaml +++ b/content/lessons/engineering/low-pass-filter/lesson.yaml @@ -28,7 +28,7 @@ parameters: min: 1 max: 1000 step: 1 - value: 100 + value: 20 variables: - H - f_c diff --git a/content/lessons/engineering/pid-control/ar.md b/content/lessons/engineering/pid-control/ar.md index 669f95c9..989c02da 100644 --- a/content/lessons/engineering/pid-control/ar.md +++ b/content/lessons/engineering/pid-control/ar.md @@ -19,25 +19,25 @@ variables: ## Try it -1. راقب $x$ وهي تطارد $r$. ما دام $K_i$ عند الصفر، تستقرّ $x$ قبل $r$ بقليل. -2. ارفع $K_p$. تستجيب $x$ أسرع وتستقرّ أقرب إلى $r$، لكن تبقى فجوة دائمًا. -3. ارفع $K_i$ من الصفر. يبدأ المتحكّم بإغلاق تلك الفجوة الأخيرة، وتستقرّ $x$ أخيرًا عند $r$ تمامًا. لكن ارفعه أكثر من اللازم، فتبدأ $x$ تتجاوز الهدف وتتذبذب. +1. اجعل $K_i$ يساوي 0، مع $K_p$ = 2 و$r$ = 1 و$\tau$ = 1، وراقب $x$ وهي تلحق بـ$r$. تستقرّ $x$ عند 0.667، أي دون الهدف 1. +2. ارفع $K_p$ إلى 9. تستجيب $x$ أسرع وتستقرّ أقرب إلى $r$، عند 0.9، لكن تبقى فجوة دائمًا. +3. أعِد $K_p$ إلى 2 وارفع $K_i$ من الصفر إلى 2. يسدّ المتحكّم تلك الفجوة الأخيرة، وتستقرّ $x$ عند 1 تمامًا. ارفع الآن $\tau$ إلى 5: الكسبان نفسهما مع منظومة أبطأ يجعلان $x$ تتجاوز الهدف إلى نحو 1.24 ثم تتأرجح قبل أن تستقرّ. ## Real-life examples 1. **منظّم حرارة منزلي.** اضبط كسبين متواضعين، Kp = 1 وKi = 0.1. يوصلان الغرفة إلى الحرارة المطلوبة بسلاسة وبطء، دون أي تجاوز، مريح لكن غير سريع. 2. **مثبّت سرعة سيارة.** ارفع الكسبين إلى Kp = 3 وKi = 0.5. يبلغ النظام السرعة الهدف ويحافظ عليها بسرعة ودقة، حتى في الصعود، دون تجاوز يُذكر. -3. **مثبّت طائرة مسيّرة سيّئ الضبط.** اضبط كسبين عدوانيّين، Kp = 8 وKi = 1.5. يستجيب النظام بسرعة لكنه يتجاوز الهدف ويتذبذب قبل أن يستقرّ، وهذه بالضبط مشكلة «K_i الزائد» التي يحذّر منها هذا الدرس. +3. **مثبّت طائرة مسيّرة سيّئ الضبط.** كسب تكاملي أكبر من اللازم لمنظومة بطيئة (Kp = 1 وKi = 2 وτ = 3). يتجاوز النظام الهدف بنحو 27% ويتذبذب قبل أن يستقرّ، وهذه بالضبط مشكلة «K_i الزائد» التي يحذّر منها هذا الدرس. ## Test yourself 1. أبقِ $K_i$ عند الصفر، أي تحكّم تناسبي فقط، وجِد $K_p$ تستقرّ عنده $x$ عند 80% من الهدف $r$ بالضبط. 2. جِد $K_p$ و$K_i$ و$\tau$ تجعل الاستجابة حرجة التخميد، أي أسرع استقرار ممكن دون أي تجاوز. -3. اختر $K_i$ أعلى من 0.05، وجِد توليفة $K_p$ و$\tau$ تجعل الاستجابة تتذبذب بوضوح قبل أن تستقرّ. +3. جِد قيمًا لـ$K_p$ و$K_i$ و$\tau$ تجعل الاستجابة تتذبذب بوضوح قبل أن تستقرّ (جرّب $K_p$ صغيرًا مع $K_i$ و$\tau$ كبيرين). ## Intuition -اضبط مثبّت سرعة سيارة على 100 كم/سا، لكن في الصعود لا يستطيع المحرك وحده مجاراة الهدف، فتستقرّ السيارة عند 97 كم/سا وتبقى هناك، وهذه الفجوة الدائمة هي بالضبط ما ينتجه التحكّم التناسبي وحده. على الشاشة، $x$، خرج المنظومة، يطارد $r$، الهدف. اسحب $K_p$، الكسب التناسبي، لأعلى فتستجيب $x$ أسرع وأقوى لأي فجوة، لكن مع بقاء $K_i$ عند الصفر تستقرّ $x$ دائمًا قبل $r$ بقليل. +مثبّت السرعة في سيارة مضبوط على 100 كم/س، لكن المحرك لا يكفي في الطريق الصاعد، فتستقرّ السيارة عند 97 كم/س وتبقى هناك. هذه الفجوة الدائمة هي بالضبط ما ينتجه التحكّم التناسبي وحده. على الشاشة، $x$، خرج المنظومة، يلحق بـ$r$، الهدف. اسحب $K_p$، الكسب التناسبي، لأعلى فتستجيب $x$ أسرع وأقوى لأي فجوة، لكن مع بقاء $K_i$ عند الصفر تستقرّ $x$ دائمًا قبل $r$ بقليل. الآن اسحب $K_i$ لأعلى من الصفر. يبدأ المتحكّم بجمع تلك الفجوة المتبقّية ويدفع أقوى كلما طال بقاؤها، فتستقرّ $x$ أخيرًا عند $r$ تمامًا، أي يحافظ مثبّت السرعة أخيرًا على السرعة المضبوطة حتى في الصعود. لكن إن رفعت $K_i$ أكثر من اللازم يبالغ المتحكّم في ردّ فعله تجاه الخطأ القديم، فتتجاوز $x$ الهدف $r$ ثم تهبط دونه وتتذبذب قبل أن تستقرّ. @@ -60,13 +60,17 @@ variables: ## Real world ### مثبّت السرعة في السيارات + مثبّت السرعة نظام PID على السرعة. يدفع دوّاسة الوقود أقوى كلما ابتعدت السرعة عن الهدف المضبوط، والحدّ التكاملي هو ما يتيح له الحفاظ على سرعة دقيقة في الصعود، بدل الاستقرار عند سرعة أبطأ قليلًا. ### منظّمات الحرارة المنزلية وأنظمة التكييف + تستخدم أنظمة التدفئة والتبريد الجيدة PID بدل التبديل البسيط تشغيل/إيقاف، ولهذا تستقرّ الحرارة بسلاسة عند الهدف بدل التذبذب حوله. ### التحكّم في العمليات الصناعية + تستخدم المصانع الكيميائية حلقات PID على آلاف الصمامات والسخّانات في آن واحد للحفاظ على الضغط والتدفّق والحرارة عند قيمها المضبوطة رغم تغيّر الظروف باستمرار. ### تثبيت الطائرات المسيّرة + يشغّل متحكّم طيران الطائرة المسيّرة حلقة PID مرّات كثيرة في الثانية على كل محور ميل، فيدفع المحرّكات لإلغاء أي انحراف عن الطيران الأفقي قبل أن يُلاحَظ أصلًا. diff --git a/content/lessons/engineering/pid-control/en.md b/content/lessons/engineering/pid-control/en.md index 3f405d08..a1fbedf3 100644 --- a/content/lessons/engineering/pid-control/en.md +++ b/content/lessons/engineering/pid-control/en.md @@ -20,21 +20,21 @@ variables: ## Try it -1. Watch $x$ chase $r$. With $K_i$ at zero, it settles just short of $r$. -2. Drag $K_p$ up. $x$ reacts faster and settles closer to $r$, but a gap always remains. -3. Now drag $K_i$ up from zero. The controller starts closing that last gap, and $x$ eventually lands exactly on $r$ — though push $K_i$ too far and it starts to overshoot and oscillate. +1. Set $K_i$ to 0, with $K_p$ = 2, $r$ = 1 and $\tau$ = 1, and watch $x$ chase $r$. It levels off at 0.667, short of the target of 1. +2. Drag $K_p$ up to 9. $x$ reacts faster and settles closer to $r$, at 0.9, but a gap always remains. +3. Set $K_p$ back to 2 and drag $K_i$ up from zero to 2. The controller closes that last gap, and $x$ lands exactly on 1. Now raise $\tau$ to 5: with the same gains on a more sluggish system, $x$ overshoots to about 1.24 and swings back before it settles. ## Real-life examples 1. **A home thermostat.** Modest gains (Kp = 1, Ki = 0.1) bring the room to temperature smoothly and slowly, without any overshoot — comfortable but not fast. 2. **A car's cruise control.** Higher gains (Kp = 3, Ki = 0.5) let the system reach and hold the target speed quickly and precisely, even up a hill, without much overshoot. -3. **A poorly tuned drone stabilizer.** Aggressive gains (Kp = 8, Ki = 1.5) react fast but overshoot and oscillate before settling — exactly the "too much Ki" problem this lesson warns about. +3. **A poorly tuned drone stabilizer.** Too much integral gain for a sluggish system (Kp = 1, Ki = 2, τ = 3) overshoots the target by about 27% and oscillates before settling — exactly the "too much Ki" problem this lesson warns about. ## Test yourself 1. With $K_i$ at zero (proportional-only control), find a $K_p$ that makes $x$ settle at exactly 80% of the target $r$. 2. Find $K_p$, $K_i$ and $\tau$ that make the response critically damped — the fastest settling possible without any overshoot. -3. With $K_i$ above 0.05, find a $K_p$ and $\tau$ combination that makes the response clearly oscillate before settling. +3. Find $K_p$, $K_i$ and $\tau$ that make the response clearly oscillate before settling (try a small $K_p$ with a large $K_i$ and $\tau$). ## Intuition @@ -61,13 +61,17 @@ Raising K_p or K_i too far turns this into a lightly damped or even unstable osc ## Real world ### Cruise control + A car's cruise control is a PID loop on speed: it pushes the throttle harder the further you are below the set speed, and the integral term is what lets it hold an exact speed uphill instead of settling a little slow. ### Home thermostats and HVAC + Better heating and cooling systems use PID rather than simple on/off switching, which is why the temperature settles smoothly at the target instead of oscillating around it. ### Industrial process control + Chemical plants use PID loops on thousands of valves and heaters at once to hold pressure, flow and temperature exactly at their setpoints despite constantly changing conditions. ### Drone stabilization + A drone's flight controller runs a PID loop many times a second on each axis of tilt, pushing motors to cancel any drift from level flight before it is even noticeable. diff --git a/content/lessons/engineering/pid-control/lesson.yaml b/content/lessons/engineering/pid-control/lesson.yaml index 14a3570e..25c2431e 100644 --- a/content/lessons/engineering/pid-control/lesson.yaml +++ b/content/lessons/engineering/pid-control/lesson.yaml @@ -22,8 +22,8 @@ visualization: - (Kp*(r - x) + Ki*I - x)/tau - r - x initial: - - "0" - - "0" + - '0' + - '0' tMax: 30 labels: - temperature x @@ -76,10 +76,10 @@ presets: Ki: 0.5 r: 1.5 tau: 0.5 - - Kp: 8 - Ki: 1.5 + - Kp: 1 + Ki: 2 r: 1 - tau: 0.5 + tau: 3 challenges: - check: Ki<0.03 and abs(Kp/(1+Kp)-0.8)<0.02 - check: (1+Kp)/(2*sqrt(Ki*tau)) diff --git a/content/lessons/engineering/sampling-and-aliasing/ar.md b/content/lessons/engineering/sampling-and-aliasing/ar.md index c4b9d484..55f34da9 100644 --- a/content/lessons/engineering/sampling-and-aliasing/ar.md +++ b/content/lessons/engineering/sampling-and-aliasing/ar.md @@ -14,21 +14,21 @@ variables: ## Try it -1. راقب النقاط، فهي تحدّد اللحظات التي قِسنا فيها الإشارة فعلًا. المنحنى الأملس خلفها هو ما نعيد بناءه من هذه النقاط وحدها. -2. اسحب $f_s$ لأسفل نحو ضعف $f$. تتباعد النقاط، ويتعثّر إعادة البناء. -3. ادفع $f_s$ دون ذلك الحدّ، فيستقرّ المنحنى المُعاد بناؤه على موجة أبطأ ووهمية لم تكن موجودة أصلًا. هذا هو التماثل. +1. ابدأ بالقيمتين $f$ = 3 هرتز و$f_s$ = 20 هرتز وراقب النقاط، فهي تحدّد اللحظات التي قِسنا فيها الإشارة فعلًا. المنحنى الملوّن هو ما نعيد بناءه من هذه النقاط وحدها. القراءة «التردد الذي تظهره العينات» تساوي 3 هرتز، وهو التردد الحقيقي. +2. اخفض $f_s$ إلى 6.5 هرتز، أي فوق ضعف $f$ بقليل. تتباعد النقاط وتصعب إعادة البناء، لكن العينات ما زالت تُظهر 3 هرتز. +3. اخفض $f_s$ إلى 4 هرتز، أي دون ذلك الحدّ. تُظهر العينات الآن 1 هرتز: يستقرّ المنحنى المُعاد بناؤه على موجة أبطأ وهمية لم تكن موجودة أصلًا. هذا هو التردد الشبح. ## Real-life examples 1. **تسجيل نغمة موسيقية بأمان.** خذ عينات نغمة ترددها 5 هرتز بمعدّل 40 هرتز، أي أكثر من ضعف تردد الإشارة براحة. تعيد بناء الموجة بدقة، وهو هامش الأمان نفسه الذي تستخدمه الأقراص المدمجة، إذ تأخذ عيناتها أعلى بوضوح من ضعف مدى السمع البشري. -2. **ظاهرة عجلة العربة على الكاميرا.** تلتقط كاميرا دوران عجلة (هنا f = 10) بمعدّل fs = 12 إطارًا في الثانية فقط، وهذا يقصّر كثيرًا عن معدّل نايكويست. تبدو العجلة تزحف أو تدور إلى الخلف على الشاشة. +2. **ظاهرة عجلة العربة على الكاميرا.** تلتقط كاميرا دوران عجلة (هنا f = 10) بمعدّل fs = 12 إطارًا في الثانية فقط، وهذا أقلّ بكثير من معدّل نايكويست، فتُظهر العينات 2 هرتز فقط. تبدو العجلة على الشاشة كأنها تدور ببطء شديد أو إلى الخلف. 3. **حسّاس عند حدّ أخذ العينات بالضبط.** خذ عينات إشارة f = 8 بمعدّل fs = 17، أعلى بقليل فقط من الحدّ الصارم fs > 2f = 16. يعمل هذا نظريًا لكنه يترك هامشًا ضئيلًا، والأنظمة الحقيقية تأخذ عيناتها أعلى بوضوح من هذا الحدّ توخّيًا للسلامة. ## Test yourself -1. جِد $f$ و$f_s$ بحيث يكون $f_s$ ضعف $f$ على الأقل، لكن بزيادة لا تتجاوز 10% عن ذلك الحدّ الأدنى — عند حافة ما تتطلّبه قاعدة أخذ العينات تمامًا. -2. أوجد تماثلًا واضحًا، أي جِد $f$ و$f_s$ بحيث يكون $f_s$ أقل من 1.5 ضعف $f$. -3. جِد $f$ و$f_s$ بحيث يستقرّ $f_s$ تحت ضعف $f$ بقليل فقط، بحيث يكون التماثل قد بدأ للتو. +1. جِد $f$ و$f_s$ بحيث يكون $f_s$ أكبر من ضعف $f$، لكن بزيادة أقلّ من 5% عن ذلك الحدّ الأدنى — عند حافة ما تتطلّبه قاعدة أخذ العينات تمامًا. +2. اصنع ترددًا شبحًا واضحًا، أي جِد $f$ و$f_s$ بحيث يكون $f_s$ أقل من 1.5 ضعف $f$. +3. جِد $f$ و$f_s$ بحيث يستقرّ $f_s$ تحت ضعف $f$ بقليل فقط، بحيث يكون التردد الشبح قد بدأ يظهر للتو. ## Intuition @@ -40,11 +40,11 @@ variables: معيار أخذ العينات (نايكويست) يقول إن إشارة ترددها f لا يمكن استرجاعها إلا إذا $f_s > 2f$. العينات نفسها ليست إلا نقاطًا على الموجة، $x(t) = \sin(2\pi f t)$، تُقرأ عند خطوات زمنية ثابتة. -خذ العينات دون هذا المعدّل، $f_s < 2f$، فيصبح التردد الحقيقي f لا يُميَّز عن تردد «متماثل» أبطأ يمرّ بالنقاط نفسها تمامًا. هذا التماثل هو بعينه الموجة البطيئة التي يستقرّ عليها إعادة البناء. +خذ العينات دون هذا المعدّل، $f_s < 2f$، فيصبح التردد الحقيقي f لا يُميَّز عن تردد «شبح» أبطأ يمرّ بالنقاط نفسها تمامًا. هذا التردد الشبح هو بعينه الموجة البطيئة التي تستقرّ عليها إعادة البناء. ## Advanced -بما أن التماثل يطوي أي تردد أعلى من $f_s/2$ إلى داخل النطاق الذي تحته، يضع كل نظام أخذ عينات حقيقي مرشّح تمرير منخفض مضادًّا للتماثل قبل أخذ العينات لإزالة الطاقة فوق $f_s/2$ أولًا. الترشيح بعد أخذ العينات لا يستطيع بعدها التمييز بين التردد المتماثل والحقيقي. +بما أن أي تردد أعلى من $f_s/2$ يظهر ترددًا شبحًا داخل النطاق الذي تحته، يضع كل نظام أخذ عينات حقيقي مرشّح تمرير منخفض قبل أخذ العينات، لإزالة الطاقة فوق $f_s/2$ أولًا. أما الترشيح بعد أخذ العينات فلا يستطيع التمييز بين التردد الشبح والتردد الحقيقي. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### لماذا تأخذ الأقراص المدمجة عيناتها عند 44.1 كيلوهرتز -يتوقف السمع البشري عند نحو 20 كيلوهرتز، فتأخذ الأقراص المدمجة عيناتها بمعدّل أعلى بوضوح من ضعف ذلك، عند 44.1 كيلوهرتز، مع هامش يكفي لمرشّح لطيف مضاد للتماثل. + +يتوقف السمع البشري عند نحو 20 كيلوهرتز، فتأخذ الأقراص المدمجة عيناتها بمعدّل أعلى بوضوح من ضعف ذلك، عند 44.1 كيلوهرتز، مع هامش يكفي لمرشّح تدريجي يمنع التردد الشبح. ### ظاهرة عجلة العربة -تبدو العجلات والمراوح في الفيديو تدور ببطء أو تتوقف أو تعكس اتجاهها كلما توافق معدّل دورانها مع معدّل إطارات الكاميرا. إنه التماثل نفسه، لكن في الدوران بدل الزمن. + +تبدو العجلات والمراوح في الفيديو تدور ببطء أو تتوقف أو تعكس اتجاهها كلما توافق معدّل دورانها مع معدّل إطارات الكاميرا. إنه التردد الشبح نفسه، لكن في الدوران بدل الزمن. ### الكاميرات الرقمية وظاهرة موواريه -حين تلتقط حساسة الكاميرا نقشًا دقيقًا متكررًا (قميص مخطط، سقف بعيد) بدقة غير كافية تحوّله إلى ألوان زائفة وأشرطة متموّجة. إنه تماثل مكاني بدل الزمني. + +حين تلتقط حساسة الكاميرا نقشًا دقيقًا متكررًا (قميص مخطط، سقف بعيد) بدقة غير كافية تحوّله إلى ألوان زائفة وأشرطة متموّجة. إنها الظاهرة نفسها، لكن في المكان بدل الزمن. ### الإفراط في أخذ العينات في محولات الصوت + تأخذ محولات الرقمي إلى التماثلي الحديثة عيناتها بمعدّل أعلى بكثير من حدّ نايكويست عمدًا، فيدفع ذلك شوائب التماثل إلى ترددات يسهل ترشيحها بتكلفة أقل. diff --git a/content/lessons/engineering/sampling-and-aliasing/en.md b/content/lessons/engineering/sampling-and-aliasing/en.md index 5a9ae760..291736ce 100644 --- a/content/lessons/engineering/sampling-and-aliasing/en.md +++ b/content/lessons/engineering/sampling-and-aliasing/en.md @@ -15,19 +15,19 @@ variables: ## Try it -1. Watch the dots. They mark where the signal is actually measured, and the smooth curve behind them is what gets reconstructed from those dots alone. -2. Drag $f_s$ down toward twice $f$. The dots grow sparse and the reconstruction starts to struggle. -3. Push $f_s$ below that line. The reconstructed curve locks onto a slower, fake wave that was never really there — aliasing. +1. Start with $f$ = 3 Hz and $f_s$ = 20 Hz and watch the dots. They mark where the signal is actually measured, and the coloured curve is what gets reconstructed from those dots alone. The readout «frequency the samples show» reads 3 Hz, the true frequency. +2. Drag $f_s$ down to 6.5 Hz, just above twice $f$. The dots grow sparse and the reconstruction starts to struggle, but the samples still show 3 Hz. +3. Push $f_s$ down to 4 Hz, below that line. The samples now show 1 Hz: the reconstructed curve locks onto a slower, fake wave that was never really there — aliasing. ## Real-life examples 1. **Recording a musical note safely.** Sampling a 5 Hz-equivalent tone at a 40 Hz rate — comfortably more than twice the signal frequency — reconstructs the wave cleanly, the same safety margin CDs use by sampling well above twice the range of human hearing. -2. **The wagon-wheel effect on camera.** A wheel's spin (here, f = 10) sampled by a camera at only fs = 12 frames a second falls well short of the Nyquist rate, so the wheel appears to crawl or spin backward on screen. +2. **The wagon-wheel effect on camera.** A wheel's spin (here, f = 10) sampled by a camera at only fs = 12 frames a second falls well short of the Nyquist rate, so the samples show only 2 Hz: the wheel appears to crawl or spin backward on screen. 3. **A sensor sampled right at the edge.** A signal at f = 8 sampled at fs = 17, just above the strict fs > 2f = 16 minimum, works in theory but leaves little margin — real systems sample well above this edge for safety. ## Test yourself -1. Find $f$ and $f_s$ where $f_s$ is at least twice $f$, but no more than 10% above that minimum — right at the edge of what the sampling rule requires. +1. Find $f$ and $f_s$ where $f_s$ is more than twice $f$, but less than 5% above that minimum — right at the edge of what the sampling rule requires. 2. Create clear aliasing: find $f$ and $f_s$ where $f_s$ is less than 1.5 times $f$. 3. Find $f$ and $f_s$ where $f_s$ sits just below twice $f$ — so aliasing has only just begun. @@ -56,13 +56,17 @@ Because aliasing folds any frequency above $f_s/2$ down into the band below it, ## Real world ### Why CDs sample at 44.1 kHz + Human hearing tops out near 20 kHz, so CDs sample comfortably above twice that, at 44.1 kHz, with room to spare for a gentle anti-aliasing filter. ### The wagon-wheel effect + Wheels and propellers in video appear to spin slowly, stop, or reverse whenever their rotation rate lines up with the camera's frame rate — the same aliasing, in rotation instead of time. ### Digital cameras and moiré + A camera sensor sampling fine repeating patterns (a striped shirt, a distant roof) without enough resolution turns them into false colours and wavy bands — spatial aliasing instead of temporal. ### Oversampling in audio converters + Modern digital-to-analogue converters sample far above the Nyquist minimum on purpose, which pushes aliasing artefacts to frequencies easy to filter out cheaply. diff --git a/content/lessons/engineering/sampling-and-aliasing/lesson.yaml b/content/lessons/engineering/sampling-and-aliasing/lesson.yaml index 950a1f51..896894c2 100644 --- a/content/lessons/engineering/sampling-and-aliasing/lesson.yaml +++ b/content/lessons/engineering/sampling-and-aliasing/lesson.yaml @@ -46,6 +46,6 @@ presets: - f: 8 fs: 17 challenges: - - check: fs >= 2*f and fs < 2.1*f + - check: fs > 2*f and fs < 2.1*f - check: fs < 1.5*f and fs >= 2 - check: fs < 2*f and fs > 1.9*f diff --git a/content/lessons/engineering/signals-and-noise/ar.md b/content/lessons/engineering/signals-and-noise/ar.md index 89185720..6f01de7f 100644 --- a/content/lessons/engineering/signals-and-noise/ar.md +++ b/content/lessons/engineering/signals-and-noise/ar.md @@ -9,16 +9,16 @@ parameters: variables: - A — سعة الإشارة الحقيقية المتكرّرة المدفونة داخل الضجيج - σ — الانحراف المعياري للضجيج العشوائي في قياس واحد - - N — عدد الآثار المستقلّة المتكرّرة التي يُحسب متوسطها معًا - - S — نسبة الإشارة إلى الضجيج في أثر واحد، قبل حساب المتوسط - - S_N — نسبة الإشارة إلى الضجيج بعد حساب متوسط N أثرًا + - N — عدد التسجيلات المستقلّة المتكرّرة التي يُحسب متوسطها معًا + - S — نسبة الإشارة إلى الضجيج في تسجيل واحد، قبل حساب المتوسط + - S_N — نسبة الإشارة إلى الضجيج بعد حساب متوسط N تسجيلًا --- ## Try it -1. مع بقاء $N$ عند 1، انظر إلى الأثر الواحد الصاخب. النبضة الخافتة تكاد لا تُرى، إن ظهرت أصلًا، تحت الضجيج. -2. ارفع $N$ نحو 16 تقريبًا. راقب الأثر الغليظ الذي يمثّل المتوسط وهو يخرج بوضوح من الضجيج، بينما يبقى الأثر الخافت الواحد صاخبًا كما كان. -3. الآن ارفع $\sigma$ (زد الضجيج) مع إبقاء $N$ مرتفعًا. لاحظ كم يجب أن يكبر $N$ قبل أن تظهر النبضة من جديد. حساب المتوسط ما زال ناجحًا، لكنه يحتاج تكرارات أكثر فقط. +1. اجعل $A$ = 2 ميلي فولت و$\sigma$ = 4 ميلي فولت و$N$ = 1، وانظر إلى التسجيل الواحد المليء بالضجيج. نسبة الإشارة إلى الضجيج فيه 0.5، والنبضة الخافتة تكاد لا تُرى تحت الضجيج. +2. ارفع $N$ إلى 16. ترتفع النسبة بعد المتوسط إلى 2، وينخفض الضجيج بعد حساب المتوسط من 4 ميلي فولت إلى 1 ميلي فولت. يخرج التسجيل الغليظ الذي يمثّل المتوسط بوضوح من الضجيج، بينما يبقى التسجيل الخافت الواحد مشوَّشًا كما كان. +3. ارفع الآن $\sigma$ إلى 8 ميلي فولت (ضجيج أكثر) وأبقِ $N$ عند 16. تنخفض النسبة بعد المتوسط إلى 1. ارفع $N$ إلى 64 لتعود إلى 2: ضعف الضجيج يحتاج أربعة أضعاف التكرارات. حساب المتوسط ما زال ناجحًا، لكنه يحتاج تكرارات أكثر. ## Real-life examples @@ -28,42 +28,46 @@ variables: ## Test yourself -1. اضبط إشارة مدفونة تمامًا في أثر واحد ($S$ أقلّ من 1). -2. جِد توليفة يرفع فيها حساب المتوسط نسبة الإشارة إلى الضجيج إلى ما فوق 3 براحة. +1. اضبط إشارة مدفونة عميقًا في تسجيل واحد ($S$ أقلّ من 0.25). +2. جِد قيمًا يرفع معها حساب المتوسط نسبة الإشارة إلى الضجيج إلى ما فوق 3. 3. اجعل نسبة الإشارة إلى الضجيج بعد حساب المتوسط تقترب من 2. ## Intuition -في أيّ أثر واحد صاخب، التذبذبات العشوائية تدفع القراءة للأعلى بقدر ما تدفعها للأسفل في كلّ لحظة. اجمع آثارًا مستقلّة كثيرة معًا، وتبدأ تلك الصعودات والهبوطات العشوائية بإلغاء بعضها بعضًا، وتزداد اكتمالًا كلما أضفت آثارًا أكثر، بينما الإشارة الحقيقية، لأنها متطابقة في كلّ مرّة، تتراكم بالطريقة نفسها في كلّ مرّة ولا تُلغي نفسها أبدًا. +في أيّ تسجيل واحد صاخب، التذبذبات العشوائية تدفع القراءة للأعلى بقدر ما تدفعها للأسفل في كلّ لحظة. اجمع تسجيلات مستقلّة كثيرة معًا، وتبدأ تلك الصعودات والهبوطات العشوائية بإلغاء بعضها بعضًا، وتزداد اكتمالًا كلما أضفت تسجيلات أكثر، بينما الإشارة الحقيقية، لأنها متطابقة في كلّ مرّة، تتراكم بالطريقة نفسها في كلّ مرّة ولا تُلغي نفسها أبدًا. هذه هي الحيلة الكاملة وراء حساب متوسط الإشارة. إنها لا تُزيل الضجيج من أيّ قياس واحد، بل تتيح لقياسات صاخبة كثيرة أن تُلغي عشوائية بعضها بعضًا جزئيًّا، بينما الشيء الوحيد المشترك بينها جميعًا، وهو الإشارة الحقيقية، يستمرّ في تعزيز نفسه. مضاعفة مقدار ما يُلغى من الضجيج تحتاج أربعة أضعاف عدد التكرارات، لا ضعفين، لأن العشوائية لا تتقلّص إلا بمقدار الجذر التربيعي لعدد ما تحسب متوسطه. ## Formal -حساب متوسط $N$ قياسًا صاخبًا مستقلًّا يُقلّص الانحراف المعياري للضجيج إلى $\sigma_{\text{avg}} = \frac{\sigma}{\sqrt N}$، بينما سعة الإشارة المتكرّرة $A$ لا تتأثّر إطلاقًا، لأنها متطابقة في كلّ أثر. الأثر الواحد له نسبة إشارة إلى ضجيج $S = \frac{A}{\sigma}$. +حساب متوسط $N$ قياسًا صاخبًا مستقلًّا يُقلّص الانحراف المعياري للضجيج إلى $\sigma_{\text{avg}} = \frac{\sigma}{\sqrt N}$، بينما سعة الإشارة المتكرّرة $A$ لا تتأثّر إطلاقًا، لأنها متطابقة في كلّ تسجيل. التسجيل الواحد له نسبة إشارة إلى ضجيج $S = \frac{A}{\sigma}$. -بعد حساب المتوسط، تصبح النسبة $S_N = \frac{A}{\sigma_{\text{avg}}} = S\sqrt N$. تتحسّن نسبة الإشارة إلى الضجيج بمقدار الجذر التربيعي لعدد التكرارات، فمضاعفة عدد الآثار أربع مرات لا يضاعف وضوح الإشارة إلا مرّتين فقط. +بعد حساب المتوسط، تصبح النسبة $S_N = \frac{A}{\sigma_{\text{avg}}} = S\sqrt N$. تتحسّن نسبة الإشارة إلى الضجيج بمقدار الجذر التربيعي لعدد التكرارات، فمضاعفة عدد التسجيلات أربع مرات لا يضاعف وضوح الإشارة إلا مرّتين فقط. ## Advanced -هذا التحسّن بمقدار $\sqrt N$ يفترض أن ضجيج كلّ أثر مستقلّ عن الآخر. أما الضجيج الذي يتكرّر بالنمط نفسه في كلّ محاولة (كطنين كهربائي من شبكة الكهرباء بتردّد ثابت مثلًا) فيتلاشى بحساب المتوسط أبطأ بكثير، أو لا يتلاشى إطلاقًا، لأنه ليس عشوائيًّا من أثر إلى آخر. +هذا التحسّن بمقدار $\sqrt N$ يفترض أن ضجيج كلّ تسجيل مستقلّ عن الآخر. أما الضجيج الذي يتكرّر بالنمط نفسه في كلّ محاولة (كطنين كهربائي من شبكة الكهرباء بتردّد ثابت مثلًا) فيتلاشى بحساب المتوسط أبطأ بكثير، أو لا يتلاشى إطلاقًا، لأنه ليس عشوائيًّا من تسجيل إلى آخر. ## Derivation -1. حساب متوسط $N$ أثرًا صاخبًا مستقلًّا يُقلّص الانحراف المعياري للضجيج بمقدار الجذر التربيعي لعدد ما جُمع. $\sigma_{\text{avg}} = \frac{\sigma}{\sqrt N}$. -2. نسبة الإشارة إلى الضجيج في أثر واحد تقارن سعة الإشارة الثابتة بضجيج ذلك الأثر وحده. $S = \frac{A}{\sigma}$. +1. حساب متوسط $N$ تسجيلًا صاخبًا مستقلًّا يُقلّص الانحراف المعياري للضجيج بمقدار الجذر التربيعي لعدد ما جُمع. $\sigma_{\text{avg}} = \frac{\sigma}{\sqrt N}$. +2. نسبة الإشارة إلى الضجيج في تسجيل واحد تقارن سعة الإشارة الثابتة بضجيج ذلك التسجيل وحده. $S = \frac{A}{\sigma}$. 3. استخدام مستوى الضجيج المُقلَّص في النسبة نفسها يعطي نسبة الإشارة إلى الضجيج بعد حساب المتوسط. $S_N = \frac{A}{\sigma_{\text{avg}}} = S\sqrt N$. ## Real world ### مراقبة تخطيط القلب والدماغ + يحسب الأطبّاء متوسط نبضات قلب أو دورات موجات دماغية كثيرة معًا لاستخلاص موجة نظيفة قابلة للتكرار من ضجيج العضلات والكهرباء الذي يدفن أيّ قراءة واحدة. ### التلسكوبات اللاسلكية واكتشاف النجوم النابضة + قد تكون نبضة النجم النابض اللاسلكية أخفت بكثير من الضجيج الكوني المحيط بها في أيّ دورة واحدة. يحسب الفلكيون متوسط آلاف الدورات معًا لكشف نبضة غير مرئية في أيّ منها بمفرده. ### تكديس صور التصوير الفلكي + يكدّس المصوّرون عشرات أو مئات اللقطات للمجرّة الخافتة نفسها، فيُلغى الضجيج العشوائي لمستشعر كلّ لقطة بحساب المتوسط بينما يستمرّ ضوء المجرّة الحقيقي بالتراكم. ### تحديد الموقع عبر GPS + يحسب مستقبل GPS متوسط قراءات موقع سريعة كثيرة معًا، لأن كلّ قراءة منفردة صاخبة بفعل تأثيرات الغلاف الجوي والإشارة، فيعطي موقعًا نهائيًّا أكثر ثباتًا بكثير من أيّ تحديد واحد. diff --git a/content/lessons/engineering/signals-and-noise/en.md b/content/lessons/engineering/signals-and-noise/en.md index 047aedf9..78ffe3a3 100644 --- a/content/lessons/engineering/signals-and-noise/en.md +++ b/content/lessons/engineering/signals-and-noise/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. With $N$ at 1, look at the single noisy trace — the faint pulse is barely, if at all, visible under the noise. -2. Drag $N$ up toward 16 or so. Watch the bold averaged trace pull cleanly out of the noise while the faint single trace stays just as messy as before. -3. Now raise $\sigma$ (more noise) while keeping $N$ high. Notice how much larger $N$ has to get before the pulse reappears — averaging still works, it just needs more repeats. +1. With $A$ = 2 mV, $\sigma$ = 4 mV and $N$ at 1, look at the single noisy trace. The single-trace SNR reads 0.5 — the faint pulse is barely, if at all, visible under the noise. +2. Drag $N$ up to 16. The averaged SNR climbs to 2 and the noise after averaging falls from 4 mV to 1 mV: the bold averaged trace pulls cleanly out of the noise while the faint single trace stays just as messy as before. +3. Now raise $\sigma$ to 8 mV (more noise) while keeping $N$ at 16. The averaged SNR drops to 1. Raise $N$ to 64 to get back to 2 — twice the noise needs four times the repeats. Averaging still works, it just needs more repeats. ## Real-life examples @@ -30,7 +30,7 @@ variables: ## Test yourself -1. Set up a signal that is completely buried on a single trace ($S$ below 1). +1. Set up a signal that is deeply buried on a single trace ($S$ below 0.25). 2. Find a combination where averaging brings the signal-to-noise ratio comfortably above 3. 3. Bring the averaged signal-to-noise ratio to about 2. @@ -59,13 +59,17 @@ This $\sqrt N$ improvement assumes the noise on each trace is independent of the ## Real world ### ECG and EEG monitoring + Doctors average many heartbeats or brain-wave cycles together to pull a clean, repeatable waveform out of the muscle and electrical noise that buries any single reading. ### Radio telescopes and pulsar detection + A pulsar's radio pulse can be far fainter than the surrounding cosmic noise on any single rotation; astronomers average thousands of rotations together to reveal a pulse invisible in any one of them. ### Astrophotography image stacking + Photographers stack dozens or hundreds of exposures of the same faint galaxy, averaging away each frame's random sensor noise while the galaxy's real light keeps adding up. ### GPS positioning + A GPS receiver averages many rapid position readings together, since each individual reading is noisy from atmospheric and signal effects, giving a far steadier final position than any single fix. diff --git a/content/lessons/engineering/signals-and-noise/lesson.yaml b/content/lessons/engineering/signals-and-noise/lesson.yaml index 43b1432c..44a6f3bd 100644 --- a/content/lessons/engineering/signals-and-noise/lesson.yaml +++ b/content/lessons/engineering/signals-and-noise/lesson.yaml @@ -54,7 +54,7 @@ presets: sigma: 6 N: 100 challenges: - - check: A/sigma < 1 + - check: A/sigma < 0.25 - check: A/sigma*sqrt(N) > 3 - check: A/sigma*sqrt(N) target: 2 diff --git a/content/lessons/engineering/stress-strain-and-materials/ar.md b/content/lessons/engineering/stress-strain-and-materials/ar.md index 34c40070..b8ebbba9 100644 --- a/content/lessons/engineering/stress-strain-and-materials/ar.md +++ b/content/lessons/engineering/stress-strain-and-materials/ar.md @@ -17,20 +17,20 @@ variables: ## Try it -1. ارفع $\sigma$ (الإجهاد المطبَّق) ببطء من الصفر مع بقاء $E$ و$Y$ عند قيمهما الافتراضية للفولاذ. راقب الانفعال وهو يرتفع في خطّ مستقيم تمامًا، ثم ينحني ويتسطّح بمجرّد أن يتجاوز $\sigma$ قيمة $Y$. -2. الآن أنزل $E$ كثيرًا، نحو صلابة المطاط. الإجهاد الصغير نفسه ينتج الآن انفعالًا ضخمًا، وتبقى المادة مرنة تمامًا عبر مدى أوسع بكثير من $\sigma$. -3. مع عودة $E$ إلى قيمة تشبه الفولاذ، ادفع $\sigma$ إلى ما بعد $Y$ بكثير وراقب القراءات. بعض ذلك الانفعال أصبح الآن دائمًا. لن يختفي كليًّا حتى لو عاد $\sigma$ إلى الصفر. +1. ارفع $\sigma$ (الإجهاد المطبَّق) ببطء من الصفر مع بقاء $E$ و$Y$ عند قيمتي الفولاذ الافتراضيتين (200 جيجاباسكال و250 ميغاباسكال). يرتفع الانفعال في خطّ مستقيم تمامًا: 0.05% عند 100 ميغاباسكال، و0.125% عند 250 ميغاباسكال. واصِل إلى 300 ميغاباسكال، أي بعد $Y$: ينحني المنحنى ويتسطّح، ويقفز الانفعال إلى 0.625%، وتصير الحالة «لدن». +2. أعِد $\sigma$ إلى 100 ميغاباسكال، وأنزل $E$ كثيرًا إلى 0.05 جيجاباسكال، وهي صلابة المطاط. الإجهاد نفسه ينتج الآن انفعالًا ضخمًا، 200% بدل 0.05%، والحالة ما زالت «مرن»، أي أن التمدّد كله سيزول عند رفع الحمل. +3. أعِد $E$ إلى 200 جيجاباسكال، وارفع $\sigma$ إلى ما بعد $Y$ بكثير، إلى 400 ميغاباسكال، وراقب القراءات. الانفعال 1.625%، ومنه 1.425% أصبح دائمًا: لن يختفي حتى لو عاد $\sigma$ إلى الصفر. ## Real-life examples -1. **صامولة فولاذية مشدودة بشكل طبيعي.** بإجهاد نحو 100 ميغاباسكال، أقلّ بكثير من نقطة خضوعها البالغة 250 ميغاباسكال، تتمدّد الصامولة بنحو 0.05% فقط، وهو أمر غير مرئي إطلاقًا، وترتدّ بشكل كامل عند فكّها. -2. **الصامولة الفولاذية نفسها مشدودة بإفراط.** مسحوبة إلى 400 ميغاباسكال، متجاوزةً نقطة خضوعها البالغة 250 ميغاباسكال، تتمدّد الصامولة بنحو 1.6%، وحتى بعد إزالة الحمل يبقى نحو 1.4% من ذلك التمدّد دون أن يزول أبدًا. أصبحت الصامولة الآن أطول وأضعف بشكل دائم. +1. **برغي فولاذي مشدود شدًّا عاديًّا.** الإجهاد فيه نحو 100 ميغاباسكال، أقلّ بكثير من نقطة خضوعه البالغة 250 ميغاباسكال. يتمدّد البرغي نحو 0.05% فقط، وهذا لا يُرى بالعين، ويعود إلى طوله تمامًا عند فكّه. +2. **البرغي الفولاذي نفسه مشدود أكثر من اللازم.** يصل الإجهاد إلى 400 ميغاباسكال، فوق نقطة خضوعه البالغة 250 ميغاباسكال. يتمدّد البرغي نحو 1.6%، وحتى بعد إزالة الحمل يبقى نحو 1.4% من ذلك التمدّد ولا يزول أبدًا. صار البرغي أطول وأضعف إلى الأبد. 3. **رباط مطاطي يُشدّ باليد.** بصلابة أقلّ بكثير (نحو 50 ميغاباسكال) وحدّ مرونة قرب 15 ميغاباسكال، يكفي إجهاد شدّ قدره 8 ميغاباسكال فقط لإنتاج تمدّد قدره 16%، لكن لأنه ما زال دون الحدّ المرن، فإن تركه يعيده فورًا إلى شكله. ## Test yourself -1. اختر مادة صلبة تشبه الفولاذ ($E$ أعلى من 100 جيجاباسكال) مع بقاء $\sigma$ دون $Y$، لتبقى مرنة تمامًا. -2. اختر مادة صلبة تشبه الفولاذ مع دفع $\sigma$ إلى ما بعد $Y$، لتأخذ انحناءً دائمًا. +1. حمّل مادة صلبة تشبه الفولاذ ($E$ أعلى من 100 جيجاباسكال) قريبًا من حدّها: اجعل $\sigma$ أعلى من 80% من $Y$ لكنه ما زال دون $Y$، لتبقى مرنة تمامًا. +2. اختر مادة صلبة تشبه الفولاذ وارفع $\sigma$ إلى ما بعد $Y$، ليبقى فيها تشوّه دائم. 3. اختر مادة طرية تشبه المطاط ($E$ أقلّ من 1 جيجاباسكال) مع بقاء $\sigma$ دون $Y$، لتتمدّد كثيرًا لكنها تظلّ ترتدّ. ## Intuition @@ -58,13 +58,17 @@ variables: ## Real world ### الصواميل الفولاذية ومثبّتات الإنشاءات -يحرص المهندسون عمدًا على إبقاء إجهادات العمل أقلّ بكثير من $Y$ حتى تبقى كلّ صامولة في المدى المرن التام القابل للارتداد الكامل طوال عمرها العملي. + +يحرص المهندسون عمدًا على إبقاء إجهادات العمل أقلّ بكثير من $Y$ حتى يبقى كلّ برغي في المدى المرن، فيعود إلى طوله الأصلي تمامًا طوال عمره في الخدمة. ### مناطق الانسحاق في السيارات + تُصمَّم مقدّمة هيكل السيارة لتتجاوز نقطة خضوعها عمدًا في الحادث، فتمتصّ طاقة التصادم بانحناء لدن دائم بدل نقلها مباشرة إلى الركّاب. ### مشابك الورق وشمّاعات المعاطف المنحنية + اثنِ مشبك ورق متجاوزًا حدّه المرن فيبقى منحنيًا. هذا عرض يومي بسيط للمنطقة اللدنة نفسها التي يُمثّلها هذا الدرس، وصولًا إلى التمدّد الدائم الذي يبقى بعد أن تترك يدك. ### الحشيات والأربطة المطاطية + تُختار الحشيات والحلقات المطاطية والأربطة خصّيصًا لمداها المرن الهائل، بحيث تتمدّد كثيرًا أثناء الاستخدام اليومي وتعود مع ذلك إلى شكلها الأصلي بدل أن تأخذ انحناءً دائمًا. diff --git a/content/lessons/engineering/stress-strain-and-materials/en.md b/content/lessons/engineering/stress-strain-and-materials/en.md index a27446e9..28c357e1 100644 --- a/content/lessons/engineering/stress-strain-and-materials/en.md +++ b/content/lessons/engineering/stress-strain-and-materials/en.md @@ -10,7 +10,7 @@ parameters: sigma: σ — the stress you apply variables: - "σ — the stress: the pulling force spread over the material's cross-section" - - "ε — the strain: how much the material has stretched, as a fraction of its original length" + - 'ε — the strain: how much the material has stretched, as a fraction of its original length' - E — Young's modulus, how stiff the material is while it's still elastic - Y — the yield stress, where the material stops springing all the way back - E_p — the plastic hardening stiffness, how much stress still rises for extra strain past yield @@ -19,9 +19,9 @@ variables: ## Try it -1. Drag $\sigma$ (applied stress) up slowly from zero with $E$ and $Y$ at their steel defaults. Watch the strain climb in a dead straight line, then bend and flatten once $\sigma$ passes $Y$. -2. Now drop $E$ far down, toward rubber's stiffness. The same small stress now produces a huge strain — and the material stays fully elastic across a much wider range of $\sigma$. -3. With steel-like $E$ again, push $\sigma$ well past $Y$ and watch the readouts: some of that strain is now permanent — it will not fully disappear even if $\sigma$ drops back to zero. +1. Drag $\sigma$ (applied stress) up slowly from zero with $E$ and $Y$ at their steel defaults (200 GPa and 250 MPa). The strain climbs in a dead straight line: 0.05% at 100 MPa, 0.125% at 250 MPa. Go on to 300 MPa, past $Y$: the curve bends and flattens, the strain jumps to 0.625% and the state reads plastic. +2. Set $\sigma$ back to 100 MPa and drop $E$ far down, to rubber's 0.05 GPa. The same stress now produces a huge strain, 200% instead of 0.05% — and the state still reads elastic, so it would all spring back. +3. Set $E$ back to 200 GPa, push $\sigma$ well past $Y$, to 400 MPa, and watch the readouts: the strain is 1.625%, and 1.425% of it is now permanent — it will not disappear even if $\sigma$ drops back to zero. ## Real-life examples @@ -31,7 +31,7 @@ variables: ## Test yourself -1. Find a stiff, steel-like material ($E$ above 100 GPa) with $\sigma$ still below $Y$, so it stays fully elastic. +1. Load a stiff, steel-like material ($E$ above 100 GPa) close to its limit: $\sigma$ above 80% of $Y$ but still below $Y$, so it stays fully elastic. 2. Find a stiff, steel-like material with $\sigma$ pushed past $Y$, so it takes a permanent set. 3. Find a soft, rubber-like material ($E$ under 1 GPa) with $\sigma$ still below $Y$, so it stretches a lot but still springs back. @@ -60,13 +60,17 @@ Real materials rarely have as sharp a corner at $Y$ as this simplified model dra ## Real world ### Steel bolts and structural fasteners + Engineers deliberately keep working stresses well under $Y$ so every bolt stays in the fully elastic, fully recoverable region for its whole working life. ### Car crumple zones + A car's front structure is designed to pass its yield point on purpose in a crash, absorbing the collision's energy as permanent, plastic bending instead of transmitting it straight to the passengers. ### Bent paperclips and coat hangers + Bend a paperclip past its elastic limit and it stays bent — a simple, everyday demonstration of the exact plastic region this lesson models, right down to the permanent set that remains after you let go. ### Rubber seals and bands + Gaskets, O-rings and rubber bands are chosen specifically for their huge elastic range, so they can stretch a great deal under everyday handling and still return to their original shape instead of taking a permanent set. diff --git a/content/lessons/engineering/stress-strain-and-materials/lesson.yaml b/content/lessons/engineering/stress-strain-and-materials/lesson.yaml index 14258c19..6c50a7ce 100644 --- a/content/lessons/engineering/stress-strain-and-materials/lesson.yaml +++ b/content/lessons/engineering/stress-strain-and-materials/lesson.yaml @@ -57,6 +57,6 @@ presets: Y: 15 sigma: 8 challenges: - - check: sigma < Y and E > 100 + - check: sigma < Y and sigma > 0.8*Y and E > 100 - check: sigma > Y and E > 100 - check: E < 1 and sigma < Y 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: 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. 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. 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: 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. 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. 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. 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. 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: 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. 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. 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: 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. 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. 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: 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. 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: 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: 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. diff --git a/content/lessons/networking/bluetooth/ar.md b/content/lessons/networking/bluetooth/ar.md index d9a43351..f0032580 100644 --- a/content/lessons/networking/bluetooth/ar.md +++ b/content/lessons/networking/bluetooth/ar.md @@ -13,9 +13,9 @@ variables: ## Try it -1. اترك k = 5 وراقب الحزمة: هاتفك وسماعتك يضيئان القناة نفسها في كل قفزة — كلاهما حسبها من سرّ الاقتران، ولم يعلنها أحد. -2. ارفع k إلى 20: يحطّ المنافسون الآن على قناتك كل رابع قفزة تقريبًا ويومض العمود أحمر — وفي القفزة التالية مباشرة، بعد جزء من الميلي ثانية، تنطلق الرزمة ببساطة من جديد. -3. أنزل k إلى 0 وأبطئ r: الغرفة الفارغة لا تتصادم أبدًا، وتستطيع مشاهدة تسلسل القفز يخطو بهدوء عبر الحزمة. +1. اضبط k = 5 (تُظهر القراءة P = 6.2%) وراقب الحزمة: هاتفك وسماعتك يضيئان القناة نفسها في كل قفزة — كلاهما حسبها من سرّ الاقتران، ولم يعلنها أحد. +2. ارفع k إلى 20: تُظهر القراءة P = 22.5%. يحطّ المنافسون الآن على قناتك مرة كل أربع قفزات تقريبًا ويومض العمود بالأحمر — وفي القفزة التالية مباشرة، بعد جزء من الميلي ثانية، تُرسَل الرزمة من جديد. +3. أنزل k إلى 0 وأبطئ r إلى 100: تُظهر القراءة P = 0.0%. في الغرفة الفارغة لا يقع أي تصادم، وتستطيع مشاهدة القفزات تتنقل بهدوء بين القنوات. ## Real-life examples @@ -31,19 +31,19 @@ variables: ## Intuition -جرّب أن تجري محادثة على قناة واحدة لجهاز لاسلكي في مهرجان مزدحم وسيدوس أحدهم على كلامك خلال ثوانٍ. جواب بلوتوث ليس القتال على قناة بل الفرار عبرها كلها: يقسم هاتفك وسماعتك حزمة 2.4 GHz إلى 79 مسارًا ويبدلان المسار 1600 مرة كل ثانية، متّبعين رقصة حسبها الطرفان من السرّ الذي تبادلاه عند الاقتران. على الشاشة، العمود المضيء هو مسار القفزة الحالية — لاحظ أن الجهازين يختاران دائمًا المسار نفسه دون أن يعلناه أبدًا. +جرّب أن تتحدث عبر جهاز لاسلكي على قناة واحدة في مهرجان مزدحم، وسيقاطع أحدهم كلامك خلال ثوانٍ. حلّ بلوتوث ليس التزاحم على قناة واحدة بل التنقل بين القنوات كلها: يقسم هاتفك وسماعتك حزمة 2.4 GHz إلى 79 مسارًا ويبدلان المسار 1600 مرة كل ثانية، متّبعين رقصة حسبها الطرفان من السرّ الذي تبادلاه عند الاقتران. على الشاشة، العمود المضيء هو مسار القفزة الحالية — لاحظ أن الجهازين يختاران دائمًا المسار نفسه دون أن يعلناه أبدًا. -المنافسون الذين يؤدّون رقصاتهم الخاصة سيحطّون أحيانًا على مسارك، وتومض المحاكاة بالأحمر حين يحدث ذلك. الحيلة أن التصادم لا يُمنع بل يُجعل رخيصًا: القفزة الفاسدة تكلّف 625 ميكروثانية، والإعادة تركب القفزة التالية على مسار جديد، وأذناك لا تلاحظان شيئًا. ارفع k وراقب الومضات الحمراء تتكاثر بينما تستمر الموسيقى، فعليًّا، في العزف. +المنافسون الذين يؤدّون رقصاتهم الخاصة سيحطّون أحيانًا على مسارك، وتومض المحاكاة بالأحمر حين يحدث ذلك. الحيلة أن بلوتوث لا يمنع التصادم بل يجعل ضرره صغيرًا: القفزة الفاسدة تضيّع 625 ميكروثانية فقط، ثم تُعاد الرزمة في القفزة التالية على مسار جديد، فلا تلاحظ أذناك شيئًا. ارفع k وراقب الومضات الحمراء تكثر، والموسيقى في الواقع لا تنقطع. ## Formal يقسم بلوتوث الكلاسيكي حزمة 2.4 GHz إلى 79 قناة عرض كل منها 1 MHz ويقفز شبه عشوائيًّا بمعدل 1600 قفزة في الثانية؛ ويُشتق التسلسل من عنوان الجهاز الرئيس وساعته، وهو ما تتشاركه مصافحة الاقتران، فيبقى الطرفان متزامنين دون أي رسائل تنسيق. -إذا جلس كل من الأزواج المنافسة الـ$k$ على قناة شبه عشوائية، فلا تنجو قفزة إلا إذا أخطأوك جميعًا: $P = 1 - \left(1 - \frac{1}{79}\right)^{k}$، أي نحو $\frac{k}{79}$ حين تكون $k$ صغيرة — تدهور خطّي رشيق لا هاوية. +إذا جلس كل من الأزواج المنافسة الـ$k$ على قناة شبه عشوائية، فلا تنجو قفزة إلا إذا أخطأوك جميعًا: $P = 1 - \left(1 - \frac{1}{79}\right)^{k}$، أي نحو $\frac{k}{79}$ حين تكون $k$ صغيرة — فيزداد الاحتمال قليلًا مع كل منافس جديد ولا يقفز فجأة. ## Advanced -يصقل بلوتوث الحديث الرقصة: القفز التكيفي للترددات يلاحظ القنوات الدائمة الفشل — شبكة واي فاي عند الجيران، أو فرن ميكروويف — ويشطبها بهدوء من قائمة القفز، فتنكمش 79 في الصيغة إلى القنوات السليمة وحدها. وبلوتوث منخفض الطاقة يعيد رسم الحزمة 40 قناة أعرض وينام بين القفزات، وهكذا يعيش سوار اللياقة أسابيع على بطارية عملة. والمدى القصير ميزة لا ضعف: فعند ميلي واطات قليلة من قدرة الإرسال تتلاشى الرقصة كلها خلال أمتار، فيتشارك آلاف الأزواج حيًّا واحدًا من المدينة. +يصقل بلوتوث الحديث الرقصة: القفز التكيفي للترددات يلاحظ القنوات الدائمة الفشل — شبكة واي فاي عند الجيران، أو فرن ميكروويف — ويشطبها بهدوء من قائمة القفز، فتنكمش 79 في الصيغة إلى القنوات السليمة وحدها. وبلوتوث منخفض الطاقة يعيد رسم الحزمة 40 قناة أعرض وينام بين القفزات، ولهذا يعمل سوار اللياقة أسابيع ببطارية صغيرة بحجم قطعة نقود. والمدى القصير ميزة لا ضعف: فعند ميلي واطات قليلة من قدرة الإرسال تتلاشى الرقصة كلها خلال أمتار، فيتشارك آلاف الأزواج حيًّا واحدًا من المدينة. ## Derivation @@ -54,13 +54,17 @@ variables: ## Real world ### السماعات والساعات ولوحات المفاتيح + كل ما هو قصير المدى ويعمل ببطارية يركب هذه الرقصة — تسلسل القفز هو سرّ عمل سماعتيك في قطار مليء بسماعات الآخرين. ### مكالمات السيارة -تقترن السيارة والهاتف مرة واحدة، ثم يعيدان حساب الرقصة نفسها في كل رحلة، بمنأى عن بقية راديوات الموقف. + +تقترن السيارة والهاتف مرة واحدة، ثم يعيدان حساب الرقصة نفسها في كل رحلة، دون أن تزعجهما الأجهزة اللاسلكية الأخرى في الموقف. ### تتبع المخالطة والمنارات + يبثّ بلوتوث منخفض الطاقة قفزات حضور صغيرة، فتلاحظ الهواتف بعضها بعضًا دون أي اتصال أصلًا. ### مشاركة الحزمة مع واي فاي -بلوتوث وواي فاي وأفران الميكروويف تتزاحم كلها في 2.4 GHz — والقفز بين الترددات هو ما يُبقي بلوتوث مهذبًا وحيًّا. + +بلوتوث وواي فاي وأفران الميكروويف تتزاحم كلها في 2.4 GHz — والقفز بين الترددات هو ما يجعل بلوتوث يعمل وسط هذا الزحام دون أن يزعج غيره. diff --git a/content/lessons/networking/bluetooth/en.md b/content/lessons/networking/bluetooth/en.md index 35c738ba..66553bab 100644 --- a/content/lessons/networking/bluetooth/en.md +++ b/content/lessons/networking/bluetooth/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Leave k = 5 and watch the band: your phone and earbud light up the same channel on every hop — both computed it from the pairing secret, nobody announced it. -2. Raise k to 20: rivals now land on your channel roughly every fourth hop and the column flashes red — and on the very next hop, a fraction of a millisecond later, the packet simply goes again. -3. Drop k to 0 and slow r down: an empty room never collides, and you can watch the hop sequence calmly stepping through the band. +1. Set k = 5 (the readout shows P = 6.2%) and watch the band: your phone and earbud light up the same channel on every hop — both computed it from the pairing secret, nobody announced it. +2. Raise k to 20: the readout shows P = 22.5%. Rivals now land on your channel roughly every fourth hop and the column flashes red — and on the very next hop, a fraction of a millisecond later, the packet simply goes again. +3. Drop k to 0 and slow r down to 100: the readout shows P = 0.0%. An empty room never collides, and you can watch the hop sequence calmly stepping through the band. ## Real-life examples @@ -55,13 +55,17 @@ Modern Bluetooth refines the dance: adaptive frequency hopping notices channels ## Real world ### Earbuds, watches and keyboards + Everything short-range and battery-powered rides this dance — the hop sequence is why your earbuds work on a train full of other earbuds. ### Hands-free in cars + The car and phone pair once, then recompute the same dance every drive, immune to the parking lot's other radios. ### Contact-tracing and beacons + Low-energy Bluetooth broadcasts tiny hops of presence, letting phones notice each other without connecting at all. ### Sharing the band with Wi-Fi + Bluetooth, Wi-Fi and microwave ovens all crowd into 2.4 GHz — frequency hopping is how Bluetooth stays polite and survives. diff --git a/content/lessons/networking/bluetooth/lesson.yaml b/content/lessons/networking/bluetooth/lesson.yaml index da349b55..14f5144a 100644 --- a/content/lessons/networking/bluetooth/lesson.yaml +++ b/content/lessons/networking/bluetooth/lesson.yaml @@ -3,14 +3,14 @@ subject: networking difficulty: beginner equation: P = 1 - \left(1 - \frac{1}{79}\right)^{k} concepts: -- bluetooth -- frequency-hopping -- pairing -- collision + - bluetooth + - frequency-hopping + - pairing + - collision prerequisites: -- wifi + - wifi related: -- wifi + - wifi visualization: type: bluetooth-hop parameters: @@ -18,29 +18,29 @@ parameters: min: 0 max: 30 step: 1 - value: 5 + value: 10 r: min: 100 max: 1600 step: 100 value: 1600 variables: -- P -- k + - P + - k derivation: -- \text{one rival pair lands on your channel with chance } \frac{1}{79} -- \text{all } k \text{ rivals miss with chance } \left(1 - \frac{1}{79}\right)^{k} -- P = 1 - \left(1 - \frac{1}{79}\right)^{k} + - \text{one rival pair lands on your channel with chance } \frac{1}{79} + - \text{all } k \text{ rivals miss with chance } \left(1 - \frac{1}{79}\right)^{k} + - P = 1 - \left(1 - \frac{1}{79}\right)^{k} charts: [] primary: k presets: -- k: 5 - r: 1600 -- k: 20 - r: 1600 -- k: 0 - r: 100 + - k: 5 + r: 1600 + - k: 20 + r: 1600 + - k: 0 + r: 100 challenges: -- check: k >= 4.5 and (1 - (1 - 1/79)^k) <= 0.07 -- check: k >= 19.5 and (1 - (1 - 1/79)^k) < 0.25 -- check: k < 0.5 + - check: k >= 4.5 and (1 - (1 - 1/79)^k) <= 0.07 + - check: k >= 19.5 and (1 - (1 - 1/79)^k) < 0.25 + - check: k < 0.5 diff --git a/content/lessons/networking/cdn/ar.md b/content/lessons/networking/cdn/ar.md index 33ebf31a..73a0abb5 100644 --- a/content/lessons/networking/cdn/ar.md +++ b/content/lessons/networking/cdn/ar.md @@ -11,59 +11,63 @@ variables: - متوسط زمن الطلب - رحلة الطرف ذهابًا وإيابًا - رحلة الأصل ذهابًا وإيابًا - - نسبة إصابة الذاكرة + - نسبة الطلبات التي يجيبها الطرف --- ## Try it 1. اقرأ الرحلتين مع الإعدادات كما هي: نصف ملّي ثانية إلى الثلاجة آخر الشارع، و90 ملّي ثانية عبر المحيط. الفيزياء واحدة، والفرق هو المسافة. -2. اسحب H من 90 إلى 0 وراقب المتوسط يصعد من أقل من 10 ملّي ثوانٍ إلى عبور المحيط كاملًا. قيمة الـCDN كلها في هذه النسبة الواحدة. -3. اضبط H على 100 وقلّص de: حين يُجاب كل طلب من الجوار، يصير الأصل البعيد كأنه غير موجود، ولو كان على بعد 12,000 كم. +2. اسحب H من 90 إلى 0 وراقب المتوسط يصعد من أقل من 10 ملّي ثوانٍ إلى 90 ملّي ثانية، أي عبور المحيط كاملًا. قيمة الـCDN كلها في هذه النسبة الواحدة. +3. اضبط H على 100 وقلّص de إلى 10 كم وارفع do إلى 12,000 كم: يقرأ المتوسط 0.1 ملّي ثانية. حين يُجاب كل طلب من الجوار، يصير الأصل البعيد كأنه غير موجود، ولو كان على بعد 12,000 كم. ## Real-life examples - **سهرة فيلم.** الأصل على 9,000 كم والطرف على 50 و95% من الطلبات تجد الملف في الطرف: المتوسط 5 ملّي ثوانٍ بدل 90. هذا الفرق بين تشغيل فوري ودائرة تدور. -- **بلا CDN.** كل طلب من كل مشاهد يعبر المحيط في 90 ملّي ثانية، والخادم الأصل يذوب تحت حمل يخدمه وحده. -- **تخفيضات خاطفة وذواكر باردة.** نصف الطلبات لا تجد الملف أول الأمر (H = 50): المتوسط 45 والأصل يلهث، حتى تدفأ الأطراف بعد دقائق. +- **بلا CDN.** كل طلب من كل مشاهد يعبر المحيط في 90 ملّي ثانية، والخادم الأصل ينهار تحت حمل يخدمه وحده. +- **تخفيضات مفاجئة والأطراف ما زالت فارغة.** نصف الطلبات لا تجد الملف أول الأمر (H = 50): المتوسط 45 ملّي ثانية والأصل يعمل بأقصى طاقته، حتى تمتلئ الأطراف بالنسخ بعد دقائق. ## Test yourself -1. قدّم 90% من الطلبات على الأقل من طرف لا يبعد أكثر من 50 كم. -2. صفّر نسبة الإصابة مع أصل بعيد وجرّب كيف كان الإنترنت قبل الـCDN. +1. قدّم 95% من الطلبات على الأقل من طرف لا يبعد أكثر من 50 كم. +2. اجعل H صفرًا مع أصل بعيد وجرّب كيف كان الإنترنت قبل الـCDN. 3. أنزل المتوسط تحت 2 ملّي ثانية مع بقاء الأصل على 5,000 كم على الأقل. منزلق واحد فقط يوصلك. ## Intuition تحت كل طلب أرضية صلبة من الفيزياء: الضوء في الزجاج يقطع نحو 100 كم لكل ملّي ثانية ذهابًا وإيابًا. اسأل خادمًا على بعد 9,000 كم تدفع 90 ملّي ثانية قبل أن يفكر أي حاسوب في أي شيء. هذه سرعة الضوء، وليست حدًا تفرضه شركة فتُرفع بالمال. فما الحركة الوحيدة الباقية؟ إن عجزت البيانات عن السفر أسرع، فانقلها أقرب قبل أن تُطلب: انسخ الفيلم وملفات الموقع ورقعة اللعبة في مستودعات صغيرة بكل مدينة، ودع كل مشاهد يأخذ من أقربها. -الخريطة على الشاشة هي هذه الصفقة. الثلاجة آخر الشارع تجيب معظم الطلبات بأقل من ملّي ثانية سفر، وعبور المحيط ما يزال يحدث، لكن فقط للنسبة التي لا تحملها الثلاجة. وهذه النسبة هي التجارة كلها: قيمة أي CDN بنسبة إصابته، ولهذا تُبذل هندسة هائلة في تقرير ما يُخزَّن وكم يبقى وكيف تُملأ ثلاجة باردة قبل وصول الزحام. +الخريطة على الشاشة هي هذه الصفقة. الثلاجة آخر الشارع تجيب معظم الطلبات بأقل من ملّي ثانية سفر، وعبور المحيط ما يزال يحدث، لكن فقط للنسبة التي لا تحملها الثلاجة. وهذه النسبة هي التجارة كلها: قيمة أي CDN بنسبة الطلبات التي يجيبها من قريب، ولهذا يبذل المهندسون جهدًا كبيرًا في تحديد ما يُخزَّن وكم يبقى وكيف تُملأ ثلاجة فارغة قبل وصول الزحام. ## Formal -برحلتين $t_e = d_e/100$ و$t_o = d_o/100$ ملّي ثانية، تعطي نسبة إصابة $H$ بالمئة المتوسط $\bar{t} = \frac{H\,t_e + (100-H)\,t_o}{100}$: وسط موزون تجره نسبة واحدة بين آخر الشارع وآخر العالم. +برحلتين $t_e = d_e/100$ و$t_o = d_o/100$ ملّي ثانية، تعطي نسبة $H$ بالمئة من الطلبات المجابة من الطرف المتوسط $\bar{t} = \frac{H\,t_e + (100-H)\,t_o}{100}$: وسط موزون تجره نسبة واحدة بين آخر الشارع وآخر العالم. -والحساسية قاسية عند القمة: رفع H من 90 إلى 99 يقسم حركة الأصل على عشرة، وهذا مهم مرتين: مرة في متوسط الزمن، ومرة في الحمل الذي يتحمله الأصل. تخدم الذواكر ما لا يتغير من شخص لآخر، أي الفيديو والصور والملفات البرمجية، وهي أغلب البايتات؛ أما الردود الشخصية فتظل تعبر إلى الأصل، ولهذا تُرسم الصفحة فورًا ثم يظهر اسمك بعدها بلحظة. +والحساسية قاسية عند القمة: رفع H من 90 إلى 99 يقسم حركة الأصل على عشرة، وهذا مهم مرتين: مرة في متوسط الزمن، ومرة في الحمل الذي يتحمله الأصل. تخدم الأطراف ما لا يتغير من شخص لآخر، أي الفيديو والصور والملفات البرمجية، وهي أغلب البايتات؛ أما الردود الشخصية فتظل تعبر إلى الأصل، ولهذا تُرسم الصفحة فورًا ثم يظهر اسمك بعدها بلحظة. ## Advanced -ما يُعد «قابلًا للتخزين» يتوسع كل سنة: الأطراف الحديثة تشغّل شيفرة وتفك التشفير وتحفظ نسخًا قصيرة العمر من ردود الواجهات البرمجية، فيقترب الحوار كله إلى بعد ملّي ثوانٍ من المستخدم. والاقتصاد لا يقل عن الفيزياء أهمية: نقل البيانات عبر المحيطات غالٍ ونقلها من آخر الشارع رخيص، فنسبة الإصابة العالية سياسة توفير قبل أن تكون سياسة سرعة. والقرب نفسه يجعل الـCDN ممتص صدمات الإنترنت: ذروة زيارات أو هجوم حجب خدمة يتوزع على آلاف الأطراف بدل أصل واحد، ولهذا فإن «ضعه خلف CDN» هي أيضًا أول نصيحة دفاعية. +ما يُعد «قابلًا للتخزين» يتوسع كل سنة: الأطراف الحديثة تشغّل شيفرة وتفك التشفير وتحفظ نسخًا قصيرة العمر من ردود الواجهات البرمجية، فيقترب الحوار كله إلى بعد ملّي ثوانٍ من المستخدم. والاقتصاد لا يقل عن الفيزياء أهمية: نقل البيانات عبر المحيطات غالٍ ونقلها من آخر الشارع رخيص، فارتفاع H سياسة توفير قبل أن تكون سياسة سرعة. والقرب نفسه يجعل الـCDN ممتص صدمات الإنترنت: ذروة زيارات أو هجوم حجب خدمة يتوزع على آلاف الأطراف بدل أصل واحد، ولهذا فإن «ضعه خلف CDN» هي أيضًا أول نصيحة دفاعية. ## Derivation 1. رحلة ذهاب وإياب عبر $d$ كم من الألياف تكلف نحو $\frac{d}{100}$ ملّي ثانية. المسافة هي الزمن، بلا تفاوض. 2. فالجوابان الممكنان يكلفان $t_e = \frac{d_e}{100}$ و$t_o = \frac{d_o}{100}$ ملّي ثانية، والنسبة H تقرر أيهما يدفعه كل طلب. -3. والمتوسط هو الوسط الموزون $\bar{t} = \frac{H\,t_e + (100-H)\,t_o}{100}$، ولأن $t_o$ أكبر بكثير من $t_e$ فإن الطلبات الخائبة تتحكم فيه وحدها تقريبًا. +3. والمتوسط هو الوسط الموزون $\bar{t} = \frac{H\,t_e + (100-H)\,t_o}{100}$، ولأن $t_o$ أكبر بكثير من $t_e$ فإن الطلبات التي تذهب إلى الأصل تتحكم فيه وحدها تقريبًا. ## Real world ### بث الفيديو + نتفليكس ويوتيوب يضعان رفوف خوادم داخل مباني مزودي الإنترنت أنفسهم، وتُدفع حلقات الليلة إليها مسبقًا في ساعات الهدوء. ### تحديثات البرمجيات -تحديث نظام هاتف يصل إلى ملياري جهاز في أيام لسبب واحد: كل منطقة تنزّله من نسخة جاثمة قربها سلفًا. + +تحديث نظام هاتف يصل إلى ملياري جهاز في أيام لسبب واحد: كل منطقة تنزّله من نسخة موجودة قربها مسبقًا. ### ذرى الأخبار + حين يفتح الجميع الصفحة نفسها معًا تمتص الأطراف التدافع، ويخدم الأصل نسخة واحدة لكل طرف، لا نسخة لكل قارئ. ### الألعاب + اللعبة تنزّل خرائطها ورقعها من الأطراف، بينما تجري حركة المباراة الحساسة للزمن على خوادم لعب إقليمية. منطق الجغرافيا نفسه مرتين. diff --git a/content/lessons/networking/cdn/en.md b/content/lessons/networking/cdn/en.md index 2e7bb463..ada21b06 100644 --- a/content/lessons/networking/cdn/en.md +++ b/content/lessons/networking/cdn/en.md @@ -1,5 +1,5 @@ --- -title: 'CDN: the internet''s corner shops' +title: "CDN: the internet's corner shops" summary: >- You cannot make light travel faster, so the big sites stopped trying — they copied their files into thousands of little servers down the street from @@ -18,8 +18,8 @@ variables: ## Try it 1. Read the two trips with the defaults: 0.5 ms to the fridge down the street, 90 ms across the ocean — the same physics, just different distances. -2. Drag H from 90 down to 0 and watch the average slide from under 10 ms to the full ocean crossing: the CDN's whole value lives in that one percentage. -3. Now set H to 100 and shrink de: with every request answered next door, even a 12,000 km origin might as well not exist. +2. Drag H from 90 down to 0 and watch the average climb from under 10 ms to the full 90 ms ocean crossing: the CDN's whole value lives in that one percentage. +3. Now set H to 100, shrink de to 10 km and push do up to 12,000 km: the average reads 0.1 ms. With every request answered next door, even a 12,000 km origin might as well not exist. ## Real-life examples @@ -29,13 +29,13 @@ variables: ## Test yourself -1. Serve at least 90% from an edge no farther than 50 km. +1. Serve at least 95% from an edge no farther than 50 km. 2. Set the hit rate to zero with a far origin and feel what the internet was like before CDNs. 3. Get the average under 2 ms while the origin stays at least 5,000 km away — only one slider can do it. ## Intuition -Physics sets a floor under every request: light in glass covers about 100 km per millisecond of round trip, so asking a server 9,000 km away costs 90 ms before any computer has thought about anything. No cable upgrade changes this — it is the speed of light, not a speed limit. The content delivery network is the only move left: if the data cannot travel faster, move the data closer *before it is asked for*. Copy the film, the stylesheet, the game patch into little warehouses in every city, and let each viewer fetch from the nearest one. +Physics sets a floor under every request: light in glass covers about 100 km per millisecond of round trip, so asking a server 9,000 km away costs 90 ms before any computer has thought about anything. No cable upgrade changes this — it is the speed of light, not a speed limit. The content delivery network is the only move left: if the data cannot travel faster, move the data closer _before it is asked for_. Copy the film, the stylesheet, the game patch into little warehouses in every city, and let each viewer fetch from the nearest one. The map on screen is that bargain. The fridge down the street answers most requests in under a millisecond of travel; the ocean crossing still happens, but only for the fraction H the fridge doesn't hold. That fraction is the whole business: a CDN is only as good as its hit rate, which is why so much engineering goes into deciding what to cache, for how long, and how to warm a cold edge before the crowd arrives. @@ -58,13 +58,17 @@ What counts as "cacheable" keeps expanding: modern edges run code, terminate enc ## Real world ### Video streaming + Netflix and YouTube place racks of edge servers inside ISPs' own buildings; the night's episodes are pushed there in advance, at off-peak hours. ### Software updates + A phone OS update lands on two billion devices in days only because every region downloads from copies already sitting nearby. ### News spikes + When everyone opens the same page at once, the edges absorb the stampede; the origin serves one copy per edge, not one per reader. ### Online games + Game clients fetch maps and patches from edges, while the latency-critical match traffic runs to dedicated regional game servers — the same geography logic, applied twice. diff --git a/content/lessons/networking/cdn/lesson.yaml b/content/lessons/networking/cdn/lesson.yaml index 38a8d301..ceb7a645 100644 --- a/content/lessons/networking/cdn/lesson.yaml +++ b/content/lessons/networking/cdn/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: high-school equation: \bar{t} = \frac{H\,t_e + (100 - H)\,t_o}{100} concepts: -- cdn -- caching -- edge -- speed-of-light + - cdn + - caching + - edge + - speed-of-light prerequisites: -- latency-and-bandwidth + - latency-and-bandwidth related: -- dns -- cloud-vpc + - dns + - cloud-vpc visualization: type: cdn-map parameters: @@ -34,27 +34,27 @@ parameters: value: 90 unit: '%' variables: -- \bar{t} -- t_e -- t_o -- H + - \bar{t} + - t_e + - t_o + - H derivation: -- '\text{light in fibre: a round trip over } d \text{ km costs about } \frac{d}{100} \text{ ms}' -- t_e = \frac{d_e}{100}, \qquad t_o = \frac{d_o}{100} -- \bar{t} = \frac{H\,t_e + (100 - H)\,t_o}{100} + - '\text{light in fibre: a round trip over } d \text{ km costs about } \frac{d}{100} \text{ ms}' + - t_e = \frac{d_e}{100}, \qquad t_o = \frac{d_o}{100} + - \bar{t} = \frac{H\,t_e + (100 - H)\,t_o}{100} charts: [] primary: H presets: -- do: 9000 - de: 50 - H: 95 -- do: 9000 - de: 50 - H: 0 -- do: 9000 - de: 50 - H: 50 + - do: 9000 + de: 50 + H: 95 + - do: 9000 + de: 50 + H: 0 + - do: 9000 + de: 50 + H: 50 challenges: -- check: H >= 90 and de <= 50 -- check: H == 0 and do >= 9000 -- check: (H*de/100 + (100-H)*do/100)/100 <= 2 and do >= 5000 + - check: H >= 95 and de <= 50 + - check: H == 0 and do >= 9000 + - check: (H*de/100 + (100-H)*do/100)/100 <= 2 and do >= 5000 diff --git a/content/lessons/networking/cell-towers/ar.md b/content/lessons/networking/cell-towers/ar.md index edf859fb..b0a1eefe 100644 --- a/content/lessons/networking/cell-towers/ar.md +++ b/content/lessons/networking/cell-towers/ar.md @@ -17,9 +17,9 @@ variables: ## Try it -1. اسحب d من 0.2 نحو 6، فيمشي هاتفك في الطريق من البرج A إلى البرج B. ينزل المنحنى الأزرق ويصعد البرتقالي. -2. قف عند 3 km في المنتصف. البرجان متساويان في القوة، ومع ذلك يبقى الهاتف على البرج A. تابع المشي حتى يعبر خط التسليم المتقطع. -3. ارفع H فيبتعد خط التسليم عن المنتصف. وارفع n (مدينة أكثر ازدحامًا) فينزل المنحنيان أسرع، وتهبط إشارتك أكثر قبل الانتقال. +1. اسحب d من 0.2 إلى 5.8، فيمشي هاتفك في الطريق من البرج A إلى البرج B. ينزل المنحنى الأزرق ويصعد البرتقالي. +2. قف عند 3 km في المنتصف. البرجان متساويان في القوة، ومع ذلك يبقى الهاتف على البرج A. تابع المشي: عند 3.4 km يعبر خط التسليم المتقطع وتتحول القراءة إلى البرج B. +3. ارفع H إلى 6 فيبتعد خط التسليم عن المنتصف إلى نحو 3.7 km. ثم عُد إلى 3 km وارفع n من 3 إلى 4 (مدينة أكثر ازدحامًا): ينزل المنحنيان أسرع، وتهبط إشارة البرج A من −89.3 إلى −94.1 dBm. ## Real-life examples @@ -60,13 +60,17 @@ variables: ## Real world ### مكالمات تصمد على الطريق السريع + بسرعة 100 km/h تعبر كل خلية في المدينة في نحو دقيقة. وينقل التسليم مكالمتك من برج إلى آخر في بضع عشرات من أجزاء الألف من الثانية، فلا تسمع الانتقال أبدًا. ### أعمدة تختفي في المصعد + المصعد المعدني أو القبو يضيف عشرات الديسيبلات من الخسارة فوق خسارة المسافة. فإذا لم يسمع الهاتف برجًا أقوى من نحو −115 dBm كتب «لا توجد خدمة». ### خلايا صغيرة في المدن + في وسط المدينة تضعف الإشارة بسرعة، ويتقاسم آلاف الناس كل خلية. لذلك يضع المشغّلون خلايا صغيرة على أعمدة الإنارة وأسطح المباني، بين الواحدة والأخرى بضع مئات من الأمتار. ### الملاعب والمهرجانات + حين يجتمع خمسون ألف شخص في ملعب واحد، يجلب المشغّلون أبراجًا على شاحنات توقف بجانبه طوال اليوم، فيخدم كل برج عددًا أقل من الهواتف. diff --git a/content/lessons/networking/cell-towers/en.md b/content/lessons/networking/cell-towers/en.md index 7e7375e0..54fcb8ff 100644 --- a/content/lessons/networking/cell-towers/en.md +++ b/content/lessons/networking/cell-towers/en.md @@ -18,9 +18,9 @@ variables: ## Try it -1. Drag d from 0.2 towards 6: your phone walks down the road from tower A to tower B. The blue curve falls and the orange one rises. -2. Stop at 3 km, the middle. Both towers are equally strong, yet the phone stays on tower A. Keep walking until it crosses the dashed handover line. -3. Raise H and the handover line moves further past the middle. Raise n (a denser city) and both curves sink faster, so your bars drop lower before the switch. +1. Drag d from 0.2 up to 5.8: your phone walks down the road from tower A to tower B. The blue curve falls and the orange one rises. +2. Stop at 3 km, the middle. Both towers are equally strong, yet the phone stays on tower A. Keep walking: at 3.4 km it crosses the dashed handover line and the readout switches to tower B. +3. Raise H to 6 and the handover line moves further past the middle, to about 3.7 km. Go back to 3 km and raise n from 3 to 4 (a denser city): both curves sink faster, and the signal from tower A drops from −89.3 to −94.1 dBm. ## Real-life examples @@ -61,13 +61,17 @@ A tower usually carries three panels, each covering a 120° sector, so one mast ## Real world ### Calls that survive a motorway + At 100 km/h you cross each cell of a town in about a minute. Handover moves your call from tower to tower in a few tens of milliseconds, so you never hear the switch. ### Bars that vanish in a lift + A metal lift or a basement adds tens of decibels of loss on top of the distance. If the phone hears no tower stronger than about −115 dBm, it shows "No service". ### Small cells in cities + Downtown, signals fade fast and thousands of people share each cell, so carriers add small cells on lamp posts and rooftops a few hundred metres apart. ### Stadiums and festivals + When 50,000 people gather in one field, carriers bring cell towers on trucks and park them beside it for the day, so each tower serves fewer phones. diff --git a/content/lessons/networking/cell-towers/lesson.yaml b/content/lessons/networking/cell-towers/lesson.yaml index 60c295e5..a4c9b31c 100644 --- a/content/lessons/networking/cell-towers/lesson.yaml +++ b/content/lessons/networking/cell-towers/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: high-school equation: P = P_1 - 10\,n\,\log_{10} d concepts: -- cellular-network -- handover -- path-loss -- signal-strength + - cellular-network + - handover + - path-loss + - signal-strength prerequisites: -- wifi + - wifi related: -- dialer-codes -- latency-and-bandwidth + - dialer-codes + - latency-and-bandwidth visualization: type: cell-towers visualization3d: @@ -35,28 +35,28 @@ parameters: value: 3 unit: dB variables: -- P -- P_1 -- n -- d -- H + - P + - P_1 + - n + - d + - H derivation: -- P_A = P_1 - 10\,n\,\log_{10} d_A \qquad P_B = P_1 - 10\,n\,\log_{10} d_B -- P_B - P_A = 10\,n\,\log_{10} \dfrac{d_A}{d_B} -- '\text{switch to B when } P_B - P_A > H' + - P_A = P_1 - 10\,n\,\log_{10} d_A \qquad P_B = P_1 - 10\,n\,\log_{10} d_B + - P_B - P_A = 10\,n\,\log_{10} \dfrac{d_A}{d_B} + - '\text{switch to B when } P_B - P_A > H' charts: [] primary: d presets: -- d: 1.5 - n: 3 - H: 3 -- d: 3.5 - n: 2.4 - H: 3 -- d: 3.8 - n: 3.8 - H: 10 + - d: 1.5 + n: 3 + H: 3 + - d: 3.5 + n: 2.4 + H: 3 + - d: 3.8 + n: 3.8 + H: 10 challenges: -- check: 10*n*log10(d/(6-d)) > H -- check: abs(d - 3.5) < 0.05 and 10*n*log10(d/(6-d)) <= H -- check: 'n >= 3.5 and (10*n*log10(d/(6-d)) > H ? -75 - 10*n*log10(6-d) : -75 - 10*n*log10(d)) < -95' + - check: 10*n*log10(d/(6-d)) > H + - check: abs(d - 3.5) < 0.05 and 10*n*log10(d/(6-d)) <= H + - check: 'n >= 3.5 and (10*n*log10(d/(6-d)) > H ? -75 - 10*n*log10(6-d) : -75 - 10*n*log10(d)) < -95' diff --git a/content/lessons/networking/cloud-vpc/ar.md b/content/lessons/networking/cloud-vpc/ar.md index 9979ebf2..4e690799 100644 --- a/content/lessons/networking/cloud-vpc/ar.md +++ b/content/lessons/networking/cloud-vpc/ar.md @@ -14,37 +14,37 @@ variables: ## Try it -1. ابدأ عند p = 20: تنقسم كتلة 10.0.0.0/16 إلى 16 شبكة فرعية في كلٍّ نحو أربعة آلاف عنوان — بلاطة واحدة تحمل الكرة الأرضية، والبقية تحمل أقفالًا. -2. حرّك p صعودًا وهبوطًا: كل درجة صعود تضاعف الشبكات وتُنصّف حجمها — العناوين الـ65,536 نفسها، مقسومة أدق أو أخشن. -3. ارفع pub وراقب مزيدًا من البلاطات تواجه العالم. التصاميم الحقيقية تُبقي هذا العدد ضئيلًا بلا رحمة: خوادم الويب تواجه الخارج، وقواعد البيانات لا تفعل أبدًا. +1. اضبط p = 20 و pub = 1: تُظهر القراءات S = 16 و H = 4,094. تنقسم كتلة 10.0.0.0/16 إلى 16 شبكة فرعية في كلٍّ منها نحو أربعة آلاف عنوان — مربع واحد عليه الكرة الأرضية، والبقية عليها أقفال. +2. ارفع p إلى 21 (S = 32 و H = 2,046)، ثم أنزله إلى 19 (S = 8 و H = 8,190): كل درجة صعود تضاعف عدد الشبكات وتجعل حجمها النصف — العناوين الـ65,536 نفسها، مقسومة إلى قطع أصغر أو أكبر. +3. عُد إلى p = 20 وارفع pub إلى 4: أربعة مربعات تحمل الآن الكرة الأرضية وتواجه العالم، و12 تبقى مقفلة. التصاميم الحقيقية تُبقي هذا العدد صغيرًا جدًا: خوادم الويب تواجه الخارج، وقواعد البيانات لا تواجهه أبدًا. ## Real-life examples -- **التصميم المعتاد لشركة ناشئة.** p = 20 مع شبكة عامة واحدة: موزّع الحمل يقف على البوابة، وبلاطات التطبيق وقاعدة البيانات مقفلة خلفه. +- **التصميم المعتاد لشركة ناشئة.** p = 20 مع شبكة عامة واحدة: موزّع الحمل يقف على البوابة، ومربعات التطبيق وقاعدة البيانات مقفلة خلفه. - **كبير وبسيط.** p = 18 يقطع 4 شبكات ضخمة فقط في كلٍّ نحو ستة عشر ألف عنوان، اثنتان عامتان — أسيجة قليلة ومساحة وفيرة. -- **مدينة الخدمات المصغّرة.** p = 24 يُشرّح 256 شبكة من 254 عنوانًا مع 4 بوابات عامة — عزل دقيق لمئات الخدمات الصغيرة. +- **مدينة الخدمات المصغّرة.** p = 24 يقسم الكتلة إلى 256 شبكة في كلٍّ منها 254 عنوانًا مع 4 بوابات عامة — عزل دقيق لمئات الخدمات الصغيرة. ## Test yourself 1. قسّم الكتلة إلى 16 شبكة فرعية بالضبط. -2. أبقِ 4,000 عنوان صالح على الأقل في كل شبكة فرعية. +2. أبقِ 16,000 عنوان صالح على الأقل في كل شبكة فرعية. 3. ست عشرة شبكة تحرسها بوابة عامة واحدة. ## Intuition السحابة مدينة من الحواسيب يملكها غيرك، والـVPC — السحابة الخاصة الافتراضية — هو المجمّع المسوَّر الذي تستأجره شركتك داخلها. يحصل المجمّع على مخطط شوارعه الخاص، كتلة العناوين 10.0.0.0/16، التي لا يراها أحد في الخارج أصلًا؛ والسياج مرسوم بالبرمجيات، والطريق الوحيد من المدينة هو البوابة التي تختار فتحها، بوابة الإنترنت أعلى الشاشة. -في الداخل، أنت من يرسم الشوارع، وهذا ما يفعله المنزلق p: يستلف بتات عناوين ليقسم الكتلة إلى شبكات فرعية. كل بلاطة على الشاشة شبكة فرعية — شارع تسكنه الآلات المتقاربة. البلاطات ذات الكرة الأرضية لها طريق عبر البوابة وتستطيع خدمة الجمهور؛ أما ذوات القفل فلا طريق لها، فقاعدة بيانات هناك لا تُبلغ من الإنترنت لا بسبب كلمة سر، بل لأن لا مسار إليها أصلًا. +في الداخل، أنت من يرسم الشوارع، وهذا ما يفعله المنزلق p: يأخذ بتات من العنوان ليقسم الكتلة إلى شبكات فرعية. كل مربع على الشاشة شبكة فرعية — شارع تسكنه الأجهزة التي تعمل معًا. المربعات ذات الكرة الأرضية لها طريق عبر البوابة وتستطيع خدمة الجمهور؛ أما ذوات القفل فلا طريق لها، فقاعدة البيانات هناك لا يمكن الوصول إليها من الإنترنت، لا بسبب كلمة سر، بل لأنه لا يوجد طريق إليها أصلًا. ## Formal تستخدم كتل العناوين ترميز البادئة نفسه الذي في الشبكات المنزلية: 10.0.0.0/16 يثبّت أول 16 بتًّا من كل عنوان بالداخل. اختيار بادئة شبكات فرعية $p$ ينفق $p - 16$ بتًّا إضافيًّا على تسمية الشبكات ويترك $32 - p$ بتًّا للآلات، فنحصل على $S = 2^{p-16}$ شبكة في كلٍّ منها $H = 2^{32-p} - 2$ عنوانًا صالحًا. مع $p = 20$: ‏$S = 2^{4} = 16$ شبكة في كلٍّ $H = 2^{12} - 2 = 4094$. -وما يجعل شبكة «عامة» ليس إلا التوجيه: تكون الشبكة عامة حين يرسل جدول مساراتها الحركة الخارجة إلى بوابة الإنترنت، وخاصة حين لا يفعل. فالقفل على البلاطة هو حرفيًّا غياب الطريق. +وما يجعل شبكة «عامة» ليس إلا التوجيه: تكون الشبكة عامة حين يرسل جدول مساراتها الحركة الخارجة إلى بوابة الإنترنت، وخاصة حين لا يفعل. فالقفل على المربع معناه ببساطة أن الطريق غير موجود. ## Advanced -الشبكات الخاصة التي ما تزال تحتاج تنزيل التحديثات تمدّ يدها عبر بوابة NAT — حيلة الموجّه المنزلي على مقياس مركز بيانات: يستطيع من في الداخل بدء المحادثات مع العالم، ولا يستطيع العالم بدء محادثة معهم. وحول كل آلة تضيف مجموعات الأمان سياجًا ثانيًا من المنافذ والمصادر المسموحة، والتصاميم الجادة تنسخ المخطط كله عبر مناطق التوافر فلا يُسقط غرقُ قاعة بيانات إلا نسخة واحدة من كل شبكة، لا الشركة. وحين يجب أن تتحادث شركتان بخصوصية، تُخاط سحابتاهما بالتناظر — طريق خاص بين مجمّعين لا يمس المدينة العامة أبدًا. +الشبكات الخاصة التي ما تزال تحتاج تنزيل التحديثات تتصل بالخارج عبر بوابة NAT — وهي حيلة الموجّه المنزلي نفسها لكن بحجم مركز بيانات: يستطيع من في الداخل بدء المحادثات مع العالم، ولا يستطيع العالم بدء محادثة معهم. وحول كل آلة تضيف مجموعات الأمان سياجًا ثانيًا من المنافذ والمصادر المسموحة، والتصاميم الجادة تنسخ المخطط كله عبر مناطق التوافر فلا يُسقط غرقُ قاعة بيانات إلا نسخة واحدة من كل شبكة، لا الشركة. وحين يجب أن تتحادث شركتان بخصوصية، تُربط سحابتاهما ربطًا مباشرًا (peering) — طريق خاص بين مجمّعين لا يمس المدينة العامة أبدًا. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### كل تطبيق تستخدمه تقريبًا + خدمات البث والبنوك والألعاب تعمل داخل سحابات خاصة — «في السحابة» تعني غالبًا «داخل مجمّع مسوَّر لأحدهم». ### قاعدة البيانات التي لا تُخترق من الخارج -الاختراقات عبر الإنترنت المفتوح تتوقف عند الطريق الغائب: الشبكات المقفلة لا تُبلغ بالبناء، لا بالسهر. + +الاختراقات عبر الإنترنت المفتوح تتوقف عند الطريق الغائب: الشبكات المقفلة لا يمكن الوصول إليها بحكم تصميمها، لا بفضل الحراسة. ### الامتثال والبنوك + كثيرًا ما يفرض المنظّمون هذا المخطط بعينه — وجوه عامة مفصولة عن البيانات الخاصة بشبكات فرعية، لا بوعود. ### المكاتب الهجينة + كثيرًا ما ينتهي نفق الشركة داخل الـVPC، فيضع شبكة المكتب والمجمّع السحابي على خريطة خاصة واحدة. diff --git a/content/lessons/networking/cloud-vpc/en.md b/content/lessons/networking/cloud-vpc/en.md index 73bdfa4b..70bb7eaf 100644 --- a/content/lessons/networking/cloud-vpc/en.md +++ b/content/lessons/networking/cloud-vpc/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Start at p = 20: the 10.0.0.0/16 block splits into 16 subnets of about four thousand addresses each — one tile holds the globe, the rest hold locks. -2. Slide p up and down: every step up doubles the subnets and halves their size — the same 65,536 addresses, sliced finer or coarser. -3. Raise pub and watch more tiles face the world. Real designs keep that number ruthlessly small: web servers face out, databases never do. +1. Set p = 20 and pub = 1: the readouts show S = 16 and H = 4,094. The 10.0.0.0/16 block splits into 16 subnets of about four thousand addresses each — one tile holds the globe, the rest hold locks. +2. Slide p up to 21 (S = 32, H = 2,046), then down to 19 (S = 8, H = 8,190): every step up doubles the subnets and halves their size — the same 65,536 addresses, sliced finer or coarser. +3. Go back to p = 20 and raise pub to 4: four tiles now show the globe and face the world, and 12 stay locked. Real designs keep that number ruthlessly small: web servers face out, databases never do. ## Real-life examples @@ -28,7 +28,7 @@ variables: ## Test yourself 1. Slice the block into exactly 16 subnets. -2. Keep at least 4,000 usable addresses in every subnet. +2. Keep at least 16,000 usable addresses in every subnet. 3. Sixteen subnets guarded by a single public gate. ## Intuition @@ -56,13 +56,17 @@ Private subnets that still need to download updates reach out through a NAT gate ## Real world ### Practically every app you use + Streaming services, banks and games run inside VPCs — "in the cloud" almost always means "inside someone's fenced compound". ### The database that cannot be hacked from outside + Breaches via the open internet stop at the missing route: locked subnets are unreachable by construction, not by vigilance. ### Compliance and banking + Regulators often require exactly this layout — public faces separated from private data by subnets, not promises. ### Hybrid offices + A company VPN often ends inside the VPC, placing the office network and the cloud compound on one private map. diff --git a/content/lessons/networking/cloud-vpc/lesson.yaml b/content/lessons/networking/cloud-vpc/lesson.yaml index f56e41dc..f4ebcfd5 100644 --- a/content/lessons/networking/cloud-vpc/lesson.yaml +++ b/content/lessons/networking/cloud-vpc/lesson.yaml @@ -3,17 +3,17 @@ subject: networking difficulty: high-school equation: S = 2^{p-16}, \qquad H = 2^{32-p} - 2 concepts: -- vpc -- cloud -- subnet -- gateway -- security + - vpc + - cloud + - subnet + - gateway + - security prerequisites: -- routers -- vpn + - routers + - vpn related: -- nas-and-raid -- vpn + - nas-and-raid + - vpn visualization: type: cloud-vpc parameters: @@ -21,30 +21,30 @@ parameters: min: 18 max: 26 step: 1 - value: 20 + value: 22 pub: min: 1 max: 4 step: 1 - value: 1 + value: 2 variables: -- S -- H -- p + - S + - H + - p derivation: -- \text{the rented block holds } 2^{16} = 65536 \text{ addresses} -- S = 2^{p-16} -- H = 2^{32-p} - 2 + - \text{the rented block holds } 2^{16} = 65536 \text{ addresses} + - S = 2^{p-16} + - H = 2^{32-p} - 2 charts: [] primary: p presets: -- p: 20 - pub: 1 -- p: 18 - pub: 2 -- p: 24 - pub: 4 + - p: 20 + pub: 1 + - p: 18 + pub: 2 + - p: 24 + pub: 4 challenges: -- check: abs(2^(p-16) - 16) < 0.5 -- check: 2^(32-p) - 2 >= 4000 -- check: abs(2^(p-16) - 16) < 0.5 and pub < 1.5 + - check: abs(2^(p-16) - 16) < 0.5 + - check: 2^(32-p) - 2 >= 16000 + - check: abs(2^(p-16) - 16) < 0.5 and pub < 1.5 diff --git a/content/lessons/networking/dialer-codes/ar.md b/content/lessons/networking/dialer-codes/ar.md index c97c0e6e..209c74f0 100644 --- a/content/lessons/networking/dialer-codes/ar.md +++ b/content/lessons/networking/dialer-codes/ar.md @@ -14,9 +14,9 @@ variables: ## Try it -1. اترك code عند 0: هذا رقم هاتف عادي، كله أرقام، فيرنّه الهاتف وحسب — لا رمز ولا حيلة. +1. اترك code عند 0: هذا رقم هاتف عادي، كله أرقام، فيتصل به الهاتف مباشرة — لا رمز ولا حيلة. 2. حرّك code إلى 1 ($\texttt{*\#06\#}$): شكل النجمة والمربّع يخبر الهاتف أن هذه ليست مكالمة. يُجاب على الهاتف نفسه، فيظهر رقم IMEI فورًا، ولا يُتَّصل بالمشغّل أبدًا. -3. تابع إلى 2 ($\texttt{*\#21\#}$) ثم 3 ($\texttt{*123\#}$): صارت السلسلة سؤالًا لمشغّلك. راقب السهم يقفز إلى بطاقة الشبكة؛ ارفع rtt فيطول وصول الرد، لأنه يخرج ويعود فعلًا. +3. تابع إلى 2 ($\texttt{*\#21\#}$) ثم 3 ($\texttt{*123\#}$): صارت السلسلة سؤالًا لمشغّلك. راقب السهم يقفز إلى بطاقة الشبكة. عند rtt = 50 تقول القراءة إن الرد يأتي في 50 ms؛ ارفع rtt إلى 200 فتصير 200 ms، لأن الرد يذهب إلى الشبكة ويعود فعلًا. ## Real-life examples @@ -32,38 +32,42 @@ variables: ## Intuition -تبدو لوحة الاتصال بسيطة: تضغط أرقامًا فتُجري مكالمة. لكنها في الحقيقة مُحلِّل صغير، وأول ما تفعله بما كتبته أن تقرّر أيَّ نوع هو. أرقام فقط؟ هذا رقم هاتف — رنّه. أما سلسلة قصيرة مبنية من $\texttt{*}$ و$\texttt{\#}$، مثل $\texttt{*\#06\#}$، فتطابق نمطًا وضعه معيار GSM قبل عقود، فيعرفها الهاتف أمرًا لا رقمًا. +تبدو لوحة الاتصال بسيطة: تضغط أرقامًا فتُجري مكالمة. لكنها في الحقيقة برنامج صغير يفحص ما كتبته، وأول ما تفعله أن تقرّر من أيّ نوع هو. أرقام فقط؟ هذا رقم هاتف — اتصل به. أما سلسلة قصيرة مبنية من $\texttt{*}$ و$\texttt{\#}$، مثل $\texttt{*\#06\#}$، فتطابق نمطًا وضعه معيار GSM قبل عقود، فيعرفها الهاتف أمرًا لا رقمًا. -تنقسم هذه الأوامر ثلاثة أقسام. قليل منها يُجاب على الهاتف نفسه: $\texttt{*\#06\#}$ يقرأ رقمًا من ذاكرة الهاتف وحدها، فيردّ لحظة تضغط الاتصال. ومعظمها سؤال مهذّب للمشغّل — «هل التحويل مُشغَّل؟»، «كم رصيدي؟» — يُحزَم ويُرسَل عبر الشبكة، فيأخذ ذهابًا وإيابًا ويعود رسالةً على الشاشة. وشكل خاص واحد، $\texttt{*\#*\#...\#*\#*}$، لا يُرسَل إلى أي مكان: يحوّله الهاتف إعلانًا داخليًا يستطيع تطبيق على الهاتف أن يصغي إليه، وهكذا تُفتح شاشة معلومات مخفية. اللوحة نفسها، وثلاث وجهات مختلفة تمامًا — وشكل ما تكتبه هو الوحيد الذي يقرّر. +تنقسم هذه الأوامر ثلاثة أقسام. قليل منها يُجاب على الهاتف نفسه: $\texttt{*\#06\#}$ يقرأ رقمًا من ذاكرة الهاتف وحدها، فيردّ لحظة تضغط الاتصال. ومعظمها سؤال مهذّب للمشغّل — «هل التحويل مُشغَّل؟»، «كم رصيدي؟» — يُحزَم ويُرسَل عبر الشبكة، فيأخذ ذهابًا وإيابًا ويعود رسالةً على الشاشة. وشكل خاص واحد، $\texttt{*\#*\#...\#*\#*}$، لا يُرسَل إلى أي مكان: يحوّله الهاتف إلى رسالة داخلية يستطيع تطبيق على الهاتف أن يلتقطها، وهكذا تُفتح شاشة معلومات مخفية. اللوحة نفسها، وثلاث وجهات مختلفة تمامًا — وشكل ما تكتبه هو الوحيد الذي يقرّر. ## Formal -القواعد في المعيار 3GPP TS 22.030. سلسلة الخدمة الإضافية هي $\texttt{*}$ أو $\texttt{\#}$ أو زوج منهما، ثم رمز خدمة من رقمين أو ثلاثة، ثم معامل، تُختم بـ$\texttt{\#}$ — والبادئة تقول هل تستعلم ($\texttt{*\#}$) أم تُفعّل ($\texttt{*}$) أم تُعطّل ($\texttt{\#}$) أم تمحو ($\texttt{\#\#}$). يطابق المُتَّصِل هذه القواعد؛ وما يخالفها يُعامَل أرقامًا تُطلَب. +القواعد في المعيار 3GPP TS 22.030. سلسلة الخدمة الإضافية هي $\texttt{*}$ أو $\texttt{\#}$ أو زوج منهما، ثم رمز خدمة من رقمين أو ثلاثة، ثم معامل، تُختم بـ$\texttt{\#}$ — والبادئة تقول هل تستعلم ($\texttt{*\#}$) أم تُفعّل ($\texttt{*}$) أم تُعطّل ($\texttt{\#}$) أم تمحو ($\texttt{\#\#}$). تقارن لوحة الاتصال ما كتبته بهذه القواعد؛ وما يخالفها تعامله على أنه رقم هاتف تتصل به. -وجهة الطلب تقرّر الكلفة. رمز يجيب عنه الهاتف محليًّا — ورقم IMEI هو المثال المعتاد — لا يكلّف زمن شبكة: $t_{\text{resp}} = 0$. ورمز يصير طلب خدمة إضافية، أو سلسلة USSD، يُرسَل إلى المشغّل ويُجاب عنه بعد ذهاب وإياب واحد: $t_{\text{resp}} = t_{\text{RTT}}$. وتختلف USSD عن الرسالة القصيرة في أنها تمسك جلسة حيّة مع منصّة المشغّل بدل تخزين رسالة، ولهذا تبدو قوائمها فورية ما إن يُدفع الذهاب والإياب. +وجهة الطلب تقرّر الكلفة. رمز يجيب عنه الهاتف محليًّا — ورقم IMEI هو المثال المعتاد — لا يكلّف زمن شبكة: $t_{\text{resp}} = 0$. ورمز يصير طلب خدمة إضافية، أو سلسلة USSD، يُرسَل إلى المشغّل ويُجاب عنه بعد ذهاب وإياب واحد: $t_{\text{resp}} = t_{\text{RTT}}$. وتختلف USSD عن الرسالة القصيرة في أنها تُبقي اتصالًا مفتوحًا مع نظام المشغّل بدل تخزين رسالة، ولهذا تظهر قوائمها فورًا بعد انتهاء الذهاب والإياب. ## Advanced -الشكل $\texttt{*\#*\#...\#*\#*}$ ليس من معيار GSM أصلًا؛ بل اصطلاح من أندرويد. حين يراه المُتَّصِل يبثّ نيّة — $\texttt{android.provider.Telephony.SECRET\_CODE}$ مع الأرقام مضيفًا لها — فيستجيب كل تطبيق سجّل في بيانه مستقبِلًا لذلك المضيف بعينه. والأرقام عادةً اختصار على لوحة المفاتيح (4636 تهجئ INFO)، و«السرّ» ليس إلا أن مطوّرًا اختار الرقم ووصله بشاشة؛ لا شيء مخفيّ على مستوى البروتوكول. +الشكل $\texttt{*\#*\#...\#*\#*}$ ليس من معيار GSM أصلًا؛ بل اصطلاح من أندرويد. حين تراه لوحة الاتصال تبثّ رسالة داخلية (intent) — $\texttt{android.provider.Telephony.SECRET\_CODE}$ ومعها الأرقام — فيستجيب كل تطبيق سجّل نفسه لاستقبال هذه الأرقام بعينها. والأرقام عادةً اختصار على لوحة المفاتيح (4636 تهجئ INFO)، و«السرّ» ليس إلا أن مطوّرًا اختار الرقم ووصله بشاشة؛ لا شيء مخفيّ على مستوى البروتوكول. -وهذا الفصل — رموز الشبكة المعيارية مقابل البثّ المحلي على الهاتف — حدٌّ أمنيّ أيضًا. فلأن وصلة ويب أو رمز QR قد يسلّم سلسلة $\texttt{tel:}$ مباشرة إلى المُتَّصِل، قد يحاول خبيثٌ تشغيل رمز خدمة إضافية مؤذٍ تلقائيًّا؛ لذلك يمنع أندرويد الحديث سلاسل الاتصال الواصلة بهذا الطريق، ويطلب أن يضغط الشخص الاتصال لأي أثر على الشبكة. الرموز نفسها موثّقة وعادية؛ والحذر كله في مَن يملك أن يكتبها. +وهذا الفصل — رموز الشبكة المعيارية مقابل البثّ المحلي على الهاتف — حدٌّ أمنيّ أيضًا. فلأن وصلة ويب أو رمز QR قد يسلّم سلسلة $\texttt{tel:}$ مباشرة إلى لوحة الاتصال، قد يحاول مهاجم تشغيل رمز خدمة إضافية مؤذٍ تلقائيًّا؛ لذلك يمنع أندرويد الحديث سلاسل الاتصال الواصلة بهذا الطريق، ويطلب أن يضغط الشخص الاتصال لأي أثر على الشبكة. الرموز نفسها موثّقة وعادية؛ والحذر كله في مَن يملك أن يكتبها. ## Derivation -1. يصنّف المُتَّصِل السلسلة أولًا: أرقام فقط تعني مكالمة، وسلسلة على شكل $\text{*\#SC\#}$ تطابق قواعد الخدمة الإضافية فتُعامَل رمزًا. +1. تصنّف لوحة الاتصال السلسلة أولًا: أرقام فقط تعني مكالمة، وسلسلة على شكل $\text{*\#SC\#}$ تطابق قواعد الخدمة الإضافية فتُعامَل رمزًا. 2. رمز يجيب عنه الهاتف من ذاكرته، كرقم IMEI، لا يتّصل بأحد: $n = 0$، فيكون $t_{\text{resp}} = 0$ والرد فوري. 3. رمز هو سؤال للمشغّل — طلب حالة تحويل، أو قائمة USSD — يذهب ويعود مرة واحدة: $n = 1$، فيكون $t_{\text{resp}} = t_{\text{RTT}}$، وتنتظر بقدر بُعد الشبكة. ## Real world ### قراءة رقم IMEI للهاتف + كل محل يشتري هاتفًا مستعملًا يكتب $\texttt{*\#06\#}$ ليقرأ رقمه التسلسلي — يعمل بلا شريحة وبلا تغطية لأن الهاتف يجيب نفسه. ### الخدمة الذاتية لدى المشغّل + تعمل الباقات مسبقة الدفع في كثير من العالم على USSD: تشحن وتفحص الرصيد وتبدّل الباقات عبر قوائم من نوع $\texttt{*123\#}$، بلا تطبيق وبلا بيانات تقريبًا. ### التحكّم بإظهار الرقم -كتابة $\texttt{\#31\#}$ قبل رقم تُخفي هويتك المُتَّصِلة في تلك المكالمة وحدها — طلب خدمة إضافية لمكالمة واحدة، تحترمه الشبكة ثم تنساه. + +كتابة $\texttt{\#31\#}$ قبل رقم تُخفي رقمك عن الطرف الآخر في تلك المكالمة وحدها — طلب خدمة إضافية لمكالمة واحدة، تحترمه الشبكة ثم تنساه. ### الاحتيال عبر سلسلة الاتصال -لأن وصلة مضغوطة كانت تستطيع أن تُمرّر رمزًا مباشرة إلى المُتَّصِل، حاول مهاجمون تشغيل سلاسل خدمة إضافية مؤذية تلقائيًّا؛ والدفاع المبني في الهواتف الحديثة ألا تتصرف بناءً على سلسلة كهذه دون أن يضغط الشخص الاتصال. + +لأن الضغط على رابط كان يكفي لتمرير رمز مباشرة إلى لوحة الاتصال، حاول مهاجمون تشغيل سلاسل خدمة إضافية مؤذية تلقائيًّا؛ والدفاع المبني في الهواتف الحديثة ألا تتصرف بناءً على سلسلة كهذه دون أن يضغط الشخص الاتصال. diff --git a/content/lessons/networking/dialer-codes/en.md b/content/lessons/networking/dialer-codes/en.md index 4c75b9eb..ac81791d 100644 --- a/content/lessons/networking/dialer-codes/en.md +++ b/content/lessons/networking/dialer-codes/en.md @@ -1,5 +1,5 @@ --- -title: 'Dialer codes: why some numbers aren''t phone numbers' +title: "Dialer codes: why some numbers aren't phone numbers" summary: >- Type the right short string of stars and hashes into the dialer and it never places a call — the phone reads it as an instruction, and answers it three @@ -17,7 +17,7 @@ variables: 1. Leave code at 0: that is a normal phone number, all digits, so the dialer just rings it — no code, no trick. 2. Drag code to 1 ($\texttt{*\#06\#}$): the star-and-hash shape tells the dialer this is not a call. It is answered on the phone itself — the IMEI appears instantly, and the carrier is never contacted. -3. Drag on to 2 ($\texttt{*\#21\#}$) and 3 ($\texttt{*123\#}$): now the string is a question for your carrier. Watch the arrow jump to the network card; raise rtt and the reply takes longer, because it really does travel out and back. +3. Drag on to 2 ($\texttt{*\#21\#}$) and 3 ($\texttt{*123\#}$): now the string is a question for your carrier. Watch the arrow jump to the network card. With rtt = 50 the readout says the answer takes 50 ms; raise rtt to 200 and it says 200 ms, because the reply really does travel out and back. ## Real-life examples @@ -58,13 +58,17 @@ This split — standard network codes versus phone-local broadcasts — is also ## Real world ### Reading a phone's IMEI + Every shop that buys a used phone types $\texttt{*\#06\#}$ to read its serial — it works with no SIM and no signal because the phone answers itself. ### Carrier self-service + Prepaid plans across much of the world run on USSD: you top up, check balance and switch bundles through $\texttt{*123\#}$-style menus, no app and almost no data needed. ### Caller-ID control + Dialing $\texttt{\#31\#}$ before a number hides your caller ID for that one call — a per-call supplementary-service request the network honours and then forgets. ### Phishing by dialer string + Because a tapped link could once feed a code straight to the dialer, attackers tried to trigger harmful supplementary-service strings automatically; the defence built into modern phones is to never act on such a string without the person pressing dial. diff --git a/content/lessons/networking/dialer-codes/lesson.yaml b/content/lessons/networking/dialer-codes/lesson.yaml index de815003..2c05c4eb 100644 --- a/content/lessons/networking/dialer-codes/lesson.yaml +++ b/content/lessons/networking/dialer-codes/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: high-school equation: t_{\text{resp}} = n\,t_{\text{RTT}} concepts: -- mmi -- ussd -- supplementary-services -- telephony + - mmi + - ussd + - supplementary-services + - telephony prerequisites: -- routers + - routers related: -- dns -- packet-switching + - dns + - packet-switching visualization: type: mmi-dialer visualization3d: @@ -21,7 +21,7 @@ parameters: min: 0 max: 4 step: 1 - value: 1 + value: 0 rtt: min: 10 max: 300 @@ -29,23 +29,23 @@ parameters: value: 50 unit: ms variables: -- t_{\text{resp}} -- n -- t_{\text{RTT}} + - t_{\text{resp}} + - n + - t_{\text{RTT}} derivation: -- '\text{all digits? the dialer places a call. a string shaped } \text{*\#SC\#} \text{ is not a call}' -- '\text{answered on the phone (IMEI): } n = 0,\ t_{\text{resp}} = 0' -- '\text{a question for the carrier (call-forward status, a USSD menu): } n = 1,\ t_{\text{resp}} = t_{\text{RTT}}' + - '\text{all digits? the dialer places a call. a string shaped } \text{*\#SC\#} \text{ is not a call}' + - '\text{answered on the phone (IMEI): } n = 0,\ t_{\text{resp}} = 0' + - '\text{a question for the carrier (call-forward status, a USSD menu): } n = 1,\ t_{\text{resp}} = t_{\text{RTT}}' charts: [] primary: code presets: -- code: 1 - rtt: 50 -- code: 2 - rtt: 50 -- code: 3 - rtt: 120 + - code: 1 + rtt: 50 + - code: 2 + rtt: 50 + - code: 3 + rtt: 120 challenges: -- check: code == 1 or code == 4 -- check: code == 3 -- check: (code == 2 or code == 3) and rtt >= 150 + - check: code == 1 or code == 4 + - check: code == 3 + - check: (code == 2 or code == 3) and rtt >= 150 diff --git a/content/lessons/networking/dns/ar.md b/content/lessons/networking/dns/ar.md index 56d878cb..cfb9116c 100644 --- a/content/lessons/networking/dns/ar.md +++ b/content/lessons/networking/dns/ar.md @@ -6,18 +6,18 @@ summary: >- parameters: step: step — امشِ خطوات البحث cache: cache — المحلِّل يتذكر مسبقًا (0 بارد، 1 دافئ) - rtt: rtt — رحلة ذهاب وإياب واحدة على بعدك + rtt: rtt — زمن رحلة ذهاب وإياب واحدة variables: - كلفة البحث البارد - - كلفة إصابة الذاكرة + - كلفة الجواب من الذاكرة - زمن رحلة واحدة --- ## Try it -1. مع cache عند 0، اسحب step من 0 إلى 4 واقرأ كلام كل محطة: المحلّل يسأل الجذر، والجذر يدله على السجل، والسجل يدله على خادم الموقع، وذلك الأخير وحده يعرف العنوان. -2. اقلب cache إلى 1 واسحب step من جديد: تبهت السلسلة العليا كلها، ويجيب المحلّل من ذاكرته برحلة واحدة. انظر إلى الساعة: ربع الزمن. -3. ارفع rtt إلى 200 وأعد البحث البارد: 800 ملّي ثانية قبل أن تبدأ الصفحة أصلًا. هذا هو البطء الغريب الذي تحسه مع موقع لم يزره أحد قربك من مدة. +1. مع cache عند 0، اسحب step من 0 إلى 4 واقرأ كلام كل محطة: المحلّل يسأل الجذر، والجذر يدله على السجل، والسجل يدله على خادم الموقع، وذلك الأخير وحده يعرف العنوان. عند الخطوة 4 تُظهر القراءات 4 رحلات و200 ms. +2. اقلب cache إلى 1 واسحب step من جديد: تبهت السلسلة العليا كلها، ويجيب المحلّل من ذاكرته برحلة واحدة. انظر إلى الزمن المنقضي: 50 ms، أي ربع الزمن. +3. أعد cache إلى 0 وارفع rtt إلى 200 واسحب step إلى 4 من جديد: 800 ملّي ثانية قبل أن تبدأ الصفحة أصلًا. هذا هو البطء الغريب الذي تحسه مع موقع لم يزره أحد قربك من مدة. ## Real-life examples @@ -45,24 +45,28 @@ variables: ## Advanced -أجوبة DNS وُلدت بلا توقيع، والجواب المزوّر فخ كامل: كتبتَ الاسم الصحيح ووصلتَ إلى خادم المهاجم. يضيف DNSSEC توقيعات على طول السلسلة ليتحقق المحلّل من كل خطوة. وهناك معركة أخرى هي الخصوصية: استعلامات DNS التقليدية تسافر نصًا مكشوفًا، فتستطيع أي شبكة في الطريق تسجيل كل موقع تبحث عنه، وهذا بالضبط التسريب الذي يسده درس VPN؛ أما DNS عبر HTTPS فيلف الاستعلامات داخل حركة ويب مشفرة عادية. وذاكرة المحلّل البريئة هي نقطة التحكم في الإنترنت: الحجب الوطني ومرشحات الأهل تُنفَّذ عادة كمحلّلات ترفض الإجابة عن أسماء معينة. +أجوبة DNS وُلدت بلا توقيع، والجواب المزوّر فخ محكم: كتبتَ الاسم الصحيح ووصلتَ إلى خادم المهاجم. يضيف DNSSEC توقيعات على طول السلسلة ليتحقق المحلّل من كل خطوة. وهناك معركة أخرى هي الخصوصية: استعلامات DNS التقليدية تسافر نصًا مكشوفًا، فتستطيع أي شبكة في الطريق تسجيل كل موقع تبحث عنه، وهذا بالضبط التسريب الذي يسده درس VPN؛ أما DNS عبر HTTPS فيلف الاستعلامات داخل حركة ويب مشفرة عادية. وذاكرة المحلّل البريئة هي نقطة التحكم في الإنترنت: الحجب الوطني ومرشحات الأهل تُنفَّذ عادة كمحلّلات ترفض الإجابة عن أسماء معينة. ## Derivation 1. لا أحد يعرف كل العناوين، لكن السلسلة محكمة: الجذر يعرف السجلات، وكل سجل يعرف خوادم أسمائه، وخادم كل موقع يعرف عنوانه، فينحل السؤال البارد بثلاث إحالات بالضبط. 2. مع قفزتك إلى المحلّل، يكون المجموع $t_{\text{miss}} = 4\,t_{\text{RTT}}$. -3. والجواب المخزّن يقفز فوق الإحالات كلها: $t_{\text{hit}} = t_{\text{RTT}}$، توفير أربع مرات تنعم به كل نقرة بعد الأولى. +3. والجواب المخزّن يقفز فوق الإحالات كلها: $t_{\text{hit}} = t_{\text{RTT}}$، أي ربع الزمن، وهذا ما تستفيد منه كل نقرة بعد الأولى. ## Real world ### النقرة الأولى على موقع جديد + الوقفة الغريبة قبل أن يستجيب موقع غير مألوف هي غالبًا السلسلة الباردة وهي تجري. المتصفحات تستبق فتسأل DNS عن روابط قد تنقرها. ### نقل الاستضافة + نقل موقع إلى خادم جديد هو تغيير سجل واحد عند خادم الأسماء، وينتشر التغيير كلما انتهت صلاحية النسخ المخزنة. ### أعطال تشبه موت الإنترنت + حين يتعطل مزود DNS كبير تختفي آلاف المواقع السليمة دفعة واحدة: الخوادم بخير، لكن أسماءها توقفت عن الترجمة. ### الحجب والترشيح + مرشحات المدارس والشركات والحجب الوطني معظمها محلّلات تجيب عن أسماء معينة بالصمت أو بصفحة تحذير. diff --git a/content/lessons/networking/dns/en.md b/content/lessons/networking/dns/en.md index 979eb2a0..87f819b6 100644 --- a/content/lessons/networking/dns/en.md +++ b/content/lessons/networking/dns/en.md @@ -16,9 +16,9 @@ variables: ## Try it -1. With cache at 0, drag step from 0 to 4 and read each speech bubble: the resolver asks root, root points at the registry, the registry points at the site's own server, and only that last server knows the address. -2. Flip cache to 1 and drag step again: the whole upper chain greys out — the resolver answers from memory in a single round trip, and the stopwatch shows a quarter of the cost. -3. Raise rtt to 200 and run a cold lookup once more: 800 ms before the page can even *begin* — this is the lag you feel on a site nobody near you has visited lately. +1. With cache at 0, drag step from 0 to 4 and read each speech bubble: the resolver asks root, root points at the registry, the registry points at the site's own server, and only that last server knows the address. At step 4 the readouts show 4 round trips and 200 ms. +2. Flip cache to 1 and drag step again: the whole upper chain greys out — the resolver answers from memory in a single round trip, and the elapsed time reads 50 ms, a quarter of the cost. +3. Set cache back to 0, raise rtt to 200 and drag step to 4 once more: 800 ms before the page can even _begin_ — this is the lag you feel on a site nobody near you has visited lately. ## Real-life examples @@ -57,13 +57,17 @@ DNS answers were born unsigned, and a forged answer is a perfect trap: you typed ## Real world ### The first click on any site + That odd pause before an unfamiliar site reacts is often the cold chain running — browsers even "prefetch" DNS for links you might click. ### Changing hosting + Moving a site to a new server is one record change at the authoritative name server; the move ripples out as caches expire, TTL by TTL. ### Outages that look like the internet dying + When a major DNS provider fails, thousands of healthy sites become unreachable at once — the servers are fine, but their names stopped resolving. ### Blocking and filtering + School filters, corporate policies and national blocks are mostly resolvers that answer selected names with silence or a warning page. diff --git a/content/lessons/networking/dns/lesson.yaml b/content/lessons/networking/dns/lesson.yaml index a77598bc..c2fea40b 100644 --- a/content/lessons/networking/dns/lesson.yaml +++ b/content/lessons/networking/dns/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: t_{\text{miss}} = 4\,t_{\text{RTT}}, \qquad t_{\text{hit}} = t_{\text{RTT}} concepts: -- dns -- name-resolution -- caching -- hierarchy + - dns + - name-resolution + - caching + - hierarchy prerequisites: -- routers + - routers related: -- cdn -- tcp + - cdn + - tcp visualization: type: dns-chain parameters: @@ -32,26 +32,26 @@ parameters: value: 50 unit: ms variables: -- t_{\text{miss}} -- t_{\text{hit}} -- t_{\text{RTT}} + - t_{\text{miss}} + - t_{\text{hit}} + - t_{\text{RTT}} derivation: -- '\text{a cold lookup pays 4 round trips: resolver, root, registry, the site''s own server}' -- t_{\text{miss}} = 4\,t_{\text{RTT}} -- '\text{a warm cache answers at the first stop: } t_{\text{hit}} = t_{\text{RTT}}' + - '\text{a cold lookup pays 4 round trips: resolver, root, registry, the site''s own server}' + - t_{\text{miss}} = 4\,t_{\text{RTT}} + - '\text{a warm cache answers at the first stop: } t_{\text{hit}} = t_{\text{RTT}}' charts: [] primary: step presets: -- step: 4 - cache: 0 - rtt: 50 -- step: 4 - cache: 1 - rtt: 50 -- step: 4 - cache: 0 - rtt: 200 + - step: 4 + cache: 0 + rtt: 50 + - step: 4 + cache: 1 + rtt: 50 + - step: 4 + cache: 0 + rtt: 200 challenges: -- check: cache == 0 and step >= 4 -- check: cache == 1 and step >= 1 and rtt <= 20 -- check: cache == 0 and rtt >= 150 and step >= 4 + - check: cache == 0 and step >= 4 + - check: cache == 1 and step >= 1 and rtt <= 20 + - check: cache == 0 and rtt >= 150 and step >= 4 diff --git a/content/lessons/networking/firewall/ar.md b/content/lessons/networking/firewall/ar.md index b1dadbfc..f09e513c 100644 --- a/content/lessons/networking/firewall/ar.md +++ b/content/lessons/networking/firewall/ar.md @@ -6,16 +6,16 @@ summary: >- parameters: web: web — الباب 443، موقعك (0 مغلق، 1 مفتوح) ssh: ssh — الباب 22، الدخول البعيد (0 مسدود، 1 مفتوح) - R: R — كم يطرق البوت الماسح بسرعة + R: R — سرعة طرق البوت الماسح variables: - - كم بابًا يقف مفتوحًا + - عدد الأبواب المفتوحة - محاولات الماسح في الدقيقة --- ## Try it -1. راقب الإعدادات كما هي: الزوار الشرفاء يدخلون من الباب 443 إلى موقعك، ومحاولات البوت الماسح تمطر على الطوب وترتد. الجدار يعمل بصمت. -2. افتح ssh وارفع R إلى 300: خلال لحظات يجد البوت البابَ 22 يجيب، ويبدأ العداد الأحمر. غريب يجرب كلمات السر على جهازك الآن، بلا توقف. +1. راقب الإعدادات كما هي: الزوار العاديون يدخلون من الباب 443 إلى موقعك، ومحاولات البوت الماسح تصطدم بالطوب وترتد. الجدار يعمل بصمت. تُظهر القراءات بابًا واحدًا مفتوحًا و144,000 محاولة في اليوم. +2. افتح ssh وارفع R إلى 300: تُظهر القراءات بابين مفتوحين و432,000 محاولة في اليوم، ويجد البوت البابَ 22 يجيب، ويظهر تحذير أحمر. غريب يجرب كلمات السر على جهازك الآن، بلا توقف. 3. أغلق البابين معًا: أمان كامل وظلام كامل، فالموقع نفسه صار لا يُوصل إليه. الأمن هو اختيار الأبواب التي تستحق الفتح. ## Real-life examples @@ -26,25 +26,25 @@ variables: ## Test yourself -1. شغّل الإعداد السليم: الويب يخدم والدخول البعيد مسدود. -2. مثّل الخطأ الكلاسيكي: ssh مفتوح تحت مسح كثيف، ثم اقرأ ما يفعله البوت. +1. شغّل الإعداد السليم تحت أشد مسح: الويب مفتوح والدخول البعيد مسدود و R عند 500. +2. مثّل الخطأ الشائع: ssh مفتوح تحت مسح كثيف، ثم اقرأ ما يفعله البوت. 3. سُدّ كل شيء وتأكد من اللوحتين معًا: لا ثغرة واحدة، ولا موقع أيضًا. ## Intuition العنوان يوصل الرزمة إلى جهازك، لكن جهازك يدير محادثات كثيرة في وقت واحد، فتحمل كل رزمة رقم باب اسمه المنفذ: 443 للموقع، و22 للدخول البعيد، و25 للبريد. المنافذ هي أرقام الشقق داخل العمارة. والمشكلة أن العمارة تطل على شارع يمشي فيه العالم كله: برامج آلية تمسح الإنترنت بأكمله ليل نهار، تطرق كل باب في كل عنوان وتسجل كل ما يجيب. هي لا تستهدفك أنت، بل تستهدف الجميع، وأنت من الجميع. -الجدار الناري أبسط فكرة أمنية نجحت: جدار كل أبوابه مسدودة بالطوب إلا ما فتحته أنت بقرار صريح. الزائر الشريف يمشي إلى 443 فيُخدَم، وألف طرقة من الماسح تضرب الطوب فلا تتعلم شيئًا. اللعبة كلها في قائمة الاستثناءات القصيرة: كل باب مفتوح وعدٌ دائم بأن البرنامج خلفه قادر على الدفاع عن نفسه أمام كل ما يأتي من الشارع. وعود أقل تعني مداخل أقل. +الجدار الناري أبسط فكرة أمنية نجحت: جدار كل أبوابه مسدودة بالطوب إلا ما فتحته أنت بقرار صريح. الزائر العادي يذهب إلى 443 فيدخل، وألف طرقة من الماسح تضرب الطوب فلا يعرف منها شيئًا. اللعبة كلها في قائمة الاستثناءات القصيرة: كل باب مفتوح وعدٌ دائم بأن البرنامج خلفه قادر على الدفاع عن نفسه أمام كل ما يأتي من الشارع. وعود أقل تعني مداخل أقل. ## Formal -رقم المنفذ 16 بتًا، فلكل عنوان $2^{16} - 1 = 65{,}535$ بابًا ممكنًا. والجدار الذي يمنع كل شيء افتراضيًا يقلص الأبواب المطروقة من كلها إلى $n_{\text{open}}$، وهذا هو سطح الهجوم: الأماكن الوحيدة التي يمكن فيها وخز علّة برمجية من الخارج، فالتعرض $\propto n_{\text{open}}$. +رقم المنفذ 16 بتًا، فلكل عنوان $2^{16} - 1 = 65{,}535$ بابًا ممكنًا. والجدار الذي يمنع كل شيء افتراضيًا يقلص الأبواب المطروقة من كلها إلى $n_{\text{open}}$، وهذا هو سطح الهجوم: الأماكن الوحيدة التي يمكن منها استغلال خطأ برمجي من الخارج، فالتعرض $\propto n_{\text{open}}$. ماسح بمعدل $R$ محاولة في الدقيقة يطرق $1440\,R$ مرة في اليوم، وعلى الطوب لا تكلفك هذه الطرقات شيئًا، وهذا هو المطلوب. وتضيف الجدران الحقيقية فكرتين: الاتجاه، فطلباتك الصادرة وردودها تمر بحرية لأن الجدار يواجه الشارع لا البيت؛ والحالة، فكل رد يُطابق بالمحادثة التي طلبته، فيُسمح بصنف «ردود ما بدأته أنا» من دون فتح أي باب. ## Advanced -الصقل الحديث الأهم هو سؤال من يحق له استخدام الباب المفتوح: الباب 443 مفتوحًا للعالم هو ثمن امتلاك موقع عام، أما الباب 22 مفتوحًا للعالم فلا مبرر له، فتحصره الجدران في عناوين المكتب، أو تسده نهائيًا وتضع SSH خلف الـVPN من درسين مضيا، فلا يرى البابَ إلا من هو داخل الأنبوب المختوم أصلًا. وبعد ذلك يأتي مذهب «انعدام الثقة»: افترض أن الجدار سيُخترق يومًا، وطالب كل خدمة بالتحقق من هوية كل مناد حتى في الداخل. الجدران طبقة أولى، لا طبقة وحيدة. ونظرة الماسح متاحة للجميع: مواقع مثل Shodan تتيح البحث في كل باب يجيب على الإنترنت، ولهذا تعيش جملة «لن يجدها أحد» دقائق لا سنين. +أهم تطوير حديث هو سؤال من يحق له استخدام الباب المفتوح: الباب 443 مفتوحًا للعالم هو ثمن امتلاك موقع عام، أما الباب 22 مفتوحًا للعالم فلا مبرر له، فتحصره الجدران في عناوين المكتب، أو تسده نهائيًا وتضع SSH خلف الـVPN من درسين مضيا، فلا يرى البابَ إلا من هو داخل النفق المغلق أصلًا. وبعد ذلك يأتي مذهب «انعدام الثقة»: افترض أن الجدار سيُخترق يومًا، وطالب كل خدمة بالتحقق من هوية كل من يتصل بها حتى في الداخل. الجدران طبقة أولى، لا طبقة وحيدة. ونظرة الماسح متاحة للجميع: مواقع مثل Shodan تتيح البحث في كل باب يجيب على الإنترنت، ولهذا تعيش جملة «لن يجدها أحد» دقائق لا سنين. ## Derivation @@ -55,13 +55,17 @@ variables: ## Real world ### موجّه بيتك + هو جدار ناري بالتصميم: لا شيء من الخارج يستطيع بدء محادثة إلى الداخل، ولهذا ينجو حاسوبك من الإنترنت المكشوف أصلًا. ### تحصين الخوادم + أول أمر يُكتب على أي خادم سحابي جديد: فعّل الجدار واسمح فقط بالمنفذين أو الثلاثة التي وُجدت الآلة من أجلها. ### باب برامج الفدية المفضل -منافذ سطح المكتب البعيد وSSH المكشوفة بكلمات سر ضعيفة ما تزال طريقًا رئيسيًا إلى شبكات الشركات. العداد الأحمر في المحاكاة، لكن في الواقع. + +منافذ سطح المكتب البعيد وSSH المكشوفة بكلمات سر ضعيفة ما تزال طريقًا رئيسيًا إلى شبكات الشركات. هذا هو التحذير الأحمر في المحاكاة، لكن في الواقع. ### خوادم الألعاب وتمرير المنافذ + استضافة لعبة من البيت تعني فتح باب واحد عمدًا عبر جدار الموجّه، وهي الحالة النادرة التي تقطع فيها شبكة بيت وعدًا للشارع. diff --git a/content/lessons/networking/firewall/en.md b/content/lessons/networking/firewall/en.md index 326b0585..b94e7048 100644 --- a/content/lessons/networking/firewall/en.md +++ b/content/lessons/networking/firewall/en.md @@ -15,9 +15,9 @@ variables: ## Try it -1. Watch the defaults: honest visitors stream through door 443 to your website, while the scanner bot's probes rain against brick and bounce — the wall is doing its job invisibly. -2. Open ssh and raise R to 300: within moments the bot finds door 22 answering, and the red counter starts — a stranger is now guessing passwords at your remote login, around the clock. -3. Close both doors: perfectly safe, perfectly dark — the site is unreachable too. Security is choosing which doors *earn* their opening. +1. Watch the defaults: honest visitors stream through door 443 to your website, while the scanner bot's probes rain against brick and bounce — the wall is doing its job invisibly. The readouts show 1 door open and 144,000 probes a day. +2. Open ssh and raise R to 300: the readouts show 2 doors open and 432,000 probes a day, the bot finds door 22 answering, and a red warning appears — a stranger is now guessing passwords at your remote login, around the clock. +3. Close both doors: perfectly safe, perfectly dark — the site is unreachable too. Security is choosing which doors _earn_ their opening. ## Real-life examples @@ -27,13 +27,13 @@ variables: ## Test yourself -1. Run the healthy setup: web serving, remote login sealed. +1. Run the healthy setup under the heaviest scan: web serving, remote login sealed, R at 500. 2. Recreate the classic mistake: ssh open under a heavy scan — then read what the bot is doing to it. 3. Brick everything and confirm both panels: no attack surface, and no website either. ## Intuition -An address gets a packet to your machine, but a machine runs many conversations at once — so every packet also names a door number, a port: 443 for the website, 22 for remote login, 25 for mail. The port system is just apartment numbers for programs. The trouble is that the building sits on a street the whole world walks: automated scanners sweep the entire internet continuously, knocking on every door of every address, cataloguing whatever answers. They are not targeting you; they are targeting *everyone*, which includes you. +An address gets a packet to your machine, but a machine runs many conversations at once — so every packet also names a door number, a port: 443 for the website, 22 for remote login, 25 for mail. The port system is just apartment numbers for programs. The trouble is that the building sits on a street the whole world walks: automated scanners sweep the entire internet continuously, knocking on every door of every address, cataloguing whatever answers. They are not targeting you; they are targeting _everyone_, which includes you. A firewall is the stupidest security idea that works: a wall where every door is bricked shut unless you explicitly chose otherwise. The honest visitor walks to 443 and is served. The scanner's thousand knocks hit brick and learn nothing. The whole game is the short list of exceptions — each open door is a standing promise that the program behind it can defend itself against everything the street brings, forever. Fewer promises, fewer ways in. @@ -45,7 +45,7 @@ A scanner at $R$ tries per minute lands $1440\,R$ knocks a day; against brick th ## Advanced -The sharpest modern refinement is who may use an open door: door 443 open *to the world* is the cost of having a public website, but door 22 open to the world is unnecessary — firewalls restrict it to the office's addresses, or brick it entirely and put SSH behind the VPN from two lessons back, so the door exists only for people already inside the sealed pipe. Beyond that lies the "zero trust" turn: assume the wall will someday be breached, and demand that every service authenticate every caller even indoors — walls as the first layer, never the only one. And the scanner's eye view is public: sites like Shodan let anyone search every answering door on the internet, which is why "nobody will find it" lasts minutes, not years. +The sharpest modern refinement is who may use an open door: door 443 open _to the world_ is the cost of having a public website, but door 22 open to the world is unnecessary — firewalls restrict it to the office's addresses, or brick it entirely and put SSH behind the VPN from two lessons back, so the door exists only for people already inside the sealed pipe. Beyond that lies the "zero trust" turn: assume the wall will someday be breached, and demand that every service authenticate every caller even indoors — walls as the first layer, never the only one. And the scanner's eye view is public: sites like Shodan let anyone search every answering door on the internet, which is why "nobody will find it" lasts minutes, not years. ## Derivation @@ -56,13 +56,17 @@ The sharpest modern refinement is who may use an open door: door 443 open *to th ## Real world ### Your home router + It firewalls by design: nothing outside can open a conversation inward, which is why your laptop survives the open internet at all. ### Server hardening + The first command on any new cloud server is enabling the firewall and allowlisting the two or three ports the machine is actually for. ### Ransomware's favourite door -Exposed remote-desktop and SSH ports with guessable passwords remain a leading way into company networks — the sim's red counter, in real life. + +Exposed remote-desktop and SSH ports with guessable passwords remain a leading way into company networks — the sim's red warning, in real life. ### Game servers and port forwarding + Hosting a game from home means deliberately opening one door through the router's wall — the rare case where a home network makes a promise to the street. diff --git a/content/lessons/networking/firewall/lesson.yaml b/content/lessons/networking/firewall/lesson.yaml index f2270800..3cd60bf0 100644 --- a/content/lessons/networking/firewall/lesson.yaml +++ b/content/lessons/networking/firewall/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: \text{exposure} \propto n_{\text{open}} concepts: -- firewall -- ports -- attack-surface -- services + - firewall + - ports + - attack-surface + - services prerequisites: -- routers + - routers related: -- vpn -- tcp + - vpn + - tcp visualization: type: firewall-doors parameters: @@ -31,25 +31,25 @@ parameters: step: 10 value: 100 variables: -- n_{\text{open}} -- R + - n_{\text{open}} + - R derivation: -- \text{65,535 numbered doors exist; a firewall bricks them all shut by default} -- '\text{each service you run opens exactly one: } n_{\text{open}} = \text{web} + \text{ssh}' -- \text{a scanner making } R \text{ tries/min knocks } 1440\,R \text{ times a day; only open doors ever answer} + - \text{65,535 numbered doors exist; a firewall bricks them all shut by default} + - '\text{each service you run opens exactly one: } n_{\text{open}} = \text{web} + \text{ssh}' + - \text{a scanner making } R \text{ tries/min knocks } 1440\,R \text{ times a day; only open doors ever answer} charts: [] primary: ssh presets: -- web: 1 - ssh: 0 - R: 100 -- web: 1 - ssh: 1 - R: 300 -- web: 0 - ssh: 0 - R: 500 + - web: 1 + ssh: 0 + R: 100 + - web: 1 + ssh: 1 + R: 300 + - web: 0 + ssh: 0 + R: 500 challenges: -- check: web == 1 and ssh == 0 -- check: ssh == 1 and R >= 300 -- check: web == 0 and ssh == 0 + - check: web == 1 and ssh == 0 and R >= 500 + - check: ssh == 1 and R >= 300 + - check: web == 0 and ssh == 0 diff --git a/content/lessons/networking/latency-and-bandwidth/ar.md b/content/lessons/networking/latency-and-bandwidth/ar.md index 3439a96d..f4f6d5c5 100644 --- a/content/lessons/networking/latency-and-bandwidth/ar.md +++ b/content/lessons/networking/latency-and-bandwidth/ar.md @@ -16,9 +16,9 @@ variables: ## Try it -1. انظر إلى الساعتين أسفل الطريق: ساعة اللاعب لا تقيس إلا طول الطريق، وساعة التحميل لا تهتم إلا بعرضه. حرّك أي منزلق وراقب أيهما يتأثر. -2. اختر إعداد «الألياف»، ثم اسحب L حتى 600 من دون أن تلمس B: تحمرّ ساعة اللاعب بينما لا تكاد ساعة التحميل تتغير. الخط نفسه صار ممتازًا لشيء وسيئًا لشيء آخر. -3. أعد L إلى 40 وأنزل B إلى 10: ينقلب الحال، فالتحميل يتعذب واللاعب مرتاح. الرقمان مستقلان تمامًا. +1. انظر إلى الساعتين أسفل الطريق: ساعة اللاعب تقرأ 40 ms وساعة التحميل 8.0 s. ساعة اللاعب لا تقيس إلا طول الطريق، وساعة التحميل لا تهتم إلا بعرضه. حرّك أي منزلق وراقب أيهما يتأثر. +2. اختر مثال «ألياف في المدينة» (L = 10 و B = 500)، ثم اسحب L حتى 600 من دون أن تلمس B: تحمرّ ساعة اللاعب عند 600 ms بينما لا تتغير ساعة التحميل إلا من 1.6 s إلى 2.2 s. الخط نفسه صار ممتازًا لشيء وسيئًا لشيء آخر. +3. أعد L إلى 40 وأنزل B إلى 10: ينقلب الحال، فتحمرّ ساعة التحميل عند 80.0 s وتبقى ساعة اللاعب خضراء عند 40 ms. الرقمان مستقلان تمامًا. ## Real-life examples @@ -36,17 +36,17 @@ variables: سؤال «هل الإنترنت عندك سريع؟» سؤالان مختبئان في سؤال واحد. الأول: حين تطلب شيئًا من الخادم، كم تنتظر حتى يصلك أول رد؟ هذا هو زمن الاستجابة، وهو طول الطريق، وأنت تدفعه في كل نقرة وكل طلقة في لعبة وكل كلمة في مكالمة. الثاني: بعد أن تبدأ البيانات بالتدفق، كم يصل منها في الثانية؟ هذا هو عرض النطاق، وهو عرض الطريق، وهو ما يهم الملفات الكبيرة. -على الشاشة، راكب الدراجة هو النبضة: يذهب ويعود وحده، فلا تنفعه كثرة الحارات، وينفعه طريق أقصر فقط. والقافلة هي الملف: شاحنات متلاصقة، عددُ الواصل منها كل ثانية يحدده عددُ الحارات، وطول الطريق لا يهمها كثيرًا. لهذا قد تدفع لشركة الإنترنت ثمن «سرعة عشرة أضعاف» ولا تتحسن لعبتك أبدًا: لقد وسّعوا الطريق، وطلقاتك ما تزال تقطع طوله كاملًا. +على الشاشة، راكب الدراجة هو البنغ: يذهب ويعود وحده، فلا تنفعه كثرة الحارات، وينفعه طريق أقصر فقط. والقافلة هي الملف: شاحنات متلاصقة، عددُ الواصل منها كل ثانية يحدده عددُ الحارات، وطول الطريق لا يهمها كثيرًا. لهذا قد تدفع لشركة الإنترنت ثمن «سرعة عشرة أضعاف» ولا تتحسن لعبتك أبدًا: لقد وسّعوا الطريق، وطلقاتك ما تزال تقطع طوله كاملًا. ## Formal زمن جلب ملف حجمه $S$ ميغابايت على خط عرضه $B$ ميغابت في الثانية وزمن استجابته $L$ ملّي ثانية هو تقريبًا $T = \frac{L}{1000} + \frac{8S}{B}$: الحد الأول رحلة الطلب وأول رد، والثاني زمن تدفق البيانات نفسها، والعامل 8 يحوّل البايتات إلى بتات. -الحدان لا يعوّض أحدهما الآخر. طلب صغير جدًا ($S \approx 0$) لا يدفع إلا ثمن الرحلة: $T \approx \frac{L}{1000}$، ولهذا تُقاس الألعاب والمكالمات بالبنغ لا بالميغابت. وملف ضخم زمنه كله تدفق، ويصير زمن الاستجابة فيه خطأ تقريب لا يُذكر. وتفصيل أخير: الاتصال يبدأ بطيئًا ويتسارع عبر عدة رحلات ذهاب وإياب، فزمن الاستجابة الطويل يؤخر حتى بداية التنزيلات الكبيرة. +الحدان لا يعوّض أحدهما الآخر. طلب صغير جدًا ($S \approx 0$) لا يدفع إلا ثمن الرحلة: $T \approx \frac{L}{1000}$، ولهذا تُقاس الألعاب والمكالمات بالبنغ لا بالميغابت. وملف ضخم زمنه كله تدفق، ويصير زمن الاستجابة فيه شيئًا لا يُذكر. وتفصيل أخير: الاتصال يبدأ بطيئًا ويتسارع عبر عدة رحلات ذهاب وإياب، فزمن الاستجابة الطويل يؤخر حتى بداية التنزيلات الكبيرة. ## Advanced -لزمن الاستجابة حد أدنى لا يكسره أي مال: الضوء داخل الألياف يسير بنحو ثلثي $c$، أي قرابة 200,000 كم في الثانية، فرحلة ذهاب وإياب عبر 6,000 كم تكلف 60 ملّي ثانية قبل أن يعمل أي جهاز في الطريق. لهذا كفّت الشركات الكبرى عن محاولة تسريع الخط وصارت تنقل الخادم نفسه قريبًا منك، وهذه فكرة درس CDN المجاور. أما عرض النطاق فمسألة هندسة: مُدَّ أليافًا أكثر يتضاعف. ولهذا نما عرض النطاق آلاف المرات في عقدين بينما لم يتحرك زمن الاستجابة تقريبًا، وصُممت بروتوكولات كاملة مثل HTTP/2 وQUIC لهدف واحد: رحلات ذهاب وإياب أقل. +لزمن الاستجابة حد أدنى لا يكسره أي مال: الضوء داخل الألياف يسير بنحو ثلثي $c$، أي قرابة 200,000 كم في الثانية، فرحلة ذهاب وإياب إلى خادم يبعد 6,000 كم تكلف 60 ملّي ثانية قبل أن يعمل أي جهاز في الطريق. لهذا كفّت الشركات الكبرى عن محاولة تسريع الخط وصارت تنقل الخادم نفسه قريبًا منك، وهذه فكرة درس CDN المجاور. أما عرض النطاق فمسألة هندسة: مُدَّ أليافًا أكثر يتضاعف. ولهذا نما عرض النطاق آلاف المرات في عقدين بينما لم يتحرك زمن الاستجابة تقريبًا، وصُممت بروتوكولات كاملة مثل HTTP/2 وQUIC لهدف واحد: رحلات ذهاب وإياب أقل. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### الألعاب عبر الإنترنت + اللعبة ترسل رزمًا صغيرة باستمرار، فإحساسها كله من زمن الاستجابة. اللاعبون الجادون يطاردون خادمًا تحت 30 ملّي ثانية ولا يسألون عن الميغابت. ### مكالمات الفيديو + المحادثة تتفكك إذا تأخر الرد نحو 200 ملّي ثانية، بينما يكتفي الفيديو نفسه ببضعة ميغابت. المكالمة ابنة زمن الاستجابة لا ابنة عرض النطاق. ### بث الأفلام + المشغّل يحمّل مقدمًا فيخفي زمن الاستجابة تمامًا. جودة البث مسألة عرض نطاق، ولهذا يصلح إنترنت الأقمار للأفلام ولا يصلح للألعاب. ### التداول عالي التردد + شركات تمد أليافًا خاصة بخط مستقيم بين المدن لتكسب ملّي ثانية واحدة. طول الطريق يساوي مالًا حقيقيًا. diff --git a/content/lessons/networking/latency-and-bandwidth/en.md b/content/lessons/networking/latency-and-bandwidth/en.md index 6d8339f4..a4c12e34 100644 --- a/content/lessons/networking/latency-and-bandwidth/en.md +++ b/content/lessons/networking/latency-and-bandwidth/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Watch the two stopwatches with the defaults: the ping rider only cares how long the road is, the convoy below mostly cares how many lanes it has. -2. Set the fibre preset, then drag L up to 600 without touching B: the gamer's stopwatch turns red while the downloader barely notices — same line, opposite verdicts. -3. Now starve B down to 10 with L back at 40: the downloader suffers and the gamer is perfectly happy. The two numbers answer different questions. +1. Watch the two stopwatches with the defaults: the gamer's reads 40 ms and the downloader's 8.0 s. The ping rider only cares how long the road is, the convoy below mostly cares how many lanes it has. +2. Load the «Fibre in the city» example (L = 10, B = 500), then drag L up to 600 without touching B: the gamer's stopwatch turns red at 600 ms while the downloader's only moves from 1.6 s to 2.2 s — same line, opposite verdicts. +3. Now starve B down to 10 with L back at 40: the downloader's stopwatch turns red at 80.0 s while the gamer's is green at 40 ms. The two numbers answer different questions. ## Real-life examples @@ -43,11 +43,11 @@ The road on screen makes the two independent: drag L and the road stretches; dra The time to fetch a file of $S$ megabytes over a line of $B$ megabits per second with round-trip latency $L$ milliseconds is, to a first approximation, $T = \frac{L}{1000} + \frac{8S}{B}$: one round trip to ask, then a stream whose duration depends only on size over rate (the factor 8 converts bytes to bits). -The two terms do not trade against each other. For a tiny request ($S \approx 0$) the formula collapses to $T \approx \frac{L}{1000}$ — pure latency, which is why games and calls specify ping, not megabits. For a huge file the second term dominates and latency becomes a rounding error. Real transfers add a subtlety: a connection starts cautiously and accelerates over several round trips, so high latency also slows the *start* of big downloads — one more reason short roads matter. +The two terms do not trade against each other. For a tiny request ($S \approx 0$) the formula collapses to $T \approx \frac{L}{1000}$ — pure latency, which is why games and calls specify ping, not megabits. For a huge file the second term dominates and latency becomes a rounding error. Real transfers add a subtlety: a connection starts cautiously and accelerates over several round trips, so high latency also slows the _start_ of big downloads — one more reason short roads matter. ## Advanced -Latency has a hard floor that no money removes: light in glass fibre travels at about two-thirds of $c$, roughly 200,000 km/s, so a round trip across 6,000 km of fibre costs 60 ms before a single router has done any work. That is why serious systems move the *server* instead of speeding the line — the CDN lesson next door is exactly this trick. Bandwidth, by contrast, is an engineering variable: lay more fibre, use better encodings, and it multiplies. The asymmetry explains a decade of internet history: bandwidth grew a thousandfold while latency barely moved, and whole protocols (HTTP/2, QUIC) exist mainly to spend fewer round trips. +Latency has a hard floor that no money removes: light in glass fibre travels at about two-thirds of $c$, roughly 200,000 km/s, so a round trip across 6,000 km of fibre costs 60 ms before a single router has done any work. That is why serious systems move the _server_ instead of speeding the line — the CDN lesson next door is exactly this trick. Bandwidth, by contrast, is an engineering variable: lay more fibre, use better encodings, and it multiplies. The asymmetry explains a decade of internet history: bandwidth grew a thousandfold while latency barely moved, and whole protocols (HTTP/2, QUIC) exist mainly to spend fewer round trips. ## Derivation @@ -58,13 +58,17 @@ Latency has a hard floor that no money removes: light in glass fibre travels at ## Real world ### Online games + A game sends tiny packets constantly; its whole feel is the $L$ term. Competitive players hunt for servers under 30 ms and could not care less about their megabits. ### Video calls + A conversation falls apart when replies lag ~200 ms behind; the video itself needs only a few Mbps. Calls are latency creatures, not bandwidth ones. ### Streaming movies + The player buffers ahead, hiding latency completely — streaming quality is almost purely a bandwidth question, which is why satellite internet streams well. ### High-frequency trading + Firms lay private straight-line fibre between cities to shave single milliseconds — the clearest proof that the length of the road is worth real money. diff --git a/content/lessons/networking/latency-and-bandwidth/lesson.yaml b/content/lessons/networking/latency-and-bandwidth/lesson.yaml index 448d399b..325105b7 100644 --- a/content/lessons/networking/latency-and-bandwidth/lesson.yaml +++ b/content/lessons/networking/latency-and-bandwidth/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: T = \frac{L}{1000} + \frac{8S}{B} concepts: -- latency -- bandwidth -- throughput -- ping + - latency + - bandwidth + - throughput + - ping prerequisites: -- routers + - routers related: -- packet-switching -- cdn + - packet-switching + - cdn visualization: type: latency-road parameters: @@ -34,27 +34,27 @@ parameters: value: 100 unit: MB variables: -- T -- L -- B -- S + - T + - L + - B + - S derivation: -- '\text{waiting for the far end: } \frac{L}{1000} \text{ seconds, no matter the width}' -- '\text{streaming the data: } S \text{ MB} = 8S \text{ Mb, so } \frac{8S}{B} \text{ seconds}' -- T = \frac{L}{1000} + \frac{8S}{B} + - '\text{waiting for the far end: } \frac{L}{1000} \text{ seconds, no matter the width}' + - '\text{streaming the data: } S \text{ MB} = 8S \text{ Mb, so } \frac{8S}{B} \text{ seconds}' + - T = \frac{L}{1000} + \frac{8S}{B} charts: [] primary: L presets: -- L: 10 - B: 500 - S: 100 -- L: 600 - B: 200 - S: 100 -- L: 40 - B: 10 - S: 100 + - L: 10 + B: 500 + S: 100 + - L: 600 + B: 200 + S: 100 + - L: 40 + B: 10 + S: 100 challenges: -- check: L <= 20 and B >= 400 -- check: L/1000 + 8*S/B <= 2 and S >= 100 -- check: L >= 500 and B >= 500 + - check: L <= 20 and B >= 400 + - check: L/1000 + 8*S/B <= 2 and S >= 100 + - check: L >= 500 and B >= 500 diff --git a/content/lessons/networking/nas-and-raid/ar.md b/content/lessons/networking/nas-and-raid/ar.md index a73e073f..8daaf59e 100644 --- a/content/lessons/networking/nas-and-raid/ar.md +++ b/content/lessons/networking/nas-and-raid/ar.md @@ -16,37 +16,37 @@ variables: ## Try it -1. ابدأ بوضع التكافؤ (mode = 2) وجِد كتل P الرمادية: مساحة قرص واحد تحمل رياضيات الأمان للبقية كلها. -2. اضبط dead على 1: يموت القرص الأول، ويعيد الصندوق حساب كل شريحة ناقصة من التكافؤ — أبطأ لفترة، لكن لا شيء يضيع. -3. انتقل إلى التقسيم (mode = 0) والقرص ما يزال ميتًا: العطل نفسه يدمّر الملف الآن — كل المساحة، ولا شيء من الأمان. ثم جرّب المرآة (mode = 1). +1. ابدأ بوضع التكافؤ (mode = 2) مع 4 أقراص من 4 TB وابحث عن كتل P الرمادية: المساحة الصالحة 12.0 TB من 16 TB خام، لأن مساحة قرص واحد تحمل حسابات الحماية للبقية كلها. +2. اضبط dead على 1: يموت القرص الأول، ويعيد الصندوق حساب كل شريحة ناقصة من التكافؤ — أبطأ لفترة، لكن لا شيء يضيع: تقول القراءة «الملفات تنجو». +3. انتقل إلى التقسيم (mode = 0) والقرص ما يزال ميتًا: ترتفع المساحة الصالحة إلى 16.0 TB، لكن العطل نفسه يدمّر الملف الآن وتقول القراءة «يضيع كل شيء». ثم جرّب المرآة (mode = 1): المساحة الصالحة 8.0 TB والملفات تنجو. ## Real-life examples -- **صندوق البيت العاقل.** أربعة أقراص من 4 تيرابايت بالتكافؤ: 12 تيرابايت صالحة، وأي قرص واحد يستطيع أن يموت يوم ثلاثاء بلا دراما. +- **صندوق البيت العاقل.** أربعة أقراص من 4 تيرابايت بالتكافؤ: 12 تيرابايت صالحة، وإذا تعطّل أي قرص واحد في أي يوم فلن تخسر شيئًا. - **صندوق المقامر.** الأقراص الأربعة نفسها مقسّمة: 16 تيرابايت كلها صالحة — إلى أن يتعطل قرص واحد فيموت معه كل ملف. -- **ثنائي المرتابين.** وضع المرآة: كل بايت يُكتب مرتين، 8 تيرابايت صالحة، وتوأم القرص الميت لا يرفّ له جفن. +- **صندوق شديد الحذر.** وضع المرآة: كل بايت يُكتب مرتين، 8 تيرابايت صالحة، وتوأم القرص الميت لا يرفّ له جفن. ## Test yourself 1. ابنِ صندوق تكافؤ بمساحة صالحة لا تقل عن 20 تيرابايت. 2. قسّم الصندوق واسحب قرصًا — لترى ما يعِد به RAID 0 حقًا. -3. اعكس الصندوق مرآةً واسحب القرص نفسه — هذه المرة تنجو الصور. +3. اجعل الصندوق في وضع المرآة واسحب القرص نفسه — هذه المرة تنجو الصور. ## Intuition -وحدة NAS — التخزين الموصول بالشبكة — هي سحابة العائلة الخاصة: صندوق أقراص هادئ موصول بالموجّه، يحمل الصور والنسخ الاحتياطية ومكتبة الأفلام لكل جهاز في البيت. والسؤال الذي عليه إجابته ليس السرعة بل الفَناء: الأقراص الصلبة تموت، بانتظام ودون إنذار، فعمل الصندوق الحقيقي هو تقرير ما يحدث في ذلك اليوم. ولهذا القرار اسم: RAID، ومنزلق mode يتيح لك اتخاذه بثلاث طرق بالأقراص نفسها. +وحدة NAS — التخزين الموصول بالشبكة — هي سحابة العائلة الخاصة: صندوق أقراص هادئ موصول بالموجّه، يحمل الصور والنسخ الاحتياطية ومكتبة الأفلام لكل جهاز في البيت. والسؤال الذي عليه إجابته ليس عن السرعة بل عن التعطّل: الأقراص الصلبة تتعطل، وهذا يحدث كثيرًا ودون إنذار، فعمل الصندوق الحقيقي هو تقرير ما يحدث في ذلك اليوم. ولهذا القرار اسم: RAID، ومنزلق mode يتيح لك اتخاذه بثلاث طرق بالأقراص نفسها. -التقسيم يبعثر كتل كل ملف على الأقراص كلها — كل بايت تشتريه بايت تستعمله، وقرص ميت واحد يقطع عمود كل ملف الفقري. والمرآة تكتب كل شيء مرتين، منفقةً نصف المساحة على توأم حي. أما التكافؤ فهو الوسط الذكي: إلى جانب كتل البيانات يخزّن كتل تدقيق صغيرة، وأي كتلة واحدة مفقودة يمكن إعادة حسابها من الناجيات — الملف على الشاشة يعيد تركيب نفسه حرفيًّا حين تسحب القرص. مساحة قرص واحد تشتري شبكة الأمان كاملة. +التقسيم يبعثر كتل كل ملف على الأقراص كلها — كل بايت تشتريه بايت تستعمله، وقرص ميت واحد يُتلف كل الملفات. والمرآة تكتب كل شيء مرتين، منفقةً نصف المساحة على توأم حي. أما التكافؤ فهو الوسط الذكي: إلى جانب كتل البيانات يخزّن كتل تدقيق صغيرة، وأي كتلة واحدة مفقودة يمكن إعادة حسابها من الناجيات — الملف على الشاشة يعيد تركيب نفسه أمامك حين تسحب القرص. مساحة قرص واحد تشتري شبكة الأمان كاملة. ## Formal -في وضع التكافؤ تحصل كل مجموعة من كتل البيانات على كتلة تكافؤ تُحسب بـXOR: ‏$P = b_1 \oplus b_2 \oplus \cdots$، ولأن XOR يفكّ نفسه، فأي كتلة ضائعة تساوي XOR كل البقية — وهذا هو إعادة الحساب الذي تشاهده في المحاكاة. +في وضع التكافؤ تحصل كل مجموعة من كتل البيانات على كتلة تكافؤ تُحسب بـXOR: ‏$P = b_1 \oplus b_2 \oplus \cdots$، ولأن تطبيق XOR مرتين يلغي أثره، فأي كتلة ضائعة تساوي XOR كل البقية — وهذا هو إعادة الحساب الذي تشاهده في المحاكاة. والسعات تتبع مباشرة: التقسيم يستعمل كل شيء، $U = ns$؛ والمرآة تضاعف كل شيء، $U = \frac{ns}{2}$؛ والتكافؤ يحجز مساحة قرص واحد، $U = (n-1)s$. التقسيم وحده يرسب في اختبار القرص الميت الواحد؛ والمرآة والتكافؤ كلاهما ينجح، بثمنين مختلفين. ## Advanced -‏RAID ليس نسخًا احتياطيًّا: يحمي من قرص يحتضر، لا من فيروس فدية أو حذف عرضي أو حريق بيت، وكلها أشياء تنسخها المرآة بأمانة. والتجهيزات الجادة تضيف كتلة تكافؤ ثانية (RAID 6) لأن إعادة بناء قرص حديث متعدد التيرابايتات تستغرق أيامًا من القراءة المجهِدة، في اللحظة التي يكون فيها عطل ثانٍ قاتلًا. والرياضيات نفسها، وقد كبرت إلى الترميز المحوّ، هي طريقة السحب الكبرى في تخزين ملفاتك عبر مراكز بيانات كاملة — صندوق الخزانة والعملاق السحابي يعملان بفكرة واحدة. +‏RAID ليس نسخًا احتياطيًّا: يحمي من قرص يحتضر، لا من فيروس فدية أو حذف عرضي أو حريق بيت، وكلها أشياء تنسخها المرآة بأمانة. والتجهيزات الجادة تضيف كتلة تكافؤ ثانية (RAID 6) لأن إعادة بناء قرص حديث متعدد التيرابايتات تستغرق أيامًا من القراءة المجهِدة، في اللحظة التي يكون فيها عطل ثانٍ قاتلًا. والرياضيات نفسها، في صورة متطورة تسمى ترميز المحو (erasure coding)، هي طريقة السحب الكبرى في تخزين ملفاتك عبر مراكز بيانات كاملة — صندوق الخزانة والعملاق السحابي يعملان بفكرة واحدة. ## Derivation @@ -57,13 +57,17 @@ variables: ## Real world ### خوادم الوسائط المنزلية + وحدة NAS بتطبيق وسائط تبثّ أفلام العائلة إلى كل شاشة في البيت — سحابة الخزانة في موطنها الطبيعي. ### الشركات الصغيرة + تحفظ المكاتب أقراصها المشتركة على صناديق تكافؤ: تُستبدل الأقراص على فنجان قهوة لا على عقود ضائعة. ### مسجّلات المراقبة -أنظمة الكاميرات تكتب بلا توقف لسنوات — والتكافؤ يُبقي الأرشيف حيًّا عبر وفيات الأقراص الروتينية. + +أنظمة الكاميرات تكتب بلا توقف لسنوات — والتكافؤ يحفظ الأرشيف سليمًا مع أن الأقراص تتعطل من حين لآخر. ### السحب الكبرى نفسها -تستخدم مراكز البيانات الترميز المحوّ، وهو صيغة التكافؤ الراشدة، فتوزّع كل ملف على أقراص كثيرة حتى لتموت رفوف كاملة دون أن يلاحظ أحد. + +تستخدم مراكز البيانات ترميز المحو، وهو الصورة المتطورة من التكافؤ، فتوزّع كل ملف على أقراص كثيرة حتى لتموت رفوف كاملة دون أن يلاحظ أحد. diff --git a/content/lessons/networking/nas-and-raid/en.md b/content/lessons/networking/nas-and-raid/en.md index 30f7d79c..0f249f08 100644 --- a/content/lessons/networking/nas-and-raid/en.md +++ b/content/lessons/networking/nas-and-raid/en.md @@ -17,9 +17,9 @@ variables: ## Try it -1. Start in parity mode (mode = 2) and find the grey P blocks: one disk's worth of space holds the safety maths for all the rest. -2. Set dead = 1: the first disk dies, and the box recomputes every missing stripe from parity — slower for a while, but nothing is lost. -3. Switch to stripe (mode = 0) with the disk still dead: the very same failure now destroys the file — all the space, none of the safety. Then try mirror (mode = 1). +1. Start in parity mode (mode = 2) with 4 disks of 4 TB and find the grey P blocks: usable space reads 12.0 TB out of 16 TB raw, because one disk's worth of space holds the safety maths for all the rest. +2. Set dead = 1: the first disk dies, and the box recomputes every missing stripe from parity — slower for a while, but nothing is lost: the readout says «files survive». +3. Switch to stripe (mode = 0) with the disk still dead: usable space rises to 16.0 TB, but the very same failure now destroys the file and the readout says «everything is lost». Then try mirror (mode = 1): 8.0 TB usable, and the files survive. ## Real-life examples @@ -58,13 +58,17 @@ RAID is not backup: it protects against a dying disk, not against ransomware, ac ## Real world ### Home media servers + A NAS running a media app streams the family's films to every screen in the house — the closet cloud in its natural habitat. ### Small businesses + Offices keep their shared drives on parity boxes: disks are replaced over coffee instead of over lost contracts. ### Surveillance recorders + Security camera systems write continuously for years — parity keeps the archive alive through routine disk deaths. ### The big clouds themselves + Data centres use erasure coding, parity's grown-up form, spreading each file across so many disks that whole racks can die unnoticed. diff --git a/content/lessons/networking/nas-and-raid/lesson.yaml b/content/lessons/networking/nas-and-raid/lesson.yaml index 9808fd22..9c0c37c7 100644 --- a/content/lessons/networking/nas-and-raid/lesson.yaml +++ b/content/lessons/networking/nas-and-raid/lesson.yaml @@ -3,14 +3,14 @@ subject: networking difficulty: beginner equation: U = (n-1)s concepts: -- nas -- raid -- redundancy -- storage + - nas + - raid + - redundancy + - storage prerequisites: -- routers + - routers related: -- cloud-vpc + - cloud-vpc visualization: type: nas-raid parameters: @@ -36,29 +36,29 @@ parameters: step: 1 value: 0 variables: -- U -- n -- s + - U + - n + - s derivation: -- \text{stripe } U = ns \text{ and one dead disk loses everything} -- \text{mirror } U = \frac{ns}{2} -- \text{parity } U = (n-1)s + - \text{stripe } U = ns \text{ and one dead disk loses everything} + - \text{mirror } U = \frac{ns}{2} + - \text{parity } U = (n-1)s charts: [] primary: mode presets: -- n: 4 - s: 4 - mode: 2 - dead: 0 -- n: 4 - s: 4 - mode: 0 - dead: 1 -- n: 4 - s: 4 - mode: 1 - dead: 1 + - n: 4 + s: 4 + mode: 2 + dead: 0 + - n: 4 + s: 4 + mode: 0 + dead: 1 + - n: 4 + s: 4 + mode: 1 + dead: 1 challenges: -- check: abs(mode-2) < 0.5 and (n-1)*s >= 20 -- check: abs(mode-0) < 0.5 and dead > 0.5 -- check: abs(mode-1) < 0.5 and dead > 0.5 + - check: abs(mode-2) < 0.5 and (n-1)*s >= 20 + - check: abs(mode-0) < 0.5 and dead > 0.5 + - check: abs(mode-1) < 0.5 and dead > 0.5 diff --git a/content/lessons/networking/packet-switching/ar.md b/content/lessons/networking/packet-switching/ar.md index 7f84812d..be44c77a 100644 --- a/content/lessons/networking/packet-switching/ar.md +++ b/content/lessons/networking/packet-switching/ar.md @@ -16,8 +16,8 @@ variables: ## Try it 1. راقب الإعدادات كما هي: رسالة من 12 كيلوبايت تتقطع 8 رزم مرقمة، الفردية تركب المسار العلوي والزوجية السفلي، وتصل مخلوطة الترتيب إلى الرف الذي يرتبها من جديد. -2. أنزل P إلى 200 بايت: الرسالة نفسها تتفتت 60 قطعة. مظاريف أكثر وعناوين أكثر، والرسالة لم تتغير. -3. اضبط cut على 1: يموت المسار العلوي في منتصف الطريق، فتسلك كل الرزم المسار السفلي بهدوء، من دون أن يخبر أحدٌ المرسل بشيء. +2. أنزل P إلى 200 بايت: تُظهر القراءة k = 60. الرسالة نفسها تتفتت إلى 60 قطعة. مظاريف أكثر وعناوين أكثر، والرسالة لم تتغير. +3. اضبط cut على 1: يموت المسار العلوي في منتصف الطريق، وتقول القراءة «واحد — أُعيد التوجيه»، فتسلك كل الرزم المسار السفلي بهدوء، من دون أن يخبر أحدٌ المرسل بشيء. ## Real-life examples @@ -27,13 +27,13 @@ variables: ## Test yourself -1. اجعل الرسالة تحتاج 8 رزم بالضبط. +1. اجعل الرسالة تحتاج 10 رزم بالضبط. 2. اقطع المسار العلوي وشاهد إعادة التوجيه بعينك. 3. فتّت الرسالة إلى 40 قطعة على الأقل برزم حجمها 300 بايت أو أصغر. ## Intuition -شبكة الهاتف القديمة كانت تعمل كأنبوب مستأجَر: طوال المكالمة يُحجز خط كامل من فمك إلى أذن صديقك، لا يستعمله غيركما. طريقة مضمونة، لكنها مسرفة: الخط يجلس فارغًا في كل لحظة صمت. الإنترنت بُني على القرار المعاكس: لا أحد يملك خطًا، والجميع يتشارك كل شيء. رسالتك تتقطع قطعًا مرقمة، تُكتب على كل قطعة وجهتها كاملة، ثم تُرمى في شبكة من الموجّهات يمررها كلٌّ منها خطوة واحدة نحو الهدف. +شبكة الهاتف القديمة كانت تعمل كأنبوب مستأجَر: طوال المكالمة يُحجز خط كامل من فمك إلى أذن صديقك، لا يستعمله غيركما. طريقة مضمونة، لكنها مسرفة: الخط يبقى فارغًا في كل لحظة صمت. الإنترنت بُني على القرار المعاكس: لا أحد يملك خطًا، والجميع يتشارك كل شيء. رسالتك تتقطع قطعًا مرقمة، تُكتب على كل قطعة وجهتها كاملة، ثم تُرمى في شبكة من الموجّهات يمررها كلٌّ منها خطوة واحدة نحو الهدف. المشهد على الشاشة هو هذا القرار أمام عينيك. الرزمة لا تعرف الطريق، تعرف العنوان فقط، وكل موجّه يعرف خطوة تالية جيدة. رزمتان من الرسالة نفسها قد تسلكان طريقين مختلفين وتصلان بالمقلوب، فيرتبهما الرف المرقم عند المستقبل. وحين يموت مسار، لا يعلن أحد شيئًا: الموجّهات ببساطة تتوقف عن اختياره. وُلد هذا التصميم من سؤال عسكري: أي شبكة تنجو إذا فقدت أي قطعة منها؟ والجواب: شبكة لا توجد فيها قطعة مهمة. @@ -45,7 +45,7 @@ variables: ## Advanced -ثمن المشاركة هو الازدحام: حين تتجمع رزم الجميع على وصلة واحدة تطول طوابير الموجّهات، ويزيد التأخير، وفي النهاية تُرمى رزمٌ أرضًا. وحل الإنترنت يسكن الأطراف لا القلب: المرسلون يراقبون الفقد ويبطّئون أنفسهم (هذا درس TCP المجاور)، فيبقى قلب الشبكة بسيطًا وسريعًا. «قلب بسيط وأطراف ذكية» هو أعمق رهان في تصميم الإنترنت، وهو سبب أن شبكة صُممت أيام الحواسيب العملاقة تحمل اليوم مكالمات الفيديو من دون تعديل: كل ذكاء جديد يُركّب في الطرفين فقط. +ثمن المشاركة هو الازدحام: حين تتجمع رزم الجميع على وصلة واحدة تطول طوابير الموجّهات، ويزيد التأخير، وفي النهاية تُهمَل بعض الرزم فتضيع. وحل الإنترنت موجود في الأطراف لا في القلب: المرسلون يراقبون الفقد ويبطّئون أنفسهم (هذا درس TCP المجاور)، فيبقى قلب الشبكة بسيطًا وسريعًا. «قلب بسيط وأطراف ذكية» هو أعمق رهان في تصميم الإنترنت، وهو سبب أن شبكة صُممت أيام الحواسيب العملاقة تحمل اليوم مكالمات الفيديو من دون تعديل: كل ذكاء جديد يُركّب في الطرفين فقط. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### قطع الكبلات والزلازل + الكبلات البحرية تتعطل باستمرار. جداول التوجيه تتحدث خلال ثوانٍ وتلتف الحركة حول العطب. هذا هدف التصميم، ويتحقق كل يوم. ### حركة مختلطة على سلك واحد + تنزيلك ومكالمة جارك ولعبة شخص غريب تتشارك الوصلة نفسها رزمةً رزمة. لا حجوزات ولا خطوط خاصة، مظاريف متداخلة فقط. ### أمر traceroute + شغّل traceroute على أي موقع يطبع لك الطريق الفعلي الذي سلكته رزمك الآن، قفزة قفزة، وكثيرًا ما يختلف عن طريق ما قبل دقيقة. ### كوكبات الأقمار + شبكات مثل ستارلينك تعيد توجيه الرزم بين أقمار تتحرك باستمرار. تبديل الرزم هو ما يجعل شبكة من قطع متحركة ممكنة أصلًا. diff --git a/content/lessons/networking/packet-switching/en.md b/content/lessons/networking/packet-switching/en.md index de6a3343..609c701a 100644 --- a/content/lessons/networking/packet-switching/en.md +++ b/content/lessons/networking/packet-switching/en.md @@ -17,8 +17,8 @@ variables: ## Try it 1. Watch the defaults: a 12 KB message becomes 8 numbered packets, odd ones riding the top route and even ones the bottom, arriving out of order onto the shelf that reorders them. -2. Drop P to 200 bytes: the same message shatters into 60 pieces — more envelopes, more addresses, more overhead, same letter. -3. Now set cut to 1: the top route dies mid-journey and every packet calmly reroutes through the bottom — nobody upstream had to be told. +2. Drop P to 200 bytes: the readout shows k = 60. The same message shatters into 60 pieces — more envelopes, more addresses, more overhead, same letter. +3. Now set cut to 1: the top route dies mid-journey, the readout says «one — rerouted», and every packet calmly takes the bottom route — nobody upstream had to be told. ## Real-life examples @@ -28,7 +28,7 @@ variables: ## Test yourself -1. Make the message need exactly 8 packets. +1. Make the message need exactly 10 packets. 2. Cut the top route and watch the reroute happen. 3. Shatter the message into at least 40 pieces using packets of 300 bytes or smaller. @@ -42,7 +42,7 @@ The scene on screen is that decision made visible. No packet knows the route; it A message of $S$ kilobytes is $1000\,S$ bytes, and a network's links agree on a maximum transmission unit of $P$ bytes per packet, so the message travels as $k = \left\lceil \frac{1000\,S}{P} \right\rceil$ independent datagrams. Each carries a header with source, destination and a sequence position, which is what makes out-of-order arrival harmless. -Smaller $P$ means more packets and proportionally more header overhead — the reason the internet's standard MTU settled near 1500 bytes. Routing is stateless per packet: a router reads the destination, consults its table for the best next hop as the table stands *now*, and forwards. The table itself is kept fresh by routers gossiping about which links are up, so a cut propagates as new table entries, not as a broken promise to any particular message. +Smaller $P$ means more packets and proportionally more header overhead — the reason the internet's standard MTU settled near 1500 bytes. Routing is stateless per packet: a router reads the destination, consults its table for the best next hop as the table stands _now_, and forwards. The table itself is kept fresh by routers gossiping about which links are up, so a cut propagates as new table entries, not as a broken promise to any particular message. ## Advanced @@ -57,13 +57,17 @@ The trade hidden in the design is that sharing creates congestion: when everyone ## Real world ### Cable cuts and earthquakes + Undersea cables fail constantly; routing tables update within seconds and traffic flows around the damage — the design goal, achieved daily. ### Mixed traffic on one wire + Your download, a neighbour's call and a stranger's game share each link packet by packet — no circuits, no reservations, just interleaved envelopes. ### Traceroute + Run traceroute to any site and it prints the actual hop-by-hop path your packets chose just now — often different from the path a minute ago. ### Satellite constellations + Starlink-style meshes reroute packets between moving satellites continuously: packet switching is what makes a network of moving parts even possible. diff --git a/content/lessons/networking/packet-switching/lesson.yaml b/content/lessons/networking/packet-switching/lesson.yaml index 07a54662..fe048841 100644 --- a/content/lessons/networking/packet-switching/lesson.yaml +++ b/content/lessons/networking/packet-switching/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: k = \left\lceil \frac{1000\,S}{P} \right\rceil concepts: -- packets -- routing -- redundancy -- reassembly + - packets + - routing + - redundancy + - reassembly prerequisites: -- latency-and-bandwidth + - latency-and-bandwidth related: -- tcp -- routers + - tcp + - routers visualization: type: packet-switch parameters: @@ -33,26 +33,26 @@ parameters: step: 1 value: 0 variables: -- k -- S -- P + - k + - S + - P derivation: -- \text{a message of } S \text{ KB is } 1000\,S \text{ bytes} -- \text{each packet carries at most } P \text{ bytes} -- k = \left\lceil \frac{1000\,S}{P} \right\rceil \text{ packets, each finding its own route} + - \text{a message of } S \text{ KB is } 1000\,S \text{ bytes} + - \text{each packet carries at most } P \text{ bytes} + - k = \left\lceil \frac{1000\,S}{P} \right\rceil \text{ packets, each finding its own route} charts: [] primary: cut presets: -- S: 12 - P: 1500 - cut: 0 -- S: 12 - P: 200 - cut: 0 -- S: 12 - P: 1500 - cut: 1 + - S: 12 + P: 1500 + cut: 0 + - S: 12 + P: 200 + cut: 0 + - S: 12 + P: 1500 + cut: 1 challenges: -- check: ceil(1000*S/P) == 8 -- check: cut == 1 -- check: P <= 300 and ceil(1000*S/P) >= 40 + - check: ceil(1000*S/P) == 10 + - check: cut == 1 + - check: P <= 300 and ceil(1000*S/P) >= 40 diff --git a/content/lessons/networking/routers/ar.md b/content/lessons/networking/routers/ar.md index 713b565c..584ec580 100644 --- a/content/lessons/networking/routers/ar.md +++ b/content/lessons/networking/routers/ar.md @@ -13,19 +13,19 @@ variables: ## Try it -1. أبقِ p = 24 وd = 4 وتتبّع رزمة واحدة: تغادر جهازًا ملوّنًا، وتبلغ الموجّه، وتتابع إلى السحابة بلون جديد — خارج البيت، كل الرزم تلبس العنوان العام نفسه. +1. أبقِ p = 24 وd = 4 (تُظهر القراءة 254 عنوانًا متاحًا) وتتبّع رزمة واحدة: تغادر جهازًا ملوّنًا، وتصل إلى الموجّه، وتتابع إلى السحابة بلون جديد — خارج البيت، كل الرزم تحمل العنوان العام نفسه. 2. ارفع d إلى 8: أجهزة أكثر ورزم ملوّنة أكثر، وما يزال العنوان العام واحدًا — جدول NAT تحت الموجّه هو ما يمنع اختلاط الردود. -3. الآن ادفع p إلى 30: تنكمش الشبكة الخاصة إلى عنوانين صالحين فقط ويفيض البيت — طول البادئة وحده يقرر حجم الشبكة. +3. الآن ارفع p إلى 30: تهبط القراءة إلى عنوانين متاحين فقط وتحمرّ، ويظهر تحذير «الشبكة ممتلئة»، لأن 8 أجهزة لا يكفيها عنوانان — طول البادئة وحده يقرر حجم الشبكة. ## Real-life examples - **بيت عادي.** p = 24 يعطي 254 عنوانًا صالحًا — يكفي 4 أجهزة اليوم، ويفسح لكل مصباح وجرس باب سيأتي لاحقًا. -- **وصلة من نقطة إلى نقطة.** p = 30 يترك عنوانين بالضبط، المقاس الكلاسيكي لكابل يصل موجّهين لا غير. +- **وصلة من نقطة إلى نقطة.** p = 30 يترك عنوانين بالضبط، الحجم المعتاد لكابل يصل موجّهين لا غير. - **بيت ذكي ممتلئ.** 8 أجهزة على p = 24: مهما ازدحم الداخل، لا يغادر المبنى إلا عنوان عام واحد. ## Test yourself -1. اضبط البادئة بحيث تتسع الشبكة لـ254 جهازًا بالضبط. +1. اضبط البادئة بحيث تتسع الشبكة لـ62 جهازًا بالضبط. 2. قلّص الشبكة إلى عنوانين صالحين بالضبط. 3. املأ البيت: صِل الأجهزة الثمانية كلها. @@ -33,34 +33,38 @@ variables: تخيّل عمارة سكنية لها عنوان شارع واحد. رسائل كل الشقق تخرج عبر البوّاب، الذي يختمها جميعًا بعنوان العمارة ويدوّن في دفتره أي شقة أرسلت ماذا — فإذا وصل ردّ، عرف بالضبط أي باب يطرق. موجّهك هو ذلك البوّاب: على الشاشة، تتحول رزم كل جهاز الملوّنة إلى رزم عامة متطابقة عند الموجّه، وجدول NAT تحته هو الدفتر. -داخل العمارة، ما تزال الشقق تحتاج أرقامها الخاصة: تلك هي الشبكة الفرعية الخاصة، 192.168.1.x، غير المرئية للعالم الخارجي. وعدد الأرقام الموجودة يحدده طول البادئة $p$: من بتات العنوان الـ32، تسمّي أول $p$ منها الشبكة والبقية تسمّي الجهاز، فيتسع البيت لـ$H = 2^{32-p} - 2$ منها. حرّك p وراقب قراءة السعة تنهار من المئات إلى اثنين. +داخل العمارة، ما تزال الشقق تحتاج أرقامها الخاصة: تلك هي الشبكة الفرعية الخاصة، 192.168.1.x، غير المرئية للعالم الخارجي. وعدد الأرقام الموجودة يحدده طول البادئة $p$: من بتات العنوان الـ32، تسمّي أول $p$ منها الشبكة والبقية تسمّي الجهاز، فيتسع البيت لـ$H = 2^{32-p} - 2$ منها. حرّك p وراقب قراءة العناوين المتاحة تهبط من المئات إلى اثنين. ## Formal -عنوان IPv4 هو 32 بتًّا. تُكتب الشبكة بادئةً، مثل 192.168.1.0/24: أول $p$ بتًّا ثابتة لكل من في الداخل، والبتات المتبقية $32 - p$ حرة، فتعطي $H = 2^{32-p} - 2$ عنوانًا صالحًا — والعنوانان الضائعان يسمّيان الشبكة نفسها ونداءها الجماعي للجميع دفعة واحدة. +عنوان IPv4 هو 32 بتًّا. تُكتب الشبكة بادئةً، مثل 192.168.1.0/24: أول $p$ بتًّا ثابتة لكل من في الداخل، والبتات المتبقية $32 - p$ حرة، فتعطي $H = 2^{32-p} - 2$ عنوانًا صالحًا — والعنوانان الناقصان محجوزان: واحد لاسم الشبكة نفسها، وواحد للبث إلى كل الأجهزة دفعة واحدة. -ترجمة عناوين الشبكة (NAT) هي دفتر البوّاب بدقة: لكل اتصال خارج يستبدل الموجّه بـ(العنوان الخاص، المنفذ) الزوجَ (العنوان العام، منفذًا جديدًا) ويخزّن الزوج؛ وكل ردّ وارد يُطابَق مع الجدول ويُعاد كتابته. وعناوين مثل 192.168.x.x محجوزة للاستخدام الخاص، فتعيد ملايين البيوت استخدامها دون أي تصادم. +ترجمة عناوين الشبكة (NAT) هي دفتر البوّاب بدقة: لكل اتصال خارج يضع الموجّه (العنوان العام، منفذًا جديدًا) مكان (العنوان الخاص، المنفذ) ويخزّن الزوجين في جدوله؛ وكل ردّ وارد يُطابَق مع الجدول ويُعاد كتابته. وعناوين مثل 192.168.x.x محجوزة للاستخدام الخاص، فتعيد ملايين البيوت استخدامها دون أي تصادم. ## Advanced -صار NAT عالميًّا لأن عناوين IPv4 نفدت: 32 بتًّا تعطي نحو 4.3 مليار عنوان لأجهزة تفوقها عددًا بكثير، فتختبئ بيوت كاملة — ومع NAT على مستوى المشغّل، أحياء كاملة — خلف عناوين عامة مفردة. والثمن أن الأجهزة خلف NAT يصعب بلوغها من الخارج (ومن هنا توجيه المنافذ لخوادم الألعاب)، ومنافذ الجدول محدودة. أما IPv6، بعناوينه ذات 128 بتًّا، فيمنح كل مصباح على الأرض عنوانه العام ويجعل الدفتر اختياريًّا. +انتشر NAT في كل مكان لأن عناوين IPv4 نفدت: 32 بتًّا تعطي نحو 4.3 مليار عنوان لأجهزة تفوقها عددًا بكثير، فتختبئ بيوت كاملة — ومع NAT على مستوى المشغّل، أحياء كاملة — خلف عناوين عامة مفردة. والثمن أن الأجهزة خلف NAT يصعب الوصول إليها من الخارج (ومن هنا توجيه المنافذ لخوادم الألعاب)، ومنافذ الجدول محدودة. أما IPv6، بعناوينه ذات 128 بتًّا، فيمنح كل مصباح على الأرض عنوانه العام ويجعل الدفتر اختياريًّا. ## Derivation 1. عنوان IPv4 فيه 32 بتًّا؛ أول $p$ منها يسمّي الشبكة، والبتات الباقية تسمّي الجهاز. -2. مع $p = 24$ تبقى 8 بتات فيتسع $2^{8} - 2 = 254$ جهازًا — والعنوانان الناقصان هما اسم الشبكة نفسها ونداؤها الجماعي. +2. مع $p = 24$ تبقى 8 بتات فيتسع $2^{8} - 2 = 254$ جهازًا — والعنوانان الناقصان هما اسم الشبكة نفسها وعنوان البث إلى الجميع. 3. مع $p = 30$ لا يبقى إلا $2^{2} - 2 = 2$: ما يكفي بالضبط لكابل واحد بين موجّهين. ## Real world ### الصندوق قرب بابك + كل موجّه منزلي بوّاب ودفتر عناوين ومترجم في آن واحد — وما واي فاي إلا طريقة وصول الرزم إليه عبر الهواء. ### NAT على مستوى المشغّل -كثير من شبكات الجوال تضع آلاف الزبائن خلف عنوان عام واحد، مشغّلةً الدفتر نفسه على مقياس مدينة. + +كثير من شبكات الجوال تضع آلاف الزبائن خلف عنوان عام واحد، فتستعمل الدفتر نفسه لكن بحجم مدينة. ### توجيه المنافذ للألعاب -استضافة خادم لعبة من البيت تعني إخبار البوّاب مسبقًا: كل ما يصل على هذا المنفذ يذهب إلى تلك الآلة. + +استضافة خادم لعبة من البيت تعني إخبار البوّاب مسبقًا: كل ما يصل على هذا المنفذ يذهب إلى ذلك الجهاز. ### لماذا يعمل 192.168.1.1 في كل بيت + النطاقات الخاصة محجوزة تحديدًا لتُعاد الأرقام نفسها في كل بيت على الأرض دون تصادم واحد. diff --git a/content/lessons/networking/routers/en.md b/content/lessons/networking/routers/en.md index e3ded9c7..b7c2a686 100644 --- a/content/lessons/networking/routers/en.md +++ b/content/lessons/networking/routers/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. Keep p = 24 and d = 4 and follow one packet: it leaves a coloured gadget, reaches the router, and continues to the cloud recoloured — outside the house, every packet wears the same public address. +1. Keep p = 24 and d = 4 (the readout shows 254 addresses available) and follow one packet: it leaves a coloured gadget, reaches the router, and continues to the cloud recoloured — outside the house, every packet wears the same public address. 2. Raise d to 8: more gadgets, more coloured packets, still one public address — the NAT table under the router is what keeps the replies from getting mixed up. -3. Now push p to 30: the private subnet shrinks to just 2 usable addresses and the house overflows — the prefix length alone decides how big a network is. +3. Now push p to 30: the readout drops to 2 addresses available and turns red, and a «subnet full» warning appears, because 8 gadgets cannot share 2 addresses — the prefix length alone decides how big a network is. ## Real-life examples @@ -26,7 +26,7 @@ variables: ## Test yourself -1. Set the prefix so the subnet holds exactly 254 gadgets. +1. Set the prefix so the subnet holds exactly 62 gadgets. 2. Shrink the subnet to exactly 2 usable addresses. 3. Fill the house: connect all 8 gadgets. @@ -55,13 +55,17 @@ NAT became universal because IPv4 ran out: 32 bits give about 4.3 billion addres ## Real world ### The box by your door + Every home router is doorman, address book and translator at once — the Wi-Fi is just how packets reach it through the air. ### Carrier-grade NAT + Many mobile networks put thousands of customers behind one public address, running the same ledger at city scale. ### Port forwarding for games + Hosting a game server from home means telling the doorman in advance: anything arriving on this port goes to that machine. ### Why 192.168.1.1 works in every house + Private ranges are reserved precisely so the same numbers can be reused in every home on Earth without a single clash. diff --git a/content/lessons/networking/routers/lesson.yaml b/content/lessons/networking/routers/lesson.yaml index 2dec6b32..8e87c47c 100644 --- a/content/lessons/networking/routers/lesson.yaml +++ b/content/lessons/networking/routers/lesson.yaml @@ -3,14 +3,14 @@ subject: networking difficulty: beginner equation: H = 2^{32-p} - 2 concepts: -- router -- nat -- ip-address -- subnet + - router + - nat + - ip-address + - subnet prerequisites: [] related: -- wifi -- vpn + - wifi + - vpn visualization: type: home-router parameters: @@ -25,22 +25,22 @@ parameters: step: 1 value: 4 variables: -- H -- p + - H + - p derivation: -- H = 2^{32-p} - 2 -- p = 24 \Rightarrow H = 2^{8} - 2 = 254 -- p = 30 \Rightarrow H = 2^{2} - 2 = 2 + - H = 2^{32-p} - 2 + - p = 24 \Rightarrow H = 2^{8} - 2 = 254 + - p = 30 \Rightarrow H = 2^{2} - 2 = 2 charts: [] primary: d presets: -- p: 24 - d: 4 -- p: 30 - d: 2 -- p: 24 - d: 8 + - p: 24 + d: 4 + - p: 30 + d: 2 + - p: 24 + d: 8 challenges: -- check: abs(2^(32-p) - 2 - 254) < 0.5 -- check: abs(2^(32-p) - 2 - 2) < 0.5 -- check: d > 7.5 + - check: abs(2^(32-p) - 2 - 62) < 0.5 + - check: abs(2^(32-p) - 2 - 2) < 0.5 + - check: d > 7.5 diff --git a/content/lessons/networking/ss7/ar.md b/content/lessons/networking/ss7/ar.md index 8c72a554..b06f3027 100644 --- a/content/lessons/networking/ss7/ar.md +++ b/content/lessons/networking/ss7/ar.md @@ -19,7 +19,7 @@ variables: 1. اترك mode على 0 (مكالمة)، وحرّك step من 0 إلى 5. اقرأ كل رسالة في الفقاعة أعلى الرسم. ثم انظر إلى الخط 7 في الأسفل: يُحجز لك عند 1، ويحمل صوتيكما عند 3، ويعود فارغًا عند 5. 2. اجعل mode يساوي 1 (رسالة نصية). تبقى خطوط الصوت رمادية طوال الوقت، لأن نص الرسالة ينتقل داخل رسالة إشارة. عُدّ الرسائل: اثنتان لمعرفة مكان الهاتف، واثنتان لتوصيل النص. -3. ارفع h وhop. تقطع كل رسالة وصلات أكثر، وتأخذ كل وصلة وقتًا أطول، فيكبر زمن الانتظار في المربع الأخير. +3. عُد إلى mode يساوي 0 واجعل h يساوي 6 وhop يساوي 50. تقطع كل رسالة وصلات أكثر، وتأخذ كل وصلة وقتًا أطول: تأخذ الرسالة الواحدة الآن 300 ms، ويقول المربع الأخير إنك تسمع الرنين بعد 600 ms. ## Real-life examples @@ -66,16 +66,21 @@ SS7 (نظام الإشارات رقم 7) مجموعة بروتوكولات وض ## Real world ### الرنين الذي تسمعه + الرنين الذي تسمعه وأنت تنتظر يشغّله سنترالك أنت. ولا يبدأ إلا بعد أن تعود رسالة ACM، وقبلها تكون الشبكة ما زالت تتفق على المكالمة. ### لماذا كانت الرسالة 160 حرفًا + كان على الرسالة النصية أن تتسع داخل رسالة إشارة واحدة، وهذه تترك لها 140 بايت. إذا أخذ كل حرف 7 بتات، يتسع المكان لـ 160 حرفًا بالضبط. ### التجوال في الخارج + حين تفتح هاتفك في بلد آخر، يرسل سنترال ذلك البلد رسالة SS7 إلى سجلك الرئيسي. ومن تلك اللحظة تُرسل كل مكالمة ورسالة لرقمك إلى الخارج حتى تصل إليك. ### الاحتفاظ برقمك + حين تنقل رقمك إلى شركة اتصالات جديدة، تسأل السنترالات الأخرى قاعدة بيانات عبر SS7: أي شركة تملك هذا الرقم الآن؟ ثم تجهّز المكالمة. ### رموز البنك المسروقة + في 2017 استعمل لصوص في ألمانيا وصولًا إلى SS7 ليحوّلوا رموز البنك المرسلة إلى عملاء في رسائل نصية إلى أنفسهم، ثم أفرغوا حساباتهم. لهذا تراقب شركات الاتصالات حركة SS7 اليوم، وتفضّل البنوك الموافقة من التطبيق. diff --git a/content/lessons/networking/ss7/en.md b/content/lessons/networking/ss7/en.md index 4f027162..aaec9a8a 100644 --- a/content/lessons/networking/ss7/en.md +++ b/content/lessons/networking/ss7/en.md @@ -19,7 +19,7 @@ variables: 1. Leave mode at 0 (a call) and move step from 0 to 5. Read each message in the bubble at the top. Then look at line 7 at the bottom: it is kept for you at step 1, carries your voices at step 3 and is free again at step 5. 2. Set mode to 1 (a text). The voice lines stay grey the whole time, because the text rides inside a signalling message. Count the messages: two to find the phone, two to deliver the text. -3. Raise h and hop. Each message crosses more links, and each link takes longer, so the wait in the last box grows. +3. Go back to mode 0 and set h to 6 and hop to 50. Each message crosses more links, and each link takes longer: one message now takes 300 ms, and the last box says you hear ringing after 600 ms. ## Real-life examples @@ -66,16 +66,21 @@ Operators now put SS7 firewalls at their borders, which drop requests that shoul ## Real world ### The ringing tone you hear + The ringing you hear while you wait is played by your own exchange, and it starts only when the ACM message has come back. Until then the network is still agreeing on the call. ### Why texts had 160 letters + A text had to fit inside one signalling message, which left room for 140 bytes. With 7 bits per letter, that is exactly 160 letters. ### Roaming abroad + When you switch on your phone in another country, the exchange there sends an SS7 message to your home register. From then on, every call and text for your number is sent abroad to find you. ### Keeping your number + When you move your number to a new company, other exchanges ask a database over SS7 which company owns the number now, before they set up the call. ### Stolen bank codes + In 2017, thieves in Germany used SS7 access to redirect bank customers' text-message codes to themselves and emptied their accounts. This is why operators now filter SS7 traffic and banks prefer app approvals. diff --git a/content/lessons/networking/ss7/lesson.yaml b/content/lessons/networking/ss7/lesson.yaml index ae1ee027..758ecd12 100644 --- a/content/lessons/networking/ss7/lesson.yaml +++ b/content/lessons/networking/ss7/lesson.yaml @@ -3,17 +3,17 @@ subject: networking difficulty: high-school equation: t_{\text{wait}} = 2\,n\,h\,t_{\text{hop}} concepts: -- ss7 -- signalling -- call-setup -- roaming -- sms + - ss7 + - signalling + - call-setup + - roaming + - sms prerequisites: -- dialer-codes + - dialer-codes related: -- cell-towers -- packet-switching -- latency-and-bandwidth + - cell-towers + - packet-switching + - latency-and-bandwidth visualization: type: ss7-signal visualization3d: @@ -41,32 +41,32 @@ parameters: value: 20 unit: ms variables: -- t_{\text{wait}} -- n -- h -- t_{\text{hop}} + - t_{\text{wait}} + - n + - h + - t_{\text{hop}} derivation: -- '\text{one message crosses } h \text{ links: } h\,t_{\text{hop}}' -- '\text{there and back: } 2\,h\,t_{\text{hop}}' -- '\text{a call needs one round trip } (n = 1)\text{, a text or a trip abroad needs two } (n = 2)' -- t_{\text{wait}} = 2\,n\,h\,t_{\text{hop}} + - '\text{one message crosses } h \text{ links: } h\,t_{\text{hop}}' + - '\text{there and back: } 2\,h\,t_{\text{hop}}' + - '\text{a call needs one round trip } (n = 1)\text{, a text or a trip abroad needs two } (n = 2)' + - t_{\text{wait}} = 2\,n\,h\,t_{\text{hop}} charts: [] primary: step presets: -- mode: 0 - step: 2 - h: 3 - hop: 20 -- mode: 1 - step: 4 - h: 6 - hop: 25 -- mode: 2 - step: 5 - h: 7 - hop: 40 + - mode: 0 + step: 2 + h: 3 + hop: 20 + - mode: 1 + step: 4 + h: 6 + hop: 25 + - mode: 2 + step: 5 + h: 7 + hop: 40 challenges: -- check: mode == 0 and step == 2 -- check: mode == 1 and step == 3 -- check: mode == 0 and 2*h*hop > 500 -- check: mode == 2 and step == 5 and 4*h*hop < 100 + - check: mode == 0 and step == 2 + - check: mode == 1 and step == 3 + - check: mode == 0 and 2*h*hop > 500 + - check: mode == 2 and step == 5 and 4*h*hop < 100 diff --git a/content/lessons/networking/tcp/ar.md b/content/lessons/networking/tcp/ar.md index 526bffe4..33736216 100644 --- a/content/lessons/networking/tcp/ar.md +++ b/content/lessons/networking/tcp/ar.md @@ -5,7 +5,7 @@ summary: >- يأته إيصاله. هكذا تصير الرداءة بطئًا لا فقدانًا. parameters: loss: loss — كم يُسقط الخط من كل شيء - ack: ack — أوراق الشكر (1 يعني TCP، 0 يعني UDP) + ack: ack — الإيصالات (1 يعني TCP، 0 يعني UDP) variables: - متوسط الإرسالات لكل رزمة واصلة - احتمال سقوط الرزمة الواحدة @@ -13,9 +13,9 @@ variables: ## Try it -1. مع الإعدادات كما هي، ابحث عن الشريحة التي سقطت في العاصفة: لم يرجع عنها إيصال، فأعاد المرسل إرسالها بهدوء، والصورة على اليمين وصلت كاملة رغم كل شيء. -2. اقلب ack إلى 0 وارفع الفقد قليلًا: العاصفة نفسها تترك الآن ثقوبًا دائمة في الصورة، لأن لا أحد يتابع ما وصل وما ضاع. -3. ارفع الفقد إلى 40 وأعد ack إلى 1: الصورة تكتمل مع ذلك، متأخرة وبإعادات كثيرة، لكنها كاملة. اقرأ E: عند فقد 40% تكلف كل رزمة 1.67 إرسالًا في المتوسط. +1. مع الإعدادات كما هي (loss = 10 و ack = 1)، ابحث عن الشريحة التي سقطت في العاصفة، وهي الشريحة 2: لم يرجع عنها إيصال، فأعاد المرسل إرسالها بهدوء، والصورة على اليمين وصلت كاملة رغم كل شيء. +2. اجعل ack يساوي 0: الشريحة 2 لا تصل أبدًا وتقرأ «وصل من الصورة» 90%. ارفع loss إلى 20 فتنزل إلى 80%: العاصفة نفسها تترك الآن ثقوبًا دائمة في الصورة، لأن لا أحد يتابع ما وصل وما ضاع. +3. ارفع loss إلى 40 وأعد ack إلى 1: الصورة تكتمل مع ذلك (100%)، متأخرة وبأربع إعادات، لكنها كاملة. اقرأ E: عند فقد 40% تكلف كل رزمة 1.67 إرسالًا في المتوسط. ## Real-life examples @@ -31,7 +31,7 @@ variables: ## Intuition -أسلاك الإنترنت لا تَعِد بشيء: الموجّه المزدحم يرمي رزمتك أرضًا ولا يصفّر أحد. فكيف يصل تحويل مصرفي سليمًا؟ ليس لأن الخط جيد، بل لأن الطرفين لا يثقان به أصلًا. المرسل يرقّم كل قطعة. والمستقبل يرد على كل قطعة تصله بإيصال صغير. والمرسل يحتفظ بكل قطعة حتى يصله إيصالها، فإن تأخر الإيصال أعاد إرسالها، مرة ومرتين وما لزم. +أسلاك الإنترنت لا تَعِد بشيء: الموجّه المزدحم يرمي رزمتك ولا يخبر أحدًا. فكيف يصل تحويل مصرفي سليمًا؟ ليس لأن الخط جيد، بل لأن الطرفين لا يثقان به أصلًا. المرسل يرقّم كل قطعة. والمستقبل يرد على كل قطعة تصله بإيصال صغير. والمرسل يحتفظ بكل قطعة حتى يصله إيصالها، فإن تأخر الإيصال أعاد إرسالها، مرة ومرتين وأكثر إن لزم. هذه هي الحيلة كلها على الشاشة. ارفع العاصفة وشاهدها تعمل: قطع تسقط، وإيصالات تغيب، وإعادات تسد الفجوات، والصورة على اليمين تكتمل دائمًا. ثم انتقل إلى UDP: العاصفة نفسها بلا دفاتر، فتصير الثقوب دائمة. ولا أحد من النمطين «أفضل» مطلقًا: شريحة الصورة المعادة لا تقدر بثمن، أما ربع ثانية من مكالمة فسيصل بعدما تجاوزها الحديث. الإنترنت يقدم الاثنين، وكل تطبيق يختار الوعد الذي يناسبه. @@ -39,7 +39,7 @@ variables: إذا نجت كل محاولة إرسال باحتمال $1-p$ مستقلًا عن غيرها، فعدد المحاولات حتى تعبر الرزمة يتبع التوزيع الهندسي، ومتوسطه $E = \frac{1}{1-p}$. عند فقد 10% يكون المتوسط 1.11 إرسالًا للرزمة، وعند 50% يتضاعف إلى 2 فقط: الموثوقية تتدهور بهدوء ولا تنهار. -وآلية TCP الحقيقية تبني فوق هذا الأساس: الإيصالات تراكمية («وصلني كل شيء حتى البايت n»)، ونافذة منزلقة تُبقي رزمًا كثيرة في الطريق معًا بدل واحدة، ومؤقّت الإعادة يتكيف مع زمن الذهاب والإياب المقيس. والمحصلة أن خدمة الرزم الخام الفاقدة من درس تبديل الرزم تظهر لكل التطبيقات فوقها أنبوبًا نظيفًا تخرج منه البايتات كما دخلت تمامًا. +وآلية TCP الحقيقية تبني فوق هذا الأساس: الإيصالات تراكمية («وصلني كل شيء حتى البايت n»)، ونافذة منزلقة تُبقي رزمًا كثيرة في الطريق معًا بدل واحدة، ومؤقّت الإعادة يتكيف مع زمن الذهاب والإياب المقيس. والمحصلة أن خدمة الرزم البسيطة التي قد تضيع رزمها، كما في درس تبديل الرزم، تظهر لكل التطبيقات فوقها أنبوبًا نظيفًا تخرج منه البايتات كما دخلت تمامًا. ## Advanced @@ -54,13 +54,17 @@ variables: ## Real world ### كل ما يجب أن يصل مضبوطًا + صفحات الويب والبريد والتنزيلات والتحويلات المصرفية كلها TCP: بايت واحد ناقص أو مقلوب يفسدها، فتشتري الوعد وتدفع ثمنه صبرًا. ### كل ما يجب أن يصل الآن + المكالمات وحركة الألعاب والبث الحي تعمل على UDP وتبتلع الخسائر الصغيرة. التأخر عندها أسوأ من الخلل. ### QUIC، الخلطة الحديثة + يعمل HTTP/3 فوق QUIC: تحته UDP، وفوقه ترقيم وإيصالات على طريقة TCP مع تشفير. الدفاتر نفسها، في مكان جديد. ### مسابير الفضاء + وصلات الفضاء العميق تستعمل منطق الإعادة نفسه برحلات تستغرق ساعات. رياضيات القطع التي لم يصل إيصالها لا تبالي بالمسافة. diff --git a/content/lessons/networking/tcp/en.md b/content/lessons/networking/tcp/en.md index 076bef39..524c7426 100644 --- a/content/lessons/networking/tcp/en.md +++ b/content/lessons/networking/tcp/en.md @@ -14,9 +14,9 @@ variables: ## Try it -1. With the defaults, find the stripe that died in the storm: no thank-you note came back for it, so the sender quietly sent it again — and the picture on the right is whole anyway. -2. Flip ack to 0 and raise loss a little: the same storm now leaves permanent holes in the picture, because nobody is keeping books. -3. Push loss to 40 with ack back on: the picture still arrives complete — later and at the cost of many resends, but complete. Read E: at 40% loss, each packet costs 1.67 sends on average. +1. With the defaults (loss = 10, ack = 1), find the stripe that died in the storm, stripe 2: no thank-you note came back for it, so the sender quietly sent it again — and the picture on the right is whole anyway. +2. Flip ack to 0: stripe 2 never arrives and «picture delivered» reads 90%. Raise loss to 20 and it falls to 80%: the same storm now leaves permanent holes in the picture, because nobody is keeping books. +3. Push loss to 40 with ack back on: the picture still arrives complete (100%) — later and at the cost of 4 resends, but complete. Read E: at 40% loss, each packet costs 1.67 sends on average. ## Real-life examples @@ -55,13 +55,17 @@ A dropped packet carries a second meaning: on wired networks, loss almost always ## Real world ### Everything that must be exact + Web pages, emails, downloads, bank transfers — all TCP: a single flipped or missing byte would corrupt them, so they buy the promise. ### Everything that must be now + Calls, game movement, live video run on UDP and simply absorb small losses — lateness is worse than a glitch. ### QUIC, the modern blend + HTTP/3 runs on QUIC: UDP underneath, with TCP-style numbering and acknowledgement rebuilt on top, plus encryption — the same bookkeeping, relocated. ### Space probes + Deep-space links use the same resend logic with hours-long round trips — the mathematics of unthanked pieces does not care about distance. diff --git a/content/lessons/networking/tcp/lesson.yaml b/content/lessons/networking/tcp/lesson.yaml index 1671aae7..80599fc2 100644 --- a/content/lessons/networking/tcp/lesson.yaml +++ b/content/lessons/networking/tcp/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: high-school equation: E = \frac{1}{1 - p} concepts: -- tcp -- udp -- acknowledgement -- retransmission + - tcp + - udp + - acknowledgement + - retransmission prerequisites: -- packet-switching + - packet-switching related: -- latency-and-bandwidth -- dns + - latency-and-bandwidth + - dns visualization: type: tcp-talk parameters: @@ -27,22 +27,22 @@ parameters: step: 1 value: 1 variables: -- E -- p + - E + - p derivation: -- \text{a packet survives a try with probability } 1 - p -- \text{tries until success average } \frac{1}{1-p} -- p = 0.5 \Rightarrow E = 2 \text{ sends per delivered packet} + - \text{a packet survives a try with probability } 1 - p + - \text{tries until success average } \frac{1}{1-p} + - p = 0.5 \Rightarrow E = 2 \text{ sends per delivered packet} charts: [] primary: loss presets: -- loss: 10 - ack: 1 -- loss: 10 - ack: 0 -- loss: 40 - ack: 1 + - loss: 10 + ack: 1 + - loss: 10 + ack: 0 + - loss: 40 + ack: 1 challenges: -- check: ack == 1 and loss >= 30 -- check: ack == 0 and loss >= 20 -- check: loss == 0 + - check: ack == 1 and loss >= 30 + - check: ack == 0 and loss >= 20 + - check: loss == 0 diff --git a/content/lessons/networking/vpn/ar.md b/content/lessons/networking/vpn/ar.md index 61ef375e..a6b723e3 100644 --- a/content/lessons/networking/vpn/ar.md +++ b/content/lessons/networking/vpn/ar.md @@ -1,7 +1,7 @@ --- title: 'VPN: أنبوب مختوم عبر شبكة فضولية' summary: >- - بمفتاح واحد تنهار قائمة مزودك بكل مواقعك إلى سطر مشفر واحد نحو خادم VPN، والثمن + بمفتاح واحد تتقلص قائمة المواقع التي يراها مزودك إلى سطر مشفر واحد نحو خادم VPN، والثمن بايتات غلاف قليلة في كل رزمة. parameters: vpn: vpn — مفتاح النفق (0 متوقف، 1 يعمل) @@ -15,37 +15,37 @@ variables: ## Try it -1. ابدأ بـ vpn = 0 واقرأ لوحة مزوّد الإنترنت: كل موقع تزوره جالس هناك على المكشوف، لأن كل رزمة يجب أن تحمل وجهتها على ظاهرها لتصل أصلًا. -2. اقلب vpn إلى 1: تنختم الرزم في مظاريف مقفلة لا تحمل إلا عنوان خادم VPN، وتنهار قائمة المزوّد إلى سطر مشفّر واحد. -3. الآن ارفع h وراقب الشريط في الأسفل: الغلاف يقضم من سرعتك، G = B(1 − h/1500) — أجرة صغيرة وصادقة مقابل الخصوصية. +1. ابدأ بـ vpn = 0 واقرأ لوحة مزوّد الإنترنت: كل موقع تزوره ظاهر هناك بوضوح، لأن كل رزمة يجب أن تحمل وجهتها على ظاهرها لتصل أصلًا. +2. اجعل vpn يساوي 1: تُغلَق الرزم في مظاريف مقفلة لا تحمل إلا عنوان خادم VPN، وتتقلص قائمة المزوّد إلى سطر مشفّر واحد. +3. الآن ارفع h من 60 إلى 120 وراقب الشريط في الأسفل: على خط 100 ميغابت تنزل G من 96.0 إلى 92.0. الغلاف يأخذ جزءًا من سرعتك، G = B(1 − h/1500) — ثمن صغير مقابل الخصوصية. ## Real-life examples -- **واي فاي فندق، والنفق يعمل.** 60 من كل 1500 بايت تذهب للغلاف: 96% من خط الـ100 ميغابت ما تزال تحمل بياناتك، وموجّه الفندق لا يتعلم شيئًا سوى «حركة مشفّرة إلى خادم واحد». -- **الخط نفسه، والنفق متوقف.** سرعة كاملة وخصوصية صفر: صاحب الواي فاي المجاني يقرأ كل وجهة تكلّمها، طوال السهرة. -- **خط سريع ونفق رشيق.** 20 بايت غلاف على خط 500 ميغابت تُبقي الصافي قرب 493 — الأنفاق الحديثة تكاد لا تكلّف شيئًا. +- **واي فاي فندق، والنفق يعمل.** 60 من كل 1500 بايت تذهب للغلاف: 96% من خط الـ100 ميغابت ما تزال تحمل بياناتك، وموجّه الفندق لا يعرف شيئًا سوى «حركة مشفّرة إلى خادم واحد». +- **الخط نفسه، والنفق متوقف.** سرعة كاملة وخصوصية صفر: صاحب الواي فاي المجاني يرى كل موقع تتصل به، طوال السهرة. +- **خط سريع ونفق خفيف.** 20 بايت غلاف على خط 500 ميغابت تُبقي الصافي قرب 493 — الأنفاق الحديثة تكاد لا تكلّف شيئًا. ## Test yourself 1. شغّل النفق. -2. أبقِ النفق يعمل والصافي عند 480 ميغابت أو أفضل — ستحتاج الخط الكبير وأرشق غلاف. -3. أوقف النفق من جديد وانظر إلى لوحة المزوّد: هذا معنى «بلا VPN». +2. أبقِ النفق يعمل والصافي عند 480 ميغابت أو أفضل — ستحتاج أكبر خط وغلافًا من 60 بايت أو أقل. +3. أوقف النفق على أسرع خط (B = 500) وانظر إلى لوحة المزوّد: سرعة كاملة، وهذا معنى «بلا VPN». ## Intuition رزمة الشبكة كبطاقة بريدية: مهما كتبت في داخلها، يجب أن يُقرأ العنوان على ظاهرها وإلا ما استطاع أي موجّه توصيلها — فكل من في الطريق يقرأ إلى أين أنت ذاهب، حتى حين يكون المحتوى مختومًا. وVPN هو حيلة وضع البطاقة داخل مظروف معنون إلى صديق موثوق يعيد الإرسال: لا يرى سعاة البريد سوى عنوان الصديق، والصديق يفتح المظروف ويمرر البطاقة، والموقع الذي يجيب يرى عنوان الصديق بدل عنوانك. -على الشاشة، الصديق هو خادم VPN، والمظروف هو أيقونة القفل، والعين هي مزوّد الإنترنت — أو واي فاي المقهى المجاني، أو أي شبكة لا تملكها. اقلب المفتاح فتنهار قائمة العين الأنيقة بالوجهات إلى أنبوب واحد غير مقروء. وأجرة ذلك مطبوعة على الشريط السفلي: كل مظروف ينفق h من بايتات الرزمة الـ1500 على التغليف، فتُقايض قليلًا من السرعة بكثير من الخصوصية. +على الشاشة، الصديق هو خادم VPN، والمظروف هو أيقونة القفل، والعين هي مزوّد الإنترنت — أو واي فاي المقهى المجاني، أو أي شبكة لا تملكها. شغّل المفتاح فتتحول قائمة المواقع المرتبة التي تراها العين إلى أنبوب واحد لا يُقرأ ما فيه. وثمن ذلك مكتوب على الشريط السفلي: كل مظروف ينفق h من بايتات الرزمة الـ1500 على التغليف، فتدفع قليلًا من السرعة وتكسب كثيرًا من الخصوصية. ## Formal -تقنيًّا، المظروف هو الكبسلة: تُشفَّر الرزمة الأصلية بترويساتها كلها وتوضع حمولةً في رزمة جديدة معنونة إلى خادم VPN. لا تتعامل الموجّهات في الطريق إلا مع الترويسة الخارجية، فتغيب عنها الوجهة الداخلية والمنافذ والمحتوى؛ ويفكّ الخادم التشفير ويمرر الأصل، وتعود الردود عبر الأنبوب نفسه معكوسةً. +تقنيًّا، المظروف هو التغليف (encapsulation): تُشفَّر الرزمة الأصلية بترويساتها كلها وتوضع حمولةً في رزمة جديدة معنونة إلى خادم VPN. لا تتعامل الموجّهات في الطريق إلا مع الترويسة الخارجية، فتغيب عنها الوجهة الداخلية والمنافذ والمحتوى؛ ويفكّ الخادم التشفير ويمرر الأصل، وتعود الردود عبر الأنبوب نفسه معكوسةً. -للرزم حجم أقصى ثابت (1500 بايت في الشبكات المعتادة)، فتخرج بايتات الترويسة الخارجية والختم التشفيري الـ$h$ من ميزانية كل رزمة: $G = B\left(1 - \frac{h}{1500}\right)$. مع $h = 60$ تلك ضريبة 4%؛ والأنفاق القديمة المتخمة تقارب $h = 120$، أما الرشيقة الحديثة فتجلس قرب $h = 20$. +للرزم حجم أقصى ثابت (1500 بايت في الشبكات المعتادة)، فتخرج بايتات الترويسة الخارجية والختم التشفيري الـ$h$ من ميزانية كل رزمة: $G = B\left(1 - \frac{h}{1500}\right)$. مع $h = 60$ تلك ضريبة 4%؛ والأنفاق القديمة الثقيلة تقارب $h = 120$، أما الحديثة الخفيفة فتقترب من $h = 20$. ## Advanced -ينقل VPN الثقة ولا يلغيها: خادم VPN يرى الآن بالضبط ما كان مزوّدك يراه، فسؤال «أي VPN» أهم من «هل VPN». والختم نفسه يقوم على سحر تبادل المفاتيح من قاعة التشفير — آلتان لم تلتقيا قط تتفقان على مفتاح فوق الشبكة المكشوفة (ديفي-هيلمان)، ومفاتيح جديدة لكل جلسة تعني أن الحركة المسجَّلة تبقى مختومة حتى لو تسرّب مفتاح لاحقًا. وأنفاق الشركات تشغّل الأنبوب نفسه بالعكس: لا للاختباء من الشبكة، بل لوضع حاسوب بعيد افتراضيًّا داخل شبكة المكتب الخاصة. +ينقل VPN الثقة ولا يلغيها: خادم VPN يرى الآن بالضبط ما كان مزوّدك يراه، فسؤال «أي VPN» أهم من «هل VPN». والختم نفسه يقوم على تبادل المفاتيح الذي تشرحه دروس التشفير — جهازان لم يلتقيا قط تتفقان على مفتاح فوق الشبكة المكشوفة (ديفي-هيلمان)، ومفاتيح جديدة لكل جلسة تعني أن الحركة المسجَّلة تبقى مختومة حتى لو تسرّب مفتاح لاحقًا. وأنفاق الشركات تشغّل الأنبوب نفسه بالعكس: لا للاختباء من الشبكة، بل لوضع حاسوب بعيد افتراضيًّا داخل شبكة المكتب الخاصة. ## Derivation @@ -56,13 +56,17 @@ variables: ## Real world ### الواي فاي العام + على شبكة لا تملكها — فنادق ومطارات ومقاهٍ — يمنع النفق صاحب الشبكة من قراءة وجهاتك. ### العمل من البيت + تضع أنفاق الشركات الحاسوب البعيد داخل شبكة المكتب، فتجيبه الخوادم الداخلية التي ترفض الإنترنت العام. ### عبور الشبكات غير الموثوقة + يستخدم الصحفيون والمسافرون الأنبوب ليمنعوا الشبكات المحلية من تسجيل حركتهم أو ترشيحها أو العبث بها. ### ماذا يرى الـVPN + ينتهي الأنبوب عند خادم المزوّد — واختيار مزوّد جدير بالثقة هو القرار الذي تقوم عليه الفكرة كلها. diff --git a/content/lessons/networking/vpn/en.md b/content/lessons/networking/vpn/en.md index e8f205ec..db5eb811 100644 --- a/content/lessons/networking/vpn/en.md +++ b/content/lessons/networking/vpn/en.md @@ -18,7 +18,7 @@ variables: 1. Start with vpn = 0 and read the ISP panel: every site you visit sits there in plain sight, because each packet must carry its destination on the outside to be delivered at all. 2. Flip vpn to 1: the packets seal into locked envelopes addressed only to the VPN server, and the ISP's list collapses to one encrypted line. -3. Now raise h and watch the bar at the bottom: the wrapper eats into your speed, G = B(1 − h/1500) — a small, honest fare for the privacy. +3. Now raise h from 60 to 120 and watch the bar at the bottom: on the 100 Mbps line G falls from 96.0 to 92.0 Mbps. The wrapper eats into your speed, G = B(1 − h/1500) — a small, honest fare for the privacy. ## Real-life examples @@ -29,8 +29,8 @@ variables: ## Test yourself 1. Turn the tunnel on. -2. Keep the tunnel on and the goodput at 480 Mbps or better — you will need the big line and the leanest wrapper. -3. Turn the tunnel off again and look at the ISP panel: that is what "no VPN" means. +2. Keep the tunnel on and the goodput at 480 Mbps or better — you will need the biggest line and a wrapper of 60 bytes or less. +3. Turn the tunnel off on the fastest line (B = 500) and look at the ISP panel: full speed, and that is what "no VPN" means. ## Intuition @@ -57,13 +57,17 @@ A VPN moves trust rather than removing it: the VPN server now sees exactly what ## Real world ### Public Wi-Fi + On a network you do not own — hotels, airports, cafés — the tunnel keeps the network's owner from reading your destinations. ### Working from home + Corporate VPNs put a remote laptop inside the office network, so internal servers that refuse the public internet still answer it. ### Crossing untrusted networks + Journalists and travellers use the pipe to keep local networks from logging, filtering or tampering with their traffic. ### What the VPN sees + The pipe ends at the provider's server — choosing a trustworthy one is the decision the whole scheme rests on. diff --git a/content/lessons/networking/vpn/lesson.yaml b/content/lessons/networking/vpn/lesson.yaml index 364943d3..03ba2601 100644 --- a/content/lessons/networking/vpn/lesson.yaml +++ b/content/lessons/networking/vpn/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: G = B\left(1 - \frac{h}{1500}\right) concepts: -- vpn -- encryption -- tunnel -- privacy + - vpn + - encryption + - tunnel + - privacy prerequisites: -- routers + - routers related: -- cloud-vpc -- diffie-hellman + - cloud-vpc + - diffie-hellman visualization: type: vpn-tunnel parameters: @@ -19,7 +19,7 @@ parameters: min: 0 max: 1 step: 1 - value: 1 + value: 0 h: min: 20 max: 120 @@ -33,26 +33,26 @@ parameters: value: 100 unit: Mbps variables: -- G -- B -- h + - G + - B + - h derivation: -- \text{each 1500-byte packet carries } 1500 - h \text{ bytes of your data} -- G = B\left(1 - \frac{h}{1500}\right) -- h = 60 \Rightarrow G = 0.96B + - \text{each 1500-byte packet carries } 1500 - h \text{ bytes of your data} + - G = B\left(1 - \frac{h}{1500}\right) + - h = 60 \Rightarrow G = 0.96B charts: [] primary: vpn presets: -- vpn: 1 - h: 60 - B: 100 -- vpn: 0 - h: 60 - B: 100 -- vpn: 1 - h: 20 - B: 500 + - vpn: 1 + h: 60 + B: 100 + - vpn: 0 + h: 60 + B: 100 + - vpn: 1 + h: 20 + B: 500 challenges: -- check: vpn > 0.5 -- check: vpn > 0.5 and B*(1 - h/1500) >= 480 -- check: vpn < 0.5 + - check: vpn > 0.5 + - check: vpn > 0.5 and B*(1 - h/1500) >= 480 + - check: vpn < 0.5 and B >= 500 diff --git a/content/lessons/networking/wifi/ar.md b/content/lessons/networking/wifi/ar.md index d6e3aa09..c532f4fb 100644 --- a/content/lessons/networking/wifi/ar.md +++ b/content/lessons/networking/wifi/ar.md @@ -1,12 +1,12 @@ --- title: 'واي فاي: مدى همسة راديو' summary: >- - يبث موجّهك بخُمس واط، وكل متر وكل جدار يقتطع نصيبه. أعمدة الإشارة في هاتفك تقريرٌ + يبث موجّهك بعُشر واط، وكل متر وكل جدار يقتطع نصيبه. أعمدة الإشارة في هاتفك تقريرٌ بما نجا من الرحلة. parameters: d: d — الأمتار بين الموجّه والهاتف w: w — الجدران الواقفة في الطريق - L: L — الديسيبلات التي يلتهمها كل جدار (جدار جبسي ≈ 3، طوب ≈ 8) + L: L — الديسيبلات التي يأخذها كل جدار (جدار جبسي ≈ 3، طوب ≈ 8) variables: - القدرة المستقبلة عند الهاتف، بوحدة dBm - قدرة الإرسال عند الموجّه، مثبّتة هنا عند 20 dBm @@ -14,19 +14,19 @@ variables: ## Try it -1. اسحب الهاتف بعيدًا عن الموجّه: تخفت الحلقات، ويكبر حدّ المسافة 20·log₁₀(d)، وتسقط الأعمدة واحدًا بعد الآخر. -2. أبقِ d = 5 وارفع w بدلًا من ذلك: كل جدار يقتطع قضمة ثابتة قدرها L ديسيبل — جداران من الطوب قد يكلّفان أكثر من عشرين مترًا من الهواء الطلق. -3. جِد المنطقة الميتة: ادفع الهاتف خلف آخر جدار حتى يهبط سطر الميزانية في الأعلى دون −80 وتفرغ الأعمدة. +1. اسحب الهاتف من 5 m إلى 30 m: تخفت الحلقات، ويكبر حدّ المسافة 20·log₁₀(d) من 14.0 إلى 29.5 dB، وتنزل P_r من −39.0 إلى −54.5 dBm، وتنقص الأعمدة من 4 إلى 3. +2. عُد إلى d = 5 وارفع w من 1 إلى 4 بدلًا من ذلك: تنزل P_r درجة درجة: −39 ثم −44 ثم −49 ثم −54 dBm. كل جدار يأخذ حصة ثابتة قدرها L ديسيبل — جداران من الطوب قد يكلّفان أكثر من عشرين مترًا من الهواء المفتوح. +3. ابحث عن المنطقة الميتة: اضبط w = 4 و L = 10، ثم اسحب الهاتف إلى أبعد من 10 m. تهبط P_r دون −80 dBm وتفرغ الأعمدة. ## Real-life examples - **على بعد غرفة.** خمسة أمتار وجدار جبسي واحد: −39 dBm مريحة، أعمدة كاملة وسرعة كاملة. -- **بجوار الموجّه.** متران بلا جدران: −26 dBm، أقوى ما يبلغه واي فاي منزلي — ومن هنا تأتي أرقام اختبارات السرعة المتباهية. -- **غرفة النوم البعيدة.** خمسة وعشرون مترًا وثلاثة جدران طوب: نحو −72 dBm، عمود واحد مرتجف، ومكالمات الفيديو تبدأ بالتقطّع. +- **بجوار الموجّه.** متران بلا جدران: −26 dBm، أقوى ما يصل إليه واي فاي منزلي — ومن هنا تأتي أعلى أرقام اختبارات السرعة. +- **غرفة النوم البعيدة.** خمسة وعشرون مترًا وثلاثة جدران طوب: نحو −72 dBm، عمود واحد ضعيف، ومكالمات الفيديو تبدأ بالتقطّع. ## Test yourself -1. حافظ على إشارة قوية: −50 dBm أو أفضل. +1. احصل على إشارة قوية جدًا: −30 dBm أو أفضل. 2. ابنِ منطقة ميتة: اهبط بالإشارة دون −75 dBm. 3. اخترق 3 جدران وابقَ عند −65 dBm — الجدران الرقيقة هي الحيلة. @@ -34,34 +34,38 @@ variables: أسقط حصاة في بركة فتضعف التموّجات كلما اتسعت — الطاقة نفسها ممدودة على دائرة أكبر فأكبر. يفعل الراديو هذا في ثلاثة أبعاد، فمضاعفة المسافة تكلّف دائمًا الشريحة نفسها من الإشارة، ويعدّ المهندسون تلك الشرائح بالديسيبل. على الشاشة، الحلقات الخافتة هي الانتشار؛ اسحب الهاتف وراقب أعمدته تدفع ثمن كل متر. -أما الجدران فرسمٌ من نوع آخر: كل جدار يمتص جزءًا ثابتًا مما يبلغه، أجرة مقطوعة قدرها L ديسيبل، سواء وصلت الإشارة قوية أم ضعيفة. ولهذا فالمحاكاة في حقيقتها ميزانية: ابدأ بـ20 dBm عند الموجّه، وادفع 40 dB لمجرد عبور المتر الأول على ترددات واي فاي، ثم 20·log₁₀(d) للمسافة، ثم w·L للجدران — ويحتاج الهاتف نحو −80 dBm أو أفضل مما تبقى ليمسك بالوصلة أصلًا. +أما الجدران فخسارتها من نوع آخر: كل جدار يمتص جزءًا ثابتًا مما يصل إليه، أي مقدارًا ثابتًا قدره L ديسيبل، سواء وصلت الإشارة قوية أم ضعيفة. ولهذا فالمحاكاة في حقيقتها ميزانية: ابدأ بـ20 dBm عند الموجّه، وادفع 40 dB لمجرد عبور المتر الأول على ترددات واي فاي، ثم 20·log₁₀(d) للمسافة، ثم w·L للجدران — ويحتاج الهاتف نحو −80 dBm أو أفضل مما تبقى ليمسك بالوصلة أصلًا. ## Formal -النموذج هو $P_r = P_t - 40 - 20\log_{10} d - wL$ بوحدة dBm: خسارة الفضاء الحر عند 2.4 GHz نحو 40 dB على المتر الأول، ثم 20 dB لكل تضاعف عشري في المسافة، وكل جدار يطرح $L$ الثابتة الخاصة به. +النموذج هو $P_r = P_t - 40 - 20\log_{10} d - wL$ بوحدة dBm: خسارة الفضاء الحر عند 2.4 GHz نحو 40 dB على المتر الأول، ثم 20 dB كلما صارت المسافة عشرة أضعاف، وكل جدار يطرح $L$ الثابتة الخاصة به. -الديسيبل محاسبة لوغاريتمية: −10 dB تعني عُشر القدرة، و−20 dB جزءًا من مئة، فالطرح المستقيم على الشاشة يخفي انهيارًا ضربيًّا هائلًا — بين الأعمدة الكاملة عند −40 dBm والمنطقة الميتة عند −80 dBm يقبع عامل عشرة آلاف في القدرة الفعلية. +الديسيبل محاسبة لوغاريتمية: −10 dB تعني عُشر القدرة، و−20 dB جزءًا من مئة، فالطرح البسيط على الشاشة يخفي هبوطًا هائلًا في القدرة — بين الأعمدة الكاملة عند −40 dBm والمنطقة الميتة عند −80 dBm تصغر القدرة الفعلية عشرة آلاف مرة. ## Advanced -واي فاي الحقيقي يوازن بين حزمتين: 2.4 GHz تسافر أبعد وتنفذ من الجدران أفضل، بينما تحمل 5 GHz بيانات أكثر بكثير لكنها تدفع ضريبة جدران أقسى — ولهذا تُباع الموجّهات اليوم بالحزمتين وتقفز الهواتف بينهما. ومعدل البيانات نفسه يتبع نسبة الإشارة إلى الضجيج: كلما غاصت $P_r$ نحو أرضية الضجيج أبقى الموجّه الوصلة حية بالتحول إلى ترميزات أبطأ وأمتن، ولهذا تحصل غرفة النوم البعيدة على أعمدة قبل أن تحصل على سرعة. وأنظمة الشبكات العنقودية ترفض الرحلة الطويلة أصلًا: عدة قفزات صغيرة، لكلٍّ ميزانيتها الصحية، تغلب قفزة بطولية واحدة. +واي فاي الحقيقي يوازن بين حزمتين: 2.4 GHz تسافر أبعد وتنفذ من الجدران أفضل، بينما تحمل 5 GHz بيانات أكثر بكثير لكنها تدفع ضريبة جدران أقسى — ولهذا تُباع الموجّهات اليوم بالحزمتين وتقفز الهواتف بينهما. ومعدل البيانات نفسه يتبع نسبة الإشارة إلى الضجيج: كلما اقتربت $P_r$ من مستوى الضجيج أبقى الموجّه الوصلة حية بالتحول إلى ترميزات أبطأ وأمتن، ولهذا تحصل غرفة النوم البعيدة على أعمدة قبل أن تحصل على سرعة. وأنظمة الشبكات المتداخلة (mesh) تتجنب الرحلة الطويلة أصلًا: عدة قفزات صغيرة، لكلٍّ منها إشارة جيدة، أفضل من قفزة واحدة طويلة. ## Derivation 1. ينتشر الراديو ككرة، فتهبط القدرة العابرة لكل متر مربع مع مربع المسافة — بالديسيبل، خسارة قدرها $20\log_{10} d$. 2. يمتص كل جدار جزءًا ثابتًا مما يصطدم به، أي $wL$ ديسيبل إجمالًا. -3. ابدأ من $P_t = 20$ dBm عند الموجّه، واطرح كلفة المتر الأول والرسمين معًا، وما يبقى عند الهاتف هو $P_r$. +3. ابدأ من $P_t = 20$ dBm عند الموجّه، واطرح كلفة المتر الأول وخسارة المسافة وخسارة الجدران، وما يبقى عند الهاتف هو $P_r$. ## Real world ### أين تضع الموجّه + في الوسط، مرتفعًا ومكشوفًا: كل جدار تتجنبه يردّ أعمدة كاملة لا يشتريها أغلى موجّه. -### الشبكات العنقودية والموسّعات -عدة قفزات قصيرة قوية تحل محل قفزة طويلة جائعة — الميزانية تُدفع أقساطًا صغيرة. +### الشبكات المتداخلة والموسّعات + +عدة قفزات قصيرة قوية تحل محل قفزة طويلة ضعيفة — الميزانية تُدفع أقساطًا صغيرة. -### لماذا يقتل الميكروويف مكالمة الفيديو -أفران الميكروويف تسرّب عند 2.45 GHz، داخل حزمة واي فاي 2.4 GHz تمامًا، فترفع أرضية الضجيج التي يجب أن تبقى إشارتك فوقها. +### لماذا يقطع الميكروويف مكالمة الفيديو + +أفران الميكروويف تسرّب عند 2.45 GHz، داخل حزمة واي فاي 2.4 GHz تمامًا، فترفع مستوى الضجيج الذي يجب أن تبقى إشارتك فوقه. ### ‏5 GHz مقابل 2.4 GHz + الحزمة الأسرع تخسر أكثر مع كل جدار، فتتراجع الهواتف بهدوء إلى 2.4 GHz عند أطراف البيت. diff --git a/content/lessons/networking/wifi/en.md b/content/lessons/networking/wifi/en.md index 8471edaf..ad3fa93f 100644 --- a/content/lessons/networking/wifi/en.md +++ b/content/lessons/networking/wifi/en.md @@ -1,7 +1,7 @@ --- title: 'Wi-Fi: how far a whisper of radio reaches' summary: >- - Your router shouts with a fifth of a watt, and every metre and every wall + Your router shouts with a tenth of a watt, and every metre and every wall takes its cut — the signal bars on your phone are just an accountant's report of what survived the trip. parameters: @@ -15,9 +15,9 @@ variables: ## Try it -1. Drag the phone away from the router: the rings fade, the distance term 20·log₁₀(d) grows, and the bars drop one by one. -2. Keep d = 5 and raise w instead: each wall takes a flat L-decibel bite — two brick walls can cost more than twenty metres of open air. -3. Find the dead zone: push the phone past the last wall until the budget line at the top goes below −80 and the bars empty out. +1. Drag the phone from 5 m out to 30 m: the rings fade, the distance term 20·log₁₀(d) grows from 14.0 to 29.5 dB, P_r falls from −39.0 to −54.5 dBm, and the bars drop from 4 to 3. +2. Go back to d = 5 and raise w from 1 to 4 instead: P_r steps down −39, −44, −49, −54 dBm. Each wall takes a flat L-decibel bite — two brick walls can cost more than twenty metres of open air. +3. Find the dead zone: set w = 4 and L = 10, then drag the phone out past 10 m. P_r goes below −80 dBm and the bars empty out. ## Real-life examples @@ -27,7 +27,7 @@ variables: ## Test yourself -1. Keep a strong signal: −50 dBm or better. +1. Get a very strong signal: −30 dBm or better. 2. Build a dead zone: drive the signal below −75 dBm. 3. Punch through 3 walls and still hold −65 dBm — thin walls are the trick. @@ -56,13 +56,17 @@ Real Wi-Fi juggles two bands: 2.4 GHz travels farther and squeezes through walls ## Real world ### Where to put the router + Central, high and in the open: every wall skipped refunds whole bars, which no expensive router can buy back. ### Mesh and extenders + Several short, strong hops replace one long, starved one — the budget is paid in small instalments. ### Why the microwave kills the video call + Microwave ovens leak at 2.45 GHz, right inside Wi-Fi's 2.4 GHz band, raising the noise floor your signal must stay above. ### 5 GHz vs 2.4 GHz + The faster band loses more per wall, so phones quietly fall back to 2.4 GHz at the edge of the house. diff --git a/content/lessons/networking/wifi/lesson.yaml b/content/lessons/networking/wifi/lesson.yaml index 0afb4655..5a3c8002 100644 --- a/content/lessons/networking/wifi/lesson.yaml +++ b/content/lessons/networking/wifi/lesson.yaml @@ -3,15 +3,15 @@ subject: networking difficulty: beginner equation: P_r = P_t - 40 - 20\log_{10} d - wL concepts: -- wifi -- signal-strength -- decibel -- attenuation + - wifi + - signal-strength + - decibel + - attenuation prerequisites: -- routers + - routers related: -- bluetooth -- routers + - bluetooth + - routers visualization: type: wifi-signal parameters: @@ -33,25 +33,25 @@ parameters: value: 5 unit: dB variables: -- P_r -- P_t + - P_r + - P_t derivation: -- P_r = P_t - 40 - 20\log_{10} d - wL -- d = 10, w = 1, L = 5 \Rightarrow P_r = 20 - 40 - 20 - 5 = -45 -- d = 10, w = 4, L = 8 \Rightarrow P_r = 20 - 40 - 20 - 32 = -72 + - P_r = P_t - 40 - 20\log_{10} d - wL + - d = 10, w = 1, L = 5 \Rightarrow P_r = 20 - 40 - 20 - 5 = -45 + - d = 10, w = 4, L = 8 \Rightarrow P_r = 20 - 40 - 20 - 32 = -72 charts: [] primary: d presets: -- d: 5 - w: 1 - L: 5 -- d: 2 - w: 0 - L: 5 -- d: 25 - w: 3 - L: 8 + - d: 5 + w: 1 + L: 5 + - d: 2 + w: 0 + L: 5 + - d: 25 + w: 3 + L: 8 challenges: -- check: (-20 - 20*log10(d) - w*L) >= -50 -- check: (-20 - 20*log10(d) - w*L) <= -75 -- check: w >= 2.5 and (-20 - 20*log10(d) - w*L) >= -65 + - check: (-20 - 20*log10(d) - w*L) >= -30 + - check: (-20 - 20*log10(d) - w*L) <= -75 + - check: w >= 2.5 and (-20 - 20*log10(d) - w*L) >= -65 diff --git a/content/lessons/nuclear/alpha-beta-gamma/ar.md b/content/lessons/nuclear/alpha-beta-gamma/ar.md index 77861609..d5d7f868 100644 --- a/content/lessons/nuclear/alpha-beta-gamma/ar.md +++ b/content/lessons/nuclear/alpha-beta-gamma/ar.md @@ -18,14 +18,14 @@ charts: [] ## Try it 1. راقب الحزم الثلاث: ألفا في الأعلى، وبيتا في الوسط، وغاما في الأسفل، وكلها تصطدم بالجدار نفسه. -2. اجعل «مادة الحاجز» ورقًا وحرّك «سُمك الحاجز» من الصفر. تتوقف حزمة ألفا فور ظهور الجدار، بينما بيتا وغاما بالكاد تتأثران. -3. غيّر «مادة الحاجز» إلى رصاص وادفع «سُمك الحاجز» نحو 50 mm. تستمر غاما في الضعف دون أن تتوقف كليًا، بينما توقفت بيتا فعلًا بسُمك بسيط منه. +2. اجعل «مادة الحاجز» ورقًا (الموضع 0) وارفع «سُمك الحاجز» من الصفر إلى 0.5 mm. تظهر على حزمة ألفا كلمة «توقّف» فور ظهور الجدار، وتبقى بيتا «يمرّ»، وتقرأ غاما 99.6%. +3. غيّر «مادة الحاجز» إلى رصاص (الموضع 2) وارفع «سُمك الحاجز» إلى 50 mm. تستمر غاما في الضعف حتى 0.5% دون أن تتوقف كليًا، أما بيتا فقد أوقفها أول 1 mm منه. ## Real-life examples 1. **مصدر ألفا الصغير في كاشف الدخان.** يقف خلف نافذة رقيقة من رقاقة معدنية أقل من مليمتر سُمكًا، وهذا يكفي ليمنع جسيمات ألفا من مغادرة علبة الكاشف. -2. **مصدر بيتا من سترونشيوم-90 محجوب جيدًا.** خمسة مليمترات من الألومنيوم تكفي لإيقاف جسيمات بيتا منه، ولهذا تُستخدم الألومنيوم والبلاستيك، لا الرصاص، لحجب بيتا عادة. -3. **غرفة غاما مبطّنة بالرصاص في مستشفى.** عشرون مليمترًا من الرصاص تخفض حزمة غاما إلى نحو ثُمن قوتها الأصلية، حماية حقيقية لكنها ليست جدارًا كاملًا. +2. **مصدر بيتا من سترونشيوم-90 محجوب جيدًا.** خمسة مليمترات من الألومنيوم تكفي لإيقاف جسيمات بيتا منه، ولهذا يُستخدم الألومنيوم والبلاستيك، لا الرصاص، لحجب بيتا عادة. +3. **غرفة غاما مبطّنة بالرصاص في مستشفى.** عشرون مليمترًا من الرصاص تخفض حزمة غاما إلى 11.9%، أي نحو ثُمن قوتها الأصلية، حماية حقيقية لكنها ليست جدارًا كاملًا. ## Test yourself @@ -35,19 +35,19 @@ charts: [] ## Intuition -جسيمات ألفا وبيتا قطع من المادة، نواة هيليوم في ألفا وإلكترون في بيتا، تصطدم بالمادة الصلبة وتفقد قليلًا من طاقتها في كل اصطدام حتى تنفد طاقتها فتتوقف. هذا يعطي كل نوع مدى ثابتًا في مادة معينة. الجسيم الأرقّ من المدى يعبر دون أن يتأثر، والأسمك منه لا يخرج من الجهة الأخرى أبدًا. لهذا ترى في الرسم توقفًا مفاجئًا أو عبورًا كاملًا في حزمتَي ألفا وبيتا، بلا حالة وسطى بينهما. +جسيمات ألفا وبيتا قطع من المادة، نواة هيليوم في ألفا وإلكترون في بيتا، تصطدم بالمادة الصلبة وتفقد قليلًا من طاقتها في كل اصطدام حتى تنفد طاقتها فتتوقف. هذا يعطي كل نوع مدى ثابتًا في مادة معينة. إذا كان الحاجز أرقّ من هذا المدى عبره الجسيم دون أن يتوقف، وإذا كان أسمك منه لم يخرج الجسيم من الجهة الأخرى أبدًا. لهذا ترى في الرسم توقفًا مفاجئًا أو عبورًا كاملًا في حزمتَي ألفا وبيتا، بلا حالة وسطى بينهما. -أما شعاع غاما فليس قطعة مادة بل ومضة ضوء، أعلى طاقة بكثير من الضوء الذي تراه عينك. لا يفقد طاقته تدريجيًا، بل إما يعبر الحاجز دون أن يتأثر أو يُمتص دفعة واحدة، ولا طريقة لمعرفة مصير شعاع واحد مسبقًا. زِد سُمك الحاجز فتغيّر فقط الاحتمال: يُمتص عدد أكبر من الأشعة، لكن لا يوجد سُمك يضمن امتصاص كل شعاع، وهذا ما تُظهره النقاط المتقطعة في حزمة غاما. +أما شعاع غاما فليس قطعة مادة بل ومضة ضوء، أعلى طاقة بكثير من الضوء الذي تراه عينك. لا يفقد طاقته تدريجيًا، بل إما يعبر الحاجز دون أن يتأثر أو يُمتص دفعة واحدة، ولا طريقة لمعرفة مصير شعاع واحد مسبقًا. زِد سُمك الحاجز فتغيّر فقط الاحتمال: يُمتص عدد أكبر من الأشعة، لكن لا يوجد سُمك يضمن امتصاص كل شعاع، وهذا ما تُظهره حزمة غاما: بعض النقاط تختفي عند الجدار وبعضها يكمل طريقه. ## Formal -لجسيمَي ألفا وبيتا مدى محدد $x$ في مادة معيّنة: أقل منه تعبر الحزمة بقيمة $I = I_0$، وعنده أو أكثر تصبح $I = 0$. هذا المدى بضع أجزاء من مئة من المليمتر لألفا في أي مادة صلبة، وبضعة مليمترات من الألومنيوم لجسيم بيتا نموذجي، وهو رقيق بما يكفي ليوقف الورق ألفا لكن ليس بيتا. +لجسيمَي ألفا وبيتا مدى محدد $x$ في مادة معيّنة: أقل منه تعبر الحزمة بقيمة $I = I_0$، وعنده أو أكثر تصبح $I = 0$. هذا المدى بضع أجزاء من مئة من المليمتر لألفا في أي مادة صلبة، وبضعة مليمترات من الألومنيوم لجسيم بيتا نموذجي، أي أنه قصير إلى حد أن ورقة واحدة توقف ألفا لكنها لا توقف بيتا. أما حزمة أشعة غاما فتتبع القانون $I = I_0\left(\frac{1}{2}\right)^{x/H}$: كل سُمك إضافي مقداره $H$، وهو طبقة النصف لهذه المادة، يقطع النسبة الباقية $I/I_0$ إلى نصفها من جديد، نفس قانون التنصيف الذي يحكم عمر النصف، لكن بالمليمترات بدل الثواني. ## Advanced -تتحدد طبقة النصف $H$ حسب المادة وطاقة أشعة غاما بالعلاقة $H = \ln 2/\mu$، إذ $\mu$ معامل التوهين الخطي. للمواد الأكثف وذات العدد الذري الأعلى كالرصاص معامل $\mu$ أكبر بكثير، أي طبقة نصف $H$ أصغر بكثير، ولهذا يُختار الرصاص عادة لحجب غاما رغم أنه خيار سيئ لحجب بيتا. يبطئ جسيم بيتا السريع داخل عنصر ثقيل كالرصاص فيطلق أشعة سينية ثانوية نافذة (bremsstrahlung). لهذا يفضّل مصمّمو الحماية عناصر خفيفة كالألومنيوم أو البلاستيك لبيتا، ويوفّرون الرصاص لغاما. +تتحدد طبقة النصف $H$ حسب المادة وطاقة أشعة غاما بالعلاقة $H = \ln 2/\mu$، إذ $\mu$ معامل التوهين الخطي. للمواد الأكثف وذات العدد الذري الأعلى كالرصاص معامل $\mu$ أكبر بكثير، أي طبقة نصف $H$ أصغر بكثير، ولهذا يُختار الرصاص عادة لحجب غاما رغم أنه خيار سيئ لحجب بيتا. حين يتباطأ جسيم بيتا السريع داخل عنصر ثقيل كالرصاص يطلق أشعة سينية ثانوية نافذة تسمى أشعة الكبح (bremsstrahlung). لهذا يفضّل مصمّمو الحماية عناصر خفيفة كالألومنيوم أو البلاستيك لبيتا، ويتركون الرصاص لغاما. ## Derivation @@ -58,13 +58,17 @@ charts: [] ## Real world ### كواشف الدخان + الأمريسيوم-241 بداخله يُطلق جسيمات ألفا لا تغادر غرفة الاستشعار أبدًا، إذ توقفها الرقاقة والهواء المحيط بها، ولهذا الجهاز آمن على السقف. ### الطب النووي والتصوير الصناعي + يحجب الفنيون مصادر بيتا بالبلاستيك أو الألومنيوم، ومصادر غاما بالرصاص أو الخرسانة السميكة، فيختارون المادة بحسب نوع الإشعاع لا بحسب أثقل مادة متاحة. ### غرف الأشعة السينية والمقطعية + تُبطَّن جدران غرفة التصوير بالرصاص، وتُحسب المريلة الرصاصية القريبة منها بعدد طبقات النصف، بحيث تنخفض الجرعة خلف الحاجز إلى نسبة آمنة معتمدة. ### المركبات الفضائية ورواد الفضاء -تواجه المهمات البعيدة عن الأرض خليطًا من الجسيمات وإشعاعًا شبيهًا بغاما عالي الطاقة، تخفّفه الحواجز المعتادة دون أن توقفه كليًا، ولهذا يحسب مخططو المهمات الجرعة المتراكمة كلها بدل انتظار حاجز يصفّرها. + +تواجه المهمات البعيدة عن الأرض خليطًا من الجسيمات وإشعاعًا شبيهًا بغاما عالي الطاقة، تخفّفه الحواجز المعتادة دون أن توقفه كليًا، ولهذا يحسب مخططو المهمات الجرعة المتراكمة كلها بدل انتظار حاجز يجعلها صفرًا. diff --git a/content/lessons/nuclear/alpha-beta-gamma/en.md b/content/lessons/nuclear/alpha-beta-gamma/en.md index b7e51282..85cbd10c 100644 --- a/content/lessons/nuclear/alpha-beta-gamma/en.md +++ b/content/lessons/nuclear/alpha-beta-gamma/en.md @@ -17,14 +17,14 @@ charts: [] ## Try it 1. Watch the three beams: alpha (top), beta (middle) and gamma (bottom), all flying at the same wall. -2. Set "shield material" to paper and drag "shield thickness" up from zero. The alpha beam stops the instant the wall appears; beta and gamma barely notice. -3. Switch "shield material" to lead and push "shield thickness" toward 50 mm. The gamma beam keeps thinning but never fully stops, while beta was already blocked by a sliver of it. +2. Set "shield material" to paper (position 0) and drag "shield thickness" from zero to 0.5 mm. The alpha beam is "blocked" the instant the wall appears; beta still "gets through" and gamma reads 99.6%. +3. Switch "shield material" to lead (position 2) and push "shield thickness" up to 50 mm. The gamma beam keeps thinning, down to 0.5%, but never fully stops, while beta was already blocked by the first 1 mm of it. ## Real-life examples 1. **A smoke detector's tiny alpha source.** It sits behind a thin foil window, thinner than a millimetre — plenty to stop its alpha particles from ever leaving the detector housing. 2. **A strontium-90 beta source, shielded properly.** Five millimetres of aluminium is enough to stop its beta particles, which is why aluminium and plastic, not lead, are the standard choice for beta shielding. -3. **A hospital's lead-lined gamma room.** Twenty millimetres of lead cuts the gamma beam to roughly an eighth of its original strength — real protection, but not a perfect wall. +3. **A hospital's lead-lined gamma room.** Twenty millimetres of lead cuts the gamma beam to 11.9%, roughly an eighth of its original strength — real protection, but not a perfect wall. ## Test yourself @@ -36,7 +36,7 @@ charts: [] Alpha and beta particles are chunks of matter — a helium nucleus for alpha, an electron for beta — crashing through a solid and losing a little energy in every collision until they run out and stop. That gives each one a fixed range in a given material: thinner than the range and it sails through untouched, thicker than the range and it never comes out the other side. That is why the picture shows a clean, sudden "blocked" or "passes" for those two lanes, with nothing in between. -A gamma ray is not a chunk of matter but a burst of light, far more energetic than the light your eyes see. It does not lose energy gradually; it either slams straight through unaffected or is absorbed in one single event, and there is no way to know in advance which will happen to any one ray. Thicken the shield and you only change the odds — more rays get unlucky and are absorbed, but there is never a thickness that guarantees every last one is stopped, which is exactly what the flickering dots in the gamma lane are showing you. +A gamma ray is not a chunk of matter but a burst of light, far more energetic than the light your eyes see. It does not lose energy gradually; it either slams straight through unaffected or is absorbed in one single event, and there is no way to know in advance which will happen to any one ray. Thicken the shield and you only change the odds — more rays get unlucky and are absorbed, but there is never a thickness that guarantees every last one is stopped, which is exactly what the gamma lane is showing you: some dots vanish at the wall while others carry straight on. ## Formal @@ -57,13 +57,17 @@ The half-value layer $H$ is set by the material and the gamma energy through $H ## Real world ### Smoke detectors + The americium-241 inside emits alpha particles that never leave the sensor chamber, stopped by the foil and the surrounding air itself, which is why the device is safe to keep on a ceiling. ### Nuclear medicine and industrial radiography + Technicians shield beta-emitting tracers with plastic or aluminium, and gamma-emitting sources with lead or thick concrete, choosing the material to match the radiation, not just piling on the densest thing available. ### X-ray and CT rooms + The lead lining in a hospital scanning room's walls and the lead apron worn nearby are sized in half-value layers, calculated so the dose on the far side falls to an accepted safe fraction. ### Spacecraft and astronauts + Deep-space missions face a mix of particles and high-energy gamma-like radiation that ordinary shielding thicknesses can only thin, not stop completely, which is why mission planners work in total accumulated dose rather than expecting any shield to bring the count to zero. diff --git a/content/lessons/nuclear/binding-energy/ar.md b/content/lessons/nuclear/binding-energy/ar.md index 621f882b..4671578e 100644 --- a/content/lessons/nuclear/binding-energy/ar.md +++ b/content/lessons/nuclear/binding-energy/ar.md @@ -8,8 +8,8 @@ variables: - 'العدد الكتلي: كم بروتونًا ونيوترونًا تحمل النواة في المجموع' - 'العدد الذري: كم من هذه الجسيمات بروتونات' - 'طاقة الربط: كم طاقة يلزمك لتفكيك النواة كلها إلى بروتونات ونيوترونات منفصلة' - - 'نحو 15.75 MeV، وهي تقريبًا كم طاقة يسهم بها كل نيوكليون في عمق النواة بلمسه جيرانه' - - 'نحو 17.8 MeV، وهي الطاقة التي يخسرها نيوكليون على السطح مقارنة بنيوكليون مدفون في الداخل، لأن جيرانه أقل' + - 'نحو 15.75 MeV، وهي تقريبًا الطاقة التي تسهم بها كل نوية في عمق النواة بملامسة جيرانها' + - 'نحو 17.8 MeV، وهي الطاقة التي تخسرها نوية على السطح مقارنة بنوية في الداخل، لأن جيرانها أقل' - 'نحو 0.711 MeV، وهي قوة التنافر الكهربائي بين بروتونين متلاصقين بهذا القرب' - 'نحو 23.7 MeV، وهو ثمن أن تحمل النواة نيوترونات أكثر من البروتونات بكثير، أو العكس، بدل مزيج متوازن' charts: [] @@ -17,33 +17,33 @@ charts: [] ## Try it -1. حرّك منزلق «العدد الكتلي A» صاعدًا من نواة خفيفة. راقب النقطة المعلَّمة تصعد المنحنى بسرعة في البداية، فكل نيوكليون جديد يضيف تقريبًا كامل طاقة الربط التي تناها نوية داخلية عميقة. -2. تابع التحريك حتى تستقر النقطة عند القمة، عند A بين 56 و62 تقريبًا: الحديد والنيكل، أشد الأنوية تماسكًا على الإطلاق. -3. تابع نحو الأنوية الثقيلة، بعد A = 150، وصولًا إلى اليورانيوم عند A = 235. راقب المنحنى ينحدر من جديد على اليمين. +1. ارفع منزلق «العدد الكتلي A» من 12 إلى 20. ترتفع قراءة «لكل نوية» من 7.2 إلى 8.01 MeV: تصعد النقطة المعلَّمة المنحنى بسرعة في البداية، فكل نوية جديدة تضيف تقريبًا كامل طاقة الربط التي تنالها نوية في عمق النواة. +2. تابع التحريك حتى تستقر النقطة عند القمة، عند A = 60، حيث تقرأ «لكل نوية» القيمة 8.84 MeV. هذه منطقة الحديد والنيكل، أشد الأنوية تماسكًا على الإطلاق. +3. تابع نحو الأنوية الثقيلة، بعد A = 150، وصولًا إلى A = 235، وهو العدد الكتلي لليورانيوم-235. تنخفض قراءة «لكل نوية» إلى نحو 7.6 MeV والمنحنى ينحدر من جديد على اليمين. ## Real-life examples -1. **الهيليوم-4، نواة خفيفة.** أربعة نيوكليونات فقط تقف منخفضة على المنحنى في هذا النموذج المبسّط، فكل واحد منها لا يزال قريبًا من السطح وجيرانه قليلة. -2. **الحديد-56 والنيكل-62، القمة.** هما أشد الأنوية تماسكًا في الطبيعة، عند نحو 8.8 MeV لكل نيوكليون، ولهذا يتوقف اندماج نجم يحتضر عن إنتاج طاقة حين يصير قلبه حديدًا. -3. **اليورانيوم-235، نواة ثقيلة.** فيها 92 بروتونًا يتنافر بعضها مع بعض في آن واحد، فتقف بعيدًا على الجانب الأيمن من المنحنى، عند نحو 7.6 MeV فقط لكل نيوكليون. +1. **الهيليوم-4، نواة خفيفة.** أربع نويات فقط تقف منخفضة على المنحنى في هذا النموذج المبسّط، فكل واحدة منها ما تزال قريبة من السطح وجيرانها قليلون. +2. **الحديد-56 والنيكل-62، القمة.** هما أشد الأنوية تماسكًا في الطبيعة، عند نحو 8.8 MeV لكل نوية، ولهذا يتوقف اندماج نجم يحتضر عن إنتاج طاقة حين يصير قلبه حديدًا. +3. **اليورانيوم-235، نواة ثقيلة.** فيها 92 بروتونًا يتنافر بعضها مع بعض في آن واحد، فتقف بعيدًا على الجانب الأيمن من المنحنى، عند نحو 7.6 MeV فقط لكل نوية. ## Test yourself -1. جد العدد الكتلي الذي تبلغ عنده طاقة الربط لكل نيوكليون أقصاها، قرب الحديد والنيكل. +1. جد العدد الكتلي الذي تبلغ عنده طاقة الربط لكل نوية أقصاها، قرب الحديد والنيكل. 2. انتقل إلى نواة ثقيلة، فوق العدد الكتلي 150، حيث يطلق شطرها طاقة. -3. انتقل إلى نواة خفيفة، تحت العدد الكتلي 20، حيث يطلق دمجها مع نواة أخرى طاقة. +3. انتقل إلى نواة خفيفة، تحت العدد الكتلي 10، حيث يطلق دمجها مع نواة أخرى طاقة. ## Intuition -كل نيوكليون داخل النواة لا يشعر إلا بجذب أقرب جيرانه. القوة النووية الشديدة بالكاد تصل إلى أبعد من فمتومتر واحد، أي عرض نيوكليون واحد تقريبًا، فهي لا تلحظ أحدًا أبعد من موضع أو موضعين. تخيّل مجموعة صغيرة من أربعة أصدقاء يمسكون بأيدي بعضهم، تمثّل الهيليوم-4. كل واحد منهم على طرف المجموعة، يلمس اثنين أو ثلاثة فقط، فقبضتهم الإجمالية ضعيفة. والآن تخيّل مجموعة من ستة وخمسين صديقًا، تمثّل الحديد-56. معظمهم مدفون في وسط الحشد، وكل واحد منهم يمسك بيد أكبر عدد من الجيران يسمح به هذا المدى القصير، فيسهم كل فرد في المتوسط بما يقارب أقصى ما تعطيه القوة، أي نحو 8.8 MeV لكل واحد. حرّك منزلق «العدد الكتلي A» وراقب النقطة المعلَّمة تصعد ذلك المنحنى مع نمو الداخل المزدحم أسرع من نمو السطح. +كل نوية داخل النواة لا تشعر إلا بجذب أقرب جيرانها. القوة النووية الشديدة بالكاد تصل إلى أبعد من فيمتومتر واحد، أي عرض نوية واحدة تقريبًا، فلا تصل إلى من هو أبعد من جار أو جارين. تخيّل مجموعة صغيرة من أربعة أصدقاء يمسكون بأيدي بعضهم، تمثّل الهيليوم-4. كل واحد منهم على طرف المجموعة، يلمس اثنين أو ثلاثة فقط، فقبضتهم الإجمالية ضعيفة. والآن تخيّل مجموعة من ستة وخمسين صديقًا، تمثّل الحديد-56. معظمهم مدفون في وسط الحشد، وكل واحد منهم يمسك بيد أكبر عدد من الجيران يسمح به هذا المدى القصير، فيسهم كل فرد في المتوسط بما يقارب أقصى ما تعطيه القوة، أي نحو 8.8 MeV لكل واحد. حرّك منزلق «العدد الكتلي A» وراقب النقطة المعلَّمة تصعد ذلك المنحنى مع نمو الداخل المزدحم أسرع من نمو السطح. -ارفع A أكثر، بعد بضع مئات. يبدأ أثر ثانٍ يغلب. كل بروتون يتنافر كهربائيًا مع كل بروتون آخر، وهذا الدفع يصل عبر النواة كلها لا إلى الجيران القريبين فقط. في اليورانيوم-235 يتدافع 92 بروتونًا في آن واحد، فيسحب هذا التنافر الثابت المنحنى إلى الأسفل نحو 7.6 MeV لكل نيوكليون. ولهذا بالضبط يُجدي شطر نواة اليورانيوم إلى قسمين، أي الانشطار. تقع القطعتان الأصغر أعلى على المنحنى مما كانت عليه نواة اليورانيوم، ويخرج الفرق في صورة نحو 200 MeV من الطاقة المُطلقة في كل شطر. المنطق نفسه يعمل بعكس الاتجاه على الطرف الأيسر من المنحنى. دمج نواتين خفيفتين في نواة أثقل قليلًا يصعد المنحنى أيضًا، وهذا بالضبط ما يشغّل الشمس. +ارفع A أكثر، إلى ما فوق المئتين. هنا يبدأ أثر ثانٍ بالتغلّب. كل بروتون يتنافر كهربائيًا مع كل بروتون آخر، وهذا الدفع يصل عبر النواة كلها لا إلى الجيران القريبين فقط. في اليورانيوم-235 يتدافع 92 بروتونًا في آن واحد، فيسحب هذا التنافر الثابت المنحنى إلى الأسفل نحو 7.6 MeV لكل نوية. ولهذا بالضبط يُجدي شطر نواة اليورانيوم إلى قسمين، أي الانشطار. تقع القطعتان الأصغر أعلى على المنحنى مما كانت عليه نواة اليورانيوم، ويخرج الفرق في صورة نحو 200 MeV من الطاقة المُطلقة في كل شطر. المنطق نفسه يعمل بعكس الاتجاه على الطرف الأيسر من المنحنى. دمج نواتين خفيفتين في نواة أثقل قليلًا يصعد المنحنى أيضًا، وهذا بالضبط ما يشغّل الشمس. ## Formal -تقدّر الصيغة شبه التجريبية للكتلة طاقة الربط الكلية لنواة بالصيغة $E_b = a_V A - a_S A^{2/3} - a_C \frac{Z(Z-1)}{A^{1/3}} - a_A \frac{(A-2Z)^2}{A}$، حيث A العدد الكتلي وZ عدد البروتونات: حد الحجم يكافئ كل نوية بالتساوي تقريبًا، وحد السطح يعاقب النويات التي جيرانه أقل، وحد كولوم يعاقب تنافر البروتونات، وحد التناظر يعاقب اختلال التوازن بين البروتونات والنيوترونات. +تقدّر الصيغة شبه التجريبية للكتلة طاقة الربط الكلية لنواة بالصيغة $E_b = a_V A - a_S A^{2/3} - a_C \frac{Z(Z-1)}{A^{1/3}} - a_A \frac{(A-2Z)^2}{A}$، حيث A العدد الكتلي وZ عدد البروتونات: حد الحجم يكافئ كل نوية بالتساوي تقريبًا، وحد السطح يعاقب النويات التي جيرانها أقل، وحد كولوم يعاقب تنافر البروتونات، وحد التناظر يعاقب اختلال التوازن بين البروتونات والنيوترونات. -قسمة الناتج على A تعطي طاقة الربط لكل نيوكليون، وهي ما يرسمه المنحنى على الشاشة. يرتفع بسرعة عند A الصغيرة، حيث تقف معظم النويات على السطح، ثم يستوي قرب الأعداد الكتلية من 56 إلى 62 حين يسيطر الداخل، ثم ينخفض ببطء مع نمو حد كولوم. وهذا هو المنحنى الذي يتتبعه هذا الدرس، مختارًا لكل A عدد البروتونات Z الأقرب إلى وادي الاستقرار الحقيقي. +قسمة الناتج على A تعطي طاقة الربط لكل نوية، وهي ما يرسمه المنحنى على الشاشة. يرتفع بسرعة عند A الصغيرة، حيث تقف معظم النويات على السطح، ثم يستوي قرب الأعداد الكتلية من 56 إلى 62 حين يسيطر الداخل، ثم ينخفض ببطء مع نمو حد كولوم. وهذا هو المنحنى الذي يتتبعه هذا الدرس، مختارًا لكل A عدد البروتونات Z الأقرب إلى وادي الاستقرار الحقيقي. ## Advanced @@ -51,20 +51,24 @@ charts: [] ## Derivation -1. لو لامس كل نيوكليون البقية البالغ عددها $A - 1$، لنمت طاقة الربط كـ $A^2$. لكن القوة الشديدة لا تصل إلا إلى أقرب الجيران، فتنمو بدلًا من ذلك بالتناسب المباشر مع $A$، وهذا حد الحجم. -2. النيوكليون الذي يقف على السطح جيرانه أقل من نيوكليون مدفون في الداخل، فيسهم بأقل. عدد نيوكليونات السطح يتناسب مع مساحة سطح النواة، وهذه تنمو بمقدار $A^{2/3}$ فقط، أي أبطأ من الحجم، فيثقل هذا العقاب أكثر ما يثقل على الأنوية الصغيرة. +1. لو لامست كل نوية البقية البالغ عددها $A - 1$، لنمت طاقة الربط كـ $A^2$. لكن القوة الشديدة لا تصل إلا إلى أقرب الجيران، فتنمو بدلًا من ذلك بالتناسب المباشر مع $A$، وهذا حد الحجم. +2. النوية التي تقف على السطح جيرانها أقل من نوية في الداخل، فتسهم بأقل. عدد نويات السطح يتناسب مع مساحة سطح النواة، وهذه تنمو بمقدار $A^{2/3}$ فقط، أي أبطأ من الحجم، فيظهر أثر هذا النقص أكثر في الأنوية الصغيرة. 3. أثران آخران يُخصمان بعد ذلك: كل زوج من البروتونات يتنافر كهربائيًا، وتدفع النواة ثمن ابتعادها عن مزيج متوازن من البروتونات والنيوترونات. الحدود الأربعة معًا ترسم المنحنى الظاهر على الشاشة. ## Real world ### الحديد والنيكل في قلوب النجوم المحتضرة + يدمج النجم الضخم العناصر الخفيفة في عناصر أثقل ما دامت كل خطوة لا تزال تصعد المنحنى. وحين يصير قلبه حديدًا ونيكلًا في الغالب، عند القمة تمامًا، لا تطلق أي خطوة اندماج أخرى طاقة، فينهار قلب النجم. ### مفاعلات نووية تشطر اليورانيوم + يشطر المفاعل نواة اليورانيوم-235 إلى قطعتين متوسطتي الحجم تقفان أعلى على المنحنى، فتطلقان نحو 200 MeV لكل شطرة، وهذا يكفي من كيلوغرام واحد من اليورانيوم ليعادل حرق نحو ألفي طن من الفحم. ### اندماج الهيدروجين في الشمس -تدمج الشمس الهيدروجين، عند A = 1، في هيليوم، عند A = 4، صاعدة أشد أجزاء المنحنى انحدارًا، ولهذا يطلق دمج أخف العناصر طاقة كبيرة جدًا لكل نيوكليون مشاركة. + +تدمج الشمس الهيدروجين، عند A = 1، في هيليوم، عند A = 4، صاعدة أشد أجزاء المنحنى انحدارًا، ولهذا يطلق دمج أخف العناصر طاقة كبيرة جدًا لكل نوية مشاركة. ### من أين تأتي العناصر الأثقل من الحديد + بما أن الاندماج يتوقف عن الجدوى بعد القمة، تُصنع العناصر الأثقل من الحديد، ومنها الذهب واليورانيوم، في الظروف العنيفة الغنية بالطاقة داخل المستعرات العظمى واصطدام النجوم النيوترونية. diff --git a/content/lessons/nuclear/binding-energy/en.md b/content/lessons/nuclear/binding-energy/en.md index f35fc480..b3a8eea1 100644 --- a/content/lessons/nuclear/binding-energy/en.md +++ b/content/lessons/nuclear/binding-energy/en.md @@ -16,9 +16,9 @@ charts: [] ## Try it -1. Drag slider "mass number A" up from a light nucleus. Watch the marked dot climb the curve fast at first, each extra nucleon adding almost the full binding energy a deep interior nucleon gets. -2. Keep dragging until the dot sits at the very top, around A = 56 to 62 — iron and nickel, the most tightly bound nuclei that exist. -3. Keep going into heavy territory, past A = 150, all the way to uranium at A = 235. Watch the curve slope back down on the right. +1. Drag slider "mass number A" up from 12 to 20. The readout "per nucleon" climbs from 7.2 to 8.01 MeV: the marked dot climbs the curve fast at first, each extra nucleon adding almost the full binding energy a deep interior nucleon gets. +2. Keep dragging until the dot sits at the very top, at A = 60, where "per nucleon" reads 8.84 MeV — the neighbourhood of iron and nickel, the most tightly bound nuclei that exist. +3. Keep going into heavy territory, past A = 150, all the way to A = 235, the mass number of uranium-235. "per nucleon" falls to about 7.6 MeV as the curve slopes back down on the right. ## Real-life examples @@ -30,7 +30,7 @@ charts: [] 1. Find the mass number where binding energy per nucleon peaks — somewhere around iron and nickel. 2. Move to a heavy nucleus, above mass number 150, where splitting it apart would release energy. -3. Move to a light nucleus, below mass number 20, where fusing it with another would release energy. +3. Move to a light nucleus, below mass number 10, where fusing it with another would release energy. ## Intuition @@ -57,13 +57,17 @@ Real nuclei wobble above and below this smooth curve because of two effects the ## Real world ### Iron and nickel in dying stars + A massive star fuses lighter elements into heavier ones for as long as each step still climbs the curve. Once its core is mostly iron and nickel, sitting at the very peak, no further fusion step releases energy, and the star's core collapses. ### Nuclear reactors splitting uranium + A reactor splits uranium-235 nuclei into two mid-sized fragments that sit higher on the curve, releasing about 200 MeV per split — enough from one kilogram of uranium to match burning roughly two thousand tonnes of coal. ### Hydrogen fusion in the Sun + The Sun fuses hydrogen (A = 1) into helium (A = 4), climbing the steepest part of the curve, which is why fusing the lightest elements releases so much energy for each nucleon involved. ### Where elements heavier than iron come from + Since fusion stops paying off past the peak, elements heavier than iron — including gold and uranium — are forged instead in the violent, energy-rich conditions of supernovae and colliding neutron stars. diff --git a/content/lessons/nuclear/binding-energy/lesson.yaml b/content/lessons/nuclear/binding-energy/lesson.yaml index 7f7287fe..122c0caf 100644 --- a/content/lessons/nuclear/binding-energy/lesson.yaml +++ b/content/lessons/nuclear/binding-energy/lesson.yaml @@ -45,4 +45,4 @@ presets: challenges: - check: A >= 54 and A <= 64 - check: A > 150 - - check: A < 20 + - check: A < 10 diff --git a/content/lessons/nuclear/chain-reaction/ar.md b/content/lessons/nuclear/chain-reaction/ar.md index 73374320..91e7e282 100644 --- a/content/lessons/nuclear/chain-reaction/ar.md +++ b/content/lessons/nuclear/chain-reaction/ar.md @@ -13,9 +13,9 @@ charts: [] ## Try it -1. اضبط «معامل التضاعف k» على 1.00 بالضبط وحرّك «الأجيال» للأعلى. تنمو الشجرة عقدة واحدة في كل صف إلى الأبد، وهذا تفاعل متسلسل ثابت. -2. أنزل k تحت 1 وشغّل من جديد. تخفّ الشجرة وتتوقف الفروع، جيلًا بعد جيل، حتى لا يبقى شيء. -3. ارفع k فوق 1.5 وراقب كل صف يتّسع أكثر من سابقه، يتضاعف ثم يتضاعف مجددًا. +1. اضبط «معامل التضاعف k» على 1.00 بالضبط وارفع «الأجيال» إلى 12. تنمو الشجرة نقطة واحدة في كل صف إلى الأبد: يبقى «العدد» عند 1 وتقرأ «الحالة» كلمة يستقر. هذا تفاعل متسلسل ثابت. +2. أنزل k إلى 0.7 واضغط «من البداية». لا ينجح الانشطار الأول في إشعال انشطار آخر: يصير «العدد» 0 من الجيل 1 فصاعدًا وتقرأ «الحالة» كلمة ينطفئ. +3. ارفع k إلى 2.00 واضغط «من البداية». يتّسع كل صف إلى ضعف سابقه، 1 ثم 2 ثم 4 ثم 8 ثم 16، ويقرأ «العدد» 64 عند الجيل 6 و4096 عند الجيل 12. ## Real-life examples @@ -25,25 +25,25 @@ charts: [] ## Test yourself -1. أنزل k تحت 0.9 وشغّل ثمانية أجيال على الأقل، حتى يصبح العدد شبه صفر. +1. أنزل k تحت 0.9 وتقدّم ثمانية أجيال على الأقل، حتى يصبح العدد شبه صفر. 2. ثبّت k ضمن 0.01 من الرقم 1 بالضبط وصل إلى الجيل 5 على الأقل، محافظًا على عدد ثابت. 3. ارفع k فوق 1.5 وصل إلى الجيل 6 أو أبعد، حتى يصل العدد إلى العشرات أو أكثر. ## Intuition -كل نقطة في الرسم انشطار واحد، وكل خط ينزل منها نيوترون أطلقه يتسبب في الانشطار التالي. ليس كل نيوترون من انشطار حقيقي ينجح في ذلك. بعضها يتسرّب خارج الوقود، وبعضها يُمتص في شيء ليس يورانيوم، وبعضها يخطئ الهدف. لذلك المهم هو متوسط عدد النيوترونات الناجحة، ويسمى k. إذا كان k أقل من 1، يملك كل جيل في المتوسط انشطارات أقل من الجيل السابق، تمامًا كما تنطفئ رسالة متسلسلة إذا أعاد كل شخص إرسالها في المتوسط لأقل من شخص جديد واحد. وإذا كان k أكبر من 1، يملك كل جيل انشطارات أكثر، و«أكثر من السابق في كل مرة» هو بالضبط ما يجعل الأمر ينفجر بدل أن ينطفئ. +كل نقطة في الرسم انشطار واحد، وكل خط ينزل منها نيوترون أطلقه يتسبب في الانشطار التالي. ليس كل نيوترون من انشطار حقيقي ينجح في ذلك. بعضها يتسرّب خارج الوقود، وبعضها يُمتص في شيء ليس يورانيوم، وبعضها يخطئ الهدف. لذلك المهم هو متوسط عدد النيوترونات الناجحة، ويسمى k. إذا كان k أقل من 1، يكون في كل جيل في المتوسط انشطارات أقل من الجيل السابق، تمامًا كما تموت إشاعة إذا نقلها كل شخص في المتوسط إلى أقل من شخص جديد واحد. وإذا كان k أكبر من 1، يكون في كل جيل انشطارات أكثر، و«أكثر من السابق في كل مرة» هو بالضبط ما يجعل الأمر ينفجر بدل أن ينطفئ. -k = 1 هو حد السكين الفاصل بينهما. وهو أيضًا الرقم الذي يُبنى كل مفاعل طاقة ليستقر عنده. نيوترون واحد بالضبط من كل انشطار يتسبب في التالي، لا أكثر ولا أقل. لذلك لا ينطفئ التفاعل المتسلسل ولا يفلت من الضبط، بل يستمر بمعدل ثابت، وهذا بالضبط معنى «خرج ثابت» على مستوى النيوترونات الفردية. حرّك k قليلًا فوق 1، وراقب كم يتّسع عرض الصفوف على الشاشة بسرعة. تتجنّب المفاعلات الحقيقية ذلك باستخدام قضبان التحكم، لتمتص نيوترونات كافية تمامًا فتثبّت k عند 1. هذا موضوع الدرس التالي بالضبط. +k = 1 هو الحد الدقيق الفاصل بينهما. وهو أيضًا الرقم الذي يُبنى كل مفاعل طاقة ليستقر عنده. نيوترون واحد بالضبط من كل انشطار يتسبب في التالي، لا أكثر ولا أقل. لذلك لا ينطفئ التفاعل المتسلسل ولا يفلت من الضبط، بل يستمر بمعدل ثابت، وهذا بالضبط معنى «خرج ثابت» على مستوى النيوترونات الفردية. حرّك k قليلًا فوق 1، وراقب كم يتّسع عرض الصفوف على الشاشة بسرعة. تتجنّب المفاعلات الحقيقية ذلك باستخدام قضبان التحكم، لتمتص نيوترونات كافية تمامًا فتثبّت k عند 1. هذا موضوع الدرس التالي بالضبط. ## Formal بدءًا من $N_0$ نيوترون في الجيل صفر، يضرب كل جيل العدد في المعامل نفسه $k$. فيكون $N_1 = k N_0$، ثم $N_2 = k N_1 = k^2 N_0$. وبعد $g$ جيلًا يصبح $N_g = k^{g} N_0$. هذا نمو أو تناقص أسّي بسيط، يعتمد فقط على كون $k$ أكبر من 1 أو أصغر منه. -في مفاعل حقيقي يعتمد $k$، أو بدقة أكبر $k_{\text{eff}}$ معامل التضاعف الفعّال، على إغناء الوقود وهندسته وكثافته، وعلى عدد النيوترونات التي يزيلها المهدئ أو قضبان التحكم قبل أن تتسبب بانشطار آخر. تسمى الحالة دون الحرجة حين $k_{\text{eff}} < 1$، والحرجة حين $k_{\text{eff}} = 1$، وفوق الحرجة حين $k_{\text{eff}} > 1$. +في مفاعل حقيقي يعتمد $k$، أو بدقة أكبر $k_{\text{eff}}$ معامل التضاعف الفعّال، على إغناء الوقود وشكله وكثافته، وعلى عدد النيوترونات التي يزيلها المهدئ أو قضبان التحكم قبل أن تتسبب بانشطار آخر. تسمى الحالة دون الحرجة حين $k_{\text{eff}} < 1$، والحرجة حين $k_{\text{eff}} = 1$، وفوق الحرجة حين $k_{\text{eff}} > 1$. ## Advanced -تُبنى المفاعلات الحقيقية لتعمل فوق الحرجة بقدر ضئيل فقط. تعتمد على شريحة صغيرة بطيئة الوصول من النيوترونات «المتأخرة» التي تطلقها بعض شظايا الانشطار بعد ثوانٍ من تحللها، لا على النيوترونات «الفورية» المتحررة في اللحظة الأولى. ولأن هذه النيوترونات المتأخرة تستغرق وقتًا لتظهر، فمفاعل عنده $k_{\text{eff}}$ أعلى من 1 بقليل يغيّر قدرته خلال ثوانٍ، مما يمنح قضبان التحكم وقتًا للاستجابة. أما مفاعل يصبح فوق حرج فوريًا، أي $k_{\text{eff}} > 1$ من النيوترونات الفورية وحدها، فيغيّر قدرته بسرعة تكاد تكون فورية. هذا هو جوهر هامش الأمان في كل مفاعل مدني. +تُبنى المفاعلات الحقيقية لتعمل فوق الحرجة بقدر ضئيل فقط. تعتمد على جزء صغير متأخر الوصول من النيوترونات «المتأخرة» التي تطلقها بعض شظايا الانشطار بعد ثوانٍ من الانشطار، لا على النيوترونات «الفورية» المتحررة في اللحظة الأولى. ولأن هذه النيوترونات المتأخرة تستغرق وقتًا لتظهر، فمفاعل عنده $k_{\text{eff}}$ أعلى من 1 بقليل يغيّر قدرته خلال ثوانٍ، مما يمنح قضبان التحكم وقتًا للاستجابة. أما مفاعل يصبح فوق حرج فوريًا، أي $k_{\text{eff}} > 1$ من النيوترونات الفورية وحدها، فيغيّر قدرته بسرعة تكاد تكون فورية. هذا هو جوهر هامش الأمان في كل مفاعل مدني. ## Derivation @@ -54,13 +54,17 @@ k = 1 هو حد السكين الفاصل بينهما. وهو أيضًا الر ## Real world ### مفاعلات الطاقة التجارية + نظام التحكم في كل مفاعل تجاري موجود لتثبيت $k_{\text{eff}}$ عند 1.00 رغم احتراق الوقود ببطء وتسخّن القلب وتبرّده. ### حوادث الحرجية -وقعت عدة حوادث مخبرية تاريخية حين جمّع باحثون بأيديهم كمية كافية من المادة الانشطارية لدفع k فوق 1 بقليل، وهذا تذكير صارم بأن الحرجية خاصية للهندسة والكتلة، لا للنية. + +وقعت عدة حوادث مخبرية تاريخية حين جمّع باحثون بأيديهم كمية كافية من المادة الانشطارية لدفع k فوق 1 بقليل، وهذا تذكير واضح بأن الحرجية تتوقف على شكل المادة وكتلتها، لا على نية أحد. ### الأسلحة النووية -يُصمَّم السلاح ليقفز بـ k إلى ما فوق 1 بكثير خلال أجزاء من الميكروثانية، ليكتمل أكبر عدد ممكن من الأجيال قبل أن يفكّك الانفجار التجمّع نفسه. + +يُصمَّم السلاح ليقفز بـ k إلى ما فوق 1 بكثير خلال أجزاء من الميكروثانية، ليكتمل أكبر عدد ممكن من الأجيال قبل أن يبعثر الانفجار المادة نفسها. ### مفاعلات الأبحاث + تُشغَّل مفاعلات الأبحاث والتدريب الصغيرة غالبًا بقدرة منخفضة وثابتة خصيصًا لتثبيت k عند 1 بالضبط لساعات متواصلة، منتجة نيوترونات للتجارب لا كهرباء. diff --git a/content/lessons/nuclear/chain-reaction/en.md b/content/lessons/nuclear/chain-reaction/en.md index a7db7302..6827efd8 100644 --- a/content/lessons/nuclear/chain-reaction/en.md +++ b/content/lessons/nuclear/chain-reaction/en.md @@ -12,9 +12,9 @@ charts: [] ## Try it -1. Set "multiplication factor k" to exactly 1.00 and drag "generations" up. The tree grows one node per row, forever — a steady chain reaction. -2. Lower k below 1 and run it again. The tree thins out and the branches stop, generation after generation, until nothing is left. -3. Raise k above 1.5 and watch each row fan out wider than the last, doubling and redoubling. +1. Set "multiplication factor k" to exactly 1.00 and drag "generations" up to 12. The tree grows one node per row, forever: "population" stays at 1 and "status" reads holding steady — a steady chain reaction. +2. Lower k to 0.7 and press restart. The first fission fails to start another: "population" drops to 0 from generation 1 on and "status" reads dying out. +3. Raise k to 2.00 and restart. Each row fans out twice as wide as the last — 1, 2, 4, 8, 16 — and "population" reads 64 at generation 6 and 4096 at generation 12. ## Real-life examples @@ -42,7 +42,7 @@ In a real reactor $k$, more precisely $k_{\text{eff}}$, the effective multiplica ## Advanced -Real reactors are built to run only barely supercritical on a small, slow-arriving slice of "delayed" neutrons that some fission fragments emit seconds after decaying, rather than on the "prompt" neutrons released in the first instant; because those delayed neutrons take time to show up, a reactor with $k_{\text{eff}}$ just above 1 changes power over seconds, giving control rods time to react, while a reactor that goes prompt supercritical, meaning $k_{\text{eff}} > 1$ from prompt neutrons alone, changes power almost instantly — the distinction at the heart of every civilian reactor's safety margin. +Real reactors are built to run only barely supercritical on a small, slow-arriving slice of "delayed" neutrons that some fission fragments emit seconds after the fission, rather than on the "prompt" neutrons released in the first instant; because those delayed neutrons take time to show up, a reactor with $k_{\text{eff}}$ just above 1 changes power over seconds, giving control rods time to react, while a reactor that goes prompt supercritical, meaning $k_{\text{eff}} > 1$ from prompt neutrons alone, changes power almost instantly — the distinction at the heart of every civilian reactor's safety margin. ## Derivation @@ -53,13 +53,17 @@ Real reactors are built to run only barely supercritical on a small, slow-arrivi ## Real world ### Commercial power reactors + Every commercial reactor's control system exists to hold $k_{\text{eff}}$ at 1.00 despite the fuel slowly burning up and the core heating and cooling. ### Criticality accidents + Several historic laboratory accidents happened when researchers accidentally assembled enough fissile material, by hand, to push k just over 1 — a stark reminder that criticality is a property of geometry and mass, not intention. ### Nuclear weapons + A weapon is designed to jump k far above 1 within microseconds, so as many generations as possible complete before the assembly blows itself apart. ### Research reactors + Small research and training reactors are often run at a low, steady power specifically to keep k held exactly at 1 for hours at a time, producing neutrons for experiments rather than electricity. diff --git a/content/lessons/nuclear/chain-reaction/lesson.yaml b/content/lessons/nuclear/chain-reaction/lesson.yaml index 1b2d6b53..3be05727 100644 --- a/content/lessons/nuclear/chain-reaction/lesson.yaml +++ b/content/lessons/nuclear/chain-reaction/lesson.yaml @@ -23,7 +23,7 @@ parameters: min: 0.5 max: 2.5 step: 0.05 - value: 1 + value: 1.2 generations: min: 0 max: 12 diff --git a/content/lessons/nuclear/chart-of-nuclides/ar.md b/content/lessons/nuclear/chart-of-nuclides/ar.md index 5dc8caae..12217b20 100644 --- a/content/lessons/nuclear/chart-of-nuclides/ar.md +++ b/content/lessons/nuclear/chart-of-nuclides/ar.md @@ -16,9 +16,9 @@ charts: [] ## Try it -1. ابدأ من الحديد-56 (Z = 26، N = 30). تقف النقطة الكبيرة تمامًا على الحزام الأخضر، أشد نواة عادية ترابطًا. -2. حرّك «النيوترونات N» إلى ما فوق 40 مع إبقاء Z عند 26. تصعد النقطة عن الحزام وتتحوّل إلى لون «نيوترونات أكثر من اللازم»، فنواة حقيقية هناك تتخلّص من شحنة نيوترون باضمحلال β⁻. -3. الآن حرّك «البروتونات Z» نحو 1 مع إبقاء N مرتفعًا. أنت تتتبّع الحافة العليا للمخطط، بعيدًا عن أي نظير مستقر معروف. +1. يبدأ المخطط عند الكربون-12. اضبط Z = 26 وN = 30 لتبني الحديد-56. تقف النقطة الكبيرة تمامًا على الحزام الأخضر، وتقرأ الحالة «مستقرة»، وتقرأ «طاقة الترابط / نكليون» القيمة 8.76 MeV. هذه أشد نواة عادية ترابطًا. +2. ارفع «النيوترونات N» إلى 41 مع إبقاء Z عند 26. تصعد النقطة عن الحزام، وتتغيّر الحالة إلى «غنية بالنيوترونات · اضمحلال β⁻»، وتنخفض طاقة الترابط إلى 8.43 MeV. في نواة حقيقية كهذه يتحوّل نيوترون إلى بروتون باضمحلال β⁻. +3. الآن اخفض «البروتونات Z» إلى 1 مع إبقاء N عند 41. تبتعد النقطة كثيرًا عن أي نظير مستقر معروف، وتصير طاقة الترابط لكل نكليون سالبة، −10.55 MeV: خليط مختل إلى هذا الحد لا يتماسك أبدًا. ## Real-life examples @@ -30,19 +30,19 @@ charts: [] 1. ابنِ نواة فيها 11 نيوترونًا زائدًا على الأقل عن عدد بروتوناتها. 2. ابنِ الحديد-56 نفسه، Z = 26 وN = 30. -3. جد (Z, N) تكون طاقة ترابطها لكل نكليون قريبة من نصف MeV من القمة الحقيقية، نحو 8.8 MeV. +3. جد (Z, N) لا تبعد طاقة ترابطها لكل نكليون أكثر من 0.4 MeV عن القمة الحقيقية، نحو 8.8 MeV. ## Intuition كل نقطة على هذا المخطط نواة ممكنة، موضوعة بعدد بروتوناتها أفقيًا وعدد نيوتروناتها رأسيًا. حرّك المنزلقين معًا على طول الحزام الأخضر فتمشي بين عناصر حقيقية واحدًا واحدًا، قريبًا دائمًا من نواة موجودة فعلًا في الطبيعة. لكن اخرج عن الحزام في أي اتجاه، فيتغيّر لون النقطة الكبيرة: لقد وصلت إلى مزيج مختل لا يتماسك إلى الأبد. -ينحني الحزام نفسه صعودًا نحو اليمين بدل أن يتبع خط N = Z المتقطّع، لأن كل بروتون تضيفه يدفع كل بروتون آخر بقوة أكبر قليلًا، بينما تضيف النيوترونات جذبًا لجيرانها فقط. تقاوم النوى المستقرة الأثقل هذا التنافر المتزايد بحمل نيوترونات إضافية. عند الكالسيوم، Z = 20، يحتاج الحزام المستقر أصلًا إلى نيوترونين إضافيين أو أكثر من البروتونات ليتماسك. +ينحني الحزام نفسه صعودًا نحو اليمين بدل أن يتبع خط N = Z المتقطّع، لأن كل بروتون تضيفه يدفع كل بروتون آخر بقوة أكبر قليلًا، بينما تضيف النيوترونات جذبًا لجيرانها فقط. تقاوم النوى المستقرة الأثقل هذا التنافر المتزايد بحمل نيوترونات إضافية. عند الحديد، Z = 26، يحتاج كل نظير مستقر إلى نيوترونين على الأقل زيادة على عدد بروتوناته ليتماسك. ## Formal -تقدّر صيغة الكتلة شبه التجريبية طاقة الترابط الكلية $B$ لنواة من أربعة تأثيرات متنافسة: جذب جماعي يكبر مع $A$، وعقوبة سطحية على النكليونات القليلة الجيران، وتنافر كولوم بين كل زوج بروتونات، وعقوبة على تباعد عددي البروتونات $Z$ والنيوترونات $N$، لكل منها ثابت وزن $a$ قِيس من نوى حقيقية. +تقدّر صيغة الكتلة شبه التجريبية طاقة الترابط الكلية $B$ لنواة من أربعة تأثيرات متنافسة: جذب جماعي يكبر مع $A$، وخصم سطحي بسبب النكليونات القليلة الجيران، وتنافر كولوم بين كل زوج بروتونات، وخصم بسبب تباعد عددي البروتونات $Z$ والنيوترونات $N$، لكل منها ثابت وزن $a$ قِيس من نوى حقيقية. -قسمة الناتج على $A$ تعطي طاقة الترابط لكل نكليون، $\frac{B}{A} = a_V - a_S A^{-1/3} - a_C \frac{Z(Z-1)}{A^{4/3}} - a_A \frac{(N-Z)^2}{A^2}$، وهذا بالضبط الارتفاع المرسوم في المشهد ثلاثي الأبعاد. يصعد إلى نحو 8.8 MeV قرب الحديد-56 وينخفض من كل جانب، وصولًا إلى نحو 200 MeV التي تُطلَق حين تنشطر نواة يورانيوم-235 إلى شظيتين أشد ترابطًا بكثير. +قسمة الناتج على $A$ تعطي طاقة الترابط لكل نكليون، $\frac{B}{A} = a_V - a_S A^{-1/3} - a_C \frac{Z(Z-1)}{A^{4/3}} - a_A \frac{(N-Z)^2}{A^2}$، وهذا بالضبط الارتفاع المرسوم في المشهد ثلاثي الأبعاد. يصعد إلى نحو 8.8 MeV قرب الحديد-56 وينخفض من كل جانب. ومن انخفاضه البطيء نحو النوى الأثقل تأتي الطاقة التي تُطلَق، نحو 200 MeV، حين تنشطر نواة يورانيوم-235 إلى شظيتين أشد ترابطًا. ## Advanced @@ -51,19 +51,23 @@ charts: [] ## Derivation 1. يجذب كل نكليون جيرانه القريبين بقدر متقارب، فيجعل حد الحجم الجماعي طاقة الترابط تكبر طرديًا مع A، تمامًا كما يكبر حجم قطرة سائل مع كمية السائل فيها. -2. النكليونات على السطح لها جيران أقل ترتبط بهم، وكل بروتون ينافر كل بروتون آخر، فتُطرح عقوبة سطحية وعقوبة كولوم من ذلك الحد الجماعي، مع عقوبة على وجود نيوترونات أكثر بكثير من البروتونات أو العكس. +2. النكليونات على السطح لها جيران أقل ترتبط بهم، وكل بروتون ينافر كل بروتون آخر، فيُطرح خصم سطحي وخصم كولوم من ذلك الحد الجماعي، مع خصم آخر بسبب وجود نيوترونات أكثر بكثير من البروتونات أو العكس. 3. قسمة طاقة الترابط كلها على A تحوّلها إلى طاقة ترابط لكل نكليون، وهذا هو الرقم الذي يقيس فعليًا مدى تماسك النواة، مهما كان حجمها. ## Real world ### من أين يأتي الحديد + يواصل الاندماج النووي في قلب النجم إطلاق الطاقة إلى أن يبدأ ببناء الحديد والنيكل، أشد النوى ترابطًا على الإطلاق. دمجهما أكثر يكلّف طاقة بدل أن يطلقها، ولهذا ينهار قلب النجم حين يمتلئ بالحديد. ### الانشطار النووي + انشطار نواة يورانيوم-235 يقرّب الشظيتين من قمة منحنى طاقة الترابط، فيُطلق نحو 200 MeV في العملية، أي أكثر بنحو خمسين مليون مرة من طاقة تفاعل كيميائي واحد. ### الطب النووي + اليود-131 والتكنيشيوم-99m يقفان بالقرب من الحزام المستقر لا عليه، ويضمحلان بمعدل معروف ومناسب، وهذا بالضبط ما يجعلهما مفيدين وقابلين للتنبؤ في التصوير والعلاج. ### تكوّن العناصر الكوني + تتكوّن العناصر الأثقل من الحديد غالبًا في فيضانات النيوترونات الهائلة عند اصطدام نجمين نيوترونيين أو انفجار مستعر أعظم. وهذه الفيضانات تدفع النوى مؤقتًا عاليًا على الجدار الغني بالنيوترونات في هذا المخطط نفسه قبل أن تضمحل عائدة نحو الحزام المستقر. diff --git a/content/lessons/nuclear/chart-of-nuclides/en.md b/content/lessons/nuclear/chart-of-nuclides/en.md index 33dc4db0..6d0b8ff0 100644 --- a/content/lessons/nuclear/chart-of-nuclides/en.md +++ b/content/lessons/nuclear/chart-of-nuclides/en.md @@ -18,9 +18,9 @@ charts: [] ## Try it -1. Start at iron-56 (Z = 26, N = 30): the big dot sits right on the green band, the most tightly bound ordinary nucleus there is. -2. Drag "neutrons N" up past 40 while Z stays at 26. The dot climbs off the band and turns the colour for "too many neutrons" — a real nucleus there sheds a neutron's worth of charge by β⁻ decay. -3. Now drag "protons Z" down toward 1 while N stays high. You're tracing the top edge of the chart, far from any known stable isotope. +1. The chart opens on carbon-12. Set Z = 26 and N = 30 to build iron-56: the big dot sits right on the green band, the status reads "stable" and "binding energy / nucleon" reads 8.76 MeV, the most tightly bound ordinary nucleus there is. +2. Drag "neutrons N" up to 41 while Z stays at 26. The dot climbs off the band, the status changes to "neutron-rich · β⁻ decay" and the binding energy drops to 8.43 MeV — in a real nucleus there, a neutron turns into a proton by β⁻ decay. +3. Now drag "protons Z" down to 1 while N stays at 41. The dot slides far from any known stable isotope and the binding energy per nucleon turns negative, −10.55 MeV: a mix this lopsided could not hold together at all. ## Real-life examples @@ -32,19 +32,19 @@ charts: [] 1. Build a nucleus with at least 11 more neutrons than protons. 2. Build iron-56 itself, Z = 26 and N = 30. -3. Find a (Z, N) whose binding energy per nucleon comes within half an MeV of the real peak, about 8.8 MeV. +3. Find a (Z, N) whose binding energy per nucleon comes within 0.4 MeV of the real peak, about 8.8 MeV. ## Intuition Every dot on this chart is one possible nucleus, plotted by how many protons it has across and how many neutrons it has up. Drag both sliders together along the green band and you're walking through real elements one at a time, always staying close to a nucleus that actually exists in nature. Step off the band in either direction, though, and the big dot changes colour: it has strayed into a mix too lopsided to hold together forever. -The band itself bends upward and to the right rather than following the dashed N = Z line, because every proton you add pushes every other proton away a little harder, while neutrons only add attraction to their neighbours. Heavier stable nuclei fight that growing repulsion by carrying extra neutrons — by calcium, Z = 20, the stable band already needs a couple more neutrons than protons just to hold together. +The band itself bends upward and to the right rather than following the dashed N = Z line, because every proton you add pushes every other proton away a little harder, while neutrons only add attraction to their neighbours. Heavier stable nuclei fight that growing repulsion by carrying extra neutrons — by iron, Z = 26, every stable isotope already needs at least two more neutrons than protons just to hold together. ## Formal The semi-empirical mass formula estimates a nucleus's total binding energy $B$ from four competing effects: a bulk attraction that grows with $A$, a surface penalty for nucleons with fewer neighbours, the Coulomb repulsion between every pair of protons, and a penalty for having very different numbers of protons $Z$ and neutrons $N$, each weighted by a constant $a$ fitted to real nuclei. -Dividing by $A$ gives binding energy per nucleon, $\frac{B}{A} = a_V - a_S A^{-1/3} - a_C \frac{Z(Z-1)}{A^{4/3}} - a_A \frac{(N-Z)^2}{A^2}$, exactly the height plotted in the 3D scene: it climbs to about 8.8 MeV near iron-56 and falls away on every side, including toward the roughly 200 MeV released when a uranium-235 nucleus splits into two far more tightly bound fragments. +Dividing by $A$ gives binding energy per nucleon, $\frac{B}{A} = a_V - a_S A^{-1/3} - a_C \frac{Z(Z-1)}{A^{4/3}} - a_A \frac{(N-Z)^2}{A^2}$, exactly the height plotted in the 3D scene: it climbs to about 8.8 MeV near iron-56 and falls away on every side. The slow fall toward the heaviest nuclei is where the roughly 200 MeV comes from when a uranium-235 nucleus splits into two more tightly bound fragments. ## Advanced @@ -59,13 +59,17 @@ A fifth term, a pairing energy of roughly ±12 divided by the square root of $A$ ## Real world ### Where iron comes from + Nuclear fusion in a star's core keeps releasing energy right up until it starts building iron and nickel, the most tightly bound nuclei there are; fusing them further would cost energy instead of releasing it, which is why a star's core collapses once it fills with iron. ### Nuclear fission + Splitting a uranium-235 nucleus moves both fragments toward the peak of the binding-energy curve, releasing about 200 MeV in the process — roughly fifty million times the energy a single chemical reaction releases. ### Nuclear medicine + Iodine-131 and technetium-99m both sit just off the stable band, decaying at a convenient, known rate, which is exactly what makes them useful and predictable for scans and treatment. ### Cosmic nucleosynthesis + Elements heavier than iron are forged mainly in the extreme neutron floods of colliding neutron stars and supernovae, which briefly push nuclei far up the neutron-rich wall of this very chart before they decay back toward the stable band. diff --git a/content/lessons/nuclear/chart-of-nuclides/lesson.yaml b/content/lessons/nuclear/chart-of-nuclides/lesson.yaml index 307d389d..5d468019 100644 --- a/content/lessons/nuclear/chart-of-nuclides/lesson.yaml +++ b/content/lessons/nuclear/chart-of-nuclides/lesson.yaml @@ -23,12 +23,12 @@ parameters: min: 1 max: 30 step: 1 - value: 26 + value: 6 N: min: 0 max: 45 step: 1 - value: 30 + value: 6 variables: - B - A diff --git a/content/lessons/nuclear/decay-chains/ar.md b/content/lessons/nuclear/decay-chains/ar.md index fb6cf67c..b821b474 100644 --- a/content/lessons/nuclear/decay-chains/ar.md +++ b/content/lessons/nuclear/decay-chains/ar.md @@ -15,54 +15,58 @@ charts: [] ## Try it -1. راقب درج النقاط ينزل من النظير الأصل (أعلى اليسار) إلى النظير المستقر (أسفل اليمين). -2. حرّك «أعمار النصف المنقضية» للأمام. تخفت نقطة الأصل مع نقصان نصيبها من الذرات الأصلية، وتضيء نقطة النهاية المستقرة مع امتلائها. +1. راقب درج النقاط ينزل من النظير الأصل (أعلى اليمين) إلى النظير المستقر (أسفل اليسار). عند عمر نصف واحد تقرأ «المتبقي من الأصل» القيمة 50.0% U-238. +2. حرّك «أعمار النصف المنقضية» للأمام إلى 3. تخفت نقطة الأصل مع نقصان نصيبها من الذرات الأصلية إلى 12.5%، وتضيء نقطة النهاية المستقرة مع امتلائها إلى 87.5% Pb-206. 3. بدّل «سلسلة الاضمحلال» بين السلاسل الثلاث. تبدأ كل سلسلة من نظير ثقيل مختلف وتنتهي عند نظير رصاص مستقر مختلف، لكنها جميعًا تمرّ بنظير رادون في الطريق. ## Real-life examples 1. **بلّورة زركون لحظة تكوّنها.** يُحبس فيها أثر من اليورانيوم-238 دون أي رصاص تقريبًا بعد، فتبدأ الساعة من الصفر. -2. **البلّورة نفسها بعد 4.47 مليار سنة.** مرّ عمر نصف واحد لليورانيوم-238، فنزل نحو نصف اليورانيوم الأصلي بالضبط كل الطريق إلى الرصاص-206. -3. **معدن قديم يحوي ثوريوم.** بعد ثلاثة أعمار نصف للثوريوم-232 (نحو 42 مليار سنة)، لم يبقَ من الثوريوم الأصلي سوى ثُمنه تقريبًا، والباقي أصبح رصاصًا-208 مستقرًا. +2. **البلّورة نفسها بعد 4.47 مليار سنة.** مرّ عمر نصف واحد لليورانيوم-238، فتحوّل نصف اليورانيوم الأصلي تقريبًا، خطوة بعد خطوة، إلى الرصاص-206. +3. **معدن يحوي ثوريوم في المستقبل البعيد.** بعد ثلاثة أعمار نصف للثوريوم-232 (نحو 42 مليار سنة)، لم يبقَ من الثوريوم الأصلي سوى ثُمنه تقريبًا، والباقي أصبح رصاصًا-208 مستقرًا. ## Test yourself 1. على سلسلة اليورانيوم-238، تجاوز عمر نصف واحد كاملًا. -2. على سلسلة الثوريوم-232، شغّل الزمن حتى خمسة أعمار نصف. +2. على سلسلة الثوريوم-232، قدِّم الزمن إلى خمسة أعمار نصف. 3. على سلسلة الأكتينيوم (اليورانيوم-235)، اخفض النظير الأصل المتبقي تحت 1%. ## Intuition -نواة ثقيلة كاليورانيوم-238 تحمل بروتونات أكثر مما تستطيع القوة الشديدة أن تمسكه بارتياح، لكن اضمحلالًا واحدًا لا يصلح ذلك دفعة واحدة. اضمحلال ألفا يفقد بروتونين ونيوترونين فقط في كل مرة، واضمحلال بيتا يحوّل نيوترونًا واحدًا إلى بروتون فقط. فتضمحل النواة، وتصل إلى نظير جديد لا يزال غير مستقر. تضمحل مرة أخرى، ثم أخرى، نازلةً الدرج الذي تراه على الشاشة، حتى تستقر أخيرًا على ترتيب مريح من البروتونات والنيوترونات، وهو الرصاص-206 في سلسلة اليورانيوم-238. +نواة ثقيلة كاليورانيوم-238 تحمل بروتونات أكثر مما تستطيع القوة الشديدة أن تمسكه بإحكام، لكن اضمحلالًا واحدًا لا يصلح ذلك دفعة واحدة. في اضمحلال ألفا تفقد النواة بروتونين ونيوترونين فقط في كل مرة، واضمحلال بيتا يحوّل نيوترونًا واحدًا إلى بروتون فقط. فتضمحل النواة، وتصل إلى نظير جديد لا يزال غير مستقر. تضمحل مرة أخرى، ثم أخرى، نازلةً الدرج الذي تراه على الشاشة، حتى تصل أخيرًا إلى ترتيب مستقر من البروتونات والنيوترونات، وهو الرصاص-206 في سلسلة اليورانيوم-238. معظم النظائر في منتصف الدرج قصيرة العمر جدًا فلا تتراكم كثيرًا. بمجرد أن يغذّيها النظير الأصل بذرات جديدة، تضمحل هي الأخرى إلى الخطوة التالية. فيستقر نصيبها عند حصة صغيرة شبه ثابتة مما تبقّى من الأصل: نقاطها أكثر سطوعًا كلما طال عمر النظير، وأخفت كلما قصر. الاستثناء الوحيد اللافت يقع في نهاية الدرج. فالنظير الأخير لا يضمحل بعد ذلك، وبدل أن يستقر عند حصة صغيرة ثابتة، يتراكم باستمرار، ويزداد سطوعًا مع كل عمر نصف يمرّ. ## Formal -بعد أن يستقر نصيب نظير وسيط من الذرات، يضمحل بمعدل يساوي تقريبًا معدل وصول ذرات جديدة منه من النظير الأصل، وهذا التوازن يُسمى «التوازن العلماني». +بعد أن يستقر نصيب نظير وسيط من الذرات، يضمحل بمعدل يساوي تقريبًا معدل وصول ذرات جديدة منه من النظير الأصل، وهذا التوازن يُسمى «التوازن المستديم» (secular equilibrium). يربط هذا التوازن نصيب كل نظير وسيط بنصيب الأصل، عبر عمرَي النصف: $\frac{N_i}{N_p} \approx \frac{T_i}{T_p}$، فنظير عمر نصفه أقصر من الأصل بمليون مرة يحتفظ بنحو جزء من مليون فقط من نصيب الأصل في أي لحظة. ## Advanced -«التوازن العلماني» تقريب يصحّ بعد أن يكفي الوقت لنظير وسيط ليبلغ حصته الثابتة، وهذا يستغرق في السلاسل الثلاث زمنًا أقصر بكثير مما يحتاجه النظير الأصل نفسه ليضمحل ولو قليلًا. أطول نظير وسيط عمرًا في سلسلة اليورانيوم-238، وهو الثوريوم-230، يبلغ توازنه في أقل من مليون سنة، وهذا جزء ضئيل من عمر نصف اليورانيوم-238 البالغ 4.47 مليار سنة. الحل الكامل الدقيق دون هذا التقريب هو معادلات باتمان، سلسلة من معادلات تفاضلية مترابطة تُحل نظيرًا بعد نظير على طول السلسلة. +«التوازن المستديم» تقريب يصحّ بعد أن يكفي الوقت لنظير وسيط ليبلغ حصته الثابتة، وهذا يستغرق في السلاسل الثلاث زمنًا أقصر بكثير مما يحتاجه النظير الأصل نفسه ليضمحل ولو قليلًا. أطول نظير وسيط عمرًا في سلسلة اليورانيوم-238، وهو اليورانيوم-234، يبلغ توازنه خلال نحو مليوني سنة، وهذا جزء ضئيل من عمر نصف اليورانيوم-238 البالغ 4.47 مليار سنة. الحل الكامل الدقيق دون هذا التقريب هو معادلات باتمان، سلسلة من معادلات تفاضلية مترابطة تُحل نظيرًا بعد نظير على طول السلسلة. ## Derivation 1. بعد أن يستقر نظير وسيط، يتوقف نصيبه عن التغيّر كثيرًا. تظهر منه ذرات بقدر ما يضمحل منه. -2. هذا التوازن يعني أن النسبة نفسها تضمحل كل عمر نصف لكل نظير، فقسمة نصيب كل نظير على عمر نصفه الخاص يعطي الرقم نفسه على طول السلسلة. +2. هذا التوازن يعني أن كل نظير يفقد العدد نفسه من الذرات في كل ثانية، فقسمة نصيب كل نظير على عمر نصفه الخاص يعطي الرقم نفسه على طول السلسلة. 3. إعادة الترتيب تحوّل هذا الرقم المشترك إلى مقارنة مباشرة: حصة نظير وسيط من نصيب الأصل تساوي نسبة عمرَي نصفهما. ## Real world ### تأريخ اليورانيوم والرصاص + يؤرّخ الجيولوجيون الصخور بقياس المسافة التي قطعها اليورانيوم-238 أو اليورانيوم-235 فيها نزولًا نحو الرصاص المستقر، وهذا هو منزلق «أعمار النصف المنقضية» نفسه المستخدم هنا. ### الرادون في البيوت -الرادون-222 والرادون-220 والرادون-219 هي الخطوة الغازية الوحيدة في كل سلسلة من هذه السلاسل الثلاث. وخلافًا لكل نظير صلب حوله، يمكن للرادون أن يتسرّب من التربة والصخور المحتوية على يورانيوم أو ثوريوم ويتجمّع في الطوابق السفلية، ولهذا تفرض دول كثيرة فحص الرادون في المنازل. + +الرادون-222 والرادون-220 والرادون-219 هي الخطوة الغازية الوحيدة في كل سلسلة من هذه السلاسل الثلاث. وخلافًا لكل نظير صلب حوله، يمكن للرادون أن يتسرّب من التربة والصخور المحتوية على يورانيوم أو ثوريوم ويتجمّع في الأقبية والطوابق الأرضية، ولهذا تفرض دول كثيرة فحص الرادون في المنازل. ### تخزين النفايات النووية + يحوي وقود المفاعلات المستهلك نظائر في منتصف سلاسل كهذه. وتراعي خطط التخزين أن النظير «الآمن» قد يضمحل هو نفسه إلى نظير أقل أمانًا أبعد في السلسلة نفسها. -### كواشف الدخان وتطبيقات أخرى +### الاستفادة من النظائر القصيرة العمر + استُخدمت بعض النظائر الأقصر عمرًا في هذه السلاسل، كالبولونيوم-210، ودُرست تحديدًا لأن السلسلة تضمن إنتاجها باستمرار من نظير أصل أطول عمرًا قريب منها. diff --git a/content/lessons/nuclear/decay-chains/en.md b/content/lessons/nuclear/decay-chains/en.md index 966e9057..4e07a45c 100644 --- a/content/lessons/nuclear/decay-chains/en.md +++ b/content/lessons/nuclear/decay-chains/en.md @@ -14,15 +14,15 @@ charts: [] ## Try it -1. Watch the staircase of dots step down from the parent (top left) to the stable isotope (bottom right). -2. Drag "half-lives elapsed" forward. The parent dot fades as its share of the original atoms drops, and the stable end brightens as it fills up. +1. Watch the staircase of dots step down from the parent (top right) to the stable isotope (bottom left). At 1 half-life, "parent remaining" reads 50.0% U-238. +2. Drag "half-lives elapsed" forward to 3. The parent dot fades as its share of the original atoms drops to 12.5%, and the stable end brightens as it fills up to 87.5% Pb-206. 3. Switch "decay chain" between the three series. Each one starts at a different heavy isotope and ends at a different stable lead isotope, but every one of them passes through a radon isotope on the way. ## Real-life examples 1. **A zircon crystal the moment it forms.** Trace uranium-238 gets locked into the crystal with essentially no lead yet — the clock starts at zero. 2. **The same crystal 4.47 billion years later.** One half-life of uranium-238 has passed: almost exactly half of the original uranium has stepped all the way down to lead-206. -3. **An ancient thorium-bearing mineral.** After three half-lives of thorium-232 (about 42 billion years), only about an eighth of the original thorium is left; the rest is now stable lead-208. +3. **A thorium-bearing mineral in the far future.** After three half-lives of thorium-232 (about 42 billion years), only about an eighth of the original thorium is left; the rest is now stable lead-208. ## Test yourself @@ -44,24 +44,28 @@ That balance ties every middle member's share of the original atoms to the paren ## Advanced -Secular equilibrium is an approximation that holds once enough time has passed for a middle member to build up to its steady share, which for every isotope in these three chains takes far less time than the chain's own parent needs to decay even slightly — the longest-lived middle member of the uranium-238 chain, thorium-230, reaches equilibrium in well under a million years, a sliver of uranium-238's 4.47-billion-year half-life. The full, exact solution without this approximation is the Bateman equations, a chain of coupled differential equations solved isotope by isotope down the series. +Secular equilibrium is an approximation that holds once enough time has passed for a middle member to build up to its steady share, which for every isotope in these three chains takes far less time than the chain's own parent needs to decay even slightly — the longest-lived middle member of the uranium-238 chain, uranium-234, reaches equilibrium within about two million years, a sliver of uranium-238's 4.47-billion-year half-life. The full, exact solution without this approximation is the Bateman equations, a chain of coupled differential equations solved isotope by isotope down the series. ## Derivation 1. Once established, a middle isotope's own population stops changing much: as many atoms of it appear as decay away. -2. That balance means the same fraction decays away every half-life for every member, so dividing each one's population by its own half-life gives the same number all along the chain. +2. That balance means every member loses the same number of atoms each second, so dividing each one's population by its own half-life gives the same number all along the chain. 3. Rearranging turns that shared number into a direct comparison: a middle isotope's share of the parent's population equals the ratio of their half-lives. ## Real world ### Uranium-lead dating + Geologists date rocks by measuring how far the uranium-238 or uranium-235 they contain has stepped down its chain toward stable lead, the same "half-lives elapsed" slider used here. ### Radon in homes + Radon-222, radon-220 and radon-219 are the one gaseous step in each of these three chains; unlike every solid isotope around it, radon can seep out of uranium- or thorium-bearing soil and rock and collect in basements, which is why many countries require home radon testing. ### Nuclear waste storage + Spent reactor fuel contains isotopes partway down chains like these; storage plans account for the fact that a "safe" decay product can itself decay into something less safe further down the same chain. -### Smoke detectors and other applications +### Short-lived members put to use + Some of the shorter-lived members of these chains, like polonium-210, have been used and studied precisely because a chain guarantees they are always being freshly produced from a longer-lived parent nearby. diff --git a/content/lessons/nuclear/fusion-in-stars/ar.md b/content/lessons/nuclear/fusion-in-stars/ar.md index 8045bad6..36472377 100644 --- a/content/lessons/nuclear/fusion-in-stars/ar.md +++ b/content/lessons/nuclear/fusion-in-stars/ar.md @@ -16,26 +16,26 @@ charts: [] ## Try it 1. راقب الصف العلوي. عند 15 مليون كلفن، حرارة قلب الشمس الفعلية، يُظهر سُلّم التفاعل سلسلة البروتون-بروتون. هذه هي الطريقة التي تحوّل بها الشمس الهيدروجين إلى هيليوم. -2. اضغط تشغيل وراقب «خطوة التفاعل» تتنقل عبر الخطوات الثلاث لهذه السلسلة، صفًا مضيئًا بعد آخر. -3. حرّك «حرارة القلب» فوق 100 مليون كلفن. يتبدّل السُلّم إلى اندماج الهيليوم في الكربون، وتقفز النقطة الزرقاء على الرسم السفلي إلى موضع أبعد على المنحنى. +2. الرسم يتحرك وحده: راقب «خطوة التفاعل» تتنقل بين الخطوات الثلاث لهذه السلسلة، صفًا مضيئًا بعد آخر، وتقرأ «طاقة هذه الخطوة» ‎+0.42 ثم ‎+5.49 ثم ‎+12.86 MeV. +3. ارفع «حرارة القلب» إلى 150 مليون كلفن. يتبدّل السُلّم إلى اندماج الهيليوم في الكربون، وتقفز النقطة الزرقاء على الرسم السفلي إلى موضع أبعد على المنحنى: ترتفع «طاقة الربط» من 7.07 إلى 7.68 MeV/A. ## Real-life examples 1. **قلب الشمس الآن.** عند 15 مليون كلفن، تندمج أربع أنوية هيدروجين في نواة هيليوم واحدة عبر ثلاث خطوات، وتُطلق نحو 26.7 MeV كل مرة تكتمل فيها السلسلة. -2. **قلب عملاق أحمر.** حين ينفد الهيدروجين القريب من نجم كالشمس، ينكمش قلبه ويسخن فوق 100 مليون كلفن، حرارة كافية لاندماج الهيليوم في الكربون. +2. **قلب عملاق أحمر.** حين يوشك الهيدروجين في قلب نجم كالشمس على النفاد، ينكمش قلبه ويسخن فوق 100 مليون كلفن، حرارة كافية لاندماج الهيليوم في الكربون. 3. **قلب نجم ضخم يحتضر، قبل انفجاره بأيام.** عند نحو 3 مليارات كلفن، تندمج أنوية السيليكون في سلسلة سريعة تنتهي عند حديد-56، النقطة التي لم يعد الاندماج بعدها يعيد طاقة أكثر مما يأخذ. ## Test yourself -1. اجعل القلب ساخنًا بما يكفي لاندماج الهيليوم في الكربون، لا أكثر مما يحتاجه احتراق الكربون. +1. اجعل القلب ساخنًا بما يكفي لاندماج الهيليوم في الكربون، لكن دون أن يبلغ الحرارة التي يحتاجها احتراق الكربون. 2. ارفع الحرارة حتى يبدأ النجم أخيرًا بتكوين الحديد. -3. أعد القلب إلى حرارة الشمس وتنقّل عبر سلسلة البروتون-بروتون كاملة. +3. جد المرحلة التي بينهما: حرارة تكفي لاندماج الأكسجين في السيليكون، لكنها لا تكفي بعد لصنع الحديد. ## Intuition كل صف في سُلّم التفاعل خطوة حقيقية يخطوها قلب الشمس الآن. يصطدم بروتونان فيتحول أحدهما إلى نيوترون فيتكوّن الديوترون. يلتقط الديوترون بروتونًا ثالثًا فيصنع هيليوم-3. وأخيرًا تلتقي نواتا هيليوم-3 فتصنعان نواة هيليوم-4 واحدة، وتقذفان البروتونين الزائدين. تحتاج كل خطوة من هذه الخطوات الثلاث قلبًا ساخنًا بما يكفي لتصطدم الأنوية بقوة تقربها من بعضها. لذلك رفع «حرارة القلب» فوق 15 مليون كلفن لا يغيّر شيئًا للهيدروجين، فهو يندمج أصلًا بالسرعة التي تحتاجها الشمس. -حرّك المنزلق فوق 100 مليون كلفن بدلًا من ذلك، ويتبدّل السُلّم كله: نفد وقود الهيدروجين القريب من النجم، فانكمش قلبه وسخن، وصارت أنوية الهيليوم تصطدم بقوة تكفي لبناء الكربون. واصل الرفع، من الكربون إلى النيون، من الأكسجين إلى السيليكون، ومن السيليكون إلى الحديد، ولاحظ على الرسم السفلي أن النقطة الزرقاء تصعد منحنى يزداد استواءً باستمرار. عند حديد-56، قمة هذا المنحنى، لا توجد نواة أثقل يستطيع الاندماج بناءها وتعيد طاقة أكثر مما تكلّف، ولهذا تنتهي قصة الاندماج في النجم هناك. +حرّك المنزلق فوق 100 مليون كلفن بدلًا من ذلك، ويتبدّل السُلّم كله: نفد وقود الهيدروجين السهل في قلب النجم، فانكمش قلبه وسخن، وصارت أنوية الهيليوم تصطدم بقوة تكفي لبناء الكربون. واصل الرفع، من الكربون إلى النيون، من الأكسجين إلى السيليكون، ومن السيليكون إلى الحديد، ولاحظ على الرسم السفلي أن النقطة الزرقاء تصعد منحنى يزداد استواءً باستمرار. عند حديد-56، قمة هذا المنحنى، لا توجد نواة أثقل يستطيع الاندماج بناءها وتعيد طاقة أكثر مما تكلّف، ولهذا تنتهي قصة الاندماج في النجم هناك. ## Formal @@ -45,7 +45,7 @@ charts: [] ## Advanced -تحتاج كل مرحلة اندماج حرارة قلب أعلى من سابقتها، لأن أنوية النواتج تحمل شحنة موجبة أكبر فأكبر. فيشتد تنافرها الكهربائي مع كل مرحلة، وهو حاجز كولوم نفسه من درس الاندماج المرافق. تحرق كل مرحلة بعد الهيدروجين وقودها أسرع بكثير من سابقتها أيضًا، فيقضي النجم الضخم ملايين السنين يندمج فيها الهيدروجين، بينما لا يقضي إلا أيامًا يندمج فيها السيليكون في الحديد، قبيل انهيار قلبه مباشرة. +تحتاج كل مرحلة اندماج حرارة قلب أعلى من سابقتها، لأن أنوية النواتج تحمل شحنة موجبة أكبر فأكبر. فيشتد تنافرها الكهربائي مع كل مرحلة، وهو حاجز كولوم نفسه الذي مرّ في درس الاندماج النووي. تحرق كل مرحلة بعد الهيدروجين وقودها أسرع بكثير من سابقتها أيضًا، فيقضي النجم الضخم ملايين السنين في دمج الهيدروجين، ولا يقضي إلا أيامًا في دمج السيليكون إلى حديد، قبيل انهيار قلبه مباشرة. ## Derivation @@ -56,13 +56,17 @@ charts: [] ## Real world ### الشمس وكل نجم مثلها -تقضي النجوم معظم حياتها تندمج فيها الهيدروجين، لأنه أسهل وقود للاندماج وأطوله عمرًا. + +تقضي النجوم معظم حياتها في دمج الهيدروجين، لأنه أسهل وقود للاندماج وأطوله عمرًا. ### العمالقة الحمراء -حين ينفد هيدروجين نجم قريب من قلبه، ينكمش القلب ويسخن، فيشتعل اندماج الهيليوم وتنتفخ طبقاته الخارجية عملاقًا أحمر. + +حين يوشك الهيدروجين في قلب النجم على النفاد، ينكمش القلب ويسخن، فيشتعل اندماج الهيليوم وتنتفخ طبقاته الخارجية عملاقًا أحمر. ### المستعرات العظمى + حين يتحول قلب نجم ضخم إلى حديد، لا يعود الاندماج قادرًا على إسناده ضد جاذبيته نفسها، فينهار القلب في أقل من ثانية، مطلقًا مستعرًا أعظم. ### تكوّن العناصر -كل عنصر أثقل من الحديد في الكون، بما فيه اليود المستعمل في الطب، تشكّل في حرارة مستعر أعظم هائلة أو في اصطدام نجمين نيوترونيين، لا في الاندماج النجمي العادي. + +العناصر الأثقل من الحديد، ومنها اليود المستعمل في الطب، لم يصنعها الاندماج النجمي العادي. بُنيت حين التقطت الأنوية نيوترونات، في النجوم العملاقة الهرمة والمستعرات العظمى واصطدام النجوم النيوترونية. diff --git a/content/lessons/nuclear/fusion-in-stars/en.md b/content/lessons/nuclear/fusion-in-stars/en.md index 0c0403c7..c3bb5732 100644 --- a/content/lessons/nuclear/fusion-in-stars/en.md +++ b/content/lessons/nuclear/fusion-in-stars/en.md @@ -15,8 +15,8 @@ charts: [] ## Try it 1. Watch the top row: at 15 million kelvin, the Sun's actual core temperature, the reaction ladder shows the proton-proton chain, the way the Sun turns hydrogen into helium. -2. Press play and watch "reaction step" cycle through all three steps of that chain, one row lit up at a time. -3. Drag "core temperature" past 100 million kelvin. The ladder switches to helium fusing into carbon, and the blue dot on the bottom chart jumps further along the curve. +2. The picture plays by itself: watch "reaction step" cycle through all three steps of that chain, one row lit up at a time, while "energy this step" reads +0.42, then +5.49, then +12.86 MeV. +3. Drag "core temperature" up to 150 million kelvin. The ladder switches to helium fusing into carbon, and the blue dot on the bottom chart jumps further along the curve: "binding energy" rises from 7.07 to 7.68 MeV/A. ## Real-life examples @@ -28,7 +28,7 @@ charts: [] 1. Set the core hot enough to fuse helium into carbon, but no hotter than carbon burning needs. 2. Push the temperature high enough that the star finally starts forming iron. -3. Cool the core back to the Sun's temperature and step through the whole proton-proton chain. +3. Find the stage in between: hot enough to fuse oxygen into silicon, but not yet hot enough to make iron. ## Intuition @@ -55,13 +55,17 @@ Each fusion stage needs a higher core temperature than the last because the prod ## Real world ### The Sun and every star like it + Stars spend almost all of their lives fusing hydrogen, because it is fusion's easiest, longest-lasting fuel. ### Red giants + When a star runs low on hydrogen its core contracts and heats up, igniting helium fusion and swelling the star's outer layers into a red giant. ### Supernovae + Once a massive star's core turns to iron, fusion can no longer hold it up against its own gravity, and the core collapses in under a second, triggering a supernova. ### Nucleosynthesis -Every element heavier than iron in the universe, including the iodine used in medicine, was forged in the extreme heat of a supernova or colliding neutron stars, not ordinary stellar fusion. + +The elements heavier than iron, including the iodine used in medicine, were not made by ordinary stellar fusion: they were built up by nuclei capturing neutrons, in old giant stars, supernovae and colliding neutron stars. diff --git a/content/lessons/nuclear/fusion-in-stars/lesson.yaml b/content/lessons/nuclear/fusion-in-stars/lesson.yaml index 8c76aa9e..606e8e11 100644 --- a/content/lessons/nuclear/fusion-in-stars/lesson.yaml +++ b/content/lessons/nuclear/fusion-in-stars/lesson.yaml @@ -22,7 +22,7 @@ parameters: temperature: min: 10 max: 3200 - step: 10 + step: 5 value: 15 unit: MK stage: @@ -51,4 +51,4 @@ presets: challenges: - check: temperature >= 100 and temperature < 600 - check: temperature >= 2700 - - check: temperature < 100 and stage == 2 + - check: temperature >= 1500 and temperature < 2700 diff --git a/content/lessons/nuclear/fusion-reactors/ar.md b/content/lessons/nuclear/fusion-reactors/ar.md index 96073f35..d0cfbb47 100644 --- a/content/lessons/nuclear/fusion-reactors/ar.md +++ b/content/lessons/nuclear/fusion-reactors/ar.md @@ -17,15 +17,15 @@ charts: [] ## Try it -1. راقب الأعمدة الثلاثة القصيرة أعلى الرسم، عمود للحرارة وعمود للكثافة وعمود لزمن الحصر. تحتها عمود طويل واحد يمثّل حاصل ضرب الثلاثة، ويقارن الناتج بخط الإشعال. -2. حرّك منزلق «حرارة البلازما» للأعلى. يكبر عموده، وينزلق مؤشر العمود الطويل يمينًا قليلًا، لكنه يبقى بعيدًا عن خط الإشعال وحده. -3. ارفع الآن منزلقَي «كثافة البلازما» و«زمن الحصر» أيضًا، حتى يقطع المؤشر خط الإشعال المتقطع. تفاعل الديوتيريوم والتريتيوم في الزاوية يطلق 17.6 MeV نفسها دائمًا، مهما تغيّر تشغيل المفاعل. +1. راقب الأعمدة الثلاثة القصيرة أعلى الرسم، عمود للحرارة وعمود للكثافة وعمود لزمن الحصر. تحتها عمود طويل واحد يمثّل حاصل ضرب الثلاثة، ويقارن الناتج بخط الإشعال. في البداية (10 keV، والكثافة 1، وثانية واحدة) يقرأ «الحاصل الثلاثي nTτ» القيمة 1.00e+21، أي ثلث المطلوب للإشعال. +2. ارفع منزلق «حرارة البلازما» إلى 20 keV. يكبر عموده، ويتحرك مؤشر العمود الطويل يمينًا، لكنه لا يصل إلى خط الإشعال: يقرأ الحاصل 2.00e+21. +3. ارفع الآن «كثافة البلازما» إلى 2 و«زمن الحصر» إلى 3 s أيضًا. يقرأ الحاصل 1.20e+22 ويقطع المؤشر خط الإشعال المتقطع. تفاعل الديوتيريوم والتريتيوم في الزاوية يطلق 17.6 MeV نفسها دائمًا، مهما تغيّر تشغيل المفاعل. ## Real-life examples -1. **بلازما متواضعة في المختبر.** حرارتها 10 keV فقط، وكثافتها منخفضة، ومحصورة لثانية واحدة. يقع حاصلها الثلاثي بعيدًا جدًّا عن خط الإشعال. +1. **بلازما متواضعة في المختبر.** حرارتها 10 keV فقط، وكثافتها 10²⁰ جسيم في المتر المكعب، ومحصورة لثانية واحدة. حاصلها الثلاثي، 1×10²¹، لا يبلغ إلا ثلث خط الإشعال. 2. **الهدف التصميمي لـITER.** حرارة نحو 15 keV، وكثافة نحو 10²⁰ جسيم في المتر المكعب، وحصر لبضع ثوانٍ. هذا يكفي لتجاوز خط الإشعال بفارق مريح. -3. **مفاعل مصمَّم بفائض قوة.** حرارة 20 keV، وكثافة ضعف كثافة ITER، وحصر خمس ثوانٍ. يتجاوز حاصله الثلاثي خط الإشعال بعشرة أضعاف تقريبًا. +3. **مفاعل مصمَّم بفائض قوة.** حرارة 20 keV، وكثافة ضعف كثافة ITER، وحصر خمس ثوانٍ. حاصله الثلاثي، 2×10²²، يساوي نحو سبعة أضعاف خط الإشعال. ## Test yourself @@ -37,7 +37,7 @@ charts: [] تندمج نواة ديوتيريوم مع نواة تريتيوم لتكوّنا هيليوم-4 ونيوترونًا، في كل مرة تصطدمان فيها بقرب كافٍ. تُطلقان 17.6 MeV نفسها في كل مرة، مهما تغيّر تشغيل المفاعل، وهذا الرقم لا يتغيّر أبدًا. الذي يتغيّر هو عدد مرات حدوث الاصطدام. رفع «حرارة البلازما» يمنح الأنوية سرعة أكبر، فتخترق تنافرها الكهربائي. رفع «كثافة البلازما» يحشر أنوية أكثر في المساحة نفسها، فتتصادم أكثر. رفع «زمن الحصر» يمنحها وقتًا أطول للتصادم، قبل أن تبرد البلازما أو تتفرق وتضيع الفرصة. -لا يكفي مقبض واحد من الثلاثة وحده. بلازما حارة لكن رقيقة، أو كثيفة لكن تتسرب خلال جزء من ألف الثانية، لا تنتج طاقة اندماج أكثر مما استُهلك في تسخينها أصلًا. يضرب العمود الطويل الأرقام الثلاثة بعضها في بعض، فيعطي رقمًا واحدًا هو «الحاصل الثلاثي». لا تنتج البلازما طاقة أكثر مما تستهلك إلا حين يقطع هذا الرقم خط الإشعال المتقطع. ITER أكبر تجربة اندماج بُنيت على الإطلاق، وصُمم ليقف بعد هذا الخط مباشرة. +لا يكفي عامل واحد من الثلاثة وحده. بلازما حارة لكن قليلة الكثافة، أو كثيفة لكن تتسرب خلال جزء من ألف الثانية، لا تنتج طاقة اندماج أكثر مما استُهلك في تسخينها أصلًا. يضرب العمود الطويل الأرقام الثلاثة بعضها في بعض، فيعطي رقمًا واحدًا هو «الحاصل الثلاثي». لا تنتج البلازما طاقة أكثر مما تستهلك إلا حين يقطع هذا الرقم خط الإشعال المتقطع. ITER أكبر تجربة اندماج بُنيت على الإطلاق، وصُمم ليقف بعد هذا الخط مباشرة. ## Formal @@ -47,7 +47,7 @@ charts: [] ## Advanced -لا يضبط مهندسو التوكاماك الكثافة والحرارة وزمن الحصر كلًّا على حدة. تسخين البلازما بقوة أكبر يقصّر غالبًا مدة حصرها الجيد، لذلك تصميم المفاعل مقايضة ثلاثية حقيقية، لا ثلاثة مقابض منفصلة. تتوزع 17.6 MeV من كل تفاعل توزيعًا غير متساوٍ. يحمل النيوترون منها 14.1 MeV، ويفلت من الحقل المغناطيسي كليًّا، لأن الحقول المغناطيسية تحني الجسيمات المشحونة فقط. يودع النيوترون طاقته في غلاف محيط بالمفاعل، وهذه هي الطريقة التي تستخرج بها محطة اندماج حقيقية حرارة قابلة للاستعمال. +لا يضبط مهندسو التوكاماك الكثافة والحرارة وزمن الحصر كلًّا على حدة. تسخين البلازما بقوة أكبر يقصّر غالبًا مدة حصرها الجيد، لذلك تصميم المفاعل موازنة حقيقية بين ثلاثة أمور مترابطة، لا ثلاثة مفاتيح منفصلة. تتوزع 17.6 MeV من كل تفاعل توزيعًا غير متساوٍ. يحمل النيوترون منها 14.1 MeV، ويفلت من الحقل المغناطيسي كليًّا، لأن الحقول المغناطيسية تحني الجسيمات المشحونة فقط. يودع النيوترون طاقته في غلاف محيط بالمفاعل، وهذه هي الطريقة التي تستخرج بها محطة اندماج حقيقية حرارة قابلة للاستعمال. ## Derivation @@ -58,13 +58,17 @@ charts: [] ## Real world ### ITER + يُبنى ITER حاليًا في فرنسا. صُمم ليحصر بلازما تتجاوز الحاصل الثلاثي اللازم للإشعال، وينتج عشرة أضعاف القدرة التي أُدخلت لتسخينها. ### الاندماج بالحصر بالقصور الذاتي -تتجاوز منشآت مثل مرفق الإشعال الوطني الحصر المغناطيسي كليًّا. تضغط كريّة وقود بالليزر بسرعة كبيرة جدًّا، فيماسكها قصورها الذاتي وحده مدة كافية لتندمج. + +تتجاوز منشآت مثل مرفق الإشعال الوطني الحصر المغناطيسي كليًّا. تضغط كريّة وقود بالليزر بسرعة كبيرة جدًّا، فيبقيها قصورها الذاتي وحده متماسكة مدة كافية لتندمج. ### الستيلاراتور -يبلغ الستيلاراتور الحاصل الثلاثي نفسه الذي يبلغه التوكاماك. يستخدم حقلًا مغناطيسيًا ملتويًا يشبه اللفائف بدل حلقة بسيطة، فيقايض بناءً أصعب بحصر أثبت. + +يبلغ الستيلاراتور الحاصل الثلاثي نفسه الذي يبلغه التوكاماك. يستخدم حقلًا مغناطيسيًا ملتويًا يشبه اللفائف بدل حلقة بسيطة، فيكون بناؤه أصعب لكن حصره أثبت. ### وعد الاندماج + الديوتيريوم وفير في مياه البحر، والتريتيوم يمكن إنتاجه من الليثيوم. لذلك سيعمل مفاعل اندماج ناجح بوقود لا ينفد، ولن يخلّف نفايات مشعة طويلة العمر. diff --git a/content/lessons/nuclear/fusion-reactors/en.md b/content/lessons/nuclear/fusion-reactors/en.md index 0ac38335..13a47511 100644 --- a/content/lessons/nuclear/fusion-reactors/en.md +++ b/content/lessons/nuclear/fusion-reactors/en.md @@ -16,15 +16,15 @@ charts: [] ## Try it -1. Watch the top bars: three short bars for temperature, density and confinement time, and one long bar underneath for their product against the ignition line. -2. Drag "plasma temperature" up. The top bar grows and the long bar's marker slides right, but nowhere near the ignition line by itself. -3. Now raise "plasma density" and "confinement time" too, until the marker crosses the dashed ignition line. The deuterium-tritium reaction in the corner still releases the same fixed 17.6 MeV either way. +1. Watch the top bars: three short bars for temperature, density and confinement time, and one long bar underneath for their product against the ignition line. At the start (10 keV, density 1, 1 s) "triple product nTτ" reads 1.00e+21, a third of the way to ignition. +2. Drag "plasma temperature" up to 20 keV. The top bar grows and the long bar's marker slides right, but it still stops short of the ignition line: the product reads 2.00e+21. +3. Now raise "plasma density" to 2 and "confinement time" to 3 s too. The product reads 1.20e+22 and the marker crosses the dashed ignition line. The deuterium-tritium reaction in the corner still releases the same fixed 17.6 MeV either way. ## Real-life examples -1. **A modest lab plasma.** 10 keV, low density, held together for only a second: the triple product lands far short of ignition. +1. **A modest lab plasma.** 10 keV, 10²⁰ particles per cubic metre, held together for only a second: the triple product, 1×10²¹, reaches just a third of the ignition line. 2. **ITER's design target.** About 15 keV, roughly 10²⁰ particles per cubic metre, held for a few seconds — enough to clear the ignition line with room to spare. -3. **A reactor built to spare.** 20 keV, twice ITER's density, held five seconds: the triple product lands an order of magnitude past ignition. +3. **A reactor built to spare.** 20 keV, twice ITER's density, held five seconds: the triple product, 2×10²², lands nearly seven times past ignition. ## Test yourself @@ -57,13 +57,17 @@ Real tokamaks do not hold density, temperature and confinement time independentl ## Real world ### ITER + Under construction in France, ITER is designed to hold a plasma past the ignition-class triple product and produce ten times the power put into heating it. ### Inertial confinement fusion + Facilities like the National Ignition Facility skip magnetic confinement entirely, compressing a fuel pellet with lasers so fast that its own inertia holds it together just long enough to fuse. ### Stellarators + A stellarator reaches the same triple product as a tokamak using a twisted, coil-shaped magnetic field instead of a simple ring, trading a harder build for steadier confinement. ### Fusion's promise + Because deuterium is abundant in seawater and tritium can be bred from lithium, a working fusion reactor would run on fuel that does not run out and leaves behind no long-lived radioactive waste. diff --git a/content/lessons/nuclear/fusion-reactors/lesson.yaml b/content/lessons/nuclear/fusion-reactors/lesson.yaml index d48156cc..0779a0e7 100644 --- a/content/lessons/nuclear/fusion-reactors/lesson.yaml +++ b/content/lessons/nuclear/fusion-reactors/lesson.yaml @@ -30,12 +30,12 @@ parameters: max: 3 step: 0.1 value: 1 - unit: "×10²⁰ m⁻³" + unit: '×10²⁰ m⁻³' confinement: min: 0.1 max: 10 step: 0.1 - value: 3 + value: 1 unit: s variables: - n diff --git a/content/lessons/nuclear/mass-defect/ar.md b/content/lessons/nuclear/mass-defect/ar.md index 3ab5131d..2ce8a703 100644 --- a/content/lessons/nuclear/mass-defect/ar.md +++ b/content/lessons/nuclear/mass-defect/ar.md @@ -18,15 +18,15 @@ charts: [] ## Try it -1. راقب ميزان الكفّتين. الكفّة اليسرى تحمل Z بروتونًا وN نيوترونًا منفصلين، والكفّة اليمنى تحمل النواة الواحدة التي تكوّنها. -2. حرّك «البروتونات Z» و«النيوترونات N» إلى 2 و2، أي الهيليوم-4. راقب الكفّة اليمنى ترتفع، أخف وزنًا، والومضة بجانبها تُظهر الطاقة التي صارت إليها الكتلة الناقصة. -3. الآن حرّك Z وN نحو الكربون، 6 و6 ثم 6 و8. راقب الومضة تكبر. كل ما زادت النويات زادت الكتلة الناقصة، وزادت الطاقة معها. +1. راقب ميزان الكفّتين. الكفّة اليسرى تحمل Z بروتونًا وN نيوترونًا منفصلين، والكفّة اليمنى تحمل النواة الواحدة التي تكوّنها. يبدأ الميزان ببروتون واحد وحده، فالكفّتان متعادلتان و«طاقة الترابط» تقرأ 0 MeV. +2. ارفع «البروتونات Z» و«النيوترونات N» إلى 2 و2، أي الهيليوم-4. ترتفع الكفّة اليمنى لأنها أخف: يقرأ «نقص الكتلة Δm» القيمة 0.0304 u وتقرأ «طاقة الترابط» القيمة 28.3 MeV، وهي الطاقة التي تحوّلت إليها الكتلة الناقصة وتُظهرها الومضة بجانب الكفّة. +3. الآن ارفع Z وN إلى الكربون: 6 و6 ثم 6 و8. تكبر الومضة وترتفع «طاقة الترابط» إلى نحو 90 MeV ثم نحو 105 MeV. كلما زادت النويات زادت الكتلة الناقصة، وزادت الطاقة معها. ## Real-life examples -1. **الهيليوم-4، المثال الكلاسيكي المحلول.** يرتبط بروتونان ونيوترونان في نواة أخف من الجسيمات الحرة بنحو 28.3 MeV، وهو أكثر رقم يُستشهد به في الفيزياء النووية. -2. **الكربون-12، النظير المرجعي.** يرتبط ستة بروتونات وستة نيوترونات في النواة نفسها التي تحدَّد كتلتها، بالتعريف، بأنها 12 وحدة كتلة ذرية بالضبط. -3. **الكربون-14، أثقل بنيوترونين.** البروتونات الستة نفسها، لكن مع ثمانية نيوترونات بدل ستة، وهو النظير المشع المستخدم لتأريخ العظام والفحم. +1. **الهيليوم-4، المثال الأشهر.** يرتبط بروتونان ونيوترونان في نواة أخف من الجسيمات الحرة بنحو 28.3 MeV، وهو أكثر رقم يُستشهد به في الفيزياء النووية. +2. **الكربون-12، النظير المرجعي.** يرتبط ستة بروتونات وستة نيوترونات في نواة الذرة التي كتلتها، بالتعريف، 12 وحدة كتلة ذرية بالضبط. +3. **الكربون-14، أثقل بنيوترونين.** البروتونات الستة نفسها، لكن مع ثمانية نيوترونات بدل ستة، وهو النظير المشع المستخدم لمعرفة عمر العظام والفحم القديم. ## Test yourself @@ -38,7 +38,7 @@ charts: [] كتلة بروتون حر واحد 1.007276 وحدة كتلة ذرية، وكتلة نيوترون حر واحد 1.008665، وإذا وزنت أيًّا منهما بمفرده فهذا ما يقرأه الميزان. الآن اربط اثنين من كل منهما في نواة هيليوم-4 وزِن الناتج. بدل أن تحصل على 4.03188 التي تتوقعها بجمع الكتل الأربع، يقرأ الميزان نحو 4.00150. الكتلة الناقصة، 0.0304، لم تسقط ولم تختبئ تحت الطاولة، بل خرجت طاقة أُشعّت لحظة تكوّن النواة، وتخبرنا $E = mc^2$ بمقدارها بالضبط: 931.5 MeV مقابل كل وحدة كتلة ذرية تختفي، فتصير 0.0304 نحو 28.3 MeV. -حرّك «البروتونات Z» و«النيوترونات N» أعلى، نحو الكربون. يتكرر الأمر نفسه، لكن بكمية أكبر. نويات أكثر تعني أزواجًا أكثر يربطها التآثر الشديد، فتختفي كتلة أكبر، وتكبر الومضة بجانب الكفّة اليمنى. طاقة الكتلة المفقودة هذه هي بعينها طاقة الترابط من درس طاقة الترابط لكل نوية الشقيق، اسمان لرقم واحد، أحدهما محسوب بالكتلة والآخر بالطاقة. +حرّك «البروتونات Z» و«النيوترونات N» أعلى، نحو الكربون. يتكرر الأمر نفسه، لكن بكمية أكبر. نويات أكثر تعني أزواجًا أكثر تربطها القوة النووية الشديدة، فتختفي كتلة أكبر، وتكبر الومضة بجانب الكفّة اليمنى. طاقة الكتلة المفقودة هذه هي نفسها طاقة الترابط التي مرّت في درس «طاقة الربط النووي»، اسمان لرقم واحد، أحدهما محسوب بالكتلة والآخر بالطاقة. ## Formal @@ -52,20 +52,24 @@ charts: [] ## Derivation -1. وزن القطع المنفصلة وحدها يعطي $Z$ كتلة بروتون زائد $N$ كتلة نيوترون، قبل أن يرتبط شيء بعد. +1. وزن القطع المنفصلة وحدها يعطي $Z$ كتلة بروتون زائد $N$ كتلة نيوترون، قبل أن يرتبط أي منها بالآخر. 2. وزن النواة الفعلية يعطي رقمًا أصغر $M$. والفرق بين الوزنين هو نقص الكتلة. 3. تحوّل علاقة أينشتاين بين الكتلة والطاقة تلك الكتلة الناقصة مباشرة إلى طاقة الترابط المُطلقة حين تكوّنت النواة، مستخدمة 931.5 MeV مقابل كل وحدة كتلة ذرية. ## Real world ### الطاقة النووية والأسلحة النووية -كلاهما يحوّل جزءًا يمكن قياسه من الكتلة الناقصة إلى طاقة، المفاعل ببطء وثبات والسلاح في نبضة واحدة. وكلاهما يستخدم الحساب نفسه على هذا الميزان بالضبط. + +كلاهما يحوّل جزءًا يمكن قياسه من الكتلة الناقصة إلى طاقة، المفاعل ببطء وثبات والسلاح دفعة واحدة. وكلاهما يستخدم الحساب نفسه على هذا الميزان بالضبط. ### تعريف وحدة الكتلة الذرية + كتلة الكربون-12 مثبَّتة باتفاق دولي عند 12 وحدة كتلة ذرية بالضبط، ولهذا بالذات ينجح بناء ميزان نقص الكتلة من Z وN والتحويل عبر 931.5 MeV/u لكل نواة أخرى. ### ميزانية طاقة الشمس + تحوّل الشمس كل ثانية نحو أربعة ملايين طن من الكتلة إلى ضوء وحرارة يصلان المجموعة الشمسية، بدمج الهيدروجين في هيليوم وفقدان جزء ضئيل من الكتلة في كل مرة. ### قياس الكتلة النووية بدقة عالية + يقيس الفيزيائيون كتل الأنوية بدقة أفضل من جزء واحد في المليار خصيصًا ليمكن الوثوق بحسابات نقص الكتلة كهذا في التنبؤ بطاقات التفاعلات الحقيقية. diff --git a/content/lessons/nuclear/mass-defect/en.md b/content/lessons/nuclear/mass-defect/en.md index 796287d6..a468d48d 100644 --- a/content/lessons/nuclear/mass-defect/en.md +++ b/content/lessons/nuclear/mass-defect/en.md @@ -10,21 +10,21 @@ variables: - 'the mass of one free proton, 1.007276 u' - 'the mass of one free neutron, 1.008665 u' - 'the actual measured mass of the whole nucleus, once bound together' - - 'the mass defect: the missing mass — the separate protons and neutrons'' total mass minus the nucleus''s actual mass' + - "the mass defect: the missing mass — the separate protons and neutrons' total mass minus the nucleus's actual mass" - 'the binding energy: the missing mass converted into energy, at 931.5 MeV for every atomic mass unit (u) that goes missing' charts: [] --- ## Try it -1. Watch the balance scale. The left pan holds Z separate protons and N separate neutrons; the right pan holds the single nucleus they'd form. -2. Drag "protons Z" and "neutrons N" up to 2 and 2 — helium-4. Watch the right pan tip up, lighter, and the flash beside it show the energy that missing mass became. -3. Now drag Z and N up toward carbon (6 and 6, then 6 and 8). Watch the flash grow — more nucleons, more missing mass, more energy. +1. Watch the balance scale. The left pan holds Z separate protons and N separate neutrons; the right pan holds the single nucleus they'd form. It starts with one lone proton, so the scale is level and "binding energy" reads 0 MeV. +2. Drag "protons Z" and "neutrons N" up to 2 and 2 — helium-4. The right pan tips up, lighter: "mass defect Δm" reads 0.0304 u and "binding energy" reads 28.3 MeV, the energy that missing mass became, shown by the flash beside the pan. +3. Now drag Z and N up to carbon: 6 and 6, then 6 and 8. The flash grows as "binding energy" rises to about 90 MeV and then about 105 MeV — more nucleons, more missing mass, more energy. ## Real-life examples 1. **Helium-4, the classic worked example.** Two protons and two neutrons bind into a nucleus about 28.3 MeV lighter than the free particles — the single most quoted number in nuclear physics. -2. **Carbon-12, the reference isotope.** Six protons and six neutrons bind into the very nucleus whose mass, by definition, is exactly 12 atomic mass units. +2. **Carbon-12, the reference isotope.** Six protons and six neutrons bind into the nucleus of the very atom whose mass, by definition, is exactly 12 atomic mass units. 3. **Carbon-14, two neutrons heavier.** The same six protons, but with eight neutrons instead of six — the radioactive isotope used to date bones and charcoal. ## Test yourself @@ -58,13 +58,17 @@ The same missing-mass accounting explains why a fission or fusion reaction relea ## Real world ### Nuclear power and weapons + Both convert a measurable slice of missing mass into energy — a reactor slowly and steadily, a weapon in a single burst — using exactly the accounting on this scale. ### Defining the atomic mass unit + Carbon-12's mass is fixed at exactly 12 u by international agreement, which is precisely why building the mass-defect scale from Z and N and converting through 931.5 MeV/u works for every other nucleus. ### The Sun's energy budget + Every second, the Sun converts about four million tonnes of mass into the sunlight and heat that reach the solar system, fusing hydrogen into helium and losing a tiny fraction of the mass each time. ### Precision mass spectrometry + Physicists measure nuclear masses to better than one part in a billion specifically so mass-defect calculations like this one can be trusted to predict real reaction energies. diff --git a/content/lessons/nuclear/mass-defect/lesson.yaml b/content/lessons/nuclear/mass-defect/lesson.yaml index 99602bfe..ab916501 100644 --- a/content/lessons/nuclear/mass-defect/lesson.yaml +++ b/content/lessons/nuclear/mass-defect/lesson.yaml @@ -22,12 +22,12 @@ parameters: min: 1 max: 12 step: 1 - value: 2 + value: 1 N: min: 0 max: 14 step: 1 - value: 2 + value: 0 variables: - Z - N diff --git a/content/lessons/nuclear/medical-isotopes/ar.md b/content/lessons/nuclear/medical-isotopes/ar.md index 78dfe8f7..02b33995 100644 --- a/content/lessons/nuclear/medical-isotopes/ar.md +++ b/content/lessons/nuclear/medical-isotopes/ar.md @@ -9,58 +9,61 @@ variables: - كمية المادة المتتبعة الباقية بعد الزمن t - كمية المادة المتتبعة المحقونة عند الزمن صفر - الساعات منذ صنع المادة المتتبعة أو حقنها - - عمر النظير النصفي، وهو الزمن اللازم لتحلل نصف كميته + - عمر النصف للنظير، وهو الزمن اللازم لتحلل نصف كميته - عدد أعمار النصف التي مضت charts: [] --- ## Try it -1. اجعل «النظير» تكنيشيوم-99m وراقب منحناه. عند الساعة 24 لا يبقى منه إلا نحو 6%. -2. بدّل «النظير» إلى يود-131 دون تحريك «الساعات». بالكاد انخفض منحناه في الساعات الـ24 نفسها. -3. حرّك «الساعات» حتى 48. يكاد التكنيشيوم-99m يختفي تمامًا، بينما لا يزال معظم اليود-131 باقيًا. +1. أبقِ «النظير» على تكنيشيوم-99m (الموضع 0) وحرّك «الساعات منذ الحقن» من 0 إلى 24 على منحناه. عند الساعة 24 تقرأ «الباقي» نحو 6%. +2. بدّل «النظير» إلى يود-131 (الموضع 1) دون تحريك «الساعات». بالكاد انخفض منحناه في الساعات الـ24 نفسها: تقرأ «الباقي» 91.7%. +3. حرّك «الساعات» حتى 48. يكاد التكنيشيوم-99m يختفي تمامًا، عند 0.4%، بينما ما يزال معظم اليود-131 باقيًا، عند 84.1%. ## Real-life examples 1. **صورة عظام حديثة الحقن.** عند الساعة صفر، الجرعة الكاملة من التكنيشيوم-99m في الجسم، جاهزة لتضيء حيثما تتجمّع. 2. **قراءة الصورة.** عند الساعة 6، بعد عمر نصف واحد للتكنيشيوم-99m، يبقى نصف المادة المتتبعة بالضبط، وهذا يكفي لصورة واضحة رغم زوال النصف الآخر. -3. **يوم داخل علاج الغدة الدرقية.** عند الساعة 24، بالكاد تحلّلت جرعة اليود-131، وما زالت تعطي جرعة ثابتة لنسيج الغدة. +3. **بعد يوم من بدء علاج الغدة الدرقية.** عند الساعة 24، بالكاد تحلّلت جرعة اليود-131، وما زالت تعطي جرعة ثابتة لنسيج الغدة. ## Test yourself 1. اجعل التكنيشيوم-99m عند عمر نصف واحد بالضبط، الساعة 6. 2. انتظر حتى ينخفض التكنيشيوم-99m دون 5% من كميته. -3. أظهر اليود-131 لا يزال نشطًا بعد 40 ساعة على الأقل من الجرعة. +3. بيّن أن اليود-131 ما يزال نشطًا بعد 40 ساعة على الأقل من الجرعة. ## Intuition -يتحلل التكنيشيوم-99m واليود-131 بالقاعدة نفسها. في كل عمر نصف يختفي نصف ما تبقى بالضبط. لكن عمريهما النصفيين مختلفان اختلافًا كبيرًا، وهذا الفرق وحده هو سبب اختيار المستشفى أحدهما دون الآخر. اجعل «النظير» تكنيشيوم-99m وحرّك «الساعات» للأمام. ينهار المنحنى بسرعة، لأن عمره النصفي 6 ساعات فقط، فبحلول صباح اليوم التالي لا يبقى منه شيء تقريبًا في الجسم. +يتحلل التكنيشيوم-99m واليود-131 بالقاعدة نفسها. في كل عمر نصف يختفي نصف ما تبقى بالضبط. لكن عمر النصف يختلف بينهما اختلافًا كبيرًا، وهذا الفرق وحده هو سبب اختيار المستشفى أحدهما دون الآخر. اجعل «النظير» تكنيشيوم-99m وحرّك «الساعات» للأمام. ينهار المنحنى بسرعة، لأن عمر النصف له 6 ساعات فقط، فبحلول صباح اليوم التالي لا يبقى منه شيء تقريبًا في الجسم. -بدّل إلى يود-131 وحرّك المنزلق نفسه. بالكاد يتحرك المنحنى، لأن عمره النصفي 8 أيام، أي أطول بنحو 32 مرة. هذه بالضبط المقايضة التي يريدها المستشفى لمهمتين مختلفتين. الصورة تحتاج نشاطًا يكفي لإضاءتها ساعة أو ساعتين، ثم تريده أن يزول ليبقى مقدار الإشعاع الذي يتلقاه المريض منخفضًا. بينما يحتاج علاج غدة درقية مفرطة النشاط نظيرًا يواصل توصيل جرعته إلى النسيج المستهدف أيامًا. +بدّل إلى يود-131 وحرّك المنزلق نفسه. بالكاد يتحرك المنحنى، لأن عمر النصف له 8 أيام، أي أطول بنحو 32 مرة. وهذا بالضبط ما يريده المستشفى لمهمتين مختلفتين. الصورة تحتاج نشاطًا يكفي لإضاءتها ساعة أو ساعتين، ثم تريده أن يزول ليبقى مقدار الإشعاع الذي يتلقاه المريض منخفضًا. بينما يحتاج علاج غدة درقية مفرطة النشاط نظيرًا يواصل توصيل جرعته إلى النسيج المستهدف أيامًا. ## Formal تتحلل كمية $N_0$ من المادة المتتبعة إلى $N = N_0\left(\tfrac12\right)^{k}$ بعد $k$ من أعمار النصف، حيث يَعُدّ $k = t/T_{1/2}$ كم عمر نصف مضى خلال $t$ ساعة. هذا القانون نفسه وراء تأريخ الكربون، لكن بالساعات لا بالسنين. -يقع عمر التكنيشيوم-99m النصفي $T_{1/2} = 6$ ساعات، وعمر اليود-131 النصفي $T_{1/2} \approx 192$ ساعة، أي 8.02 أيام، على طرفي نقيض في الطب النووي لهذا السبب بالضبط. $T_{1/2}$ قصير يخلّي الجسم منه سريعًا بعد التصوير، بينما يديم $T_{1/2}$ الطويل جرعة علاجية. +يقع عمر النصف للتكنيشيوم-99m، $T_{1/2} = 6$ ساعات، وعمر النصف لليود-131، $T_{1/2} \approx 192$ ساعة، أي 8.02 أيام، على طرفين متقابلين في الطب النووي لهذا السبب بالضبط. عمر نصف $T_{1/2}$ قصير يجعل النظير يزول من الجسم سريعًا بعد التصوير، بينما يُبقي $T_{1/2}$ الطويل الجرعة العلاجية مستمرة. ## Advanced -الذي يقيسه الكاشف فعلًا هو النشاط الإشعاعي لا الكمية الباقية وحدها. يتناسب النشاط مع $N/T_{1/2}$، فنظير قصير العمر النصفي كالتكنيشيوم-99m أكثر إشعاعًا لكل ذرة بكثير من نظير طويل العمر يحمل عدد الذرات نفسه. ولهذا بالضبط لا يحتاج إلى كمية كبيرة منه لصورة واضحة. يتركّز اليود-131 في الغدة الدرقية تحديدًا لأن الغدة تمتص أي يود تجده لتصنع هرمون الغدة، مشعًّا كان أم غير مشعّ. وهذه البيولوجيا نفسها هي ما يجعله مفيدًا لتصوير الغدة وعلاجها معًا. +الذي يقيسه الكاشف فعلًا هو النشاط الإشعاعي لا الكمية الباقية وحدها. يتناسب النشاط مع $N/T_{1/2}$، فنظير عمر النصف له قصير كالتكنيشيوم-99m أكثر إشعاعًا لكل ذرة بكثير من نظير طويل العمر يحمل عدد الذرات نفسه. ولهذا بالضبط لا يحتاج إلى كمية كبيرة منه لصورة واضحة. يتركّز اليود-131 في الغدة الدرقية تحديدًا لأن الغدة تمتص أي يود تجده لتصنع هرمون الغدة، مشعًّا كان أم غير مشعّ. وهذه الخاصية الحيوية نفسها هي ما يجعله مفيدًا لتصوير الغدة وعلاجها معًا. ## Derivation -1. يخضع النظيران للقاعدة نفسها في الانتصاف، فعدد أعمار النصف التي مضت هو الزمن المنقضي مقسومًا على عمر النصف فقط. +1. يخضع النظيران لقاعدة التنصيف نفسها، فعدد أعمار النصف التي مضت هو الزمن المنقضي مقسومًا على عمر النصف فقط. 2. رفع النصف إلى قوة ذلك العدد يعطي الكسر الباقي من المادة المتتبعة الأصلية. 3. يصل عمر النصف القصير إلى كسر باقٍ صغير خلال ساعات، بينما يبقى عمر النصف الطويل قريبًا من كميته الأولى طوال المدة نفسها. ## Real world ### تصوير العظام والقلب + يُربط التكنيشيوم-99m بجزيئات ناقلة مختلفة لإضاءة العظام أو القلب أو الكلى، ثم يزول من الجسم خلال يوم أو يومين. ### تصوير الغدة الدرقية وعلاجها + تصوّر جرعة صغيرة متتبعة من اليود-131 الغدة الدرقية، بينما تدمّر جرعة علاجية أكبر بكثير نسيج الغدة المفرط النشاط أو السرطاني خلال الأيام والأسابيع التالية. ### السلامة الإشعاعية -تخطط المستشفيات التخزين والتعامل وموعد خروج المريض حول عمر النصف لكل نظير، لأن نشاطه ينخفض بطريقة يمكن التنبؤ بها تمامًا. + +تخطط المستشفيات التخزين والتعامل وموعد خروج المريض بحسب عمر النصف لكل نظير، لأن نشاطه ينخفض بطريقة يمكن التنبؤ بها تمامًا. diff --git a/content/lessons/nuclear/medical-isotopes/en.md b/content/lessons/nuclear/medical-isotopes/en.md index 23132b5e..ee0e3887 100644 --- a/content/lessons/nuclear/medical-isotopes/en.md +++ b/content/lessons/nuclear/medical-isotopes/en.md @@ -15,9 +15,9 @@ charts: [] ## Try it -1. Set "isotope" to technetium-99m and watch its curve. By hour 24, barely 6% of it is left. -2. Switch "isotope" to iodine-131 without moving "hours". Its curve has barely dropped in that same 24 hours. -3. Drag "hours" all the way to 48. Technetium-99m has essentially vanished; iodine-131 is still mostly there. +1. Keep "isotope" on technetium-99m (position 0) and drag "hours since injection" from 0 to 24 along its curve. By hour 24, "remaining" reads about 6%. +2. Switch "isotope" to iodine-131 (position 1) without moving "hours". Its curve has barely dropped in that same 24 hours: "remaining" reads 91.7%. +3. Drag "hours" all the way to 48. Technetium-99m has essentially vanished, at 0.4%; iodine-131 is still mostly there, at 84.1%. ## Real-life examples @@ -56,10 +56,13 @@ What a detector actually measures is activity, not the raw amount left — activ ## Real world ### Bone and heart scans + Technetium-99m is attached to different carrier molecules to light up bones, the heart or the kidneys, then clears the body within a day or two. ### Thyroid imaging and treatment + A small tracer dose of iodine-131 images the thyroid; a much larger therapeutic dose destroys overactive or cancerous thyroid tissue over the following days and weeks. ### Radiation safety + Hospitals plan storage, handling and patient discharge around each isotope's half-life, since activity drops in a completely predictable way. diff --git a/content/lessons/nuclear/medical-isotopes/lesson.yaml b/content/lessons/nuclear/medical-isotopes/lesson.yaml index ffccdc50..d5bd3b91 100644 --- a/content/lessons/nuclear/medical-isotopes/lesson.yaml +++ b/content/lessons/nuclear/medical-isotopes/lesson.yaml @@ -22,7 +22,7 @@ parameters: min: 0 max: 48 step: 1 - value: 6 + value: 0 unit: h isotope: min: 0 diff --git a/content/lessons/nuclear/nuclear-fission/ar.md b/content/lessons/nuclear/nuclear-fission/ar.md index dba2d580..2bbabd5e 100644 --- a/content/lessons/nuclear/nuclear-fission/ar.md +++ b/content/lessons/nuclear/nuclear-fission/ar.md @@ -14,24 +14,24 @@ charts: [] ## Try it 1. راقب النيوترون الأخضر ينجرف من اليسار نحو نواة اليورانيوم-235 الزرقاء. -2. أبقِ «سرعة النيوترون» منخفضة وحرّك «الزمن» للأمام. تنتفخ النواة وتتمدد على هيئة دمبل ثم تنشطر إلى شظيتين وثلاثة نيوترونات جديدة. -3. ارفع «سرعة النيوترون» فوق نحو 5000 km/s وشغّل من جديد. يلامس النيوترون النواة بالكاد ثم يرتدّ بعيدًا، فلا انشطار ولا طاقة متحررة. +2. أبقِ «سرعة النيوترون» عند 1000 km/s وحرّك «الزمن» للأمام إلى 100. تنتفخ النواة وتتمدد على هيئة دمبل (ثقل تمارين له رأسان) ثم تنشطر إلى شظيتين وثلاثة نيوترونات جديدة: تقرأ «النتيجة» كلمة انشطار وتقرأ «الطاقة المتحررة» القيمة ≈198 MeV. +3. ارفع «سرعة النيوترون» إلى 6000 km/s واضغط «من البداية». يلامس النيوترون النواة بالكاد ثم يرتدّ بعيدًا: تقرأ «النتيجة» ارتداد مرن، فلا انشطار ولا طاقة متحررة. ## Real-life examples -1. **نيوترون أبطأه المفاعل.** يبطّئ الماء أو الغرافيت داخل المفاعل النيوترونات إلى نحو 1000-2000 km/s، وهذا يكفي لتمتص نواة اليورانيوم-235 نيوترونًا وتنشطر بسهولة. +1. **نيوترون أبطأه المفاعل.** يبطّئ الماء أو الغرافيت داخل المفاعل النيوترونات حتى نحو 2 km/s فقط. وحتى سرعة 1000 km/s على المنزلق تُعدّ بطيئة في هذا الرسم: بطيئة بما يكفي لتمتص نواة اليورانيوم-235 النيوترون وتنشطر بسهولة. 2. **نيوترون خرج للتو من انشطار آخر.** تنطلق نيوترونات الانشطار الجديدة بسرعة نحو 18000 km/s، وهي أسرع من أن تُلتقط، فيرتدّ معظمها عن أول نواة تصادفها. 3. **لقطة في منتصف الانشطار.** جمّد الصورة في المنتصف وراقب النواة وهي ممتدة على هيئة دمبل، قبل أن تنشطر بلحظة واحدة. ## Test yourself -1. شغّل نيوترونًا بطيئًا، أقل من 5000 km/s، حتى النهاية وراقب اكتمال الانشطار. -2. شغّل نيوترونًا سريعًا، 5000 km/s أو أكثر، حتى النهاية وتأكّد أنه يرتدّ فقط. +1. أطلق نيوترونًا بطيئًا، أقل من 5000 km/s، حتى النهاية وراقب اكتمال الانشطار. +2. أطلق نيوترونًا سريعًا، 5000 km/s أو أكثر، حتى النهاية وتأكّد أنه يرتدّ فقط. 3. أوقف النواة وهي ممتدة على هيئة دمبل، بين الزمن 30 والزمن 55. ## Intuition -تخيّل نواة اليورانيوم-235 قطرة سائل مهتزّة، يحفظ شكلها المستدير القوة النووية الشديدة، تمامًا كما يحفظ التوتر السطحي شكل قطرة الماء. نيوترون يتسلل ببطء تبتلعه النواة كاملًا، والطاقة الزائدة التي يحملها تجعل القطرة تهتز. إذا مدّ الاهتزاز القطرة بما يكفي، يتنافر بروتوناتها الـ92 كهربائيًا وتدفع كل واحدة الأخرى بعيدًا. يتغلّب هذا التنافر على القوة الشديدة التي تحاول حفظ القطرة متماسكة، فتنقسم إلى قطرتين أصغر. أما نيوترون يندفع بسرعة 18000 km/s فيغادر قبل أن تستطيع النواة الاستجابة. يكاد يلامسها فقط ثم يرتدّ، تمامًا كما تصدّ كرة سريعة جدًا يد اللاعب بدل أن يمسكها. +تخيّل نواة اليورانيوم-235 قطرة سائل مهتزّة، يحفظ شكلها المستدير القوة النووية الشديدة، تمامًا كما يحفظ التوتر السطحي شكل قطرة الماء. نيوترون يتسلل ببطء تبتلعه النواة كاملًا، والطاقة الزائدة التي يحملها تجعل القطرة تهتز. إذا مدّ الاهتزاز القطرة بما يكفي، تتنافر بروتوناتها الـ92 كهربائيًا، فكل بروتون يدفع غيره بعيدًا. يتغلّب هذا التنافر على القوة الشديدة التي تحاول حفظ القطرة متماسكة، فتنقسم إلى قطرتين أصغر. أما نيوترون يندفع بسرعة 18000 km/s فيغادر قبل أن تستطيع النواة الاستجابة. يكاد يلامسها فقط ثم يرتدّ، تمامًا كما ترتدّ كرة سريعة جدًا عن يد اللاعب قبل أن يتمكن من إمساكها. لا تكون الشظيتان على الشاشة متساويتين حين تنقسم القطرة أخيرًا. الشظية اليسرى، الباريوم-141، أكبر وأبطأ بوضوح من اليمنى، الكريبتون-92. هذا قانون نيوتن الثالث على مقياس النواة. تدفع الشظيتان بعضهما بالقوة نفسها، فتنطلق الأخف أسرع، تمامًا كما ينجرف زورق خفيف أسرع من زورق ثقيل إذا دفعتهما عن بعضهما بالقوة نفسها. تتطاير ثلاثة نيوترونات حرة من موضع الانشطار، وهذه النيوترونات بالذات قد تشطر نوى يورانيوم-235 أخرى، وهي الشرارة التي تبدأ تفاعلًا متسلسلًا. @@ -43,7 +43,7 @@ charts: [] ## Advanced -كل نواة تدين باستقرارها لطاقة الربط لكل نكليون. ترتفع هذه الطاقة من الهيدروجين حتى ذروة قدرها نحو 8.8 MeV لكل نكليون عند الحديد-56، ثم تنخفض تدريجيًا للعناصر الأثقل. يقع اليورانيوم-235 عند نحو 7.6 MeV لكل نكليون، بينما يقع الباريوم-141 والكريبتون-92 عند نحو 8.4 MeV لكل نكليون. هذا الفرق، مضروبًا في 236 نكليونًا، هو مصدر الطاقة المتحررة فعليًا. لا تنشطر النواة إلا لأن النواة المركّبة تتشوّه للحظة بما يكفي، فيتغلّب تنافر كولوم بعيد المدى بين البروتونات على جذب القوة الشديدة قريب المدى. هذا هو التجاذب نفسه الذي يحدّه تقريبًا قانون نصف قطر النواة $R = r_0 A^{1/3}$ حيث $r_0 \approx 1.2$ fm، ويحدّ من حجم أي نواة قبل أن تصبح غير مستقرة. +كل نواة تدين باستقرارها لطاقة الربط لكل نكليون. ترتفع هذه الطاقة من الهيدروجين حتى ذروة قدرها نحو 8.8 MeV لكل نكليون عند الحديد-56، ثم تنخفض تدريجيًا للعناصر الأثقل. يقع اليورانيوم-235 عند نحو 7.6 MeV لكل نكليون، بينما يقع الباريوم-141 والكريبتون-92 عند نحو 8.4 MeV لكل نكليون. هذا الفرق، مضروبًا في 236 نكليونًا، هو مصدر الطاقة المتحررة فعليًا. لا تنشطر النواة إلا لأن النواة المركّبة تتشوّه للحظة بما يكفي، فيتغلّب تنافر كولوم بعيد المدى بين البروتونات على جذب القوة الشديدة قريب المدى. وهذا هو شدّ الحبل نفسه بين القوتين، ويتبع تقريبًا قانون نصف قطر النواة $R = r_0 A^{1/3}$ حيث $r_0 \approx 1.2$ fm، وهو ما يحدّ من حجم أي نواة قبل أن تصبح غير مستقرة. ## Derivation @@ -54,13 +54,17 @@ charts: [] ## Real world ### محطات الطاقة النووية -يكرّر مفاعل الطاقة هذا الانشطار نفسه نحو 10^19 مرة في الثانية عبر وقوده، مستخدمًا الحرارة لغلي الماء وتدوير عنفة، وهذا موضوع الدرس التالي. + +يكرّر مفاعل الطاقة هذا الانشطار نفسه نحو 10^20 مرة في الثانية في وقوده، ويستخدم الحرارة لغلي الماء وتدوير توربين، وهذا موضوع درس قادم. ### الدفع البحري -تحمل الغواصات وحاملات الطائرات مفاعلات انشطار صغيرة لتعمل سنوات، بل عقودًا، دون إعادة تزويد بالوقود أو الصعود لالتقاط الهواء. + +تحمل الغواصات وحاملات الطائرات مفاعلات انشطار صغيرة لتعمل سنوات، بل عقودًا، دون التزوّد بالوقود من جديد ودون الصعود إلى السطح من أجل الهواء. ### النظائر الطبية + تشطر مفاعلات الأبحاث اليورانيوم-235 لإنتاج الموليبدينوم-99، الذي يتحلل إلى التكنيشيوم-99m، وهو نظير طبي شائع نصف عمره 6.0 ساعات فقط. ### الأسلحة النووية + ترك التفاعل المتسلسل يعمل بلا ضبط، بحيث يشطر كل نيوترون تقريبًا نواة أخرى خلال أجزاء من الميكروثانية، يطلق الطاقة نفسها دفعة واحدة بدل أن تتحرر تدريجيًا. diff --git a/content/lessons/nuclear/nuclear-fission/en.md b/content/lessons/nuclear/nuclear-fission/en.md index 0fcb90fe..ed917bfe 100644 --- a/content/lessons/nuclear/nuclear-fission/en.md +++ b/content/lessons/nuclear/nuclear-fission/en.md @@ -13,12 +13,12 @@ charts: [] ## Try it 1. Watch the green neutron drift in from the left toward the blue uranium-235 nucleus. -2. Keep "neutron speed" low and drag "time" forward. The nucleus swells, stretches into a dumbbell, then snaps into two fragments and three new neutrons. -3. Raise "neutron speed" past about 5,000 km/s and run it again. The neutron just grazes the nucleus and bounces away — no split, no energy released. +2. Keep "neutron speed" at 1,000 km/s and drag "time" forward to 100. The nucleus swells, stretches into a dumbbell, then snaps into two fragments and three new neutrons: "outcome" reads fission and "energy released" reads ≈198 MeV. +3. Raise "neutron speed" to 6,000 km/s and press restart. The neutron just grazes the nucleus and bounces away: "outcome" reads elastic scatter — no split, no energy released. ## Real-life examples -1. **A reactor's slowed-down neutron.** Water or graphite inside a reactor slows neutrons to about 1,000-2,000 km/s, slow enough that a uranium-235 nucleus readily absorbs one and splits. +1. **A reactor's slowed-down neutron.** Water or graphite inside a reactor slows neutrons all the way down to about 2 km/s. Even the 1,000 km/s on the slider counts as slow in this picture: slow enough that a uranium-235 nucleus readily absorbs the neutron and splits. 2. **A neutron fresh out of another fission.** New fission neutrons leave at around 18,000 km/s — far too fast to be captured, so most just bounce off the next nucleus they meet. 3. **Caught mid-split.** Freeze the frame partway through and watch the nucleus stretched into a dumbbell, a heartbeat before it snaps in two. @@ -53,13 +53,17 @@ Every nucleus's stability comes down to its binding energy per nucleon, which cl ## Real world ### Nuclear power plants -A power reactor runs this same split roughly 10^19 times a second across its fuel, using the heat to boil water and spin a turbine — the subject of the next lesson. + +A power reactor runs this same split roughly 10^20 times a second across its fuel, using the heat to boil water and spin a turbine — the subject of a later lesson. ### Naval propulsion + Submarines and aircraft carriers carry small fission reactors so they can run for years, even decades, without refuelling or surfacing for air. ### Medical isotopes + Research reactors fission uranium-235 to make molybdenum-99, which decays into technetium-99m — a widely used medical tracer with a half-life of just 6.0 hours. ### Nuclear weapons + Letting the chain reaction run uncontrolled, with almost every released neutron splitting another nucleus within microseconds, releases the same energy all at once instead of gradually. diff --git a/content/lessons/nuclear/nuclear-fusion/ar.md b/content/lessons/nuclear/nuclear-fusion/ar.md index a79b4a82..ca813017 100644 --- a/content/lessons/nuclear/nuclear-fusion/ar.md +++ b/content/lessons/nuclear/nuclear-fusion/ar.md @@ -1,7 +1,7 @@ --- title: 'الاندماج النووي: التغلّب على حاجز كولوم' summary: >- - نواتان تتنافران، ولا تلتصقان إلا بحرارة شديدة وازدحام شديد. هذان مقبضا الشمس والمفاعل. + نواتان تتنافران، ولا تلتصقان إلا بحرارة شديدة وازدحام شديد. وهذا ما تعتمد عليه الشمس وكل مفاعل اندماج. parameters: temperature: الحرارة confinement: الحصر @@ -14,8 +14,8 @@ charts: [] ## Try it 1. راقب الأنوية الزرقاء تنجرف وترتدّ داخل الصندوق، تدفعها شحنتها الكهربائية بعيدًا عن بعضها. -2. حرّك «الزمن» للأمام عند حرارة منخفضة. ترتدّ الأنوية عن بعضها من مسافة، وبالكاد تتلامس. -3. ارفع «الحرارة» وشغّل من جديد. تقترب الأنوية الأسرع من بعضها أكثر، وتومض حلقة أحيانًا حيث تندمج نواتان. +2. اضبط «الحرارة» على 0.2 وحرّك «الزمن» للأمام إلى 150. ترتدّ الأنوية عن بعضها من مسافة ولا تتلامس أبدًا: تبقى «أحداث الاندماج» عند 0. +3. ارفع «الحرارة» إلى 5، واضغط «من البداية»، وتقدّم إلى 150 مرة أخرى. تقترب الأنوية الأسرع من بعضها أكثر، وتومض حلقة حيث تندمج نواتان، وتصل «أحداث الاندماج» إلى 10. ## Real-life examples @@ -27,13 +27,13 @@ charts: [] 1. أبقِ «الحرارة» تحت 1 و«الحصر» تحت 0.5، ثم شغّل حتى الزمن 80 أو أكثر. يجب أن تبقى أحداث الاندماج نادرة. 2. ارفع «الحرارة» فوق 3 و«الحصر» فوق 0.8، ثم شغّل حتى الزمن 80 أو أكثر. يجب أن تظهر عدة أحداث اندماج. -3. شغّل حتى الزمن 150 كاملًا واعدّ كم نواة بقيت. +3. شغّل حتى الزمن 150 كاملًا وعُدَّ الأنوية التي بقيت. ## Intuition -تحمل كل نواة في الصندوق شحنة موجبة، فأي نواتين تدفعان بعضهما بعيدًا فور اقترابهما. هذه هي الدفعة نفسها التي تمنع أصابعك من اختراق سطح طاولة، لكنها أقوى بكثير عند القرب الشديد. إذا تُركت الأنوية بطيئة ومتباعدة، فإنها ترتدّ عن هذا التنافر من مسافة مريحة ولا تتلامس أبدًا. أما حين تتسارع الأنوية، فيحمل كل نواة زخمًا كافيًا ليواصل الاقتراب، رغم أن التنافر يقاوم بقوة أكبر كلما اقترب أكثر، تمامًا كما تتابع كرة صعودها بإصرار على تلّ يزداد انحدارًا. +تحمل كل نواة في الصندوق شحنة موجبة، فأي نواتين تدفعان بعضهما بعيدًا فور اقترابهما. هذه هي القوة نفسها التي تمنع أصابعك من اختراق سطح طاولة، لكنها أقوى بكثير عند القرب الشديد. إذا تُركت الأنوية بطيئة ومتباعدة، فإنها ترتدّ بسبب هذا التنافر وهي ما تزال بعيدة عن بعضها ولا تتلامس أبدًا. أما حين تتسارع الأنوية، فتحمل كل نواة اندفاعًا كافيًا لتواصل الاقتراب، رغم أن التنافر يقاوم بقوة أكبر كلما اقتربت أكثر، تمامًا كما تتابع كرة صعودها بإصرار على تلّ يزداد انحدارًا. -النواة السريعة بما يكفي فقط تصل في النهاية قريبًا بما يكفي لتندمج، و«السريعة بما يكفي» تعني بالضبط حرارة أعلى على مقياس الذرات. أما ضغط الأنوية نفسها في صندوق أصغر فلا يغيّر سرعة أي واحدة منها، لكنه يعني اقترابات كثيرة أكثر في كل ثانية، لأن المساحة المتاحة لتجنّب بعضها أقل. يحتاج مفاعل اندماج عامل إلى رفع المقبضين معًا: حرارة كافية لتحقيق فرصة حقيقية للتغلّب على التنافر، وكثافة كافية لتتكرر تلك الفرصة كثيرًا. +النواة السريعة بما يكفي فقط تصل في النهاية قريبًا بما يكفي لتندمج، و«السريعة بما يكفي» تعني بالضبط حرارة أعلى على مقياس الذرات. أما ضغط الأنوية نفسها في صندوق أصغر فلا يغيّر سرعة أي واحدة منها، لكنه يعني اقترابات كثيرة أكثر في كل ثانية، لأن المساحة المتاحة لتجنّب بعضها أقل. يحتاج مفاعل الاندماج الناجح إلى رفع العاملين معًا: حرارة كافية لتحقيق فرصة حقيقية للتغلّب على التنافر، وكثافة كافية لتتكرر تلك الفرصة كثيرًا. ## Formal @@ -49,18 +49,22 @@ charts: [] 1. يتبع تنافر شحنتين متماثلتي الإشارة قانون التربيع العكسي، تمامًا كالجاذبية لكن بدفع بعيدًا لا بجذب معًا. 2. يتناسب متوسط الطاقة الحركية طرديًا مع الحرارة، فيحمل غاز أسخن أنوية أسرع حركة وأقوى اصطدامًا. -3. مساواة الطاقة الحركية بتنافر كولوم تعطي أقرب مسافة تستطيع نواتان بلوغها كلاسيكيًا. الأنوية الأسخن تصل أقرب، أدنى إلى المدى الذي تستطيع فيه القوة النووية الشديدة أن تتولّى الأمر أخيرًا. +3. مساواة الطاقة الحركية بتنافر كولوم تعطي أقرب مسافة تستطيع نواتان بلوغها كلاسيكيًا. الأنوية الأسخن تصل أقرب، أدنى إلى المدى الذي تستطيع فيه القوة النووية الشديدة أن تمسك بهما أخيرًا. ## Real world ### الشمس وكل نجم آخر + تندمج أنوية الهيدروجين في هيليوم باستمرار في قلوب النجوم، ودفع طاقة الاندماج هذه إلى الخارج هو الشيء الوحيد الذي يسند النجم ضد جاذبيته نفسها. ### التوكاماك والستيلاراتور + تستعمل مفاعلات الحصر المغناطيسي حقولًا مغناطيسية قوية، لا جدرانًا صلبة، لضغط بلازما ساخنة جدًا بحيث لا يقوى أي وعاء مادي على لمسها. ### الاندماج بالحصر بالقصور الذاتي + تضغط منشآت مثل مرفق الإشعال الوطني كريّة وقود صغيرة بالليزر بسرعة وقوة هائلتين، فتبلغ للحظة خاطفة شروط الاندماج من تلقاء نفسها. ### القنابل الهيدروجينية -الفيزياء نفسها، تعمل بلا ضبط ودفعة واحدة، تطلق طاقة اندماج نجم كامل في نبضة انفجارية واحدة. + +الفيزياء نفسها، تعمل بلا ضبط ودفعة واحدة، تطلق طاقة الاندماج كلها في انفجار واحد. diff --git a/content/lessons/nuclear/nuclear-fusion/en.md b/content/lessons/nuclear/nuclear-fusion/en.md index cfade0ef..e45a5614 100644 --- a/content/lessons/nuclear/nuclear-fusion/en.md +++ b/content/lessons/nuclear/nuclear-fusion/en.md @@ -13,8 +13,8 @@ charts: [] ## Try it 1. Watch the blue nuclei drift and bounce inside the box, pushed apart by their own electric charge. -2. Drag "time" forward at a low temperature. Nuclei bounce off each other from a distance and almost never touch. -3. Raise "temperature" and run again. Faster nuclei punch closer together, and a ring occasionally flashes where two of them fuse. +2. Set "temperature" to 0.2 and drag "time" forward to 150. Nuclei bounce off each other from a distance and never touch: "fusion events" stays at 0. +3. Raise "temperature" to 5, press restart and run to 150 again. Faster nuclei punch closer together, a ring flashes wherever two of them fuse, and "fusion events" reaches 10. ## Real-life examples @@ -53,13 +53,17 @@ Quantum tunnelling lets some nuclei fuse even without quite enough classical ene ## Real world ### The Sun and every other star + Stellar cores fuse hydrogen into helium continuously, and the outward push of that fusion energy is the only thing holding a star up against its own gravity. ### Tokamaks and stellarators + Magnetic confinement reactors use powerful magnetic fields, not solid walls, to squeeze a plasma hot enough that no material container could survive touching it. ### Inertial confinement fusion + Facilities such as the National Ignition Facility compress a tiny fuel pellet with lasers so fast and so hard that, for a fleeting instant, it reaches fusion conditions on its own. ### Hydrogen bombs -The same physics, run uncontrolled and all at once, releases the fusion energy of a star in a single explosive pulse. + +The same physics, run uncontrolled and all at once, releases its fusion energy in a single explosive pulse. diff --git a/content/lessons/nuclear/nuclear-reactor/ar.md b/content/lessons/nuclear/nuclear-reactor/ar.md index cb0a63ba..71afd17b 100644 --- a/content/lessons/nuclear/nuclear-reactor/ar.md +++ b/content/lessons/nuclear/nuclear-reactor/ar.md @@ -8,15 +8,15 @@ parameters: variables: - كم دخلت قضبان التحكم داخل القلب، من 0 (خارجة تمامًا) إلى 1 (داخلة تمامًا) - كم مهدئ موجود لإبطاء النيوترونات، من 0 (لا شيء) إلى 1 (ممتلئ) - - القدرة الاسمية الكاملة للمحطة بلا أي معيق، نحو 1000 MW كهربائية لمفاعل كبير + - القدرة الاسمية الكاملة للمحطة حين لا يحدّها شيء، نحو 1000 MW كهربائية لمفاعل كبير charts: [] --- ## Try it -1. راقب قضبان التحكم الحمراء ومستوى الماء الأزرق داخل القلب، والعنفة تدور على اليمين. -2. حرّك «عمق قضبان التحكم» للأعلى. تنزلق القضبان أعمق داخل القلب، وتبطئ القدرة الناتجة والعنفة معها. -3. الآن حرّك «كمية المهدئ» نحو الصفر بدلًا من ذلك. حتى مع خروج القضبان تمامًا، تنهار القدرة. فبلا مهدئ بالكاد يستمر التفاعل المتسلسل. +1. راقب قضبان التحكم الحمراء ومستوى الماء الأزرق داخل القلب، والعنفة (التوربين) تدور على اليمين. والقضبان عند 50% والمهدئ عند 80%، تقرأ «القدرة الناتجة» 40% وتقرأ «القدرة الكهربائية» 400 MW. +2. ارفع «عمق قضبان التحكم» إلى 80%. تنزل القضبان أعمق داخل القلب، وتبطئ العنفة، وتستقر القدرة عند 16%، أي 160 MW. +3. الآن اسحب القضبان إلى الخارج تمامًا، إلى 0%: ترتفع القدرة إلى 80%، أي 800 MW. ثم اخفض «كمية المهدئ» إلى 5%. حتى مع خروج القضبان تمامًا، تنهار القدرة إلى 5%، أي 50 MW، وتقرأ «الحالة» عبارة «لا يستمر — بلا مهدئ». فبلا مهدئ بالكاد يستمر التفاعل المتسلسل. ## Real-life examples @@ -55,13 +55,17 @@ charts: [] ## Real world ### مفاعلات الماء المضغوط -تستخدم معظم مفاعلات الطاقة الماء العادي مبرّدًا ومهدئًا معًا، فقدان المبرّد يزيل المهدئ أيضًا، وهذه ميزة أمان لأن التفاعل المتسلسل يضعف من تلقاء نفسه عندئذ. + +تستخدم معظم مفاعلات الطاقة الماء العادي مبرّدًا ومهدئًا معًا، ففقدان المبرّد يزيل المهدئ أيضًا، وهذه ميزة أمان لأن التفاعل المتسلسل يضعف من تلقاء نفسه عندئذ. ### متابعة الحمل + تعدّل بعض المحطات قضبان التحكم خلال اليوم لمطابقة القدرة الناتجة مع الطلب، فتخفّض الإنتاج ليلًا حين تحتاج الشبكة كهرباء أقل. ### تسمم الزينون -ناتج انشطار، الزينون-135، يمتص هو نفسه نيوترونات ويجعل إعادة تشغيل المفاعل أصعب لفترة قصيرة بعد تغيّر القدرة، وهذا أثر يجب أن يخطط له المشغّلون. + +الزينون-135، وهو أحد نواتج الانشطار، يمتص النيوترونات هو أيضًا ويجعل إعادة تشغيل المفاعل أصعب لفترة قصيرة بعد تغيّر القدرة، وهذا أثر يجب أن يخطط له المشغّلون. ### تشيرنوبل وفوكوشيما -ترجع الكارثتان إلى المقبضين نفسيهما هنا. في تشيرنوبل سمح عيب في تصميم المهدئ للقدرة بأن تندفع بدل أن تستقر، وفي فوكوشيما لم يكن التفاعل المتسلسل نفسه، بل فقدان التبريد، ما أطلق الحرارة المخزّنة في نواتج الانشطار. + +ترجع الكارثتان إلى العاملين نفسيهما المعروضين هنا. في تشيرنوبل سمح عيب في تصميم المهدئ للقدرة بأن تندفع بدل أن تستقر، وفي فوكوشيما لم يكن التفاعل المتسلسل نفسه، بل فقدان التبريد، ما أطلق الحرارة المخزّنة في نواتج الانشطار. diff --git a/content/lessons/nuclear/nuclear-reactor/en.md b/content/lessons/nuclear/nuclear-reactor/en.md index e9f5e218..dbcd000a 100644 --- a/content/lessons/nuclear/nuclear-reactor/en.md +++ b/content/lessons/nuclear/nuclear-reactor/en.md @@ -13,9 +13,9 @@ charts: [] ## Try it -1. Watch the red control rods and the blue water level inside the core, and the turbine spinning on the right. -2. Drag "control rod depth" up. The rods slide deeper into the core, and the power output and the turbine slow down. -3. Now drag "moderator amount" down toward zero instead. Even with the rods fully out, power collapses — without a moderator the chain reaction barely runs at all. +1. Watch the red control rods and the blue water level inside the core, and the turbine spinning on the right. With the rods at 50% and the moderator at 80%, "power output" reads 40% and "electric power" reads 400 MW. +2. Drag "control rod depth" up to 80%. The rods slide deeper into the core, the turbine slows, and the power settles at 16%, or 160 MW. +3. Now pull the rods fully out, to 0%: power rises to 80%, 800 MW. Then drag "moderator amount" down to 5%. Even with the rods fully out, power collapses to 5%, 50 MW, and "status" reads won't sustain — without a moderator the chain reaction barely runs at all. ## Real-life examples @@ -54,13 +54,17 @@ Real power reactors run on low-enriched fuel, typically about 3 to 5 percent ura ## Real world ### Pressurized water reactors + Most power reactors use ordinary water as both coolant and moderator, so losing coolant also removes the moderator — a safety feature, since the chain reaction then weakens on its own. ### Load following + Some plants adjust their control rods through the day to match power output to demand, dropping output overnight when the grid needs less electricity. ### Xenon poisoning + A fission product, xenon-135, itself soaks up neutrons and briefly makes a reactor harder to restart shortly after a power change, an effect operators must plan around. ### Chernobyl and Fukushima + Both disasters trace back to the same core knobs shown here: at Chernobyl a moderator design flaw let power surge instead of settle, and at Fukushima the loss of cooling, not the chain reaction itself, released the fission products' stored heat. diff --git a/content/lessons/nuclear/radiation-dose/ar.md b/content/lessons/nuclear/radiation-dose/ar.md index aaed30a5..f3af9a0b 100644 --- a/content/lessons/nuclear/radiation-dose/ar.md +++ b/content/lessons/nuclear/radiation-dose/ar.md @@ -1,7 +1,7 @@ --- title: جرعة الإشعاع اليومية summary: >- - الموزة والرحلة والأشعة المقطعية كلها تعطيك جرعة إشعاع. الأرقام تتفاوت ملايين المرات. + الموزة والرحلة والأشعة المقطعية كلها تعطيك جرعة إشعاع. لكن أكبرها يساوي أصغرها عشرات آلاف المرات. parameters: source: مصدر يومي time: عدد المرات @@ -16,9 +16,9 @@ charts: [] ## Try it -1. انظر إلى الأشرطة الخمسة أعلى الرسم، موزة وأشعة سينية للأسنان ورحلة طيران وأشعة مقطعية للصدر وسنة من الإشعاع الخلفي. كلها على مسطرة واحدة، بوحدة الميلي‌سيفرت. -2. اختر «مصدر يومي» واجعل «عدد المرات» يساوي 1. يقف شريطك المميَّز عندئذ بالضبط عند علامة التعرّض الواحد لهذا المصدر. -3. ارفع «عدد المرات». يكبر شريطك ويتجاوز الأشرطة المرجعية الثابتة. انظر هل يصل إلى الخط المتقطع عند 100 mSv، حيث يظهر أول ارتفاع حقيقي وقابل للقياس في خطر السرطان ضمن دراسات سكانية كبيرة. +1. انظر إلى الأشرطة الخمسة أعلى الرسم، موزة وأشعة سينية للأسنان ورحلة طيران وأشعة مقطعية للصدر وسنة من الإشعاع الخلفي. كلها على مسطرة واحدة، بوحدة المليسيفرت. +2. اجعل «مصدر يومي» عند الموضع 2، أي رحلة طيران طويلة، وأبقِ «عدد المرات» عند 1. يقف شريطك المميَّز بالضبط عند علامة التعرّض الواحد لهذا المصدر، وتقرأ «جرعتك التراكمية» القيمة 40 µSv. +3. ارفع «عدد المرات» إلى 50: يصير المجموع 2.00 mSv، أي 0.83 سنة من الإشعاع الخلفي. الآن انتقل إلى الموضع 3، أشعة مقطعية للصدر، مع 10 مرات: 70.0 mSv، أي 29.17 سنة من الإشعاع الخلفي. تجاوز شريطك الأشرطة المرجعية الثابتة، لكنه لم يصل بعد إلى الخط المتقطع عند 100 mSv، حيث يظهر أول ارتفاع حقيقي وقابل للقياس في خطر السرطان ضمن دراسات سكانية كبيرة. ## Real-life examples @@ -28,15 +28,15 @@ charts: [] ## Test yourself -1. اجمع 60 رحلة طيران طويلة، وطابق بها سنة كاملة من الإشعاع الخلفي من الطيران وحده. -2. خذ خمس عشرة أشعة مقطعية للصدر، وتجاوز بها علامة 100 mSv حيث يصبح الخطر قابلًا للقياس. -3. ادفع الأشعة السينية للأسنان إلى حدّها الأقصى 100 مرة، وتحقّق أن المجموع يبقى أقل من سنة واحدة من الإشعاع الخلفي. +1. اجمع 60 رحلة طيران طويلة، لتعادل جرعتها سنة كاملة من الإشعاع الخلفي من الطيران وحده. +2. أجرِ خمس عشرة صورة مقطعية للصدر، وتجاوز بها علامة 100 mSv حيث يصبح الخطر قابلًا للقياس. +3. ارفع عدد صور الأشعة السينية للأسنان إلى الحد الأقصى، 100 مرة، وتحقّق أن المجموع يبقى أقل من سنة واحدة من الإشعاع الخلفي. ## Intuition كل مصدر في هذا الرسم حقيقي ومقيس. لكن المقياس هو ما يصعّب فهم جرعة الإشعاع. جرعة الموزة أصغر من جرعة الأشعة المقطعية للصدر بنحو سبعين ألف مرة، فلو رسمتهما على مسطرة عادية لانضغط كل شريط صغير حتى يختفي. يحلّ المقياس اللوغاريتمي هذه المشكلة، فيعطي كل خطوة ضرب في 10 العرض نفسه. بهذا تقف الموزة والأشعة السينية للأسنان ورحلة الطيران والأشعة المقطعية وسنة الإشعاع الخلفي كلها على رسم واحد مقروء. -تحريك «عدد المرات» يحوّل تعرّضًا صغيرًا واحدًا إلى مجموع تراكمي. وهذا المجموع هو ما يهم فعلًا للخطر. الجرعة التراكمية، لا أي حدث واحد بمفرده، هي ما يتابعه المنظمون والأطباء. الأشعة المقطعية الواحدة للصدر مقايضة مقصودة ومفيدة، جرعة كبيرة تُعطى مرة واحدة لسبب طبي حقيقي. أما مئة أشعة سينية للأسنان فمجموعها يبقى أقل من سنة عادية واحدة من الإشعاع الخلفي. هذا ما يُظهره الرسم. التكرار وحده لا يجعل الجرعة الصغيرة خطيرة تلقائيًا. +تحريك «عدد المرات» يحوّل تعرّضًا صغيرًا واحدًا إلى مجموع تراكمي. وهذا المجموع هو ما يهم فعلًا للخطر. الجرعة التراكمية، لا أي حدث واحد بمفرده، هي ما تتابعه الجهات الرقابية والأطباء. الصورة المقطعية الواحدة للصدر موازنة مقصودة ومفيدة، جرعة كبيرة تُعطى مرة واحدة لسبب طبي حقيقي. أما مئة صورة أشعة سينية للأسنان فمجموعها يبقى أقل من سنة عادية واحدة من الإشعاع الخلفي. هذا ما يُظهره الرسم. التكرار وحده لا يجعل الجرعة الصغيرة خطيرة تلقائيًا. ## Formal @@ -57,13 +57,17 @@ charts: [] ## Real world ### التصوير الطبي + يوازن الأطباء بين جرعة الفحص وقيمة التشخيص الذي يقدّمه. وتُصمَّم الأجهزة الحديثة عمدًا لاستخدام أقل جرعة تعطي صورة مقروءة. ### السفر الجوي وطواقم الطيران + يتلقى المسافرون الدائمون وطواقم الطيران إشعاعًا كونيًا أكثر من الأشخاص على مستوى الأرض. لهذا تُتابَع جرعة طاقم الطائرة وتُحدَّد مثل أي تعرّض إشعاعي مهني آخر. ### عمّال الصناعة النووية + يرتدي عمّال الإشعاع أجهزة قياس تسجّل التعرّض التراكمي على مدى أشهر وسنوات. وتُحدَّد الحدود التنظيمية أقل بكثير من نطاق 100 mSv لإبقاء هامش أمان واسع. ### تفاوت الإشعاع الخلفي الطبيعي + يتفاوت الإشعاع الخلفي نفسه حسب الموقع، من نحو 2 mSv في السنة في أماكن كثيرة إلى أكثر من 10 mSv في السنة في بعض مناطق الرادون المرتفع أو الارتفاع الشاهق. لا فرق ثابت في النتائج الصحية المقيسة عند هذه المستويات. diff --git a/content/lessons/nuclear/radiation-dose/en.md b/content/lessons/nuclear/radiation-dose/en.md index d4b1354f..5d10b7cf 100644 --- a/content/lessons/nuclear/radiation-dose/en.md +++ b/content/lessons/nuclear/radiation-dose/en.md @@ -1,6 +1,6 @@ --- title: Everyday radiation dose -summary: A banana, a flight and a CT scan all give you a real, measurable dose of radiation — the numbers just span an enormous range, from a ten-thousandth of a millisievert to several thousand times that. +summary: A banana, a flight and a CT scan all give you a real, measurable dose of radiation — the numbers just span an enormous range, from a ten-thousandth of a millisievert to tens of thousands of times that. parameters: source: everyday source time: repeats @@ -16,8 +16,8 @@ charts: [] ## Try it 1. Look at the five bars: a banana, a dental X-ray, a flight, a chest CT and a year of background, all on the same ruler, marked in millisieverts. -2. Pick "everyday source" and set "repeats" to 1. Your highlighted bar should land exactly on that source's single-exposure mark. -3. Raise "repeats". Watch your bar grow past the fixed reference bars, and see whether it reaches the dashed line at 100 mSv, the level where a real, measurable rise in cancer risk first shows up in large population studies. +2. Set "everyday source" to position 2, a long flight, and keep "repeats" at 1. Your highlighted bar lands exactly on that source's single-exposure mark, and "your cumulative dose" reads 40 µSv. +3. Raise "repeats" to 50: the total reads 2.00 mSv, 0.83 years of background. Now switch to position 3, a chest CT scan, with 10 repeats: 70.0 mSv, or 29.17 years of background. Your bar has grown past the fixed reference bars but still stops short of the dashed line at 100 mSv, the level where a real, measurable rise in cancer risk first shows up in large population studies. ## Real-life examples @@ -56,13 +56,17 @@ The 100 mSv mark is not a hard safety cutoff; it is roughly the lowest dose at w ## Real world ### Medical imaging + Doctors weigh a scan's dose against the value of the diagnosis it provides, and modern equipment is deliberately designed to use the lowest dose that still gives a readable image. ### Air travel and flight crew + Frequent flyers and flight crew receive more cosmic radiation than people at ground level, which is one reason airline crew dose is tracked and limited like other occupational radiation exposure. ### Nuclear industry workers + Radiation workers wear dosimeters that log cumulative exposure over months and years, with regulatory limits set well under the 100 mSv range to keep a wide safety margin. ### Natural background variation + Background radiation itself varies by location, from about 2 mSv a year in many places to over 10 mSv a year in some high-radon or high-altitude regions, without any established difference in measured health outcomes at those levels. diff --git a/content/lessons/nuclear/radioactive-decay/ar.md b/content/lessons/nuclear/radioactive-decay/ar.md index f6d44413..a3be33ed 100644 --- a/content/lessons/nuclear/radioactive-decay/ar.md +++ b/content/lessons/nuclear/radioactive-decay/ar.md @@ -1,7 +1,7 @@ --- title: الاضمحلال الإشعاعي summary: >- - لا أحد يعرف أي ذرة تتحلل تاليًا، لكن بعد عمر نصف واحد يبقى النصف دائمًا. + لا أحد يعرف أي ذرة ستضمحل بعد قليل، لكن بعد عمر نصف واحد يبقى نحو النصف دائمًا. parameters: halfLife: عمر النصف time: الزمن (بعدد أعمار النصف) @@ -17,9 +17,9 @@ charts: [] ## Try it -1. راقب شبكة الذرات. كل واحدة تبدأ مضيئة. حرّك «الزمن» للأمام، وواحدة تلو الأخرى، في لحظات لا يمكن التنبؤ بها، تنطفئ، أي تضمحل. -2. راقب المنحنى بجانب الشبكة. مهما بدا العدد الفعلي متعرجًا، فهو يتبع المنحنى الأملس N₀·(1/2)^k المرسوم خلفه. -3. ارفع «كم ذرة تبدأ بها» إلى المئات. الانطفاءات العشوائية تحدث واحدة واحدة كما كانت، لكن المجموع المعدود الآن يلتصق بالمنحنى الأملس أكثر بكثير. +1. راقب شبكة الذرات. كل واحدة تبدأ مضيئة. يتقدّم الزمن وحده، فتنطفئ الذرات واحدة تلو الأخرى في لحظات لا يمكن توقّعها، أي تضمحل. اضغط زر الإيقاف واضبط «الزمن» على 1: تقرأ «الذرات الباقية» القيمة 50 / 100. +2. راقب المنحنى بجانب الشبكة. اضبط «الزمن» على 2 ثم 3: يبقى 23 ثم 14 ذرة، والصيغة تتوقع 25 ثم 12.5. مهما بدا العدد الفعلي متعرجًا، فهو يتبع المنحنى الأملس N₀·(1/2)^k المرسوم خلفه. +3. اخفض «كم ذرة تبدأ بها» إلى 10 واضبط «الزمن» على 1: يبقى 3 ذرات فقط من 10، لا 5 كما هو متوقع. الآن ارفعه إلى 300 واضبط «الزمن» على 3: يبقى 37 من 300 والمتوقع 37.5. الانطفاءات العشوائية تحدث واحدة واحدة كما كانت، لكن العدد الكبير يقترب من المنحنى الأملس أكثر بكثير. ## Real-life examples @@ -29,15 +29,15 @@ charts: [] ## Test yourself -1. شغّل «الزمن» حتى عمر نصف واحد بالضبط. -2. شغّل «الزمن» حتى يبقى أقل من 5% من الذرات. -3. اضبط عمر النصف على قيمة الكربون-14، ثم شغّل «الزمن» حتى عمري نصف بالضبط. +1. قدِّم «الزمن» إلى عمر نصف واحد بالضبط. +2. قدِّم «الزمن» حتى يبقى أقل من 5% من الذرات. +3. اضبط عمر النصف على قيمة الكربون-14، نحو 5730 سنة (أقرب ما يصل إليه المنزلق حين تقرأ «عمر النصف» القيمة 5462.7 yr)، ثم قدِّم «الزمن» إلى عمري نصف بالضبط. ## Intuition -تضمحل كل ذرة في الشبكة في لحظة لا يعرفها أحد مسبقًا، كما لا تعرف نتيجة رمي العملة قبل رميها. لا يساعدك عمر الذرة ولا تاريخها في توقع موعدها. قد تضمحل ذرة اليود-131 في الثانية القادمة، وقد تبقى شهرًا كاملًا. أما المجموعة كلها فتتصرف بانتظام مدهش. انتظر 8.02 يوم، وهو عمر النصف، فيبقى نصف الذرات بالضبط، مهما كان عمرها قبل ذلك. +تضمحل كل ذرة في الشبكة في لحظة لا يعرفها أحد مسبقًا، كما لا تعرف نتيجة رمي العملة قبل رميها. لا يساعدك عمر الذرة ولا تاريخها في توقع موعدها. قد تضمحل ذرة اليود-131 في الثانية القادمة، وقد تبقى شهرًا كاملًا. أما المجموعة كلها فتتصرف بانتظام مدهش. انتظر 8.02 يوم، وهو عمر النصف، فيكون احتمال بقاء كل ذرة 50% بالضبط، مهما كان عمرها قبل ذلك، فيبقى نحو نصف الذرات. -هذه القاعدة الثابتة، 50% في كل عمر نصف، هي سبب أن الشبكة المتعرجة العشوائية على الشاشة لا تزال تتبع منحنى أملس. اجعل «كم ذرة تبدأ بها» صغيرًا، بضع عشرات فقط، وسترى عدد الباقيات يتمايل بوضوح حول المنحنى. فسلسلة من الحظ السيئ قد تجعل ذرات إضافية تضمحل مبكرًا، أو تُبقي بعضها متأخرًا. ارفع «كم ذرة تبدأ بها» إلى المئات فيتقلص هذا التمايل حتى يكاد يختفي، لأن صعود وهبوط مئات الانطفاءات العشوائية المستقلة يتوازن بعضها مع بعض في المتوسط. هذا هو قانون الأعداد الكبيرة نفسه الذي يجعل ربح كازينو في ليلة واحدة متوقَّعًا رغم أن دورة واحدة من عجلته ليست كذلك. +هذه القاعدة الثابتة، 50% في كل عمر نصف، هي سبب أن الشبكة المتعرجة العشوائية على الشاشة لا تزال تتبع منحنى أملس. اجعل «كم ذرة تبدأ بها» صغيرًا، بضع عشرات فقط، وسترى عدد الباقيات يتمايل بوضوح حول المنحنى. فسلسلة من الحظ السيئ قد تجعل ذرات إضافية تضمحل مبكرًا، أو تُبقي بعضها متأخرًا. ارفع «كم ذرة تبدأ بها» إلى المئات فيتقلص هذا التمايل حتى يكاد يختفي، لأن صعود وهبوط مئات الانطفاءات العشوائية المستقلة يتوازن بعضها مع بعض في المتوسط. هذا هو قانون الأعداد الكبيرة نفسه: رمية عملة واحدة لا يمكن توقّع نتيجتها، لكن ألف رمية تعطي دائمًا قرابة خمسمئة صورة. ## Formal @@ -58,13 +58,17 @@ charts: [] ## Real world ### اليود-131 في الطب + يستخدم الأطباء عمر النصف القصير لليود-131، نحو 8 أيام، عن قصد: يبقى نشطًا بما يكفي لتصوير الغدة الدرقية أو علاجها، ثم يضمحل إلى مستويات لا تُذكر خلال أسابيع، فيحدّ من تعرّض المريض على المدى الطويل. ### تأريخ الكربون-14 -يقيس علماء الآثار نسبة الكربون-14 الباقية في عظم أو خشب أو فحم ليؤرّخوا مواد عضوية حتى نحو عشرة أعمار نصف، أي نحو 50 ألف سنة. + +يقيس علماء الآثار نسبة الكربون-14 الباقية في عظم أو خشب أو فحم ليؤرّخوا مواد عضوية حتى نحو تسعة أعمار نصف، أي نحو 50 ألف سنة. ### اليورانيوم-238 وعمر الأرض + عمر النصف لليورانيوم-238، 4.47 مليار سنة، قريب جدًا من عمر الأرض نفسها، ولهذا بالذات تُعدّ نسبة اليورانيوم إلى نتاج اضمحلاله، الرصاص، في الصخور القديمة من أهم الطرق التي أرّخ بها الجيولوجيون كوكبنا. ### الإشعاع الخلفي + يمتص الشخص الواحد ما يُقدَّر بنحو 2.4 مليسيفرت من الإشعاع سنويًا من مصادر طبيعية. يأتي نحو نصف هذا القدر من اضمحلال عشوائي، ذرة تلو ذرة، لنظائر مشعّة طبيعية مثل البوتاسيوم-40 وغاز الرادون في التربة والهواء والغذاء، وهي العملية نفسها التي يحاكيها هذا الدرس، لكن بعدد أكبر بكثير من الذرات. diff --git a/content/lessons/nuclear/radioactive-decay/en.md b/content/lessons/nuclear/radioactive-decay/en.md index 88189e07..ece81ce2 100644 --- a/content/lessons/nuclear/radioactive-decay/en.md +++ b/content/lessons/nuclear/radioactive-decay/en.md @@ -16,9 +16,9 @@ charts: [] ## Try it -1. Watch the grid of atoms. Each one starts lit; drag "time" forward and, one by one, at unpredictable moments, they flip dark — decayed. -2. Watch the curve beside the grid. However jagged the actual count looks, it tracks the smooth curve N₀·(1/2)^k drawn behind it. -3. Raise "how many atoms" into the hundreds. The random flips still happen one at a time, but the counted total now hugs the smooth curve far more tightly. +1. Watch the grid of atoms. Each one starts lit; time runs forward by itself and, one by one, at unpredictable moments, they flip dark — decayed. Press pause and set "time" to 1: "atoms left" reads 50 / 100. +2. Watch the curve beside the grid. Set "time" to 2 and then 3: 23 and then 14 atoms are left, where the formula expects 25 and 12.5. However jagged the actual count looks, it tracks the smooth curve N₀·(1/2)^k drawn behind it. +3. Lower "how many atoms" to 10 and set "time" to 1: only 3 of 10 are left, not the expected 5. Now raise it to 300 and set "time" to 3: 37 of 300 are left against an expected 37.5. The random flips still happen one at a time, but a big crowd hugs the smooth curve far more tightly. ## Real-life examples @@ -30,7 +30,7 @@ charts: [] 1. Run "time" forward to exactly 1 half-life. 2. Run "time" forward until fewer than 5% of the atoms remain. -3. Set the half-life to carbon-14's, then run "time" forward to exactly 2 half-lives. +3. Set the half-life to carbon-14's, about 5730 years (the slider gets closest when the "half-life" readout shows 5462.7 yr), then run "time" forward to exactly 2 half-lives. ## Intuition @@ -57,13 +57,17 @@ The same law is often written as continuous exponential decay, $N = N_0 e^{-\lam ## Real world ### Iodine-131 in medicine + Doctors use iodine-131's short, 8-day half-life deliberately: it stays active long enough to image or treat the thyroid, then decays away to negligible levels within weeks, limiting a patient's long-term exposure. ### Carbon-14 dating -Archaeologists measure the fraction of carbon-14 left in bone, wood, or charcoal to date organic material out to roughly ten half-lives, about 50,000 years. + +Archaeologists measure the fraction of carbon-14 left in bone, wood, or charcoal to date organic material out to roughly nine half-lives, about 50,000 years. ### Uranium-238 and the age of the Earth + Uranium-238's 4.47-billion-year half-life is close to Earth's own age, which is exactly why the ratio of uranium to its decay product, lead, in ancient rocks is one of the main ways geologists have dated the planet. ### Background radiation + A person absorbs an estimated average of about 2.4 millisieverts of radiation a year from natural sources; roughly half of that comes from the random, atom-by-atom decay of naturally radioactive isotopes such as potassium-40 and radon gas in soil, air, and food — the same process this lesson simulates, just with vastly more atoms. diff --git a/content/lessons/nuclear/size-of-the-nucleus/ar.md b/content/lessons/nuclear/size-of-the-nucleus/ar.md index 2806c543..0ea7d248 100644 --- a/content/lessons/nuclear/size-of-the-nucleus/ar.md +++ b/content/lessons/nuclear/size-of-the-nucleus/ar.md @@ -3,7 +3,7 @@ title: حجم النواة summary: >- أطلق جسيمات ألفا على رقيقة ذهب فتمر كلها تقريبًا. القليل الذي يرتد يكشف أن النواة صغيرة جدًا. parameters: - b: الهدف (معامل الاصطدام) b + b: التصويب (معامل الاصطدام) b E: طاقة ألفا E variables: - العدد الذري للذهب، أي كم بروتونًا في نواته (Z = 79) @@ -16,54 +16,58 @@ charts: [] ## Try it -1. راقب الأشعة الرمادية الباهتة. اثنا عشر جسيم ألفا مصوَّبة من كل جهة حول نواة الذهب، تمرّ بلا انحراف يُذكر. -2. حرّك «الهدف b» نحو الصفر. الشعاع البرتقالي الساطع، المصوَّب قرب المركز تمامًا، يرتدّ الآن من حيث أتى. -3. ارفع «طاقة ألفا E». الهدف نفسه ينحرف الآن بزاوية أصغر. جسيم ألفا الأسرع يخترق أقرب إلى النواة قبل أن يقلبه التنافر. +1. راقب الأشعة الرمادية الباهتة. أربعة عشر جسيم ألفا مصوَّبة من كل جهة حول نواة الذهب. البعيدة عن النواة تمرّ بلا انحراف يُذكر، والقليلة الأقرب إليها وحدها تنحرف بشدة. +2. اخفض «التصويب b» إلى 1 fm. الشعاع البرتقالي الساطع، المصوَّب نحو المركز تقريبًا، يرتدّ الآن من حيث أتى: تقرأ «زاوية التشتت θ» القيمة 175°. +3. أعد «التصويب b» إلى 20 fm: تقرأ θ القيمة 97.4°. الآن ارفع «طاقة ألفا E» من 5 إلى 10 MeV. مع التصويب نفسه ينحرف الجسيم 59.3° فقط، وتنخفض «أقرب مسافة اقتراب» من 45.5 fm إلى 22.8 fm. جسيم ألفا الأسرع يقترب من النواة أكثر قبل أن يردّه التنافر. ## Real-life examples -1. **إصابة مباشرة نادرة.** يُصوَّب على بعد 2 فيمتومتر فقط من المركز، فيلقى جسيم ألفا القوة الكاملة لنواة الذهب ويرتدّ تقريبًا من حيث أتى. -2. **انحراف عابر.** يُصوَّب على بعد 50 فيمتومتر عن المركز، فينحرف جسيم ألفا بزاوية ملحوظة لكنه يواصل تقدّمه في الغالب. -3. **مرور بعيد.** يُصوَّب على بعد 250 فيمتومتر عن المركز، وهو مايزال قريبًا بمقاييس الذرة، فبالكاد يشعر جسيم ألفا بالنواة. +1. **إصابة مباشرة نادرة.** يُصوَّب على بعد 2 فيمتومتر فقط من المركز بطاقة 5 MeV، فيلقى جسيم ألفا القوة الكاملة لنواة الذهب ويرتدّ تقريبًا من حيث أتى، منحرفًا نحو 170°. +2. **انحراف جانبي.** يُصوَّب على بعد 50 فيمتومتر عن المركز، فينحرف جسيم ألفا بزاوية ملحوظة، 48.9°، لكنه يواصل تقدّمه إلى الأمام. +3. **مرور بعيد.** يُصوَّب على بعد 250 فيمتومتر عن المركز، وهو ما يزال قريبًا بمقاييس الذرة، فينحرف جسيم ألفا 10.4° فقط. ## Test yourself 1. اجعل جسيم ألفا يرتدّ بأكثر من 150°، وهذه «إصابة مباشرة» بتعبير رذرفورد نفسه. 2. صوِّب جسيم ألفا بحيث ينحرف أقل من 5°، وهذا مصير معظم الجسيمات في التجربة الحقيقية. -3. جد هدفًا وطاقة يجعلان جسيم ألفا ينحرف بزاوية قريبة من القائمة، 90°. +3. جد تصويبًا وطاقة يجعلان جسيم ألفا ينحرف بزاوية قريبة من القائمة، 90°. ## Intuition -قبل هذه التجربة تخيّل الفيزيائيون الذرة كتلة لينة من شحنة موجبة تتناثر فيها الإلكترونات، مثل زبيب داخل كعكة. جسيم ألفا السريع الثقيل بالكاد يشعر بها وهو يعبرها، هكذا توقّع ذلك النموذج. راقب الأشعة الرمادية تمرّ حول نواة الذهب على الشاشة. كلها تقريبًا تنحرف قليلًا فقط، تمامًا كما تتوقّع تلك الصورة اللينة. الآن حرّك «الهدف b» نحو الصفر. شعاع واحد، المصوَّب قرب المركز تمامًا، يتوقف فجأة ويرتدّ. شيء كهذا لا تستطيعه كتلة لينة من الشحنة أبدًا. +قبل هذه التجربة تخيّل الفيزيائيون الذرة كتلة لينة من شحنة موجبة تتناثر فيها الإلكترونات، مثل زبيب داخل كعكة. جسيم ألفا السريع الثقيل بالكاد يشعر بها وهو يعبرها، هكذا توقّع ذلك النموذج. راقب الأشعة الرمادية تمرّ حول نواة الذهب على الشاشة. البعيدة عن النواة تنحرف قليلًا فقط، تمامًا كما تتوقّع تلك الصورة اللينة لكل الجسيمات. الآن حرّك «التصويب b» نحو الصفر. شعاع واحد، المصوَّب نحو المركز تقريبًا، يتوقف فجأة ويرتدّ. شيء كهذا لا تستطيعه كتلة لينة من الشحنة أبدًا. -ذلك الارتداد الواحد كان الاكتشاف الحقيقي. فهو يعني أن شحنة الذرة الموجبة، ومعظم كتلتها، محشورة في شيء صغير وصلب في المركز، لا منتشرة في الذرة كلها. ارفع «طاقة ألفا E» وراقب حتى الهدف القريب ينحرف أقل. فالجسيم الأسرع يحمل قوة دفع أكبر، ويخترق أقرب قبل أن يقلبه التنافر. والزاوية التي يخرج بها تخبرك بالضبط بقوة ذلك الدفع. +ذلك الارتداد الواحد كان الاكتشاف الحقيقي. فهو يعني أن شحنة الذرة الموجبة، ومعظم كتلتها، محشورة في شيء صغير وصلب في المركز، لا منتشرة في الذرة كلها. ارفع «طاقة ألفا E» وسترى أن الجسيم ينحرف أقل حتى مع تصويب قريب. فالجسيم الأسرع أقوى اندفاعًا، فيقترب من النواة أكثر قبل أن يردّه التنافر. والزاوية التي يخرج بها تخبرك بالضبط بقوة ذلك الدفع. ## Formal -تخيّل جسيم ألفا شحنته $z$ يقترب من نواة شحنتها $Z$، بطاقة حركية $E$ ومعامل اصطدام $b$. يشعر الجسيم بتنافر كولوم يثني مساره بزاوية تشتت $\theta = 2\arctan\left(\frac{Zze^2}{8\pi\varepsilon_0 E b}\right)$. الهدف الأقرب أو الطاقة الأقل يعنيان دائمًا انحرافًا أحدّ. +تخيّل جسيم ألفا شحنته $z$ يقترب من نواة شحنتها $Z$، بطاقة حركية $E$ ومعامل اصطدام $b$. يشعر الجسيم بتنافر كولوم يثني مساره بزاوية تشتت $\theta = 2\arctan\left(\frac{Zze^2}{8\pi\varepsilon_0 E b}\right)$. التصويب الأقرب إلى المركز أو الطاقة الأقل يعنيان دائمًا انحرافًا أكبر. أطلق رذرفورد جسيمات ألفا بطاقة 5 MeV على رقيقة ذهب، حيث $Z$ يساوي 79. ووجد أن واحدًا تقريبًا من كل 8000 يرتدّ بأكثر من 90°. هذا عدد أكبر بكثير مما تفسّره ذرة «كعكة الزبيب» المنتشرة، وهو بالضبط ما تتوقعه نواة أصغر من حجم الذرة بنحو $10^{-5}$. ## Advanced -الصيغة نفسها، مطبَّقة عكسيًا على أكبر الزوايا المرصودة فعلًا، تعطي حدًّا أعلى لنصف قطر النواة. بعد طاقة معينة يصطدم جسيم ألفا بالنواة نفسها، حيث تتولى القوة النووية الشديدة الأمر وتنهار صيغة كولوم الصرفة. وذلك الانهيار، حيث يبدأ التشتت الحقيقي بالابتعاد عن توقّع رذرفورد، لا يزال يُستعمل اليوم لقياس أحجام النوى مباشرة. +الصيغة نفسها، مطبَّقة عكسيًا على أكبر الزوايا المرصودة فعلًا، تعطي حدًّا أعلى لنصف قطر النواة. بعد طاقة معينة يصطدم جسيم ألفا بالنواة نفسها، وهناك تبدأ القوة النووية الشديدة بالتأثير فلا تبقى صيغة كولوم وحدها صحيحة. وذلك الاختلاف، حيث يبدأ التشتت الحقيقي بالابتعاد عن توقّع رذرفورد، لا يزال يُستعمل اليوم لقياس أحجام النوى مباشرة. ## Derivation 1. يتبع تنافر كولوم بين نواة الذهب وجسيم ألفا قانون التربيع العكسي، فيشتد كثيرًا كلما اقترب الجسيم. 2. تتبّع مسار الجسيم المنحني تحت هذه القوة يعطي علاقة دقيقة بين مدى بُعده عن المركز والزاوية التي يخرج بها. -3. إعادة ترتيب تلك العلاقة من أجل الزاوية تعطي صيغة التشتت التي تربطها مباشرة بالهدف والطاقة. +3. إعادة ترتيب تلك العلاقة من أجل الزاوية تعطي صيغة التشتت التي تربطها مباشرة بالتصويب والطاقة. ## Real world ### اكتشاف النواة (1909-1911) -أطلق هانس گايگر وإرنست مارسدن جسيمات ألفا على رقيقة ذهب في مختبر رذرفورد. الارتدادات النادرة بزوايا كبيرة التي عدّاها دفعت رذرفورد لاقتراح الذرة النووية سنة 1911. + +أطلق هانس غايغر وإرنست مارسدن جسيمات ألفا على رقيقة ذهب في مختبر رذرفورد. الارتدادات النادرة بزوايا كبيرة التي عدّاها دفعت رذرفورد لاقتراح الذرة النووية سنة 1911. ### مسرّعات الجسيمات + تستعمل المسرّعات الحديثة الفكرة نفسها بطاقة أعلى بكثير. تطلق جسيمات على هدف وتقرأ نمط ما يرتدّ منها لرسم تفاصيل أصغر من أن تُرى بأي طريقة أخرى. ### لماذا رقيقة الذهب + يمكن طرق الذهب حتى يصبح رقيقة بضع مئات من الذرات سمكًا بلا تمزّق. يعبر جسيم ألفا الرقيقة فيلتقي نواة واحدة فقط في كل مرة، ما يبقي نمط التشتت واضحًا. ### تشتت رذرفورد الخلفي + لا يزال علماء المواد يستعملون هذا التشتت نفسه، ويسمّونه اليوم مطيافية تشتت رذرفورد الخلفي، لقياس تركيب أغشية رقيقة لا يتجاوز سمكها طبقات ذرية قليلة. diff --git a/content/lessons/nuclear/size-of-the-nucleus/en.md b/content/lessons/nuclear/size-of-the-nucleus/en.md index 103a2065..87b35389 100644 --- a/content/lessons/nuclear/size-of-the-nucleus/en.md +++ b/content/lessons/nuclear/size-of-the-nucleus/en.md @@ -19,15 +19,15 @@ charts: [] ## Try it -1. Watch the pale grey rays: twelve alpha particles, aimed all around the gold nucleus, streaming past with barely a bend. -2. Drag "aim b" down toward zero. The bright orange ray, aimed almost dead-on, now bounces back the way it came. -3. Raise "alpha energy E". The same aim now bends by a smaller angle — a faster alpha punches closer to the nucleus before the repulsion can turn it around. +1. Watch the pale grey rays: fourteen alpha particles, aimed all around the gold nucleus. The ones aimed far out stream past with barely a bend; only the few aimed closest to the nucleus turn sharply. +2. Drag "aim b" down to 1 fm. The bright orange ray, aimed almost dead-on, now bounces back the way it came: "scattering angle θ" reads 175°. +3. Set "aim b" back to 20 fm: θ reads 97.4°. Now raise "alpha energy E" from 5 to 10 MeV. The same aim bends by only 59.3°, and "closest approach" drops from 45.5 fm to 22.8 fm — a faster alpha punches closer to the nucleus before the repulsion can turn it around. ## Real-life examples -1. **A rare direct hit.** Aimed just 2 femtometres from dead centre, the alpha particle meets the full force of the gold nucleus and bounces back almost the way it came. -2. **A glancing deflection.** Aimed 50 femtometres off-centre, the alpha particle swings through a noticeable angle but keeps moving mostly forward. -3. **A distant pass.** Aimed 250 femtometres off-centre — still close by atomic standards — the alpha particle barely notices the nucleus at all. +1. **A rare direct hit.** Aimed just 2 femtometres from dead centre at 5 MeV, the alpha particle meets the full force of the gold nucleus and bounces back almost the way it came, turned by about 170°. +2. **A glancing deflection.** Aimed 50 femtometres off-centre, the alpha particle swings through a noticeable angle, 48.9°, but keeps moving mostly forward. +3. **A distant pass.** Aimed 250 femtometres off-centre — still close by atomic standards — the alpha particle bends by only 10.4°. ## Test yourself @@ -37,7 +37,7 @@ charts: [] ## Intuition -Before this experiment, physicists pictured an atom as a soft blob of positive charge with electrons scattered through it, like raisins in a pudding — something a fast, heavy alpha particle should barely notice as it passed through. Watch the grey rays sweep past the gold nucleus on screen: almost every one bends only a little, exactly what that soft picture predicted. Now drag "aim b" down toward zero. One ray, the one aimed almost dead-on, slams to a stop and reverses — something a soft pudding of charge could never do. +Before this experiment, physicists pictured an atom as a soft blob of positive charge with electrons scattered through it, like raisins in a pudding — something a fast, heavy alpha particle should barely notice as it passed through. Watch the grey rays sweep past the gold nucleus on screen: the ones aimed far from it bend only a little, exactly what that soft picture predicted for every particle. Now drag "aim b" down toward zero. One ray, the one aimed almost dead-on, slams to a stop and reverses — something a soft pudding of charge could never do. That single bounce-back was the real discovery: it meant the atom's positive charge, and nearly all its mass, had to be packed into something tiny and hard at the centre, not spread thin through the whole atom. Raise "alpha energy E" and watch even a close aim bend by less: a faster particle carries more punch, so it barrels in closer before the repulsion turns it around, and the angle it comes out at tells you exactly how strong that push was. @@ -60,13 +60,17 @@ The same formula, run backwards from the largest angles actually observed, gives ## Real world ### Discovering the nucleus (1909-1911) + Hans Geiger and Ernest Marsden fired alpha particles at gold foil in Rutherford's lab; the rare, large-angle bounces they counted led Rutherford to propose the nuclear atom in 1911. ### Particle accelerators + Modern accelerators use the same idea at far higher energy: firing particles at a target and reading the pattern of what bounces back to map out structure too small to see any other way. ### Why gold foil + Gold can be hammered into a foil only a few hundred atoms thick without tearing, so an alpha particle crosses it while meeting only one nucleus at a time, keeping the scattering pattern clean. ### Rutherford backscattering + Materials scientists still use this exact scattering, now called Rutherford backscattering spectrometry, to measure the composition of thin films only a few atomic layers thick. diff --git a/content/lessons/nuclear/the-nucleus/ar.md b/content/lessons/nuclear/the-nucleus/ar.md index 98820ecd..436f3fb0 100644 --- a/content/lessons/nuclear/the-nucleus/ar.md +++ b/content/lessons/nuclear/the-nucleus/ar.md @@ -6,22 +6,22 @@ parameters: Z: البروتونات Z N: النيوترونات N variables: - - نصف قطر النواة، بوحدة الفيمتومتر (1 fm يساوي 10⁻¹⁵ m، أي جزء من تريليون من عرض الشعرة تقريبًا) + - نصف قطر النواة، بوحدة الفيمتومتر (1 fm يساوي 10⁻¹⁵ m، أي جزء من مئة مليار جزء من عرض الشعرة تقريبًا) - العدد الكتلي، مجموع البروتونات والنيوترونات معًا، Z + N charts: [] --- ## Try it -1. ابدأ من الكربون-12. فيه ست بروتونات زرقاء وست نيوترونات رمادية مرصوصة في كرة صغيرة، وعليها الرمز C-12 وعلامة «نظير مستقر معروف». -2. ارفع «النيوترونات N» إلى 8 وأبقِ «البروتونات Z» عند 6. يتغيّر الرمز إلى C-14 وتختفي علامة الاستقرار. هذا هو النظير الذي يُستعمل لتأريخ العظام القديمة. -3. حرّك «البروتونات Z» إلى 20. تكبر الكرة ويزداد نصف القطر R معها، لأن كل نكليون إضافي يزيد حجم الكرة لا طولها فقط. +1. ابدأ من الكربون-12. فيه ستة بروتونات زرقاء وستة نيوترونات رمادية مرصوصة في كرة صغيرة، وعليها الرمز C-12 وعلامة «نظير مستقر معروف». يقرأ «نصف القطر R» القيمة 2.75 fm. +2. ارفع «النيوترونات N» إلى 8 وأبقِ «البروتونات Z» عند 6. يتغيّر الرمز إلى C-14، ويقرأ R القيمة 2.89 fm، وتصير الحالة «ليس نظيرًا مستقرًا معروفًا». هذا هو النظير الذي يُستعمل لمعرفة عمر العظام القديمة. +3. حرّك «البروتونات Z» إلى 20. تكبر الكرة ويزداد نصف القطر R من 2.89 fm إلى 3.64 fm، لأن كل نكليون إضافي يزيد حجم الكرة لا عرضها فقط. ## Real-life examples 1. **الهيدروجين العادي.** فيه بروتون واحد بلا أي نيوترون، وهو معظم هيدروجين الكون، وموجود في كل جزيء ماء تشربه. 2. **التريتيوم.** فيه بروتون واحد ونيوترونان. هيدروجين مشع يُستعمل وقودًا للاندماج، ونصف عمره نحو 12.3 سنة. -3. **الكربون-12.** فيه ست بروتونات وست نيوترونات. هذا هو الكربون العادي في جسمك، والمعيار الذي تُقاس عليه وحدة الكتلة الذرية. +3. **الكربون-12.** فيه ستة بروتونات وستة نيوترونات. هذا هو الكربون العادي في جسمك، والمعيار الذي تُقاس عليه وحدة الكتلة الذرية. ## Test yourself @@ -31,9 +31,9 @@ charts: [] ## Intuition -تخيّل أنك تفرغ كيس رخام على طاولة. مهما كان عدد الحبّات، تستقر في كومة بالكثافة نفسها تقريبًا في كل مكان. فالكومة الأكبر كرة أكبر فقط، لا كومة أشدّ ازدحامًا. تتصرف البروتونات والنيوترونات داخل النواة بالطريقة نفسها. حرّك «البروتونات Z» و«النيوترونات N» معًا للأعلى وراقب الكرة على الشاشة تكبر بثبات. كل نكليون تضيفه يأخذ مساحة قريبة من التي أخذها الذي قبله. +تخيّل أنك تفرغ كيسًا من الكرات الزجاجية الصغيرة (البِلي) على طاولة. مهما كان عدد الكرات، تستقر في كومة مزدحمة بالقدر نفسه تقريبًا في كل مكان. فالكومة الأكبر كرة أكبر فقط، لا كومة أشدّ ازدحامًا. تتصرف البروتونات والنيوترونات داخل النواة بالطريقة نفسها. حرّك «البروتونات Z» و«النيوترونات N» معًا للأعلى وراقب الكرة على الشاشة تكبر بثبات. كل نكليون تضيفه يأخذ مساحة قريبة من التي أخذها الذي قبله. -العدد الذي يحدد العنصر هو النقاط الزرقاء وحدها. عدد البروتونات Z يقرر أي صف من الجدول الدوري تبنيه، من الهيدروجين (Z = 1) حتى الكالسيوم (Z = 20). أما النقاط الرمادية، أي النيوترونات، فبالكاد تغيّر الكيمياء. لكن اختر عددًا خاطئًا منها فلن تتماسك النواة إلى الأبد. الكربون-12، بست من كل نوع، يبقى كما هو مليارات السنين. أما الكربون-14، بست بروتونات وثماني نيوترونات، فيتفكك ببطء، وهذا بالضبط ما يجعله مفيدًا لتأريخ العظام القديمة. +العدد الذي يحدد العنصر هو النقاط الزرقاء وحدها. عدد البروتونات Z يقرر أي صف من الجدول الدوري تبنيه، من الهيدروجين (Z = 1) حتى الكالسيوم (Z = 20). أما النقاط الرمادية، أي النيوترونات، فبالكاد تغيّر الكيمياء. لكن إذا كان عددها غير مناسب فلن تبقى النواة متماسكة إلى الأبد. الكربون-12، وفيه ستة من كل نوع، يبقى كما هو مليارات السنين. أما الكربون-14، وفيه ستة بروتونات وثمانية نيوترونات، فيتفكك ببطء، وهذا بالضبط ما يجعله مفيدًا لمعرفة عمر العظام القديمة. ## Formal @@ -47,20 +47,24 @@ charts: [] ## Derivation -1. تشغل النكليونات حجمًا متقاربًا أينما استقرت. تربطها القوة النووية الشديدة قصيرة المدى كحبّات رخام في كيس. لذلك يتناسب حجم النواة كله طرديًا مع A. +1. تشغل النكليونات حجمًا متقاربًا أينما استقرت. تربطها القوة النووية الشديدة قصيرة المدى كالكرات الزجاجية في كيس. لذلك يتناسب حجم النواة كله طرديًا مع A. 2. حجم الكرة يتناسب مع مكعّب نصف قطرها. فإذا كان الحجم يتناسب مع A فمكعّب نصف القطر يتناسب معه أيضًا، أي أن نصف القطر نفسه يتناسب مع جذر A التكعيبي. 3. قياس نوى حقيقية يثبّت ثابت التناسب هذا عند 1.2 فيمتومتر، فتنتج الصيغة R = 1.2·A^(1/3) fm. ## Real world ### التصوير الطبي + التكنيشيوم-99m، وفيه 43 بروتونًا، يُصنَّع طازجًا في المستشفيات ويضمحل بنصف عمر مقداره 6.0 ساعات فقط، فيضيء الصورة الطبية ثم يغادر الجسم بسرعة. ### وقود المفاعلات + اليورانيوم-235 واليورانيوم-238 متطابقان كيميائيًا، لكن الأندر منهما U-235 وحده ينشطر بسهولة تكفي لتشغيل مفاعل. أما U-238 الأكثر شيوعًا فيكاد يكون خاملًا كوقود، ونصف عمره 4.47 مليار سنة، أي قريب من عمر الأرض. ### تأريخ الكربون المشع + كل كائن حيّ يتبادل الكربون مع الهواء باستمرار، ومنه جزء ثابت وضئيل من الكربون-14. بعد موته يضمحل ذلك الكربون-14 بنصف عمر مقداره 5730 سنة، فيعدّ علماء الآثار ما تبقّى منه ليؤرّخوا عظامًا وأخشابًا قديمة. ### علاج الغدة الدرقية + اليود-131، بنصف عمر مقداره 8.02 يوم، يتجمّع في الغدة الدرقية ويُستعمل لتصويرها، وبجرعات أعلى لعلاج فرط نشاطها. diff --git a/content/lessons/nuclear/the-nucleus/en.md b/content/lessons/nuclear/the-nucleus/en.md index e2d531a5..aa24e5b4 100644 --- a/content/lessons/nuclear/the-nucleus/en.md +++ b/content/lessons/nuclear/the-nucleus/en.md @@ -8,16 +8,16 @@ parameters: Z: protons Z N: neutrons N variables: - - the nuclear radius, in femtometres (1 fm is 10⁻¹⁵ m, about a trillionth the width of a hair) + - the nuclear radius, in femtometres (1 fm is 10⁻¹⁵ m, about a hundred-billionth the width of a hair) - the mass number, the total count of protons and neutrons, Z + N charts: [] --- ## Try it -1. Start at carbon-12: six blue protons and six grey neutrons packed into a tiny ball, labelled C-12 and marked a known stable isotope. -2. Raise "neutrons N" to 8 while "protons Z" stays at 6. The label changes to C-14 and the stable badge turns off — you've built the isotope used to date old bones. -3. Now drag "protons Z" up to 20. The ball grows and the radius R climbs too, because every extra nucleon adds volume, not just extra width. +1. Start at carbon-12: six blue protons and six grey neutrons packed into a tiny ball, labelled C-12 and marked a known stable isotope. "radius R" reads 2.75 fm. +2. Raise "neutrons N" to 8 while "protons Z" stays at 6. The label changes to C-14, R reads 2.89 fm and the status turns to "not a known stable isotope" — you've built the isotope used to date old bones. +3. Now drag "protons Z" up to 20. The ball grows and the radius R climbs from 2.89 fm to 3.64 fm, because every extra nucleon adds volume, not just extra width. ## Real-life examples @@ -56,13 +56,17 @@ Whether a given (Z, N) pair is stable comes down to a balance: the short-range s ## Real world ### Medical imaging + Technetium-99m, with 43 protons, is made fresh in hospitals and decays with a half-life of just 6.0 hours, so it lights up a scan and then clears the body quickly. ### Nuclear fuel + Uranium-235 and uranium-238 are chemically identical, but only the rarer U-235 splits easily enough to fuel a reactor; the far more common U-238 is nearly inert as a fuel, with a half-life of 4.47 billion years — close to the age of the Earth. ### Radiocarbon dating + Every living thing keeps trading carbon with the air, including a tiny steady fraction of carbon-14. Once it dies, that C-14 decays away with a half-life of 5,730 years, so archaeologists count what's left to date old bones and wood. ### Treating thyroid disease + Iodine-131, with a half-life of 8.02 days, collects in the thyroid gland and is used both to image it and, at higher doses, to treat an overactive thyroid. diff --git a/content/lessons/physics/bernoulli-and-flow-rate/ar.md b/content/lessons/physics/bernoulli-and-flow-rate/ar.md index 6a53bfaa..784dd31a 100644 --- a/content/lessons/physics/bernoulli-and-flow-rate/ar.md +++ b/content/lessons/physics/bernoulli-and-flow-rate/ar.md @@ -1,18 +1,17 @@ --- title: برنولي ومعدل التدفق -summary: >- - غطِّ جزءًا من فتحة الخرطوم فيندفع الماء أسرع. السبب نفسه يسرّع الدم في الشريان الضيق. +summary: 'حافظ على معدل الجريان عند تغير مساحة الأنبوب، ثم استخدم موازنة طاقة مثالية لمقارنة الضغط عند ارتفاع واحد.' parameters: - v1: السرعة قبل التضييق v₁ - A1: مساحة المقطع قبل التضييق A₁ - x: مساحة المقطع بعد التضييق A₂ + v1: 'v₁ — السرعة عند المقطع الأول' + A1: 'A₁ — مساحة المقطع الأول' + x: 'A₂ — مساحة المقطع الثاني' variables: - - مساحة المقطع قبل التضييق وبعده - - سرعة التدفق قبل التضييق وبعده - - انخفاض الضغط Δp + - 'مساحتا المقطعين العرضيين' + - 'سرعتا الجريان عند المقطعين' + - 'فرق الضغط الساكن p₁−p₂ عند ارتفاع واحد' charts: - - title: انخفاض الضغط مع تضييق الأنبوب - xLabel: مساحة المقطع بعد التضييق A₂ + - title: فرق الضغط الساكن عند كثافة 1000 kg/m³ + xLabel: مساحة المقطع A₂ (cm²) yLabel: Δp (kPa) series: - p₁ − p₂ @@ -20,54 +19,50 @@ charts: ## Try it -1. راقب الماء يتدفق عبر الأنبوب بعرضه المعتاد. -2. حرّك المنزلق «مساحة المقطع بعد التضييق A₂» إلى قيمة أصغر، كأنك تضغط على خرطوم بإصبعك. راقب التدفق يتسارع. -3. حرّكه الآن إلى قيمة أوسع من «مساحة المقطع قبل التضييق A₁». يتباطأ التدفق من جديد، ويتغيّر اتجاه فرق الضغط. +1. اجعل v₁ = 2 m/s وA₁ = 6 cm² وA₂ = 3 cm². المساحة الثانية نصف الأولى، لذلك v₂ = 4 m/s. يعطي الرسم السفلي p₁−p₂ = 6 kPa لكثافة 1000 kg/m³. +2. ثبّت v₁ وA₁ واجعل A₂ = 6 cm². تتساوى السرعتان، ويصبح فرق الضغط المثالي صفرًا. +3. زد A₂ إلى 9 cm². تنخفض السرعة الثانية إلى نحو 1.33 m/s، ويصبح p₁−p₂ نحو −1.11 kPa؛ أي إن الضغط أعلى عند المقطع الأوسع في هذا النموذج المثالي. ## Real-life examples -1. **خرطوم حديقة مفتوح بالكامل.** يخرج الماء بسرعة 1.5 m/s من فتحة بعرض الأنبوب نفسه، فلا يتسارع شيء. -2. **تغطية طرف الخرطوم بإصبعك.** تقليص الفتحة إلى ربع مساحتها يدفع الماء نفسه بأربعة أضعاف سرعته، وهي الحيلة المعروفة للوصول بالماء أبعد. -3. **فوهة إطفاء الحرائق.** يضيق الخرطوم بشدة من برميل عريض إلى طرف ضيق، فيحوّل تدفقًا هادئًا بسرعة 1 m/s إلى نفاثة أسرع بنحو تسع مرات. +1. **مساحتان متساويتان.** عند v₁ = 1.5 m/s ومساحة 6 cm² لكل مقطع، تكون v₂ = 1.5 m/s وفرق الضغط المثالي صفرًا. قد يسبب احتكاك الأنبوب الفعلي هبوطًا في الضغط رغم ذلك. +2. **مقطع مساحته الربع.** عند v₁ = 1.5 m/s وA₁ = 6 cm² وA₂ = 1.5 cm²، تكون v₂ = 6 m/s وp₁−p₂ = 16.875 kPa. +3. **مقطع مساحته التُّسع.** عند v₁ = 1 m/s وA₁ = 9 cm² وA₂ = 1 cm²، تكون v₂ = 9 m/s وp₁−p₂ = 40 kPa. يثبت النموذج الجريان عند المقطع الأول عندما نغيّر مساحة الثاني. ## Test yourself -1. ضيّق الأنبوب حتى تصبح السرعة بعد التضييق ضعف السرعة قبله بالضبط. -2. اجعل السرعة بعد التضييق تبلغ 8. -3. جِد مساحة مقطع بعد التضييق يجعل الفرق بين مربع السرعة بعده ومربع السرعة قبله يساوي 20، وهي الكمية التي تحدد انخفاض الضغط. +1. اجعل A₁/A₂ = 2، فتكون السرعة الثانية ضعف الأولى. +2. اجعل السرعة الثانية قريبة من 8 m/s. +3. اجعل v₂²−v₁² قريبًا من 20 m²/s². عند كثافة المائع الثابتة، يقابل ذلك فرق ضغط 10 kPa. ## Intuition -تخيل الماء يتدفق بثبات عبر خرطوم حديقة بسرعة 1.5 مترًا في الثانية. حرّك المنزلق «مساحة المقطع بعد التضييق A₂» لتجعل الأنبوب أضيق عند تلك النقطة. يجب أن تمر الكمية نفسها من الماء كل ثانية، فيضطر إلى التسارع ليعبر الفتحة الأصغر، تمامًا كما تتسارع السيارات عند ممر بحارة واحدة في أعمال الطريق. +تخيّل سائلًا غير قابل للانضغاط يجري بصورة مستقرة في أنبوب بلا تسرب. يجب أن يساوي الحجم الداخل كل ثانية الحجم الخارج. هذا المعدل الحجمي يساوي مساحة المقطع مضروبة في متوسط السرعة. إذا كانت مساحة مقطع نصف مساحة الآخر، لزم أن يتحرك السائل فيه بضعف السرعة ليمر الحجم نفسه كل ثانية. -انظر الآن إلى الرسم الثاني، فهو يتتبع انخفاض الضغط بين النقطة العريضة والنقطة الضيقة. صغّر A₂ أكثر، فترتفع النقطة المعلَّمة على الرسم بحدة. الماء الأسرع عند النقطة الضيقة يضغط بقوة أقل بكثير من الماء الأبطأ قبله. وسّع A₂ بدلًا من ذلك حتى يتجاوز A₁، فيتباطأ التدفق هناك، ويصبح "الانخفاض" سالبًا، أي أن الضغط هناك أعلى فعليًا. +تعطينا الاستمرارية علاقة السرعتين. ولإيجاد فرق الضغط نحتاج إلى نموذج للطاقة أيضًا. في جريان مستقر باحتكاك مهمل، دون مضخة أو توربين بين المقطعين، وعند ارتفاع واحد وسرعات شبه منتظمة عبر كل مقطع، تربط معادلة برنولي زيادة السرعة بانخفاض الضغط الساكن. هذه مقارنة ضمن الجريان نفسه، وليست قاعدة تقول إن كل مائع أسرع في أي مكان أقل ضغطًا. يوضح الأنبوب الثلاثي تغير المساحة، ويحسب الرسم السفلي فرق الضغط. ## Formal -استمرارية مائع غير قابل للانضغاط: $A_1 v_1 = A_2 v_2$، فمعدل التدفق الكتلي نفسه يمر عبر كل مقطع من الأنبوب كل ثانية. +للجريان المستقر غير القابل للانضغاط، تكون $Q=A_1v_1=A_2v_2$، ومنها $v_2=v_1A_1/A_2$. نسبة المساحتين بلا وحدة، ويجب استعمال الوحدة نفسها لهما. تستخدم أدوات التحكم cm² للمساحات وm/s للسرعات. ولإعطاء Q بوحدة m³/s، نحوّل باستخدام $1\ \mathrm{cm^2}=10^{-4}\ \mathrm{m^2}$. -تحوّل معادلة برنولي بعدها تغيّر السرعة إلى تغيّر في الضغط: $\Delta p = p_1 - p_2 = \tfrac12\rho\left(v_2^2 - v_1^2\right)$، فأي نقطة يكون فيها التدفق أسرع هي نقطة يكون فيها الضغط أقل. +ضمن افتراضات الجريان المثالي المذكورة وعند ارتفاع واحد، تكون $p_1+\tfrac12\rho v_1^2=p_2+\tfrac12\rho v_2^2$. إذن $\Delta p=p_1-p_2=\tfrac12\rho(v_2^2-v_1^2)$. يثبت رسم الضغط $\rho=1000\ \mathrm{kg/m^3}$ ويعرض بالكيلوباسكال. تعني Δp الموجبة ضغطًا ساكنًا أقل عند المقطع الثاني، والسالبة ضغطًا أعلى عنده. ## Advanced -هذه بالضبط فيزياء أنبوب فنتوري في درس "برنولي" المستقل، معاد صياغتها هنا بجعل مساحة المقطع بعد التضييق نفسها هي المتغير المسحوب: تحدد الاستمرارية سرعة المائع الواجبة عند كل مقطع، ومعادلة برنولي ليست سوى حفظ للطاقة يحوّل تلك الطاقة الحركية اللازمة إلى تغيّر مقابل في الضغط على طول خط الانسياب. +عند اختلاف الارتفاعين نضيف حد الجاذبية ρgz. وتحتاج خسائر اللزوجة والمضخات والتوربينات إلى حدود طاقة إضافية، كما قد تحتاج السرعات غير المنتظمة عبر المقطع إلى تصحيحات. وقد يغيّر تضييق مخرج فعلي معدل الجريان الكلي أيضًا، لأن ضغط التغذية ومقاومة الأنبوب يحددانه. هنا يبقى v₁ وA₁ ثابتين، فيحافظ تغيير A₂ على معدل الجريان المحدد بحكم إعداد النموذج. ## Derivation -1. يتطلب حفظ الكتلة لتدفق مستقر غير قابل للانضغاط معدل تدفق كتلي واحدًا عبر كل مقطع. -2. تربط معادلة برنولي على طول خط الانسياب (مستقر، غير لزج، بلا تغيّر ارتفاع) بين الضغط والسرعة عند النقطتين. -3. طرح حدّي السرعة يعطي انخفاض الضغط مباشرة من السرعة قبل التضييق ونسبة المساحتين. +1. نساوي الكتلة التي تمر بالمقطعين كل ثانية. تُختصر الكثافة الثابتة، فيبقى معدل الجريان الحجمي متساويًا. +2. نطبق موازنة طاقة برنولي المثالية بين المقطعين المتساويين في الارتفاع على الجريان نفسه. +3. نرتب المعادلة للحصول على p₁−p₂، ثم نستخدم علاقة الاستمرارية لحساب v₂. ## Real world -### حيلة الإبهام على خرطوم الحديقة -تغطية طرف الخرطوم جزئيًا يقلّص مساحته الفعلية، فبحكم الاستمرارية يجب أن يندفع الماء أسرع، وهذه العلاقة نفسها مطبقة باليد. +### قياس معدل الجريان -### فوهات خراطيم الإطفاء -تُضيَّق فوهة الإطفاء عمدًا بشدة، فتحوّل تدفقًا متواضعًا داخل الخرطوم إلى نفاثة سريعة بعيدة المدى عند الطرف. +قد يولّد مقطع ضيق فرق ضغط قابلًا للقياس ومرتبطًا بمعدل الجريان. تحتاج الأدوات الفعلية إلى معايرة وتصحيحات لاختلافها عن النموذج المثالي. -### الرفع على جناح الطائرة -يُسرّع الجناح الهواء المار فوق سطحه العلوي المنحني، فينخفض الضغط هناك بحسب مبدأ برنولي نفسه، وهذا مشروح بتفصيل أكبر في درس «برنولي». +### مقارنة مقطعين -### تدفق الدم عبر شريان متضيّق -انسداد جزئي يضيّق مقطع الشريان، فيتسارع الدم عبره وينخفض الضغط الموضعي، وهي آلية يراقبها الأطباء في تضيّق الشرايين. +يمكن لقياس السرعة والمساحة عند مقطع أن يقدّر متوسط السرعة عند آخر في جريان مستقر غير قابل للانضغاط وبلا تسرب. يحتاج الضغط إلى افتراضات الطاقة الإضافية؛ فالاستمرارية وحدها لا تحدده. diff --git a/content/lessons/physics/bernoulli-and-flow-rate/en.md b/content/lessons/physics/bernoulli-and-flow-rate/en.md index 5e44773c..6b1c1e23 100644 --- a/content/lessons/physics/bernoulli-and-flow-rate/en.md +++ b/content/lessons/physics/bernoulli-and-flow-rate/en.md @@ -1,20 +1,17 @@ --- title: Bernoulli and flow rate -summary: >- - This is why covering part of a hose opening makes the water shoot out - faster, and why a narrowed artery makes blood speed up and its pressure - drop. +summary: 'Keep flow rate constant through a changing pipe area, then use an ideal energy balance to compare pressures at equal height.' parameters: - v1: upstream speed v₁ - A1: upstream cross-sectional area A₁ - x: downstream area A₂ + v1: 'v₁ — speed at section 1' + A1: 'A₁ — area at section 1' + x: 'A₂ — area at section 2' variables: - - upstream and downstream cross-sectional area - - upstream and downstream flow speed - - pressure drop Δp + - 'cross-sectional areas at the two sections' + - 'flow speeds at the two sections' + - 'static pressure difference p₁−p₂ at equal height' charts: - - title: Pressure drop as the pipe narrows - xLabel: downstream area A₂ + - title: Static pressure difference at density 1000 kg/m³ + xLabel: area A₂ (cm²) yLabel: Δp (kPa) series: - p₁ − p₂ @@ -22,54 +19,50 @@ charts: ## Try it -1. Watch the water flow through the pipe at its normal width. -2. Drag the slider "downstream area A₂" smaller, like pinching a hose. Watch the flow speed up. -3. Now drag it wider than "upstream area A₁". The flow slows down again, and the pressure difference flips sign. +1. Set v₁ = 2 m/s, A₁ = 6 cm² and A₂ = 3 cm². The second area is half the first, so v₂ = 4 m/s. The lower chart gives p₁−p₂ = 6 kPa for density 1000 kg/m³. +2. Keep v₁ and A₁ fixed and set A₂ = 6 cm². The speeds are equal and the ideal pressure difference is zero. +3. Increase A₂ to 9 cm². The second speed falls to about 1.33 m/s and p₁−p₂ becomes about −1.11 kPa: pressure is higher at the wider section in this ideal model. ## Real-life examples -1. **Garden hose, wide open.** Water leaves the tap at 1.5 m/s through an opening as wide as the pipe itself, so nothing speeds up. -2. **Covering the end with your thumb.** Shrinking the opening to a quarter of its area forces the same water through four times faster — the classic trick for reaching further with a hose. -3. **Firefighting nozzle.** A hose narrows sharply from a wide barrel to a narrow tip, turning a gentle 1 m/s flow into a jet about nine times faster. +1. **Equal areas.** With v₁ = 1.5 m/s and both areas 6 cm², v₂ = 1.5 m/s and the ideal pressure difference is zero. Real pipe friction can still cause a pressure loss. +2. **A quarter-area section.** With v₁ = 1.5 m/s, A₁ = 6 cm² and A₂ = 1.5 cm², v₂ = 6 m/s and p₁−p₂ = 16.875 kPa. +3. **A ninth-area section.** With v₁ = 1 m/s, A₁ = 9 cm² and A₂ = 1 cm², v₂ = 9 m/s and p₁−p₂ = 40 kPa. The model holds the upstream flow fixed as the second area changes. ## Test yourself -1. Narrow the pipe until the downstream speed is exactly twice the upstream speed. -2. Make the downstream speed reach 8. -3. Find a downstream area where the downstream speed squared minus the upstream speed squared equals 20 — the quantity that sets the pressure drop. +1. Make A₁/A₂ = 2 so the second speed is twice the first. +2. Make the second speed approximately 8 m/s. +3. Make v₂²−v₁² approximately 20 m²/s². At the fixed fluid density, this corresponds to a pressure difference of 10 kPa. ## Intuition -Imagine water moving steadily through a garden hose at 1.5 metres per second. Drag the slider "downstream area A₂" to make the pipe narrower there: the same amount of water still has to get through every second, so it has to speed up to squeeze through the smaller gap, exactly like traffic speeding up through a single-lane road works zone. +Imagine a steady flow of incompressible liquid through a pipe with no leaks. The volume entering each second must equal the volume leaving. That volume rate is cross-sectional area multiplied by average speed. If a section has half the area, the liquid must move twice as fast there to carry the same volume each second. -Now look at the second chart, which tracks the pressure drop between the wide and narrow points. Shrink A₂ further and the marked point on that chart climbs steeply: the faster water at the narrow point pushes with noticeably less pressure than the slower water upstream. Widen A₂ past A₁ instead, and the flow there slows down below the upstream speed, so the "drop" turns negative — the pressure there is actually higher. +Continuity gives the speed relation. To find a pressure difference, we need an energy model as well. For steady flow with negligible friction, no pump or turbine between the sections, equal height and approximately uniform section speeds, Bernoulli's equation relates increased speed to lower static pressure. This is a comparison along the same flow, not a rule that every faster fluid anywhere has lower pressure. The 3D pipe illustrates the area change; the lower chart calculates the pressure difference. ## Formal -Continuity for an incompressible fluid: $A_1 v_1 = A_2 v_2$, so the same mass flow rate passes every cross-section of the pipe each second. +For steady incompressible flow, $Q=A_1v_1=A_2v_2$, so $v_2=v_1A_1/A_2$. The area ratio is dimensionless; both areas must use the same unit. Here the controls use cm² and speeds use m/s. To express Q in m³/s, convert with $1\ \mathrm{cm^2}=10^{-4}\ \mathrm{m^2}$. -Bernoulli's equation then converts that speed change into a pressure change: $\Delta p = p_1 - p_2 = \tfrac12\rho\left(v_2^2 - v_1^2\right)$, so any point where the flow is faster is a point where the pressure is lower. +Under the stated ideal-flow assumptions at equal height, $p_1+\tfrac12\rho v_1^2=p_2+\tfrac12\rho v_2^2$. Thus $\Delta p=p_1-p_2=\tfrac12\rho(v_2^2-v_1^2)$. The pressure chart fixes $\rho=1000\ \mathrm{kg/m^3}$ and displays kPa. A positive Δp means lower static pressure at section 2; a negative value means higher pressure there. ## Advanced -This is exactly the physics behind the separate 'bernoulli' lesson's venturi tube, here reframed with the downstream area itself as the dragged variable: continuity fixes how fast the fluid must be moving at each cross-section, and Bernoulli's equation is nothing more than energy conservation converting that required kinetic energy into a matching pressure change along the streamline. +At unequal heights, include the gravitational term ρgz. Viscous losses, pumps and turbines require additional energy terms, and nonuniform velocity profiles can require corrections. Narrowing a real outlet may also change the overall flow rate because the supply pressure and pipe resistance determine it. Here v₁ and A₁ remain fixed, so changing A₂ preserves the specified flow rate by construction. ## Derivation -1. Mass conservation for a steady, incompressible flow requires the same mass flow rate through every cross-section. -2. Bernoulli's equation along the streamline (steady, inviscid, no elevation change) links pressure and speed at the two points. -3. Subtracting the two speed terms gives the pressure drop directly from the upstream speed and the ratio of the two areas. +1. Equate the mass passing both sections per second. The constant density cancels, leaving equal volume flow rates. +2. Apply the ideal Bernoulli energy balance between the two equal-height sections along the flow. +3. Rearrange to obtain p₁−p₂, then use the continuity relation for v₂. ## Real world -### The garden hose thumb trick -Partly covering the end of a hose shrinks its effective area, so by continuity the water must shoot out faster — exactly this relationship, applied by hand. +### Flow measurement -### Fire hose nozzles -A firefighting nozzle narrows sharply on purpose, converting a modest flow inside the hose into a fast, far-reaching jet at the tip. +A narrowed section can produce a measurable pressure difference related to flow rate. Practical instruments need calibration and corrections for departures from the ideal model. -### Lift on an airplane wing -An airfoil accelerates air over its curved upper surface, and the resulting pressure drop is the same Bernoulli link explored in depth in the 'bernoulli' lesson. +### Comparing pipe sections -### Blood flow through a narrowed artery -A partial blockage narrows an artery's cross-section, so blood speeds up through it and the local pressure drops — a mechanism doctors watch for in stenosis. +A speed measurement and area at one section can estimate average speed at another for steady incompressible flow without leaks. Pressure needs the extra energy assumptions; continuity alone does not determine it. diff --git a/content/lessons/physics/bernoulli-and-flow-rate/lesson.yaml b/content/lessons/physics/bernoulli-and-flow-rate/lesson.yaml index 8e657fdc..229de5a9 100644 --- a/content/lessons/physics/bernoulli-and-flow-rate/lesson.yaml +++ b/content/lessons/physics/bernoulli-and-flow-rate/lesson.yaml @@ -34,16 +34,19 @@ parameters: max: 5 step: 0.1 value: 2 + unit: m/s A1: min: 2 max: 10 step: 0.5 value: 6 + unit: cm² x: min: 0.5 max: 10 step: 0.1 value: 3 + unit: cm² variables: - A_1, A_2 - v_1, v_2 diff --git a/content/lessons/physics/buoyancy-archimedes/ar.md b/content/lessons/physics/buoyancy-archimedes/ar.md index b901e1ef..6b8e041c 100644 --- a/content/lessons/physics/buoyancy-archimedes/ar.md +++ b/content/lessons/physics/buoyancy-archimedes/ar.md @@ -1,67 +1,62 @@ --- title: الطفو ومبدأ أرخميدس -summary: >- - لماذا تطفو سفينة من الفولاذ وتغرق عملة من الفولاذ؟ ولماذا تطفو أسهل في ماء البحر؟ +summary: 'قارن وزن الجسم بوزن المائع الذي يزيحه لتعرف هل يطفو أم يغوص أم يتزن وهو مغمور.' parameters: - rhoObj: كثافة الجسم ρ_obj - rhoFluid: كثافة المائع ρ_fluid - V: حجم الجسم V + rhoObj: 'متوسط كثافة الجسم' + rhoFluid: 'كثافة المائع' + V: 'حجم الجسم الكلي' variables: - - قوة الطفو - - الحجم المغمور والحجم الكلي للجسم - - كثافة الجسم وكثافة المائع + - 'قوة إلى أعلى تساوي وزن المائع المزاح' + - 'الحجم المغمور والحجم الكلي للجسم' + - 'متوسط كثافة الجسم وكثافة المائع المحيط' --- ## Try it -1. راقب المكعب الجالس في خزان المائع. -2. حرّك «كثافة الجسم ρ_obj» إلى الأعلى. راقب المكعب يغرق أكثر حتى يصل إلى القاع. -3. ارفع الآن «كثافة المائع ρ_fluid» بدلًا منها. المكعب نفسه يطفو أعلى. +1. اجعل كثافة الجسم 600 kg/m³ وكثافة المائع 1000 kg/m³ والحجم 10 L. يطفو الجسم مع غمر 60% منه، ويبلغ كل من الوزن والطفو نحو 58.9 N. +2. ثبّت المائع والحجم وارفع كثافة الجسم إلى 1200 kg/m³. قوة الطفو عند الغمر الكامل 98.1 N فقط، وهي أقل من الوزن 117.7 N، فيغوص الجسم إلى القاع المرسوم. +3. أعد كثافة الجسم إلى 600 kg/m³ وارفع كثافة المائع إلى 1200 kg/m³. يصبح نصف الحجم مغمورًا. السحب الرأسي يغيّر كثافة الجسم، ولا يطبق قوة دفع مستقلة عليه. ## Real-life examples -1. **مكعب ثلج في كوب ماء.** كثافة الثلج (920 kg/m³) أقل قليلًا من كثافة الماء (1000 kg/m³)، فيطفو مع غمر معظم حجمه البالغ 20 لترًا. -2. **فلّينة تطفو في الماء.** كثافة الفلّين (240 kg/m³) أقل بكثير من كثافة الماء، فتطفو فلّينة حجمها 5 لترات ومعظمها فوق السطح. -3. **صخرة تسقط في بركة.** بكثافة 2500 kg/m³، وهي أعلى من كثافة الماء البالغة 1000 kg/m³، تغرق صخرة حجمها 10 لترات مباشرة إلى القاع. +1. **كتلة شبيهة بالجليد.** جسم حجمه 20 L ومتوسط كثافته 920 kg/m³ في مائع كثافته 1000 kg/m³ يطفو مع غمر 92% منه، أي 18.4 L. يبلغ الوزن والطفو نحو 180.5 N. +2. **كتلة شبيهة بالفلين.** عند كثافة جسم 240 kg/m³ وكثافة مائع 1000 kg/m³ وحجم 5 L، يُغمر 24%، أي 1.2 L. تبلغ كل من القوتين نحو 11.8 N. +3. **جسم كثيف.** عند كثافة 2500 kg/m³ وحجم 10 L في مائع كثافته 1000 kg/m³، يبلغ الوزن نحو 245.3 N والطفو عند الغمر الكامل 98.1 N. لا يستطيع الجسم الطفو الحر عند السطح في هذا النموذج. ## Test yourself -1. اجعل الجسم يطفو مع غمر نصف حجمه بالضبط. -2. اجعل الجسم أكثف بما يكفي ليغرق تمامًا إلى القاع. -3. جِد كثافة مائع وحجمًا يعطيان قوة طفو مقدارها 150 N عندما يكون الجسم مغمورًا بالكامل. +1. اجعل الجسم يطفو مع غمر نصف حجمه. +2. اجعل كثافة الجسم أكبر من كثافة المائع حتى يغوص. +3. اختر كثافة المائع وحجم الجسم الكلي بحيث تبلغ قوة الطفو عند الغمر الكامل نحو 150 N. يفحص التحدي أقصى حجم مزاح، حتى لو كان الجسم الحالي يطفو مغمورًا جزئيًا فقط. ## Intuition -تخيل مكعب ثلج حجمه 20 لترًا وكثافته 920 كجم/م³ يطفو في خزان ماء كثافته 1000 كجم/م³. حرّك المكعب أعلى أو أسفل وراقب مؤشر الكثافة يتغيّر. اسحبه نحو القاع فترتفع «كثافة الجسم»، وحين تتجاوز كثافة الماء يغرق المكعب إلى القاع تمامًا بدل أن يستقر في منتصف الطريق. +يزداد ضغط المائع مع العمق. لذلك يكون الأثر الصافي لقوى الضغط على الجسم المغمور إلى أعلى؛ وهذه قوة الطفو. يساوي مقدارها وزن المائع الذي أزاحه الجزء المغمور. أما وزن الجسم نفسه فيعتمد على كتلته كلها، لا على الجزء الموجود تحت السطح فقط. -راقب السهمين على المكعب. السهم الهابط هو وزنه، ويحدده كثافته وحجمه فقط. السهم الصاعد هو قوة الطفو، وتزداد كلما غمر جزء أكبر منه تحت السطح. يستقر المكعب دائمًا حيث يتوازن السهمان بالضبط. ارفع الآن «كثافة المائع ρ_fluid» نحو شيء كثيف كالشراب. يرتفع المكعب العائم بشكل ملحوظ، لأن جزءًا أقل منه يكفي ليزيح وزنًا مساويًا من المائع الأثقل. +يستقر الجسم الطافي بحرية عند حجم مغمور تتساوى فيه قوة الطفو مع وزنه. وقد يحتاج جسم أكثف إلى حجم مزاح أكبر من حجمه كله، فيغوص. عند القاع المرسوم يجب أن توازن قوة دعم ما تبقى من الوزن؛ لذلك لا يشكل سهما الوزن والطفو وحدهما رسمًا كاملًا للقوى هناك. ويفترض حساب الطفو وصول المائع إلى أسفل الجسم. ## Formal -مبدأ أرخميدس: تساوي قوة الطفو على جسم مغمور أو عائم وزن المائع الذي يزيحه، $F_b = \rho_{fluid} V_{sub}\,g$. +في مائع ساكن منتظم الكثافة، تكون قوة الطفو $F_b=\rho_fV_{\mathrm{sub}}g$. ولجسم متوسط كثافته ρₒ وحجمه الكلي V، يكون الوزن $W=\rho_oVg$. نستخدم المتر المكعب في هاتين الصيغتين؛ إذ $1\ \mathrm{L}=0.001\ \mathrm{m^3}$. -عند اتزان جسم عائم، توازن قوة الطفو الوزن تمامًا، وهذا يحدد الكسر المغمور: $V_{sub}/V = \rho_{obj}/\rho_{fluid}$، بمعزل عن شكل الجسم. +للاتزان الطافي الحر دون قوى رأسية أخرى، تكون $V_{\mathrm{sub}}/V=\rho_o/\rho_f$. إذا كان $\rho_o<\rho_f$، أمكن أن يطفو الجسم مغمورًا جزئيًا. وإذا كان $\rho_o=\rho_f$، اتزن وهو مغمور بالكامل، دون أن يلزم عمق معين. أما إذا كان $\rho_o>\rho_f$، فلا تكفي قوة الطفو وحدها لحمله. ## Advanced -كثافة الجسم *المتوسطة* هي وحدها ما يهم. لهذا تطفو سفينة فولاذية رغم أن الفولاذ نفسه أكثف من الماء بنحو ثماني مرات، فجسم السفينة يحيط بهواء كافٍ يجعل كثافتها المتوسطة، بجسمها وحمولتها وهوائها، أقل من كثافة الماء. تستغل الغواصات المبدأ نفسه بالعكس، فتملأ خزانات الاتزان أو تفرغها لضبط كثافتها المتوسطة فوق كثافة الماء أو تحتها أو مساوية لها بالضبط. +تحدد نسبة الكثافتين نسبة الحجم المغمور، لا نسبة الارتفاع المغمور بالضرورة لجسم غير منتظم. كما أنها لا تحدد استقرار الجسم ضد الانقلاب. قد يطفو جسم مجوف مغلق لأن متوسط كثافته يشمل الفراغ المحصور، وقد يغيّر دخول المائع هذا المتوسط. حجم الخزان وتغير منسوب الماء في العرض الثلاثي محجمان بصريًا، لذلك نعتمد القراءات العددية للقوى والنسب عند المقارنة الكمية. ## Derivation -1. ينص مبدأ أرخميدس على قوة الطفو مباشرة: وزن المائع الذي يزيحه الحجم المغمور. -2. يعتمد وزن الجسم نفسه على كثافته وحجمه الكلي، لا على الجزء المغمور فقط. -3. مساواة هاتين القوتين عند الاتزان وحل المعادلة يعطي الكسر المغمور كنسبة بسيطة بين الكثافتين. +1. نستخدم مبدأ أرخميدس: قوة الطفو إلى أعلى تساوي وزن المائع المزاح. +2. نحسب وزن الجسم من متوسط كثافته وحجمه الكلي. +3. للجسم الطافي بحرية نساوي الطفو بالوزن، ثم نحسب نسبة الحجم المغمور. لا يمكن تحقيق هذا الاتزان إلا إذا لم تتجاوز النسبة واحدًا. ## Real world -### السفن وهياكل القوارب -جسم فولاذي مصمم ليحيط بحجم كبير من الهواء له كثافة متوسطة منخفضة بما يكفي ليطفو، رغم أن الفولاذ الصلب كان سيغرق فورًا. +### أجسام مجوفة طافية -### البحر الميت -ماؤه مالح لدرجة أن $\rho_{fluid}$ فيه أعلى بكثير من ماء البحر العادي، فيطفو السبّاحون وجزء أكبر بكثير من أجسادهم فوق السطح مما هو معتاد. +يمكن لجسم مصنوع من مادة كثيفة أن يطفو إذا كان حجمه الخارجي المحكم كافيًا بالنسبة إلى كتلته الكلية. كثافة المادة وحدها ليست متوسط كثافة الجسم. -### المناطيد الهوائية الساخنة -تسخين الهواء داخل المنطاد يخفض كثافته دون كثافة الهواء البارد المحيط، فيُدفع المنطاد وسلته إلى الأعلى. +### مقارنة مائعين -### جبال الجليد -الجليد أقل كثافة من ماء البحر بقليل فقط، فنحو عُشر حجم جبل الجليد يقع فوق السطح والباقي مختبئ تحته. +عند ثبات كتلة الجسم، يحتاج المائع الأكثف إلى حجم مزاح أقل لحمله. وهذا يغيّر مقدار الجزء الموجود تحت السطح في جسم طافٍ. diff --git a/content/lessons/physics/buoyancy-archimedes/en.md b/content/lessons/physics/buoyancy-archimedes/en.md index 09d7a99d..882f0cab 100644 --- a/content/lessons/physics/buoyancy-archimedes/en.md +++ b/content/lessons/physics/buoyancy-archimedes/en.md @@ -1,68 +1,62 @@ --- title: Buoyancy and Archimedes' principle -summary: >- - This is why a steel ship floats but a steel coin sinks, and why you float - more easily in salty seawater than in a swimming pool. +summary: 'Compare an object’s weight with the weight of fluid it displaces to predict floating, sinking or neutral buoyancy.' parameters: - rhoObj: object density ρ_obj - rhoFluid: fluid density ρ_fluid - V: object volume V + rhoObj: 'average object density' + rhoFluid: 'fluid density' + V: 'total object volume' variables: - - buoyant force - - submerged volume and total object volume - - object density and fluid density + - 'upward force equal to the displaced fluid’s weight' + - 'immersed volume and total object volume' + - 'average object density and surrounding fluid density' --- ## Try it -1. Watch the block sitting in the tank of fluid. -2. Drag "object density ρ_obj" up. Watch the block sink lower until it drops to the floor. -3. Now raise "fluid density ρ_fluid" instead. The same block floats higher. +1. Set object density to 600 kg/m³, fluid density to 1000 kg/m³ and volume to 10 L. The object floats with 60% submerged; weight and buoyancy are both about 58.9 N. +2. Keep the fluid and volume fixed and raise object density to 1200 kg/m³. Fully submerged buoyancy is only 98.1 N, less than the weight 117.7 N, so the object sinks to the illustrated floor. +3. Restore object density to 600 kg/m³ and raise fluid density to 1200 kg/m³. Half the volume is now submerged. Dragging vertically changes object density; it does not apply a separate pushing force. ## Real-life examples -1. **An ice cube in a glass of water.** Ice (920 kg/m³) is only slightly less dense than water (1000 kg/m³), so it floats with most of its 20 L volume submerged. -2. **A cork bobbing in water.** Cork (240 kg/m³) is far less dense than water, so a 5 L cork rides mostly above the surface. -3. **A rock dropped in a pond.** At 2500 kg/m³, denser than the 1000 kg/m³ water, a 10 L rock sinks straight to the bottom. +1. **An ice-like block.** A 20 L block of average density 920 kg/m³ in fluid of density 1000 kg/m³ floats with 92%, or 18.4 L, submerged. Its weight and buoyancy are about 180.5 N. +2. **A cork-like block.** At object density 240 kg/m³, fluid density 1000 kg/m³ and volume 5 L, 24%, or 1.2 L, is submerged. Both forces are about 11.8 N. +3. **A dense block.** At 2500 kg/m³ with volume 10 L in fluid of density 1000 kg/m³, weight is about 245.3 N and fully submerged buoyancy 98.1 N. It cannot float freely at the surface under this model. ## Test yourself -1. Make the object float with exactly half its volume submerged. -2. Make the object dense enough to sink completely to the bottom. -3. Find a fluid density and volume that give a buoyant force of 150 N when the object is fully submerged. +1. Make the object float with half its volume submerged. +2. Make object density greater than fluid density so the object sinks. +3. Choose fluid density and total object volume giving a fully submerged buoyancy near 150 N. This checks the maximum displaced volume, even if the current object floats only partly submerged. ## Intuition -Picture a 20-litre block of ice, density 920 kg/m³, floating in a tank of water, density 1000 kg/m³. Drag the block up or down and watch the density readout change: pull it toward the bottom and "object density" rises, and once it passes the fluid's density the block sinks all the way to the floor instead of settling partway down. +Fluid pressure is greater at greater depth. For an immersed object, the resulting pressure forces have an upward net effect: buoyancy. Its magnitude equals the weight of the fluid displaced by the immersed part. The object's own weight depends on its total mass, not just the part below the surface. -Watch the two arrows on the block: the downward one is its weight, fixed by its own density and volume, and the upward one is the buoyant force, which grows only as more of the block is pushed under the surface. It always settles exactly where those two arrows balance. Now raise "fluid density ρ_fluid" toward something as thick as syrup: the same floating block rides noticeably higher, because less of it needs to go underwater to push aside an equal weight of the heavier fluid. +A freely floating object settles at a submerged volume for which buoyancy equals its weight. A denser object may need more displacement than its entire volume can provide, so it sinks. At the illustrated floor, a support force must balance the remaining weight; the displayed weight and buoyancy arrows are not the full force diagram there. The model assumes fluid access beneath the object when calculating submerged buoyancy. ## Formal -Archimedes' principle: the buoyant force on a submerged or floating object equals the weight of the fluid it displaces, $F_b = \rho_{fluid} V_{sub}\,g$. +In a uniform fluid at rest, buoyancy is $F_b=\rho_fV_{\mathrm{sub}}g$. For an object of average density ρₒ and total volume V, its weight is $W=\rho_oVg$. Use cubic metres in these formulas; $1\ \mathrm{L}=0.001\ \mathrm{m^3}$. -For a floating object at equilibrium, buoyancy exactly balances weight, which pins down the submerged fraction: $V_{sub}/V = \rho_{obj}/\rho_{fluid}$, independent of the object's shape. +For free floating equilibrium with no other vertical forces, $V_{\mathrm{sub}}/V=\rho_o/\rho_f$. If $\rho_o<\rho_f$, the object can float partly submerged. If $\rho_o=\rho_f$, it is neutrally buoyant when fully immersed and need not sit at one particular depth. If $\rho_o>\rho_f$, buoyancy alone cannot support it. ## Advanced -Because only the *average* density of the object matters, a steel ship floats even though steel itself is roughly eight times denser than water — the hull encloses enough air that the ship's average density, hull plus cargo plus air, stays below the water's. Submarines exploit the same principle in reverse, flooding or emptying ballast tanks to fine-tune their average density above, below, or exactly at the water's. +The density ratio determines the submerged volume fraction, not necessarily the submerged height fraction for an irregular shape. It also does not determine rotational stability. A sealed hollow object can float because its average density includes the enclosed space; admitting fluid can change that average. The 3D tank's volume and water-level changes are visually scaled, so the numerical force and fraction readouts are the quantitative reference. ## Derivation -1. Archimedes' principle states the buoyant force directly: the weight of the fluid displaced by the submerged volume. -2. The object's own weight depends on its own density and its full volume, not just the submerged part. -3. Setting those two forces equal at equilibrium and solving gives the submerged fraction as the simple ratio of the two densities. +1. Use Archimedes' principle: the upward buoyancy equals the weight of displaced fluid. +2. Calculate the object's weight from its average density and total volume. +3. For a freely floating object, set buoyancy equal to weight and solve for the submerged volume fraction. This balance is possible only when that fraction is at most one. ## Real world -### Ships and boat hulls -A steel hull shaped to enclose a large volume of air has a low enough average density to float, even though solid steel would sink instantly. +### Hollow floating objects -### The Dead Sea -Its water is so salty that $\rho_{fluid}$ is far above ordinary seawater, so swimmers float with much more of their body above the surface than usual. +An object made from a dense material can float if its watertight outer volume is large enough relative to its total mass. Material density alone is not the object's average density. -### Hot-air balloons -Heating the air inside the balloon lowers its density below that of the surrounding cooler air, so the balloon and its basket are buoyed upward. +### Comparing fluids -### Icebergs -Ice is only slightly less dense than seawater, so roughly ten percent of an iceberg's volume sits above the surface and the rest hides below. +At the same object mass, a denser fluid requires less displaced volume to support the object. This changes how much of a floating object lies below the surface. diff --git a/content/lessons/physics/circular-motion/ar.md b/content/lessons/physics/circular-motion/ar.md index 8c57d929..5831404a 100644 --- a/content/lessons/physics/circular-motion/ar.md +++ b/content/lessons/physics/circular-motion/ar.md @@ -1,14 +1,13 @@ --- title: التسارع المركزي -summary: >- - المنعطف الحاد والسريع يحتاج احتكاكًا أكبر بكثير من المنعطف الواسع البطيء. +summary: 'افهم كيف يتسارع جسم ثابت مقدار السرعة عندما يتغير اتجاه حركته على دائرة.' parameters: - rad: نصف القطر r - x: السرعة v + rad: 'r — نصف قطر الدائرة' + x: 'v — مقدار السرعة على الدائرة' variables: - - السرعة على طول المسار الدائري - - نصف قطر المسار الدائري - - التسارع المركزي، الموجَّه نحو المركز + - 'مقدار السرعة الثابت على المسار الدائري' + - 'نصف قطر الدائرة، وهو موجب' + - 'مركبة التسارع المتجهة نحو المركز' charts: - title: التسارع المركزي مقابل نصف القطر (توضيحي، v = 10 m/s) xLabel: نصف القطر r (m) @@ -19,54 +18,50 @@ charts: ## Try it -1. راقب الكرة تتحرك حول المسار الدائري. -2. حرّك المنزلق «السرعة v» إلى الأعلى. راقب القوة اللازمة نحو المركز تكبر. -3. حرّك الآن «نصف القطر r» إلى قيمة أصغر مع إبقاء السرعة ثابتة. السرعة نفسها على دائرة أضيق تحتاج قوة أكبر بكثير. +1. في العرض الثنائي، اجعل r = 5 m وv = 5 m/s. تعطي النقطة المختارة تسارعًا إلى المركز قدره 5 m/s². المحور الأفقي للسرعة، وليس للزمن. +2. ثبّت r وضاعف v إلى 10 m/s. يتضاعف التسارع أربع مرات ليصبح 20 m/s². ثم ضاعف r إلى 10 m؛ فينخفض التسارع إلى النصف، أي 10 m/s². +3. في العرض الثلاثي، قارن السهم المماس للدائرة بالسهم المتجه إلى داخلها. يمثلان السرعة المتجهة والتسارع المركزي. أطوالهما المعروضة محجمة ومحدودة، لذلك نستخدم الصيغة للمقادير الدقيقة. ## Real-life examples -1. **سيارة تأخذ منعطف طريق سريع.** بسرعة 8 m/s حول منعطف نصف قطره 20 m، تحتاج السيارة إلى تسارع مركزي مقداره 3.2 m/s²، يوفره احتكاك إطاراتها. -2. **عدّاء في منعطف مضمار.** الجري بسرعة 5 m/s حول منعطف نصف قطره 10 m يتطلب 2.5 m/s² نحو المركز، ولهذا يميل العدّاؤون إلى الداخل في المنعطفات. -3. **كرة على خيط تُدار بسرعة.** خيط طوله 1 m تتحرك عليه الكرة بسرعة 6 m/s يحتاج قوة هائلة مقدارها 36 m/s²، ولهذا يزداد شد الخيط كثيرًا عندما تديرها أسرع. +1. **مسار دائري واسع.** عند سرعة 8 m/s ونصف قطر 20 m، يكون التسارع إلى المركز 3.2 m/s². +2. **دائرة أصغر.** عند 5 m/s ونصف قطر 10 m، يكون التسارع 2.5 m/s². يحتاج جسم كتلته 2 kg إلى محصلة قوة للداخل قدرها 5 N. +3. **دائرة ضيقة.** عند 6 m/s ونصف قطر 1 m، يكون التسارع 36 m/s². هذه قيمة تسارع، لا قوة بالنيوتن؛ نضربها في الكتلة لإيجاد محصلة القوة المطلوبة إلى الداخل. ## Test yourself -1. اجعل التسارع المركزي 5 m/s² بالضبط. -2. أبقِ نصف القطر عند 10 m وجِد السرعة التي تعطي تسارعًا مركزيًا قدره 2 m/s². -3. جِد نصف قطر وسرعة يعطيان تسارعًا مركزيًا قدره 50 m/s²، وهو المستوى الذي تشعر به في لعبة ملاهٍ سريعة. +1. اجعل التسارع المركزي قريبًا من 5 m/s². +2. أبقِ نصف القطر قريبًا من 10 m، واجعل التسارع المركزي لا يبتعد عن 2 m/s² بأكثر من 0.2 m/s². +3. اجعل التسارع المركزي قريبًا من 50 m/s². هذه القيمة أعلى من نطاق الارتفاع الظاهر في الرسم الثنائي، لذلك استخدم القراءة العددية. ## Intuition -تخيل سيارة تأخذ منعطف طريق سريع نصف قطره 20 مترًا بسرعة 8 أمتار في الثانية. تحتاج إلى تسارع جانبي نحو المركز مقداره 3.2 متر في الثانية المربعة فقط لتبقى على الطريق، ويوفر احتكاك الإطارات بالإسفلت القوة اللازمة له. حرّك المنزلق «السرعة v» إلى الأعلى على المنحنى الرئيسي، فيميل بحدة إلى الأعلى، لأن مضاعفة السرعة لا تضاعف القوة اللازمة فقط، بل تجعلها أربعة أضعاف. +يغيّر الجسم المتحرك على دائرة اتجاهه في كل لحظة. حتى لو ثبت مقدار سرعته، تتغير سرعته المتجهة لأنها تشمل الاتجاه أيضًا. يصف التسارع هذا التغير. في الحركة الدائرية المنتظمة يتجه التسارع نحو المركز، بينما تتجه السرعة على المماس. -انظر الآن إلى المخطط الذي يبقي السرعة ثابتة ويغيّر نصف القطر بدلًا منها، فينخفض بسرعة في البداية ثم يتسطح. منعطف حاد بنصف قطر صغير عند سرعة معينة يتطلب قوة نحو المركز أكبر بكثير من منعطف عريض وواسع، وهذا سبب تباطؤ سيارات السباق كثيرًا في المنعطفات الحادة مقارنة بالمنعطفات اللطيفة. +يحتاج الجسم الأسرع إلى تغيير اتجاه سرعته بمعدل أكبر كي يتبع الدائرة نفسها. عند ثبات نصف القطر، تتطلب مضاعفة السرعة أربعة أمثال التسارع إلى الداخل. أما الدائرة الأكبر فتغيّر الاتجاه بصورة أبطأ؛ وعند ثبات السرعة تؤدي مضاعفة نصف القطر إلى خفض التسارع إلى النصف. يوضح الرسم السفلي علاقة التسارع بنصف القطر عند سرعة ثابتة 10 m/s، مستقلة عن متحكم السرعة الرئيسي. ## Formal -$a_c = v^2/r$، وهو موجَّه نحو مركز المسار الدائري حتى مع ثبات السرعة، لأن اتجاه السرعة يتغيّر باستمرار. +في حركة دائرية منتظمة بنصف قطر $r>0$ وسرعة v، يكون مقدار التسارع المركزي $a_c=v^2/r$ واتجاهه نحو المركز. محصلة القوة المطلوبة إلى الداخل لكتلة m هي $F_c=mv^2/r$. كلمة «مركزي» تصف اتجاه القوة ودورها، ولا تشير إلى نوع جديد من القوى. -$\dfrac{\partial a_c}{\partial v} = 2v/r$ (نمو تربيعي مع تزايد السرعة) مقابل $\dfrac{\partial a_c}{\partial r} = -v^2/r^2$ (تناقص عكسي تربيعي مع نصف القطر). +تتحقق العلاقة $\omega=v/r$ للسرعة الزاوية، ولذلك $a_c=\omega^2r$. عند ثبات v يتناسب التسارع عكسيًا مع r، وعند ثبات ω يتناسب طرديًا مع r. المقارنتان مختلفتان، لأن تغيير r مع ثبات ω يغيّر v أيضًا. ## Advanced -ينتج هذا من اشتقاق متجه وحدة دوّار. بالنسبة إلى $\mathbf r(t) = r(\cos\omega t, \sin\omega t)$، نجد $\ddot{\mathbf r} = -\omega^2 \mathbf r$، وبمقدار $\omega^2 r = v^2/r$ باستخدام $v=\omega r$. أي أن التسارع مضاد الاتجاه للموضع، فيشير نحو المركز، وذلك فقط من هندسة الدوران المنتظم، من دون الحاجة إلى افتراض أي قوة باسمها. +إذا تغير مقدار السرعة مع بقاء المسار دائريًا، يظهر تسارع مماسي dv/dt أيضًا. تبقى المركبة الشعاعية v²/r، لكن التسارع الكلي لا يتجه إلى المركز وحده. ميل المماس في الرسم الثنائي للتسارع مقابل السرعة هو 2v/r؛ فهو يقيس تغير التسارع المركزي المطلوب مع السرعة، لا تغير التسارع مع الزمن. ## Derivation -1. الموضع على دائرة نصف قطرها $r$ بسرعة زاوية $\omega$. -2. السرعة مماسة للدائرة وذات مقدار ثابت $v = r\omega$. -3. يشير التسارع إلى الداخل (نحو المركز) بهذا المقدار. +1. نصف دائرة مركزها الأصل باستخدام الجيب وجيب التمام وسرعة زاوية ثابتة. +2. نشتق الموضع، فنحصل على سرعة مماسة للدائرة مقدارها rω. +3. نشتق مرة أخرى، فيكون التسارع عكس متجه نصف القطر. نعوض ω بـv/r لنحصل على المقدار v²/r. ## Real world -### حلقات الملاهي (الأفعوانية) -يُصمَّم نصف قطر الحلقة والسرعة معًا كي يشعر الراكبون بتسارع مركزي آمن ومحتمل. +### مسار دائري مقيد -### ميلان منحنيات الطرق -تُمال منحنيات الطرق السريعة بحسب السرعة المتوقعة ونصف القطر لإبقاء القوة المركزية اللازمة ضمن حدود احتكاك الإطارات. +قد يوفر مسار أو شد أو مجموعة قوى تماس محصلة القوة إلى الداخل. تحديد القوى الفعلية خطوة مستقلة عن حساب التسارع المطلوب. -### مدارات الأقمار الصناعية -توفر الجاذبية بالضبط التسارع المركزي اللازم لإبقاء القمر الصناعي في مدار دائري عند نصف قطر وسرعة معينين. +### مدار دائري -### أجهزة الطرد المركزي -تُدوِّر أجهزة الطرد المركزي المخبرية العينات عند نصف قطر صغير لكن بسرعة عالية جدًا للوصول إلى تسارعات مركزية هائلة. +يمكن أن توفر الجاذبية التسارع المركزي لمدار دائري. يجب أن تتوافق السرعة المدارية مع الجاذبية عند ذلك البعد؛ فاختيار أي سرعة وأي نصف قطر لا يعطي مدارًا دائريًا بفعل الجاذبية. diff --git a/content/lessons/physics/circular-motion/en.md b/content/lessons/physics/circular-motion/en.md index 2a5b4d0f..34b64f3a 100644 --- a/content/lessons/physics/circular-motion/en.md +++ b/content/lessons/physics/circular-motion/en.md @@ -1,16 +1,13 @@ --- title: Centripetal acceleration -summary: >- - This is why cars need much more grip to take a tight, fast turn than a - wide, slow one, and why centrifuges spin samples so violently to separate - them. +summary: 'Explain how an object can accelerate at constant speed because its direction changes along a circle.' parameters: - rad: radius r - x: speed v + rad: 'r — circle radius' + x: 'v — speed along the circle' variables: - - speed along the circular path - - radius of the circular path - - 'centripetal acceleration, directed toward the center' + - 'constant speed along the circular path' + - 'positive radius of the circle' + - 'acceleration component directed toward the centre' charts: - title: 'Centripetal acceleration vs radius (illustrative, v = 10 m/s)' xLabel: radius r (m) @@ -21,54 +18,50 @@ charts: ## Try it -1. Watch the ball moving around the circular path. -2. Drag the slider "speed v" up. Watch the required pull toward the center grow. -3. Now drag "radius r" smaller instead, keeping speed the same. The same speed around a tighter circle needs a much bigger pull. +1. In the 2D view, set r = 5 m and v = 5 m/s. The selected point gives inward acceleration 5 m/s². The horizontal axis is speed, not time. +2. Keep r fixed and double v to 10 m/s. Acceleration quadruples to 20 m/s². Now double r to 10 m; acceleration halves to 10 m/s². +3. In 3D, compare the arrow tangent to the circle with the arrow pointing inward. They represent velocity and centripetal acceleration. Their displayed lengths are scaled and capped, so use the formula for exact magnitudes. ## Real-life examples -1. **A car rounding a highway curve.** At 8 m/s around a 20 m-radius bend, the car needs 3.2 m/s² of centripetal acceleration — provided by the grip of its tires. -2. **A runner on a track bend.** Sprinting at 5 m/s around a 10 m radius curve requires 2.5 m/s² toward the center, which is why runners lean inward on bends. -3. **A ball on a string swung fast.** A 1 m string with the ball moving at 6 m/s needs a huge 36 m/s² pull, which is why the string tension shoots up when you swing faster. +1. **A wide circular path.** At 8 m/s around a circle of radius 20 m, inward acceleration is 3.2 m/s². +2. **A smaller circle.** At 5 m/s and radius 10 m, inward acceleration is 2.5 m/s². An object of mass 2 kg would need a net inward force of 5 N. +3. **A tight circle.** At 6 m/s and radius 1 m, inward acceleration is 36 m/s². This is an acceleration, not a force in newtons; multiply by mass to find the required net inward force. ## Test yourself -1. Make the centripetal acceleration exactly 5 m/s². -2. Keep the radius at 10 m and find the speed that gives a centripetal acceleration of 2 m/s². -3. Find a radius and speed that produce a centripetal acceleration of 50 m/s² — the kind felt on a fast fairground ride. +1. Make centripetal acceleration approximately 5 m/s². +2. Keep radius near 10 m and make centripetal acceleration within 0.2 m/s² of 2 m/s². +3. Make centripetal acceleration approximately 50 m/s². This is above the 2D plot's displayed height range, so use the numerical readout. ## Intuition -Picture a car taking a highway curve of radius 20 m at 8 m/s: it needs 3.2 metres per second squared of sideways pull toward the center just to stay on the road, provided by the grip between its tires and the asphalt. Drag the slider "speed v" upward on the main curve: it bends up steeply, because doubling the speed doesn't just double the needed pull, it quadruples it. +An object moving around a circle changes direction at every instant. Even if its speed stays the same, its velocity changes because velocity includes direction. Acceleration describes this change. For uniform circular motion it points toward the centre, while velocity points along the tangent. -Now look at the chart instead, which holds speed fixed and varies the radius: it falls fast at first, then flattens out. A tight turn — a small radius — at a given speed demands far more pull toward the center than a wide, sweeping one, which is why racing cars slow down so much more for hairpin bends than for gentle curves. +A faster object must change its velocity direction more quickly to follow the same circle. At fixed radius, doubling speed requires four times the inward acceleration. A larger circle turns the direction more gradually; at fixed speed, doubling radius halves the acceleration. The lower chart illustrates the radius relationship with speed fixed at 10 m/s, independently of the main speed control. ## Formal -$a_c = v^2/r$, directed toward the center of the circular path even though speed is constant, because velocity's direction is continuously changing. +For uniform circular motion of radius $r>0$ and speed v, the centripetal acceleration has magnitude $a_c=v^2/r$ and points toward the centre. The net inward force required for mass m is $F_c=mv^2/r$. “Centripetal” describes its direction and role, not a new type of force. -$\dfrac{\partial a_c}{\partial v} = 2v/r$ (quadratic growth with speed) versus $\dfrac{\partial a_c}{\partial r} = -v^2/r^2$ (inverse-square decay with radius). +Angular speed satisfies $\omega=v/r$, so $a_c=\omega^2r$. When v is fixed, acceleration is inversely proportional to r; when ω is fixed, it is proportional to r. These are different comparisons because changing r at fixed ω also changes v. ## Advanced -This follows from differentiating a rotating unit vector: for $\mathbf r(t) = r(\cos\omega t, \sin\omega t)$, $\ddot{\mathbf r} = -\omega^2 \mathbf r$, magnitude $\omega^2 r = v^2/r$ using $v=\omega r$ — acceleration is anti-parallel to position, i.e. pointing at the center, purely from the geometry of uniform rotation, with no need to invoke any force by name. +If speed changes while the path remains circular, there is also tangential acceleration dv/dt. The radial component is still v²/r, but total acceleration is no longer purely inward. The tangent slope on the 2D acceleration-versus-speed graph is 2v/r: it measures how the required centripetal acceleration changes with speed, not how acceleration changes over time. ## Derivation -1. Position on a circle of radius $r$ with angular speed $\omega$. -2. Velocity is tangent to the circle with constant magnitude $v = r\omega$. -3. Acceleration points inward (toward the center) with this magnitude. +1. Describe a circle centred at the origin using sine and cosine with constant angular speed. +2. Differentiate position. Velocity is tangent to the circle and has magnitude rω. +3. Differentiate again. Acceleration is opposite the radius vector; replacing ω by v/r gives magnitude v²/r. ## Real world -### Roller coaster loops -Loop radius and speed are engineered together so riders experience a safe, tolerable centripetal acceleration. +### A guided circular path -### Road curve banking -Highway curves are banked based on expected speed and radius to keep required centripetal force within tire friction limits. +A track, tension or a combination of contact forces can provide the net inward force. Identifying the actual forces is a separate step from calculating the required acceleration. -### Satellite orbits -Gravity supplies exactly the centripetal acceleration needed to keep a satellite in a circular orbit at a given radius and speed. +### Circular orbits -### Centrifuges -Laboratory centrifuges spin samples at small radius but very high speed to reach enormous centripetal accelerations. +Gravity can supply the centripetal acceleration for a circular orbit. The orbiting speed must match the gravitational acceleration at that radius; arbitrary speed and radius choices do not produce a circular gravitational orbit. diff --git a/content/lessons/physics/friction-inclined-plane/ar.md b/content/lessons/physics/friction-inclined-plane/ar.md index ab56eb97..175a9a73 100644 --- a/content/lessons/physics/friction-inclined-plane/ar.md +++ b/content/lessons/physics/friction-inclined-plane/ar.md @@ -1,68 +1,61 @@ --- title: الاحتكاك على مستوى مائل -summary: >- - الحذاء المطاطي يثبت على المنحدر وينزلق على البلاط المبلل. هنا ترى متى يبدأ الانزلاق. +summary: 'حلّل قوة الجاذبية على سطح مائل، وميّز احتكاك الانزلاق عن الاحتكاك السكوني الذي قد يمنع بدء الحركة.' parameters: - mu: معامل الاحتكاك μ - x: زاوية الميل θ + mu: 'μ — معامل الاحتكاك المستخدم في النموذج' + x: 'θ — زاوية الميل فوق الأفقي' variables: - - زاوية الميل عن الأفق - - معامل الاحتكاك بين الجسم والسطح - - >- - التسارع الصافي على طول المنحدر نحو الأسفل (القيمة السالبة تعني أن الاحتكاك - يغلب، ويبقى الجسم ساكنًا) + - 'زاوية السطح المائل مقيسة من الأفقي' + - 'المعامل الحركي في الرسم، ويستخدم حدًا سكونيًا أيضًا في العرض الثلاثي' + - 'تسارع موقّع إلى أسفل لجسم ينزلق بالفعل إلى أسفل الميل' --- ## Try it -1. راقب المنحنى عند زاوية ميل صغيرة، إذ يقع تحت الصفر، ما يعني أن الجسم يبقى ساكنًا. -2. حرّك المنزلق «زاوية الميل θ» إلى الأعلى. راقب المنحنى يرتفع نحو الصفر ثم يقطعه. -3. ارفع الآن «معامل الاحتكاك μ». نقطة القطع، أي بداية الانزلاق، تنتقل إلى زاوية أكثر انحدارًا. +1. اجعل μ = 0.4 وθ = 30°. لجسم ينزلق بالفعل إلى أسفل السطح، تعطي الصيغة تسارعًا نحو 1.51 m/s² إلى أسفل الميل. +2. أبقِ μ = 0.4 وقلّل θ إلى 10°. تعطي الصيغة نحو −2.16 m/s²؛ أي إن الجسم المنزلق إلى أسفل يتباطأ. لا يعني ذلك أن جسمًا ساكنًا يتسارع إلى أعلى الميل. +3. ابحث عن الصفر قرب θ = 21.8°. يستخدم العرض الثلاثي μ أيضًا حدًا للاحتكاك السكوني، فيُبقي الجسم ساكنًا تحت هذه العتبة. مساواة المعاملين تبسيط في هذا العرض. ## Real-life examples -1. **زلاجة مدهونة بالشمع على ثلج مضغوط.** بمعامل احتكاك μ≈0.06 وميل لطيف 20°، لا يكاد الاحتكاك الضئيل يبطئ المتزلج، فيتسارع إلى الأسفل كأن المنحدر بلا احتكاك تقريبًا. -2. **صندوق خشبي على منحدر خشبي.** بمعامل μ=0.4 على منحدر 30°، يوازي الاحتكاك مركّبة الجاذبية تقريبًا، فيزحف الصندوق ببطء بدل أن ينزلق بسرعة. -3. **حذاء مطاطي على بلاط مبلل.** بمعامل μ=0.9 ينزلق الحذاء رغم ذلك على منحدر حاد 70°، إذ لا يستطيع تماسكه مجاراة ميل بهذه الحدة. +1. **معامل احتكاك صغير.** عند μ = 0.06 وθ = 20°، يبلغ تسارع الجسم المنزلق إلى أسفل نحو 2.80 m/s². القيمة موجبة، وليست حالة سكون. +2. **احتكاك متوسط.** عند μ = 0.4 وθ = 30°، يكون التسارع نحو 1.51 m/s². التسارع الموجب يعني زيادة السرعة إلى أسفل، ولا يعني بالضرورة حركة بطيئة. +3. **ميل شديد.** عند μ = 0.9 وθ = 70°، يكون التسارع نحو 6.20 m/s². هذه المعاملات مدخلات للنموذج، وليست قيمًا مقاسة مضمونة لمواد مسماة أو أسطح مبتلة. ## Test yourself -1. عند معامل احتكاك μ = 0.5، جِد زاوية الميل التي يكون عندها الصندوق على وشك الانزلاق بالضبط (التسارع = 0). -2. اجعل الصندوق يتسارع إلى أسفل المنحدر بمقدار 3 m/s² بالضبط. -3. اضبط الميل عند 45° وجِد معامل الاحتكاك الذي يبقى عنده الصندوق ساكنًا بالكاد. +1. اجعل μ = 0.5، وابحث عن زاوية تعطي تسارع انزلاق لا يبتعد عن الصفر بأكثر من 0.3 m/s². +2. اجعل التسارع المحسوب إلى أسفل قريبًا من 3 m/s². +3. اجعل θ = 45°، وابحث عن μ يعطي تسارعًا محسوبًا لا يبتعد عن الصفر بأكثر من 0.3 m/s². ## Intuition -تخيل صندوقًا خشبيًا على منحدر بزاوية 20° وسطح زلق مدهون بالشمع، معامل احتكاكه μ = 0.06. عند هذه الزاوية الصغيرة يقع المنحنى على الشاشة تحت الصفر، أي أن مركّبة الجاذبية على طول المنحدر أضعف مما يستطيع الاحتكاك مقاومته، فيبقى الصندوق ساكنًا. حرّك المنزلق «زاوية الميل θ» إلى الأعلى وراقب المنحنى يرتفع نحو الصفر. +تسحب الجاذبية الجسم رأسيًا، لكن السطح يقيد حركته في اتجاه الميل. مركبة الوزن إلى أسفل الميل هي mg sin θ، والقوة العمودية على السطح هي mg cos θ في هذا النموذج. إذا كان الجسم ينزلق إلى أسفل، يتجه الاحتكاك الحركي إلى أعلى، فيقلل محصلة القوة الهابطة. -النقطة التي يقطع عندها المنحنى الصفر هي الزاوية الحرجة، وبعدها يصبح المنحنى موجبًا ويتسارع الصندوق إلى أسفل المنحدر. ارفع الآن «معامل الاحتكاك μ» بدلًا من ذلك، إلى 0.9 مثلًا، وراقب نقطة العبور تنتقل إلى زاوية أكثر انحدارًا بكثير. سطح أكثر خشونة يمنحك ميلًا أكثر حدة قبل أن يبدأ أي انزلاق. +أما الجسم الساكن فحالته مختلفة. يتغير الاحتكاك السكوني ليوازن القوة الهابطة حتى قيمة قصوى، ولا يساوي هذه القيمة القصوى دائمًا. لذلك لا نفسر القيمة السالبة لصيغة الانزلاق بأنها تسارع إلى أعلى من السكون. يصف الرسم الثنائي جسمًا ينزلق إلى أسفل، ويضيف العرض الثلاثي شرط السكون باستخدام μ نفسه للاحتكاكين السكوني والحركي. ## Formal -على طول المنحدر، $ma = mg\sin\theta - \mu mg\cos\theta$، وهو ما يعطي $a(\theta) = g(\sin\theta - \mu\cos\theta)$، وهي مستقلة عن الكتلة. +لجسم ينزلق إلى أسفل سطح مائل ثابت، دون قوى مطبقة أخرى، تكون $N=mg\cos\theta$ و$f_k=\mu_kN$. باختيار اتجاه أسفل الميل موجبًا نحصل على $a=g(\sin\theta-\mu_k\cos\theta)$. يعطي المتحكم μ قيمة μₖ لهذا الحساب، ونستخدم $g=9.81\ \mathrm{m/s^2}$. -تحقق الزاوية الحرجة (زاوية بدء الانزلاق) الشرط $a=0$، أي $\tan\theta_c = \mu$، وهو قياس مباشر لمعامل الاحتكاك لا يعتمد على الكتلة. +للجسم الساكن ابتداءً، يستطيع الاحتكاك السكوني تثبيته عندما $mg\sin\theta\le\mu_smg\cos\theta$، أي $\tan\theta\le\mu_s$ لزاوية أقل من 90°. لا يلزم تساوي معاملي الاحتكاك السكوني والحركي. يحقق صفر صيغة الانزلاق $\tan\theta=\mu_k$، ولا يساوي عمومًا زاوية بدء انزلاق جسم ساكن. ## Advanced -هذا النمط في إيجاد الجذور مطابق لما ورد في دروس المعادلة الخطية وجذور المعادلة التربيعية. الحد الفيزيائي ذو المعنى (هنا بداية الانزلاق) هو بالضبط النقطة التي يقطع عندها التعبير الحاكم الصفر، ومشتقة $a(\theta)$ بالنسبة إلى $\theta$ تخبرك بمدى حساسية بداية الانزلاق لأي تغيّر في $\mu$ أو في الميل، وهذا مفيد لهندسة هوامش الأمان في المنحدرات والأسطح. +عندما يتوقف جسم كان ينزلق إلى أسفل، نعيد النظر في صيغة الاحتكاك الحركي. إذا بقي ساكنًا نستخدم الاحتكاك السكوني، وإذا تحرك إلى أعلى انعكس اتجاه الاحتكاك الحركي. تُختصر الكتلة من صيغة التسارع المبسطة لأن الوزن والاحتكاك كليهما يتناسبان معها. وقد تبطل قوى إضافية أو علاقة احتكاك متغيرة مع الظروف هذا الاختصار أو تقريب المعامل الثابت. ## Derivation -1. القوى على طول المنحدر هي مركّبة الجاذبية نحو أسفل المنحدر مطروحًا منها الاحتكاك. -2. يعاكس الاحتكاك الحركة، وهو متناسب مع القوة العمودية $N = mg\cos\theta$. -3. طبّق قانون نيوتن الثاني، فتُحذف الكتلة من الطرفين. +1. نختار أسفل الميل موجبًا، ونجمع مركبة الوزن والاحتكاك المعاكس على هذا الاتجاه. +2. أثناء الانزلاق إلى أسفل، يساوي مقدار الاحتكاك الحركي μ مضروبًا في القوة العمودية. ومع انعدام التسارع عموديًا على السطح، تكون N = mg cos θ. +3. نطبق Fnet = ma ونختصر الكتلة الموجبة، فنحصل على تسارع الانزلاق. ## Real world -### منحدرات الكراسي المتحركة وأكواد الأسطح -تحدد أكواد البناء أقصى زوايا ميل استنادًا إلى معاملات احتكاك مادة السطح المستخدمة. +### تجارب الانزلاق -### ثبات المركبة على المرتفعات -يجب أن يتغلب فرامل الوقوف بالضبط على هذا التوازن بين الاحتكاك والجاذبية على المنحدر. +نقيس الحركة على سطح مائل ثابت ونقارنها بالنموذج. نميّز زاوية بدء حركة جسم ساكن عن تسارعه بعد أن يبدأ الحركة. -### تصميم الناقلات والمزاريب -تُصمَّم المزاريب الصناعية بزاوية تتجاوز قليلًا الزاوية الحرجة للانزلاق كي تتدفق المواد بدلًا من أن تنحشر. +### قياس الاحتكاك -### الانهيارات الصخرية والثلجية -المنحدرات الطبيعية القريبة من زاوية الاحتكاك الحرجة معرضة لانهيارات مفاجئة عندما تُقلّل الرطوبة من $\mu$. +يعتمد المعامل على زوج السطحين وحالتهما. لا تكفي قيمة من هذا العرض وحده لتحديد مواصفات تصميم منحدر أو حذاء. diff --git a/content/lessons/physics/friction-inclined-plane/en.md b/content/lessons/physics/friction-inclined-plane/en.md index 3a15b627..ae74fe7a 100644 --- a/content/lessons/physics/friction-inclined-plane/en.md +++ b/content/lessons/physics/friction-inclined-plane/en.md @@ -1,67 +1,61 @@ --- title: Friction on an inclined plane -summary: >- - This is why a rubber-soled shoe grips a steep roof but slides on wet tile, - and how engineers pick safe ramp angles for wheelchairs and warehouses. +summary: 'Resolve gravity along a slope and distinguish sliding friction from the static friction that can hold an object at rest.' parameters: - mu: coefficient of friction μ - x: incline angle θ + mu: 'μ — friction coefficient used in the model' + x: 'θ — incline angle above horizontal' variables: - - angle of the incline from horizontal - - coefficient of friction between object and surface - - 'net acceleration down the slope (negative means friction wins, it stays put)' + - 'incline angle above the horizontal' + - 'kinetic coefficient in the graph; also used as static limit in 3D' + - 'signed downhill acceleration for a block already sliding downhill' --- ## Try it -1. Watch the curve at a shallow incline angle — it sits below zero, meaning the block stays put. -2. Drag the slider "incline angle θ" up. Watch the curve rise toward zero, then cross it. -3. Now raise "coefficient of friction μ". The crossing point, where sliding begins, moves to a steeper angle. +1. Set μ = 0.4 and θ = 30°. For a block already sliding down the incline, the formula gives about 1.51 m/s² down the slope. +2. Keep μ = 0.4 and reduce θ to 10°. The formula is about −2.16 m/s²: a down-sliding block would slow. It does not mean a stationary block accelerates uphill. +3. Find the zero near θ = 21.8°. The 3D illustration also uses μ as a static-friction limit and holds the block below this threshold. That equal-coefficient assumption is a simplification. ## Real-life examples -1. **A waxed ski on packed snow.** With μ≈0.06 and a gentle 20° slope, the tiny friction barely slows the skier — they accelerate down almost as if the slope were frictionless. -2. **A wooden crate on a wooden ramp.** With μ=0.4 on a 30° ramp, friction nearly matches gravity's pull, so the crate creeps down slowly instead of sliding fast. -3. **A rubber shoe on wet tile.** With μ=0.9 the shoe still slides on a steep 70° slope — its grip can't keep up with such a steep pitch. +1. **Small friction coefficient.** At μ = 0.06 and θ = 20°, the down-sliding acceleration is about 2.80 m/s², which is positive, not a stationary case. +2. **Intermediate friction.** At μ = 0.4 and θ = 30°, the acceleration is about 1.51 m/s². A positive acceleration means increasing downhill speed, not necessarily slow motion. +3. **Steep incline.** At μ = 0.9 and θ = 70°, the acceleration is about 6.20 m/s². These coefficients are model inputs, not measured values guaranteed for named materials or wet surfaces. ## Test yourself -1. With friction μ = 0.5, find the incline angle where the block is exactly on the verge of sliding (acceleration = 0). -2. Make the block accelerate down the slope at exactly 3 m/s². -3. Set the incline to 45° and find the friction coefficient where the block just barely stays still. +1. Set μ = 0.5 and find an angle giving a sliding-formula acceleration within 0.3 m/s² of zero. +2. Make the calculated downhill acceleration approximately 3 m/s². +3. Set θ = 45° and find μ giving a calculated acceleration within 0.3 m/s² of zero. ## Intuition -Picture a wooden crate on a 20° ramp with a slippery, waxed surface, friction coefficient μ = 0.06: at this shallow angle the curve on screen sits below zero, meaning gravity's pull along the slope is weaker than friction can resist, so the crate stays put. Drag the slider "incline angle θ" up and watch the curve climb toward zero. +Gravity pulls vertically, but the surface constrains the block's motion along the slope. The component pulling downhill is mg sin θ. The normal force perpendicular to the slope is mg cos θ in this model. When the block is sliding downhill, kinetic friction points uphill, reducing the net downhill force. -The point where the curve crosses zero is the critical angle: past it, the curve turns positive and the crate accelerates down the slope. Now raise "coefficient of friction μ" instead, say to 0.9, and watch that crossing point shift to a much steeper angle — a rougher surface buys you a steeper ramp before anything starts sliding. +A stationary block is different. Static friction adjusts to oppose the downhill pull, up to a maximum; it is not always equal to that maximum. Thus a negative value of the plotted sliding formula cannot be interpreted as uphill acceleration from rest. The 2D graph describes a down-sliding block; the 3D illustration adds a rest condition using the same μ for static and kinetic friction. ## Formal -Along the incline, $ma = mg\sin\theta - \mu mg\cos\theta$, giving $a(\theta) = g(\sin\theta - \mu\cos\theta)$, independent of mass. +For a block sliding downhill on a fixed incline, with no other applied forces, $N=mg\cos\theta$ and $f_k=\mu_kN$. Taking downhill as positive gives $a=g(\sin\theta-\mu_k\cos\theta)$. The control labelled μ supplies μₖ for this calculation, and $g=9.81\ \mathrm{m/s^2}$. -The critical (sliding) angle satisfies $a=0$: $\tan\theta_c = \mu$ — a direct, mass-independent measurement of the friction coefficient. +For a block initially at rest, static friction can hold it when $mg\sin\theta\le\mu_smg\cos\theta$, or $\tan\theta\le\mu_s$ below 90°. Static and kinetic coefficients need not be equal. The zero of the sliding formula satisfies $\tan\theta=\mu_k$ and is not generally the angle at which a resting block starts to slide. ## Advanced -This root-finding structure is identical to the linear-equation and quadratic-root lessons: the physically meaningful boundary (here, the onset of sliding) is precisely where a governing expression crosses zero, and the derivative of $a(\theta)$ with respect to $\theta$ tells you how sensitively the sliding onset shifts if $\mu$ or the incline changes — useful for engineering safety margins on ramps and roofs. +Once a down-sliding block stops, the kinetic-friction expression must be reconsidered. If it remains at rest, use static friction; if it moves uphill, kinetic friction reverses direction. Mass cancels from the simple acceleration formula because both gravity and friction are proportional to mass. Extra forces or a friction law that changes with conditions can invalidate this cancellation or the constant-coefficient approximation. ## Derivation -1. Forces along the incline: gravity component down the slope minus friction. -2. Friction opposes motion, proportional to the normal force $N = mg\cos\theta$. -3. Apply Newton's second law; mass cancels. +1. Choose downhill as positive and add the gravity component and opposing friction force along that direction. +2. For downhill sliding, the magnitude of kinetic friction is μ times the normal force. With no acceleration perpendicular to the surface, N = mg cos θ. +3. Apply Fnet = ma and cancel the positive mass to obtain the sliding acceleration. ## Real world -### Wheelchair ramps and roofing codes -Building codes set maximum slope angles based on friction coefficients of the intended surface material. +### Sliding experiments -### Vehicle hill-holding -Parking brakes must overcome exactly this friction-versus-gravity balance on a slope. +Measure motion along a fixed incline and compare with the model. Distinguish the angle at which a resting block starts moving from its acceleration after it has started. -### Conveyor and chute design -Industrial chutes are angled just past the critical sliding angle so material flows rather than jams. +### Friction measurements -### Rock and snow slides -Natural slopes near their critical friction angle are prone to sudden slides when moisture reduces $\mu$. +The coefficient depends on the pair of surfaces and their condition. A value from this illustration alone is not a design specification for ramps or footwear. diff --git a/content/lessons/physics/kinematics-constant-acceleration/ar.md b/content/lessons/physics/kinematics-constant-acceleration/ar.md index ec0227a7..a665306c 100644 --- a/content/lessons/physics/kinematics-constant-acceleration/ar.md +++ b/content/lessons/physics/kinematics-constant-acceleration/ar.md @@ -1,69 +1,64 @@ --- title: 'التسارع الثابت: من السرعة إلى المسافة' -summary: >- - من السرعة الابتدائية والتسارع وحدهما تعرف أين تتوقف السيارة ومتى. +summary: 'احسب الموضع والسرعة عند تسارع ثابت، بما يشمل التباطؤ وانعكاس اتجاه الحركة.' parameters: - x0: الموضع الابتدائي x₀ - v0: السرعة الابتدائية v₀ - a: التسارع a - x: الزمن t + x0: 'x₀ — الموضع عند الزمن صفر' + v0: 'v₀ — السرعة عند الزمن صفر' + a: 'a — التسارع الثابت' + x: 't — الزمن المنقضي' variables: - - الموضع عند $t=0$ - - السرعة عند $t=0$ - - التسارع الثابت - - الزمن (اللحظة المعاينة، ويُرمز لها بـ $x$ على المنزلق) + - 'موضع البداية' + - 'السرعة المتجهة الابتدائية بإشارتها' + - 'معدل تغير السرعة المتجهة، وهو ثابت' + - 'الزمن المنقضي بالثواني' --- ## Try it -1. مرّر الزمن على الطريق وراقب السيارة تتجاوز علامات الأمتار، مسقطةً فتتة خبز كل ثانية. -2. اقرأ السهمين: سهم السرعة يكبر (أو يصغر) مع مرور الزمن، بينما سهم التسارع لا يتغير أبدًا — هذا هو معنى «التسارع الثابت». -3. اجعل «التسارع a» صفرًا. تتساقط فتات الخبز متساوية التباعد: سرعة ثابتة بلا تسارع. +1. اجعل x₀ = 0 m وv₀ = 2 m/s وa = 1 m/s². حرّك الزمن من 0 إلى 4 s. عند 4 s يكون الموضع 16 m والسرعة 6 m/s. +2. اجعل a = 0 مع إبقاء قيم البداية الأخرى. عند 4 s يصبح الموضع 8 m، وتبقى السرعة 2 m/s. تتساوى المسافات بين العلامات الموضوعة عند الثواني الصحيحة. +3. اجعل v₀ = 8 m/s وa = −3 m/s². قرب 2.67 s تصل السرعة إلى صفر، ثم تصبح سالبة فيتحرك الجسم عائدًا. يثبت عرض الطريق والرسم المصغر المواضع الخارجة عن نطاقهما عند الحافة؛ استخدم القراءات العددية لمعرفة القيم خارج الشاشة. ## Real-life examples -1. **سيارة تكبح حتى التوقف.** بدءًا من 8 m/s (نحو 29 km/h) وبكبح مقداره 3 m/s²، يرسم موضع السيارة قطعًا مكافئًا هابطًا حتى تتوقف. -2. **مصعد يبدأ الصعود.** من السكون، يتسارع مصعد بلطف عند 1 m/s²، فتزداد سرعته تدريجيًا دون أن يهزّ الركاب. -3. **متزلج على منحدر لطيف.** بدءًا من موضع 2 m وسرعة 1 m/s ويتسارع بمقدار 2 m/s² نحو أسفل التل، تتباعد فتات الخبز أكثر فأكثر مع كل ثانية. +1. **تباطؤ ثم عودة.** عند x₀ = 0 وv₀ = 8 وa = −3، يتوقف الجسم لحظة عند نحو 2.67 s وx = 10.67 m. استمرار التسارع نفسه يعكس اتجاه الحركة؛ أما نموذج فرملة سيارة فينبغي إنهاؤه أو تغييره عند التوقف. +2. **بداية من السكون.** عند x₀ = 0 وv₀ = 0 وa = 1، يصبح الموضع بعد 4 s مساويًا لـ8 m، والسرعة 4 m/s. ثبات التسارع لا يعني أن الموضع يزيد بمعدل ثابت. +3. **نقطة بداية مختلفة.** عند x₀ = 2 وv₀ = 1 وa = 2، يكون الموضع عند 4 s مساويًا لـ22 m، والسرعة 9 m/s. أما الإزاحة من البداية فتساوي 20 m. ## Test yourself -1. اجعل الجسم عند الموضع 20 m بالضبط عند t = 5 s. -2. جِد v₀ و a بحيث تكون سرعة الجسم صفرًا بالضبط عند t = 4 s. -3. اجعل الجسم يعود إلى موضعه الابتدائي x₀ عند زمن لاحق لـ t = 0. +1. اجعل الزمن 5 s والموضع قريبًا من 20 m؛ يقبل التحدي فرقًا أقل من متر واحد. +2. اجعل الزمن 4 s، والسرعة لا تبتعد عن الصفر بأكثر من 0.2 m/s. +3. عند زمن أكبر من 0.5 s، اجعل مقدار الإزاحة عن موضع البداية أقل من 0.5 m. ينجح الجسم الساكن أيضًا في هذا الفحص؛ جرّب انعكاس الاتجاه للحصول على مثال متحرك. ## Intuition -تخيل سيارة تبدأ بسرعة 8 m/s وتكبح بقوة عند 3 m/s² حتى تتوقف. مرّر منزلق الزمن وراقب الطريق: يقصر سهم السرعة باطراد بينما تتقارب فتات الخبز — ويسجل ملحق منحنى x–t القصة نفسها ميلًا يتسطح، لأن السرعة تتغير بمعدل منتظم تحت تسارع ثابت. +يخبرنا التسارع بمقدار تغير السرعة المتجهة في كل ثانية. عند سرعة ابتدائية 2 m/s وتسارع 1 m/s²، تكون السرعات عند الأزمنة 0 و1 و2 ثانية هي 2 و3 و4 m/s. يقطع الجسم مسافة أكبر في كل ثانية تالية. تجمع معادلة الموضع بين أثر السرعة الابتدائية والإزاحة الإضافية التي يسببها التسارع. -اجعل الآن «التسارع a» صفرًا، فتتساقط فتات الخبز متساوية التباعد ويستقيم منحنى الملحق ليصبح خطًا مائلًا بسيطًا — سرعة ثابتة بلا تسارع أو تباطؤ. اجعل «التسارع a» سالبًا مع «السرعة الابتدائية v₀» موجبة بدلًا من ذلك، فتندفع السيارة إلى الأمام، ثم تتباطأ، ثم تتوقف عند راية v = 0، ثم تتدحرج عائدة — تمامًا كما تفعل كرة تُقذف رأسيًا إلى الأعلى. +نختار أحد الاتجاهين موجبًا. السرعة السالبة تعني حركة في الاتجاه المقابل، أما التسارع السالب فيعني أن السرعة تتغير نحو الاتجاه السالب. إذا بدأت السرعة موجبة وكان التسارع سالبًا، يتباطأ الجسم أولًا، ثم ينعكس اتجاهه إذا استمر التسارع. بعد الانعكاس يزداد مقدار السرعة رغم بقاء التسارع سالبًا. يرسم الشكل المصغر الموضع مقابل الزمن، فيمثل ميله السرعة ما دام المنحنى داخل حدود العرض. ## Formal -$x(t) = x_0 + v_0 t + \tfrac12 a t^2$، وباشتقاقها نحصل على $v(t) = x'(t) = v_0 + at$. +لحركة في بعد واحد بتسارع ثابت a، تكون $v(t)=v_0+at$ و$x(t)=x_0+v_0t+\tfrac12at^2$. يمثل x₀ وv₀ الموضع والسرعة عند t = 0. نستخدم وحدات متوافقة، مثل المتر والثانية والمتر لكل ثانية والمتر لكل ثانية مربعة. -وباشتقاقها مرة أخرى، $a(t) = v'(t) = a$، أي ثابتة، بما يتفق مع الفرض الأساسي. +الإزاحة هي $\Delta x=x(t)-x_0$، وقد تكون سالبة. وهي تختلف عن المسافة الكلية المقطوعة إذا تغيّر الاتجاه. تربط العلاقتان $v=dx/dt$ و$a=dv/dt$ بين الكميات، ولا تشترطان أن تكون للموضع والسرعة والتسارع الإشارة نفسها. ## Advanced -هذا هو الحل الوحيد للمعادلة $\ddot x = a$ (حيث $a$ ثابت) مع الشرطين الابتدائيين $x(0)=x_0$ و $\dot x(0)=v_0$. وهي أبسط معادلة تفاضلية خطية من الرتبة الثانية بمعاملات ثابتة، وكل كمية حركية أعلى (مثل الرعشة jerk والانتفاضة snap) تُعرَّف بالاستمرار في الاشتقاق، حيث تُنقص كل عملية اشتقاق درجة اعتماد المنحنى السابق على الزمن بمقدار واحد. +عند ثبات التسارع، تربط العلاقة v² = v₀² + 2a(x−x₀) السرعة بالموضع دون استخدام الزمن. ويحتاج حل زمن التوقف t = −v₀/a إلى تسارع غير صفري وزمن غير سالب ليصف توقفًا لاحقًا. يكون التوقف لحظيًا فقط إذا استمر التسارع. أما عند التسارع الصفري فالسرعة ثابتة، والموضع خطي في الزمن، ويكون الخط أفقيًا للجسم الساكن. ## Derivation -1. ابدأ من افتراض تسارع ثابت. -2. كامِل التسارع للحصول على السرعة، مستخدمًا $v(0)=v_0$. -3. كامِل السرعة للحصول على الموضع، مستخدمًا $x(0)=x_0$. +1. نفترض ثبات التسارع خلال الفترة الزمنية التي نصفها. +2. نكامل التسارع، ونختار ثابت التكامل بحيث تكون السرعة عند t = 0 مساوية لـv₀. +3. نكامل السرعة، ونختار الثابت بحيث يكون الموضع عند t = 0 مساويًا لـx₀. ## Real world -### مسافة الكبح -السيارة التي تكبح بتباطؤ ثابت تتبع هذا القطع المكافئ، فمضاعفة السرعة الابتدائية تُضاعف مسافة التوقف نحو أربع مرات تقريبًا. +### فترة قصيرة من التسارع -### السقوط الحر -إسقاط أو قذف جسم بالقرب من سطح الأرض يتبع هذه المعادلة نفسها مع $a = -9.81\ \text{m/s}^2$. +يمكن تقريب جزء من حركة مركبة بتسارع ثابت. تبدأ هذه الفترة وتنتهي عادة بتغيرات في التسارع لا تصفها المعادلة نفسها. -### المصاعد والقطارات -تُصمَّم أنماط التسارع الثابت المريحة للركاب اعتمادًا على هذه العلاقة نفسها بين الموضع والزمن. +### الحركة الرأسية -### صعود الصاروخ (المرحلة المبكرة) -قبل أن يُغيّر احتراق الوقود كتلة الصاروخ بشكل ملحوظ، يمكن وصف صعوده في مرحلته المبكرة جيدًا بنموذج التسارع الثابت. +قرب سطح الأرض، يتبع جسم تؤثر فيه الجاذبية الثابتة تقريبًا وحدها هذه المعادلة مع a = −9.81 m/s² إذا اخترنا الأعلى موجبًا. ينتهي هذا الوصف المبسط عند الاصطدام أو عند تأثير مقاومة هواء كبيرة. diff --git a/content/lessons/physics/kinematics-constant-acceleration/en.md b/content/lessons/physics/kinematics-constant-acceleration/en.md index 27b476a1..daf5f715 100644 --- a/content/lessons/physics/kinematics-constant-acceleration/en.md +++ b/content/lessons/physics/kinematics-constant-acceleration/en.md @@ -1,71 +1,64 @@ --- title: 'Position, velocity and constant acceleration' -summary: >- - This is how engineers predict a car's braking distance, or how far a - dropped ball falls, just from its starting speed and a constant - acceleration. +summary: 'Use constant acceleration to calculate position and velocity, including slowing down and reversing direction.' parameters: - x0: starting position x₀ - v0: initial velocity v₀ - a: acceleration a - x: time t + x0: 'x₀ — position at time zero' + v0: 'v₀ — velocity at time zero' + a: 'a — constant acceleration' + x: 't — elapsed time' variables: - - position at $t=0$ - - velocity at $t=0$ - - constant acceleration - - 'time (the scrubbed moment, labelled $x$ on the slider)' + - 'initial position' + - 'initial signed velocity' + - 'constant rate of change of velocity' + - 'elapsed time in seconds' --- ## Try it -1. Scrub time along the road and watch the car roll past the metre marks, dropping a breadcrumb every second. -2. Read the two arrows: the velocity arrow grows (or shrinks) as time passes, while the acceleration arrow never changes — that is what "constant acceleration" means. -3. Set "acceleration a" to zero. The breadcrumbs fall evenly spaced: constant speed, no speeding up. +1. Set x₀ = 0 m, v₀ = 2 m/s and a = 1 m/s². Move time from 0 to 4 s. At 4 s, the position is 16 m and velocity is 6 m/s. +2. Set a = 0 while keeping the other starting values. At 4 s the position is 8 m and velocity stays 2 m/s. The marks placed at whole seconds are evenly spaced. +3. Set v₀ = 8 m/s and a = −3 m/s². Near 2.67 s the velocity reaches zero; later it becomes negative and the object moves back. The road and inset clamp positions outside their visible range, so use the readouts for off-screen values. ## Real-life examples -1. **A car braking to a stop.** Starting at 8 m/s (about 29 km/h) and braking at 3 m/s², the car's position traces a downward-curving parabola until it stops. -2. **An elevator starting to rise.** From rest, an elevator accelerating at a gentle 1 m/s² smoothly builds up speed without jolting passengers. -3. **A skateboarder on a gentle slope.** Starting 2 m along at 1 m/s and speeding up at 2 m/s² down the hill, the breadcrumbs spread farther apart every second. +1. **Slowing, then reversing.** With x₀ = 0, v₀ = 8 and a = −3, the object stops momentarily at about 2.67 s and x = 10.67 m. Continuing the same acceleration reverses it; a braking model for a car should end or change at the stop. +2. **Starting from rest.** With x₀ = 0, v₀ = 0 and a = 1, after 4 s the position is 8 m and the velocity is 4 m/s. Constant acceleration does not make position grow at a constant rate. +3. **A different starting point.** With x₀ = 2, v₀ = 1 and a = 2, at 4 s the position is 22 m and velocity is 9 m/s. The displacement from the start is 20 m. ## Test yourself -1. Make the object be at position 20 m exactly at t = 5 s. -2. Find v₀ and a so the object's velocity is exactly zero at t = 4 s. -3. Make the object return to its starting position x₀ at some time later than t = 0. +1. Set time to 5 s and make the position approximately 20 m; the position tolerance is 1 m. +2. Set time to 4 s and make the velocity within 0.2 m/s of zero. +3. At a time greater than 0.5 s, make the displacement from the starting point less than 0.5 m in magnitude. A stationary object also passes this check; try a reversal for a moving example. ## Intuition -Picture a car starting at 8 m/s and braking hard at 3 m/s² until it stops. Scrub the time slider and watch the road: the velocity arrow shortens steadily while the breadcrumbs bunch closer together — and the inset x–t curve records the same story as a flattening slope, because velocity changes at a steady rate under constant acceleration. +Acceleration says how much velocity changes each second. With initial velocity 2 m/s and acceleration 1 m/s², the velocities at 0, 1 and 2 seconds are 2, 3 and 4 m/s. The object covers more distance in each successive second. The position formula includes both the distance associated with the starting velocity and the extra displacement caused by acceleration. -Now set "acceleration a" to zero: the breadcrumbs fall evenly spaced and the inset curve straightens into a plain sloped line — constant velocity, no speeding up or slowing down. Make "acceleration a" negative with a positive "initial velocity v₀" instead: the car speeds forward, slows, pauses at the v = 0 flag, then rolls back — exactly like a ball thrown straight up. +Choose one direction as positive. Negative velocity means motion in the opposite direction, while negative acceleration means velocity changes toward the negative direction. A positive velocity with negative acceleration first slows, then reverses if that acceleration continues. After reversal, speed increases even though acceleration remains negative. The inset plots position against time, so its slope represents velocity where the curve has not been clipped by the display bounds. ## Formal -$x(t) = x_0 + v_0 t + \tfrac12 a t^2$; differentiating gives $v(t) = x'(t) = v_0 + at$. +For one-dimensional motion with constant acceleration a, $v(t)=v_0+at$ and $x(t)=x_0+v_0t+\tfrac12at^2$. Here x₀ and v₀ are the position and velocity at t = 0. Use consistent units, such as metres, seconds, metres per second and metres per second squared. -Differentiating again, $a(t) = v'(t) = a$ — constant, consistent with the assumption. +Displacement is $\Delta x=x(t)-x_0$, which can be negative. It differs from total distance travelled if the direction changes. The relations $v=dx/dt$ and $a=dv/dt$ connect the quantities; they do not require position, velocity and acceleration to have the same sign. ## Advanced -This is the unique solution of $\ddot x = a$ (a constant) with initial conditions $x(0)=x_0$, $\dot x(0)=v_0$; it is the simplest second-order linear ODE with constant coefficients, and every higher kinematic quantity (jerk, snap) is defined by continuing to differentiate, each derivative flattening the previous curve's time-dependence by one degree. +For constant acceleration, v² = v₀² + 2a(x−x₀) relates velocity to position without time. A stopping-time solution t = −v₀/a requires a nonzero acceleration and a nonnegative time to describe a future stop. It is only a momentary stop if the acceleration continues. At zero acceleration, velocity is constant and position is linear in time, including a horizontal line for an object at rest. ## Derivation -1. Start from constant acceleration. -2. Integrate acceleration to get velocity, using $v(0)=v_0$. -3. Integrate velocity to get position, using $x(0)=x_0$. +1. Assume the acceleration is constant over the time interval being modeled. +2. Integrate acceleration and choose the integration constant so that velocity at t = 0 is v₀. +3. Integrate velocity and choose the constant so that position at t = 0 is x₀. ## Real world -### Braking distance -A car braking at constant deceleration follows this parabola; doubling initial speed roughly quadruples stopping distance. +### Short periods of acceleration -### Free fall -Dropping or throwing an object near Earth's surface is this equation with $a = -9.81\ \text{m/s}^2$. +A section of a vehicle's motion may be approximated by constant acceleration. Starting and ending that section generally involves changes in acceleration that this formula does not describe. -### Elevators and trains -Comfortable constant-acceleration profiles are designed using exactly this position-time relationship. +### Vertical motion -### Rocket ascent (early phase) -Before fuel burn changes mass significantly, a rocket's early ascent is well modeled by constant acceleration. +Near Earth's surface, an object subject only to approximately constant gravity follows this equation with a = −9.81 m/s² when upward is positive. Impact or significant air resistance ends that simple description. diff --git a/content/lessons/physics/kinetic-and-potential-energy/ar.md b/content/lessons/physics/kinetic-and-potential-energy/ar.md index c18e460f..2acb777e 100644 --- a/content/lessons/physics/kinetic-and-potential-energy/ar.md +++ b/content/lessons/physics/kinetic-and-potential-energy/ar.md @@ -1,14 +1,13 @@ --- title: 'الطاقة الحركية: لماذا السرعة أخطر من الكتلة' -summary: >- - ضاعف سرعة السيارة تصر طاقة الاصطدام أربعة أضعاف، لا ضعفين. لهذا وُضعت حدود السرعة. +summary: 'احسب الطاقة الحركية والارتفاع الذي يبلغه جسم مقذوف رأسيًا عندما تتحول طاقته إلى طاقة وضع جاذبية في نموذج مثالي.' parameters: - m: الكتلة m - x: السرعة v + m: 'm — الكتلة' + x: 'v — سرعة الإطلاق الرأسي' variables: - - كتلة الجسم - - السرعة (المحور الأفقي، ويُرمز له بـ $x$) - - الطاقة الحركية، $\tfrac12 mv^2$ + - 'كتلة الجسم الثابتة' + - 'السرعة الابتدائية للإطلاق الرأسي' + - 'الطاقة الحركية الانتقالية عند الإطلاق' charts: - title: الطاقة الكامنة الثقالية مقابل الارتفاع xLabel: الارتفاع h (m) @@ -19,54 +18,50 @@ charts: ## Try it -1. اضبط سرعة منخفضة واقرأ الشريطين: الرمية اللطيفة تحمل جولات قليلة فقط، وكرة الشبح بالكاد تفارق الأرض. -2. ارفع السرعة وراقب الشبح يتسلق — كل وحدة سرعة إضافية تشتري ارتفاعًا أكبر مما اشترته السابقة. -3. قارن السرعة v بالسرعة 2v، فارتفاع الصعود لا يتضاعف فقط، بل يصبح أربعة أضعاف. +1. اجعل m = 1 kg وv = 6 m/s. الطاقة الحركية الابتدائية 18 J، والارتفاع الرأسي المثالي نحو 1.83 m. +2. ثبّت الكتلة وضاعف السرعة إلى 12 m/s. تصبح الطاقة 72 J والارتفاع نحو 7.34 m؛ أي إن كليهما يتضاعف أربع مرات. +3. ثبّت السرعة وضاعف الكتلة إلى 2 kg. يتضاعف عمودا الطاقة، لكن الارتفاع لا يتغير. يقارن العمودان الطاقة عند الإطلاق وعند القمة؛ فهما ليسا طاقتين نجمعهما في لحظة واحدة. ## Real-life examples -1. **تمريرة كرة سلة.** كرة سلة كتلتها 0.6 kg تُقذف بسرعة 8 m/s تحمل نحو 19 J من الطاقة الحركية، وهي كافية لتؤلم اليد العارية إن أُمسكت بشكل خاطئ. -2. **كرة بولينغ تتدحرج في المسار.** بكتلة 5 kg وسرعة 3 m/s فقط، تحمل كرة البولينغ أكثر من 22 J، أي أكثر من كرة السلة الأخف بكثير، بفضل كتلتها الكبيرة. -3. **التلويح بمطرقة.** مطرقة كتلتها 2 kg تُلوَّح بسرعة 6 m/s تحمل 36 J من الطاقة الحركية، وهو ما يكفي لدفع مسمار عميقًا بضربة واحدة. +1. **جسم خفيف.** جسم كتلته 0.6 kg أُطلق رأسيًا بسرعة 8 m/s له طاقة حركية 19.2 J، ويرتفع نحو 3.26 m عند إهمال مقاومة الهواء. +2. **جسم أثقل وأبطأ.** جسم كتلته 5 kg وسرعته 3 m/s له طاقة 22.5 J وارتفاع مثالي نحو 0.46 m. الطاقة الأكبر لا تعني ارتفاعًا أكبر إذا تغيرت الكتلة أيضًا. +3. **إطلاق بقيم متوسطة.** جسم كتلته 2 kg وسرعته 6 m/s له طاقة 36 J، ويرتفع نحو 1.83 m. تضاعف الكتلة الطاقة مقارنة بالإعداد الأول في التجربة، دون أن تضاعف الارتفاع عند السرعة نفسها. ## Test yourself -1. اجعل الطاقة الحركية 20 J بالضبط. -2. أبقِ الكتلة عند 1 kg وجِد السرعة التي تعطي طاقة حركية قدرها 50 J. -3. ارفع الطاقة الحركية فوق 100 J مع إبقاء السرعة أقل من 8 m/s. +1. اجعل الطاقة الحركية قريبة من 20 J. +2. أبقِ الكتلة 1 kg، وابحث عن سرعة تعطي نحو 50 J. +3. أبقِ السرعة أقل من 8 m/s، واجعل الطاقة الحركية أكبر من 100 J. ## Intuition -تخيل كرة سلة كتلتها 0.6 كجم تُقذف بسرعة 8 أمتار في الثانية، فتحمل نحو 19 جولًا من الطاقة الحركية، وهي طاقة الحركة. حرّك منزلق السرعة من المنخفض إلى العالي وراقب ارتفاع استقرار كرة الشبح. لا يرتفع بانتظام بل يقفز — كل وحدة إضافية من السرعة تضيف طاقة أكبر، وتشتري ارتفاعًا أكبر، مما أضافته الوحدة السابقة. +الطاقة الحركية هي الطاقة المرتبطة بالحركة. عند إطلاق جسم رأسيًا دون مقاومة هواء، تقل سرعته بفعل الجاذبية أثناء الصعود. عند أعلى نقطة تصبح السرعة صفرًا، وتتحول الطاقة الحركية الابتدائية إلى زيادة في طاقة وضع الجاذبية. يضع الرسم موضعي البداية والقمة جنبًا إلى جنب للمقارنة؛ فالخط المنحني بينهما لا يمثل رحلة جانبية فعلية. -انتقل من السرعة v إلى ضعفها بدلًا من ذلك، فلا يتضاعف ارتفاع الصعود فقط، بل يصبح أربعة أضعاف، لأن مضاعفة رقم ثم تربيعه يجعل الناتج أربعة أضعاف. لهذا السبب الفيزيائي تصبح مسافة الكبح عند ضعف السرعة أطول بنحو أربع مرات، إذ يجب إزالة كل تلك الطاقة الحركية الإضافية بقوة الاحتكاك نفسها على مسافة توقف أطول. +مضاعفة السرعة تضاعف الطاقة الحركية أربع مرات لأن السرعة مربعة في الصيغة. وعند ثبات الكتلة يتضاعف الارتفاع المثالي أربع مرات أيضًا. أما مضاعفة الكتلة عند سرعة ثابتة فتضاعف الطاقة الحركية، لكنها تضاعف كذلك طاقة الوضع اللازمة لرفع الجسم إلى أي ارتفاع معين. يُختصر العاملان، فلا يعتمد الارتفاع على الكتلة في هذا النموذج. ## Formal -$KE(v) = \tfrac12 mv^2$. اشتقها فتحصل على $\dfrac{d(KE)}{dv} = mv$، وهي كمية الحركة (الزخم). فالطاقة تزداد بأسرع معدل عند أكبر قيمة لكمية الحركة بالضبط. +لجسم ثابت الكتلة في الميكانيكا الكلاسيكية، تكون الطاقة الحركية الانتقالية $K=\tfrac12mv^2$، حيث v مقدار السرعة وm الكتلة. قرب سطح الأرض، مع g ثابت تقريبًا، تكون زيادة طاقة وضع الجاذبية عند الصعود مسافة رأسية h هي $\Delta U=mgh$. -يُظهر المخطط الطاقة الكامنة الثقالية $PE = mgh$، وهي تتناسب خطيًا مع الارتفاع $h$. وهذا تباين مفيد، فالطاقة الكامنة تنمو تناسبيًا بينما الطاقة الحركية تنمو تربيعيًا. +لإطلاق رأسي دون مقاومة هواء أو انتقالات أخرى للطاقة، تتحقق $\tfrac12mv^2=mgh$، ومنها $h=v^2/(2g)$ لكتلة موجبة. نستخدم هنا $g=9.81\ \mathrm{m/s^2}$ ونقيس الارتفاع فوق نقطة البداية. عند ارتفاع متوسط يبقى مجموع الطاقة الحركية وطاقة وضع الجاذبية ثابتًا، ولا يلزم أن تبقى كل منهما ثابتة وحدها. ## Advanced -تنمو الطاقة الحركية بتربيع $v$ لأنها ناتجة من تكامل كمية الحركة، إذ $KE = \int_0^v mv'\,dv' = \tfrac12 mv^2$. هذه هي حجة مساحة المثلث نفسها المستخدمة في شغل النابض، لكن كمية الحركة $mv$ هنا تقوم مقام "القوة" الخطية. وهذا أيضًا سبب كون الطاقة، لا كمية الحركة، هي ما يحدد مسافة التوقف. فامتصاص كمية الحركة بقوة كبح ثابتة يعطي زمنًا يتناسب مع $v$، أما امتصاص الطاقة بقوة كبح ثابتة فيعطي مسافة تتناسب مع $v^2$. +تربط مبرهنة الشغل والطاقة الشغل الكلي بتغير الطاقة الحركية: Wnet = ΔK. تحسب الصيغة المعروضة حركة الانتقال؛ وقد يملك الجسم المتدحرج أو الدوّار طاقة حركية دورانية أيضًا. يغيّر الرسم السفلي الارتفاع بصورة مستقلة ويعرض mgh. محوره الأفقي ارتفاع، بينما يختار متحكم العرض الرئيسي سرعة الإطلاق؛ لهما نطاق عددي متشابه لكنهما كميتان مختلفتان. ## Derivation -1. قانون نيوتن الثاني. -2. غيّر المتغيرات باستخدام $dx/dt = v$. -3. كامل من السكون حتى السرعة $v$، وهذه هي نظرية الشغل والطاقة. +1. نطبق F = m dv/dt على جسم ثابت الكتلة يتحرك على خط. +2. في تكامل الشغل نستخدم dx = v dt، فنحصل على تكامل mv بالنسبة إلى السرعة. +3. نكامل من السكون إلى السرعة v. الشغل الكلي الناتج هو الطاقة الحركية ½mv². ## Real world -### سلامة الاصطدامات -تتناسب طاقة اصطدام السيارات مع مربع السرعة، ولهذا تؤدي زيادات بسيطة في حد السرعة إلى اصطدامات أسوأ بكثير مما تتوقع. +### مقارنة أحمال متحركة -### توربينات الرياح -تتناسب القدرة المتاحة من الرياح مع مكعب سرعتها، لأن تدفق الطاقة الحركية يتناسب أصلًا مع مربع السرعة مضروبًا في السرعة. +عند السرعة نفسها، تعطي مضاعفة الكتلة ضعف الطاقة الحركية الانتقالية. وعند الكتلة نفسها، تعطي مضاعفة السرعة أربعة أمثال الطاقة. -### المقذوفات (الباليستيك) -تعتمد الطاقة التدميرية للرصاصة على مربع سرعة الفوهة، لا على كتلتها فقط. +### رفع جسم -### الارتطامات في الرياضة -الرمية أو الإرسالة الأسرع قليلًا تحمل عند الارتطام طاقة حركية أكبر بكثير مما توحي به الزيادة في السرعة وحدها. +يمكن لآلية مثالية تحويل الحركة إلى ارتفاع. وقد تنقل الآليات الفعلية بعض الطاقة إلى التسخين أو الصوت أو الدوران، فلا يتحقق ارتفاع النموذج تلقائيًا. diff --git a/content/lessons/physics/kinetic-and-potential-energy/en.md b/content/lessons/physics/kinetic-and-potential-energy/en.md index c67d9c3a..d0e93382 100644 --- a/content/lessons/physics/kinetic-and-potential-energy/en.md +++ b/content/lessons/physics/kinetic-and-potential-energy/en.md @@ -1,15 +1,13 @@ --- title: Kinetic energy and why speed matters so much -summary: >- - This is why doubling a car's speed doesn't double its crash energy — it - quadruples it, which is why speed limits matter so much. +summary: 'Calculate kinetic energy and the height an ideal vertical launch reaches when that energy becomes gravitational potential energy.' parameters: - m: mass m - x: speed v + m: 'm — mass' + x: 'v — vertical launch speed' variables: - - mass of the object - - 'speed (the horizontal axis, labelled $x$)' - - 'kinetic energy, $\tfrac12 mv^2$' + - 'constant mass of the object' + - 'initial speed of a vertical launch' + - 'translational kinetic energy at launch' charts: - title: Gravitational potential energy vs height xLabel: height h (m) @@ -20,54 +18,50 @@ charts: ## Try it -1. Set a low speed and read the bars: a gentle throw carries only a few joules, and the ghost ball barely leaves the ground. -2. Drag the speed up and watch the ghost climb — each extra unit of speed buys more height than the last one did. -3. Compare speed v with speed 2v — the coasting height doesn't just double, it quadruples. +1. Set m = 1 kg and v = 6 m/s. The initial kinetic energy is 18 J, and the ideal vertical rise is about 1.83 m. +2. Keep mass fixed and double speed to 12 m/s. Energy rises to 72 J and height to about 7.34 m: both quadruple. +3. Keep speed fixed and double the mass to 2 kg. Both energy bars double, but the height stays the same. The two bars compare energy at launch and at the top; they are not two energies to add at one instant. ## Real-life examples -1. **A basketball pass.** A 0.6 kg basketball thrown at 8 m/s carries about 19 J of kinetic energy — enough to sting bare hands if caught wrong. -2. **A bowling ball rolling down the lane.** At 5 kg and just 3 m/s, a bowling ball still carries over 22 J, more than the much lighter basketball, thanks to its mass. -3. **Swinging a hammer.** A 2 kg hammer swung at 6 m/s carries 36 J of kinetic energy — enough to drive a nail deep with one blow. +1. **A light object.** A 0.6 kg object launched vertically at 8 m/s has 19.2 J of kinetic energy and rises about 3.26 m if air resistance is neglected. +2. **A heavier, slower object.** A 5 kg object at 3 m/s has 22.5 J and an ideal rise of about 0.46 m. More energy does not imply more height when the mass also changes. +3. **An intermediate launch.** A 2 kg object at 6 m/s has 36 J and rises about 1.83 m. Mass doubles the energy relative to the first Try it setting, but not the height at that speed. ## Test yourself -1. Make the kinetic energy exactly 20 J. -2. Keep the mass at 1 kg and find the speed that gives 50 J of kinetic energy. -3. Get the kinetic energy above 100 J while keeping the speed under 8 m/s. +1. Make the kinetic energy approximately 20 J. +2. Keep mass at 1 kg and find a speed giving about 50 J. +3. Keep speed below 8 m/s and make kinetic energy greater than 100 J. ## Intuition -Picture a 0.6 kg basketball thrown at 8 m/s: it carries about 19 joules of kinetic energy, the energy of motion. Drag the speed slider from low to high and watch the ghost ball's resting height: it doesn't rise steadily, it leaps — each extra unit of speed adds more energy, and buys more height, than the last one did. +Kinetic energy is energy associated with motion. In a vertical launch with no air resistance, gravity slows the object as it rises. At the highest point its speed is zero, and the initial kinetic energy has become an increase in gravitational potential energy. The diagram places the starting and highest positions side by side for comparison; the curved connector is not a literal sideways flight path. -Go from speed v to speed 2v instead: the coasting height doesn't merely double, it quadruples, because doubling a number and squaring it multiplies the result by four. That's the physical reason braking distance from double the speed is roughly four times longer — all that extra kinetic energy has to be removed by the same friction force over a longer stopping distance. +Doubling speed multiplies kinetic energy by four because speed is squared. At a fixed mass this also quadruples the ideal height. Doubling mass at a fixed speed doubles the kinetic energy, but raising that mass through any given height also needs twice the potential-energy increase. Those factors cancel, so the height is independent of mass in this model. ## Formal -$KE(v) = \tfrac12 mv^2$; differentiating, $\dfrac{d(KE)}{dv} = mv$, the momentum — energy increases fastest exactly where momentum is largest. +For a constant-mass object in classical mechanics, translational kinetic energy is $K=\tfrac12mv^2$, where v is speed and m is mass. Near Earth's surface with approximately constant g, the increase in gravitational potential energy for a rise h is $\Delta U=mgh$. -The chart shows gravitational potential energy $PE = mgh$, linear in height $h$ — a useful contrast: PE grows proportionally, KE grows quadratically. +For a vertical launch with no air resistance or other energy transfers, $\tfrac12mv^2=mgh$, giving $h=v^2/(2g)$ for positive mass. Here $g=9.81\ \mathrm{m/s^2}$ and height is measured above the starting point. At an intermediate height, kinetic plus gravitational potential energy remains constant; neither alone need be constant. ## Advanced -Kinetic energy is quadratic in $v$ because it comes from integrating momentum: $KE = \int_0^v mv'\,dv' = \tfrac12 mv^2$, the same triangular-area argument as spring work but with momentum $mv$ playing the role of the linear "force". This is also why energy, not momentum, sets stopping distances: momentum absorbed at constant braking force gives a time proportional to $v$, but energy absorbed over a fixed braking force gives a distance proportional to $v^2$. +The work-energy theorem relates net work to the change in kinetic energy: Wnet = ΔK. The displayed formula counts translational motion; a rolling or spinning object can also have rotational kinetic energy. The lower chart varies height independently and plots mgh. Its horizontal axis is height, whereas the main control selects launch speed; the two inputs share a numerical range but represent different quantities. ## Derivation -1. Newton's second law. -2. Change variables using $dx/dt = v$. -3. Integrate from rest to speed $v$ — the work-energy theorem. +1. Apply F = m dv/dt to a constant-mass object moving along a line. +2. In the work integral, use dx = v dt to obtain the integral of mv with respect to velocity. +3. Integrate from rest to speed v. The resulting net work is the kinetic energy ½mv². ## Real world -### Crash safety -Car crash energy scales with speed squared, which is why small speed limit increases produce disproportionately worse collisions. +### Comparing moving loads -### Wind turbines -Power available from wind scales with the cube of wind speed, since kinetic energy flux already scales as speed squared times speed. +At the same speed, twice the mass has twice the translational kinetic energy. At the same mass, twice the speed has four times the energy. -### Ballistics -A bullet's destructive energy depends on the square of its muzzle velocity, not just its mass. +### Raising an object -### Sports impacts -A slightly faster pitch or serve carries much more kinetic energy on impact than the speed increase alone would suggest. +An ideal mechanism can convert motion into height. Real mechanisms may transfer some energy to heating, sound or rotation, so the model's rise is not automatically achieved. diff --git a/content/lessons/physics/momentum-and-impulse/ar.md b/content/lessons/physics/momentum-and-impulse/ar.md index 53b2d561..31c36461 100644 --- a/content/lessons/physics/momentum-and-impulse/ar.md +++ b/content/lessons/physics/momentum-and-impulse/ar.md @@ -1,68 +1,63 @@ --- title: 'الزخم والدفع: نبضة القوة' -summary: >- - الوسادة الهوائية لا تقلل الصدمة الكلية، بل تمدها على زمن أطول فتنخفض أقصى قوة تضربك. +summary: 'احسب تغير الزخم من المساحة تحت منحنى محصلة القوة، وقارن نبضات قوة قصيرة وطويلة.' parameters: - Fmax: القوة القصوى Fmax - w: عرض النبضة w - a: a (زمن البداية) - b: b (زمن النهاية) + Fmax: 'Fmax — أقصى محصلة قوة' + w: 'w — معامل عرض النبضة' + a: 'a — زمن البداية' + b: 'b — زمن النهاية' variables: - - 'القوة المطبقة أثناء التصادم، وتبلغ ذروتها عند $F_{\max}$' - - مدى امتداد نبضة القوة زمنيًا - - الدفع، وهو المساحة المظللة، ويساوي التغيّر في كمية الحركة $\Delta p$ + - 'محصلة القوة بوصفها دالة في الزمن' + - 'معامل العرض؛ عند هذا البعد الزمني تصبح القوة القمة/e' + - 'الدفع خلال الفترة المختارة، ويساوي تغير الزخم' --- ## Try it -1. راقب النبضة المظللة تحت منحنى القوة-الزمن بعرضها المعتاد. -2. حرّك «عرض النبضة w» إلى قيمة أضيق و«القوة القصوى Fmax» إلى قيمة أعلى، مع إبقاء المساحة المظللة قريبة من ثباتها. -3. افعل العكس الآن: وسّع «عرض النبضة w» وقلّل «القوة القصوى Fmax». تبقى المساحة، أي الدفع، قريبة من ثباتها. +1. اجعل Fmax = 6 N وw = 0.08 s وa = 0 s وb = 1 s. الدفع الذي تمثله المساحة المظللة نحو 0.851 N·s. +2. ثبّت الحدين، واخفض Fmax إلى 3 N، وضاعف w إلى 0.16 s. يبقى الدفع قريبًا من 0.851 N·s، بينما تصبح النبضة أقل ارتفاعًا وأكثر عرضًا. +3. ضيّق الفترة إلى a = 0.4 s وb = 0.6 s. نحسب الآن الجزء الأوسط فقط من النبضة العريضة، فيقل الدفع. استخدم a < b لفترة زمنية تمضي إلى الأمام. ## Real-life examples -1. **لكمة ملاكم.** تصل اللكمة الحادة إلى قوة قصوى عالية (9 N في هذا النموذج المبسّط) خلال نبضة قصيرة جدًا (w=0.03 s)، أي ضربة قصيرة وقوية. -2. **التقاط كرة بقفاز مبطّن.** يوزّع الحشو الالتقاط نفسه على زمن أطول بكثير (w=0.3 s) بقوة قصوى ألطف مقدارها 2 N فقط. -3. **اصطدام قوي بلا حشو.** بلا أي حشو تقفز القوة القصوى إلى الحد الأقصى (10 N) خلال نبضة قصيرة جدًا (w=0.02 s)، وهو أشد أنواع الارتطام ضررًا. +1. **نبضة ضيقة.** عند Fmax = 9 N وw = 0.03 s خلال 0.3–0.7 s، يكون الدفع نحو 0.479 N·s. تقع النبضة كلها تقريبًا داخل الفترة. +2. **نبضة عريضة.** عند Fmax = 2 N وw = 0.3 s خلال 0.1–0.9 s، يكون الدفع نحو 1.000 N·s. القمة أقل من المثال الأول، لكن الدفع أكبر. +3. **نبضة قصيرة جدًا.** عند Fmax = 10 N وw = 0.02 s خلال 0.4–0.6 s، يكون الدفع نحو 0.354 N·s. هذه أمثلة توضيحية لتغير القوة مع الزمن؛ فلا تحدد القمة وحدها الدفع أو أثره على جسم معين. ## Test yourself -1. جِد قوة قصوى وعرض نبضة يجعل حاصل ضربهما Fmax·w يساوي 1.5، وهو مقياس تقريبي للدفع المُحدَث. -2. أبقِ القوة القصوى قريبة من 5 N ووسّع النبضة إلى أكثر من 0.3 s، محوّلًا ضربة حادة إلى دفعة لطيفة. -3. اجعل النبضة قصيرة جدًا (أقل من 0.05 s) وضعيفة جدًا (أقل من 3 N) في آن واحد، أي لمسة خفيفة وسريعة. +1. اختر a < b، وعدّل القيم للحصول على دفع قريب من 1.5 N·s خلال الفترة المختارة. +2. أبقِ القوة القصوى قريبة من 5 N، واختر w أكبر من 0.3 s. هذا يوسّع النبضة، ولا يحافظ على الدفع تلقائيًا. +3. اجعل w أقل من 0.05 s والقوة القصوى أقل من 3 N. ## Intuition -تخيل لكمة ملاكم. تصل قوتها إلى ذروة عالية خلال نبضة قصيرة جدًا، نحو 30 ميلي ثانية. حرّك «عرض النبضة w» إلى قيمة أضيق وارفع «القوة القصوى Fmax»، فتصبح النبضة المظللة طويلة ونحيلة، أي ارتفاع حاد وقصير في القوة، تمامًا كاللكمة. +محصلة قوة 2 N تؤثر مدة 3 s تعطي الدفع نفسه الذي تعطيه قوة 6 N خلال ثانية واحدة؛ فمساحة مستطيل القوة والزمن في الحالتين 6 N·s. عندما تتغير القوة، نجمع مساهماتها الصغيرة مع الزمن بدلًا من استخدام مستطيل واحد. نسمي المساحة الناتجة «الدفع»، وهي تساوي تغير الزخم. -وسّع الآن «عرض النبضة w» وقلّل «القوة القصوى Fmax» للحفاظ على المساحة المظللة قريبة من ثباتها، تمامًا كالتقاط كرة بقفاز مبطّن بدل اليد العارية. كلتا الحالتين تُحدثان الدفع نفسه، أي التغيّر نفسه في كمية الحركة، رغم أن القوة القصوى مختلفة تمامًا بينهما. وهذا بالضبط ما تستغله الوسادة الهوائية. فهي لا تستطيع تغيير مقدار كمية الحركة التي يجب أن يزيلها الاصطدام، لكنها تستطيع توزيع المساحة نفسها تحت المنحنى على زمن أطول، مما يخفض القوة القصوى. +للنبضة هنا قمة ملساء عند 0.5 s. توسيعها مع ثبات ارتفاعها يزيد الدفع. ولإبقاء الدفع قريبًا من قيمته السابقة، نخفض القمة عند زيادة العرض، ونختار فترة تشمل الأجزاء المهمة من النبضة. توضح الحركة الثلاثية تأثير القوة؛ وللمقارنة العددية نستخدم التكامل الثنائي، بدل استنتاج الدفع من المسافة التي يقطعها الجسم المتحرك. ## Formal -$J = \int_a^b F(t)\,dt = \Delta p = m\Delta v$، وهو قانون نيوتن الثاني بعد تكامله عبر الزمن. +لجسم ثابت الكتلة، يكون دفع محصلة القوة $J=\int_a^b F(t)\,dt=\Delta p=m[v(b)-v(a)]$. وحدة الدفع N·s، وهي مكافئة لـkg·m/s. إذا كانت F واحدة فقط من عدة قوى، فإن دفعها مساهمة واحدة في تغير الزخم الكلي. -عند دفع ثابت $J$، يخفّض تمديد المدة $\Delta t$ التي يعمل خلالها القوة المتوسطة (وعادة القوة القصوى أيضًا)، لأن $J \approx \bar F \,\Delta t$. +عندما $b>a$، تحقق محصلة القوة المتوسطة العلاقة الدقيقة $J=\bar F(b-a)$. النبضة المستخدمة هي $F(t)=F_{\max}\exp[-((t-0.5)/w)^2]$، حيث يحدد w العرض، وليس مدة حادة تبدأ عندها النبضة وتنتهي. على بُعد زمني w من القمة، تبلغ القوة $F_{\max}/e$. ## Advanced -هذا هو التبادل نفسه الذي يحافظ على المساحة والمعروف في معالجة الإشارات (يمكن لنبضة ضيقة ومرتفعة، وأخرى عريضة ومنخفضة، أن يتساوى تكاملهما، أي أن يتساوى محتواهما "المستمر"). وفي النهاية عندما $w \to 0$ مع بقاء المساحة ثابتة، تقترب نبضة القوة من دالة ديراك دلتا، وهي دفعة لحظية مثالية تُستخدم في جميع فروع الميكانيكا ونظرية التحكم. +تكامل النبضة على الزمن كله يساوي Fmax·w·√π. الفترة المحدودة تشمل جزءًا من هذه المساحة فقط، ولذلك لا يساوي Fmax·w وحده الدفع. عند ثبات تغير الزخم، تؤدي زيادة المدة إلى تقليل محصلة القوة المتوسطة، لكنها لا تحدد القمة وحدها؛ فالقمة تعتمد أيضًا على شكل تغير القوة. وفي عدة أبعاد يكون الزخم والدفع كميتين متجهتين. ## Derivation -1. قانون نيوتن الثاني، لحظة بلحظة. -2. غيّر المتغيرات من الزمن إلى السرعة. -3. الدفع يساوي التغيّر الناتج في كمية الحركة. +1. عند ثبات الكتلة، تساوي محصلة القوة m مضروبًا في معدل تغير السرعة المتجهة. +2. نكامل خلال الفترة الزمنية المختارة. تحوّل مشتقة السرعة التكامل إلى الفرق بين سرعتي الطرفين. +3. نضرب فرق السرعة في الكتلة الثابتة، فنحصل على تغير الزخم. ## Real world -### الوسائد الهوائية ومناطق الانسحاق -كلاهما يطيل زمن الاصطدام لتقليل القوة القصوى مقابل التغيّر الضروري نفسه في كمية الحركة. +### مقارنة قوى التلامس -### الأرضيات والحصائر المبطنة -تُطيل حصائر الجمباز والفنون القتالية زمن الهبوط لتقليل قوة الارتطام على المفاصل. +قد ينتج عن تلامسين تغير الزخم نفسه رغم اختلاف القوة مع الزمن. نقارن المساحة خلال التلامس كله، لا أكبر قوة وحدها. -### دفع الصواريخ -يحدد إجمالي الدفع الذي يولّده محرك الصاروخ (المساحة تحت منحنى الدفع-الزمن) التغيّر الناتج في كمية حركة الصاروخ. +### قياس القوة -### إتمام الحركة في الرياضة -إطالة زمن التلامس في ضربة الغولف أو التنس يغيّر نمط القوة مع الحفاظ على دفع مساوٍ أو أكبر. +يمكن استخدام تسجيل مستشعر للقوة لتقدير الدفع عدديًا. يجب أن تغطي مدة التسجيل ومعدل أخذ القراءات النبضة بما يكفي. diff --git a/content/lessons/physics/momentum-and-impulse/en.md b/content/lessons/physics/momentum-and-impulse/en.md index a7ef9e9e..74b3610b 100644 --- a/content/lessons/physics/momentum-and-impulse/en.md +++ b/content/lessons/physics/momentum-and-impulse/en.md @@ -1,70 +1,63 @@ --- title: 'Impulse: the area under a force-time pulse' -summary: >- - This is why airbags and crumple zones save lives — they can't reduce how - hard a crash pushes overall, but they can stretch that push over more - time, cutting the peak force on your body. +summary: 'Calculate a change in momentum from the area under a net-force graph, and compare short and long force pulses.' parameters: - Fmax: peak force Fmax - w: pulse width w - a: a (start time) - b: b (end time) + Fmax: 'Fmax — peak net force' + w: 'w — pulse-width parameter' + a: 'a — start time' + b: 'b — end time' variables: - - 'force applied during the collision, peaking at $F_{\max}$' - - how spread out in time the force pulse is - - 'impulse — the shaded area, equal to the change in momentum $\Delta p$' + - 'net force as a function of time' + - 'width parameter; force falls to peak/e at this offset' + - 'impulse over the selected interval, equal to momentum change' --- ## Try it -1. Watch the shaded pulse under the force-time curve at its default width. -2. Drag "pulse width w" narrower and "peak force Fmax" higher, keeping the shaded area about the same. -3. Now do the opposite: widen "pulse width w" and lower "peak force Fmax". The area, and the impulse, stays about the same. +1. Set Fmax = 6 N, w = 0.08 s, a = 0 s and b = 1 s. The shaded impulse is about 0.851 N·s. +2. Keep the bounds fixed, halve Fmax to 3 N and double w to 0.16 s. The impulse remains close to 0.851 N·s, while the pulse is lower and broader. +3. Reduce the interval to a = 0.4 s and b = 0.6 s. Only the middle of the broader pulse is counted, so the impulse decreases. Keep a < b for a forward time interval. ## Real-life examples -1. **A boxer's punch.** A sharp punch reaches a high peak force (9 N in this simplified model) over a very short pulse (w=0.03 s) — a short, hard hit. -2. **Catching a ball with a padded glove.** Cushioning spreads the same catch over a much longer time (w=0.3 s) with a gentler peak force of just 2 N. -3. **A hard, unpadded collision.** Without any cushioning, the peak force spikes to the maximum (10 N) over an extremely brief pulse (w=0.02 s) — the sharpest, most damaging kind of impact. +1. **Narrow pulse.** Fmax = 9 N and w = 0.03 s over 0.3–0.7 s give about 0.479 N·s. Almost the whole pulse lies inside this interval. +2. **Broad pulse.** Fmax = 2 N and w = 0.3 s over 0.1–0.9 s give about 1.000 N·s. The peak is lower than in the first example, but the impulse is larger. +3. **Very brief pulse.** Fmax = 10 N and w = 0.02 s over 0.4–0.6 s give about 0.354 N·s. These are illustrative force histories; peak force alone does not determine the impulse or the effect on a particular object. ## Test yourself -1. Find a peak force and pulse width whose product Fmax·w equals 1.5 — a rough measure of the impulse delivered. -2. Keep the peak force near 5 N but widen the pulse to longer than 0.3 s, turning a sharp hit into a gentle push. -3. Make the pulse both very short (under 0.05 s) and very weak (under 3 N) — a light, quick tap. +1. Choose a < b and adjust the controls for an impulse near 1.5 N·s over the selected interval. +2. Keep peak force near 5 N and choose w greater than 0.3 s. This broadens the pulse; it does not preserve impulse automatically. +3. Make w less than 0.05 s and peak force less than 3 N. ## Intuition -Picture a boxer's punch: a high peak force squeezed into a very short pulse, about 30 milliseconds. Drag "pulse width w" narrower and raise "peak force Fmax" to make the shaded pulse tall and thin: a short, sharp force spike, just like the punch. +A 2 N net force acting for 3 s gives the same impulse as a 6 N net force acting for 1 s: both force-time rectangles have area 6 N·s. For a changing force, we add the small contributions over time instead. The resulting area is called impulse, and it equals the change in momentum. -Now widen "pulse width w" and lower "peak force Fmax" to keep the shaded area roughly the same, like catching a ball with a padded glove instead of bare hands. Both deliver the same impulse, the same change in momentum, even though the peak force is wildly different — which is exactly what an airbag exploits: it cannot change how much momentum a crash must remove, but it can spread that same area under the curve over a longer time, pushing the peak force down. +The pulse here has a smooth peak at 0.5 s. Increasing its width while holding its height fixed increases impulse. To keep impulse about the same, a wider pulse needs a lower peak, and the chosen interval must include the relevant parts. The 3D animation illustrates a push; use the 2D integral for numerical comparisons rather than inferring impulse from the animated distance travelled. ## Formal -$J = \int_a^b F(t)\,dt = \Delta p = m\Delta v$ — Newton's second law integrated over time. +For a constant-mass object, the impulse of the net force is $J=\int_a^b F(t)\,dt=\Delta p=m[v(b)-v(a)]$. Impulse has units N·s, equivalent to kg·m/s. If F is only one of several forces, its impulse is only one contribution to the total momentum change. -For a fixed impulse $J$, stretching the duration $\Delta t$ over which it acts lowers the average (and typically the peak) force, since $J \approx \bar F \,\Delta t$. +For $b>a$, average net force satisfies the exact relation $J=\bar F(b-a)$. The modeled pulse is $F(t)=F_{\max}\exp[-((t-0.5)/w)^2]$, where w controls width and is not a sharp start-to-end duration. At a time w from the peak, the force is $F_{\max}/e$. ## Advanced -This is the same area-preserving trade-off seen in signal processing (a narrow, tall pulse and a wide, short one can have equal integral, i.e. equal "DC" content) — in the limit of $w \to 0$ with the area held fixed, the force pulse approaches a Dirac delta function, an idealised instantaneous impulse used throughout mechanics and control theory. +The pulse integrated over all time has area Fmax·w·√π. A finite interval captures only part of that area, so Fmax·w alone is not the impulse. For a fixed momentum change, increasing duration reduces the average net force; it does not by itself determine the peak, which also depends on the force profile. In several dimensions, momentum and impulse are vectors. ## Derivation -1. Newton's second law, instant by instant. -2. Change variables from time to velocity. -3. Impulse equals the resulting change in momentum. +1. For constant mass, the net force equals m times the rate of change of velocity. +2. Integrate over the chosen time interval. The velocity derivative converts the integral into the difference of endpoint velocities. +3. Multiplying that velocity difference by the constant mass gives the change in momentum. ## Real world -### Airbags and crumple zones -Both extend the collision time to reduce peak force for the same necessary change in momentum. +### Comparing contact forces -### Padded flooring and mats -Gymnastics and martial arts mats extend landing time to reduce impact force on joints. +Two contacts can produce the same momentum change with different force histories. Compare the area over the whole contact, not just the largest force. -### Rocket thrust -Total impulse delivered by a rocket engine (area under its thrust-time curve) determines the resulting change in the rocket's momentum. +### Force measurements -### Follow-through in sports -Extending contact time in a golf or tennis swing changes the force profile while delivering the same or greater impulse. +A force sensor recording a pulse can be used to estimate impulse numerically. The recording window and sampling rate must capture the pulse adequately. diff --git a/content/lessons/physics/momentum-and-impulse/lesson.yaml b/content/lessons/physics/momentum-and-impulse/lesson.yaml index 66e12df3..f5984e0e 100644 --- a/content/lessons/physics/momentum-and-impulse/lesson.yaml +++ b/content/lessons/physics/momentum-and-impulse/lesson.yaml @@ -76,7 +76,7 @@ presets: a: 0.4 b: 0.6 challenges: - - check: Fmax*w + - check: 'b > a ? Fmax*w*sqrt(pi)/2*(erf((b-0.5)/w)-erf((a-0.5)/w)) : -1' target: 1.5 - check: abs(Fmax-5)<0.3 and w>0.3 - check: w<0.05 and Fmax<3 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/lessons/physics/pressure-in-fluids/ar.md b/content/lessons/physics/pressure-in-fluids/ar.md index 32524f41..f5ffacf8 100644 --- a/content/lessons/physics/pressure-in-fluids/ar.md +++ b/content/lessons/physics/pressure-in-fluids/ar.md @@ -1,67 +1,62 @@ --- title: الضغط في الموائع -summary: >- - لماذا تؤلمك أذناك في قاع المسبح؟ ولماذا السد أسمك عند قاعدته؟ الضغط يزيد مع العمق. +summary: 'احسب زيادة الضغط مع العمق في مائع ساكن، وميّز ضغط السطح عن الضغط الإضافي الناتج عن العمق.' parameters: - rho: كثافة المائع ρ - x: العمق x + rho: 'ρ — كثافة المائع الثابتة' + x: 'x — العمق تحت السطح' variables: - - العمق تحت السطح - - الضغط عند ذلك العمق - - الضغط عند السطح (الجوي، عند $x = 0$) - - كثافة المائع + - 'العمق الرأسي تحت سطح المائع' + - 'الضغط المطلق الكلي عند ذلك العمق' + - 'ضغط السطح الثابت، وقيمته 101325 Pa' + - 'كثافة المائع الثابتة بوحدة kg/m³' --- ## Try it -1. راقب المنحنى يبدأ عند السطح، x = 0. -2. حرّك المنزلق «العمق x» إلى الأسفل. راقب الضغط يرتفع بخط مستقيم. -3. ارفع الآن «كثافة المائع ρ» نحو شيء أكثف، كماء البحر. يزداد ميل الخط حدة. +1. اجعل الكثافة 1000 kg/m³ والعمق 0 m. يقرأ الرسم 101.325 kPa، وهو ضغط السطح المستخدم في النموذج، وليس صفرًا. +2. زد العمق إلى 10 m. يضيف المائع 98.1 kPa، فيصبح الضغط الكلي 199.425 kPa. +3. أبقِ العمق 10 m وارفع الكثافة إلى 1200 kg/m³. تصبح الزيادة 117.72 kPa والضغط الكلي 219.045 kPa. تغيّر الكثافة ميل الخط، لا قيمته عند السطح. ## Real-life examples -1. **بركة سباحة بعمق 3 أمتار.** في الماء العذب (1000 kg/m³)، الضغط عند قاع بركة عمقها 3 أمتار أعلى بشكل ملحوظ بالفعل من ضغط السطح. -2. **الغوص في البحر عند عمق 10 أمتار.** ماء البحر أكثف قليلًا (1020 kg/m³) من الماء العذب، وعند عمق 10 أمتار يرتفع الضغط بمقدار ضغط جوي واحد تقريبًا. -3. **الطفو في البحر الميت عند عمق 5 أمتار.** ماء البحر الميت أكثر ملوحة وكثافة (1240 kg/m³) بكثير، فيتصاعد الضغط مع العمق أسرع منه في ماء البحر العادي. +1. **مائع قريب من الماء عند 3 m.** عند كثافة 1000 kg/m³، تبلغ الزيادة 29.43 kPa والضغط الكلي 130.755 kPa. +2. **مائع أكثف قليلًا عند 10 m.** عند 1020 kg/m³، تبلغ الزيادة 100.062 kPa والضغط الكلي 201.387 kPa. +3. **مائع أكثف عند 5 m.** عند 1240 kg/m³، تبلغ الزيادة 60.822 kPa والضغط الكلي 162.147 kPa. هذه كثافات مختارة لتوضيح النموذج؛ وتتأثر القيم الفعلية بتركيب المائع وحرارته. ## Test yourself -1. اجعل الضغط الكلي يصل إلى 200,000 Pa، أي نحو ضعف الضغط الجوي. -2. جِد عمقًا وكثافة تجعل الزيادة في الضغط الناتجة عن العمق وحده تساوي 50,000 Pa. -3. مع إبقاء المائع ماءً عذبًا (ρ=1000 kg/m³)، جِد العمق الذي يصل عنده الضغط إلى 150,000 Pa. +1. اجعل الضغط الكلي قريبًا من 200000 Pa، وتظهر هذه القيمة على الرسم بوصفها 200 kPa. +2. اجعل زيادة الضغط فوق قيمة السطح قريبة من 50000 Pa، أي 50 kPa. +3. أبقِ الكثافة 1000 kg/m³، واجعل الضغط الكلي لا يبتعد عن 150000 Pa بأكثر من 3000 Pa. ## Intuition -تخيل الغوص إلى عمق 3 أمتار في بركة سباحة ماؤها عذب بكثافة 1000 كجم/م³. حرّك المنزلق «العمق x» إلى الأسفل وراقب المنحنى يرتفع بخط مستقيم تمامًا، بلا انحناء وبلا تسطّح، لأن كل متر إضافي من الماء فوقك يضيف الوزن نفسه بالضبط فوق كل ما تحته. عند العمق صفر يبدأ المنحنى من الضغط الجوي العادي لا من الصفر، لأن الهواء فوق السطح يضغط بالفعل. +تخيّل عمودًا صغيرًا من مائع ساكن. يجب أن يكون الضغط عند أسفله أكبر منه عند أعلاه كي يوازن وزن المائع. إضافة متر آخر من المائع نفسه تضيف الوزن نفسه لكل وحدة مساحة، لذلك يزيد الضغط خطيًا مع العمق عندما تثبت الكثافة والجاذبية. -ارفع الآن «كثافة المائع ρ» من الماء العذب نحو شيء أكثف، كماء البحر بكثافة 1020 كجم/م³ أو البحر الميت المالح بكثافة 1240 كجم/م³، وراقب ميل الخط يزداد حدة. العمق نفسه يحمل الآن وزنًا أكبر بكثير على كل متر مربع، فيقفز الضغط عند أي عمق معين. +يوجد ضغط على السطح أصلًا. نثبته هنا عند 101325 Pa، ويضيف السائل إليه مع زيادة العمق. نسمي المجموع «الضغط المطلق»، أما الزيادة بالنسبة إلى السطح فهي فرق الضغط ρgx. يؤثر الضغط في كل الاتجاهات عند نقطة في مائع ساكن، لذلك تتعرض الجدران الجانبية للضغط أيضًا. ليس الضغط قوة متجهة إلى أسفل فقط. ## Formal -يزداد الضغط الهيدروستاتيكي خطيًا مع العمق: $P = P_0 + \rho g x$، حيث $P_0$ هو الضغط عند السطح و $x$ يُقاس عموديًا هبوطًا منه. +لمائع ساكن ذي كثافة ثابتة ρ وتسارع جاذبية ثابت g، تكون $P=P_0+\rho gx$. يمثل x العمق الرأسي تحت السطح، وP₀ ضغط السطح. نستخدم في النموذج $P_0=101325\ \mathrm{Pa}$ و$g=9.81\ \mathrm{m/s^2}$. -ميل هذا الخط هو $\rho g$، أي الضغط لكل متر من العمق، فمضاعفة كثافة المائع تضاعف سرعة تزايد الضغط مع العمق. +فرق الضغط عن السطح هو $\Delta P=\rho gx$، وميل العلاقة هو $dP/dx=\rho g$. الباسكال نيوتن واحد لكل متر مربع، و$1\ \mathrm{kPa}=1000\ \mathrm{Pa}$. يعرض الرسم الثنائي والمسبار الثلاثي الضغط الكلي بالكيلوباسكال، بينما تحسب التحديات بالباسكال. ## Advanced -تفترض هذه الصيغة مائعًا غير قابل للانضغاط بكثافة منتظمة، وهو تقريب ممتاز للماء أو الزئبق عند أعماق عادية. لكنها تنهار عند غاز كالهواء، إذ تنخفض كثافته نفسها مع الارتفاع. لهذا يكون المنحنى الحقيقي لضغط الغلاف الجوي أسّيًا لا خطيًا، لأن $\rho$ في الصيغة لم تعد ثابتة. +إذا تغيرت الكثافة أو الجاذبية كثيرًا مع العمق، نكامل dP/dx = ρ(x)g(x) بدل استخدام حاصل ضرب ثابت. ينتج الشكل الأسي للضغط الجوي عند افتراضات إضافية، مثل غاز مثالي ثابت الحرارة وجاذبية ثابتة، وليس وصفًا عامًا لكل غلاف جوي. يستخدم العرض ضغط سطح ثابتًا، ولا يحاكي آثار جريان المائع. ## Derivation -1. شريحة أفقية رقيقة من المائع، سُمكها $dx$، تضيف وزنها لكل وحدة مساحة، $\rho g\,dx$، إلى الضغط الذي يدفع كل ما تحتها. -2. جمع كل تلك الشرائح من السطح حتى العمق $x$ يعطي الضغط الإضافي الكلي، $\rho g x$، فوق ضغط السطح. -3. إضافة ذلك إلى ضغط السطح يعطي الضغط عند أي عمق، $P = P_0 + \rho g x$. +1. نوازن القوى على شريحة مائع أفقية رقيقة. يجب أن توازن زيادة الضغط عبر سماكة dx وزنها لكل وحدة مساحة، أي ρg dx. +2. نكامل من السطح إلى العمق x مع ثبات الكثافة والجاذبية. +3. نضيف الزيادة الناتجة إلى ضغط السطح المعلوم، فنحصل على الضغط الكلي. ## Real world -### ألم الأذنين أثناء الغوص -الماء أكثف من الهواء بنحو 800 مرة. فالنزول بضعة أمتار فقط في حوض سباحة يضيف جزءًا ملحوظًا من ضغط جوي كامل، وتشعر به في طبلتي أذنيك. +### أوعية متصلة -### السدود الأسمك عند القاعدة -يبني المهندسون السد أسمك بكثير قرب القاعدة، لأن ضغط الماء هناك، والقوة التي يسلطها على الجدار، أكبر بكثير منه قرب السطح. +للمائع الساكن نفسه في أوعية متصلة تحت السطح ضغط متساوٍ عند أعماق متساوية إذا اتفقت شروط السطح، حتى لو اختلفت أشكال الأوعية. -### قاعدة العشرة أمتار للغواصين -يرتفع ضغط الماء بمقدار ضغط جوي واحد تقريبًا كل 10 أمتار من العمق، وهي قاعدة تقريبية يستخدمها الغواصون لتخطيط سلوك أسطواناتهم وطفوهم. +### القوى على الجدران -### أجسام الغواصات -تُبنى أجسام الغواصات لتتحمل ضغطًا هيدروستاتيكيًا يزداد باطراد أثناء الغوص. ويحدد مقدار الضغط الذي يتحمله جسم الغواصة قبل أن ينهار أقصى عمق آمن لها. +يزداد الضغط نحو قاع خزان مملوء بالسائل. ولإيجاد القوة الكلية على جدار، نكامل الضغط على مساحته ونحسب الضغط على الجانب الآخر أيضًا. diff --git a/content/lessons/physics/pressure-in-fluids/en.md b/content/lessons/physics/pressure-in-fluids/en.md index a16e85dc..b961247b 100644 --- a/content/lessons/physics/pressure-in-fluids/en.md +++ b/content/lessons/physics/pressure-in-fluids/en.md @@ -1,68 +1,62 @@ --- title: Pressure in fluids -summary: >- - This is why your ears hurt when you dive to the bottom of a pool, and why - dams are built much thicker at the base than at the top. +summary: 'Calculate how pressure increases with depth in a stationary fluid, keeping surface pressure separate from the added pressure.' parameters: - rho: fluid density ρ - x: depth x + rho: 'ρ — constant fluid density' + x: 'x — depth below the surface' variables: - - depth below the surface - - pressure at that depth - - pressure at the surface (atmospheric, at $x = 0$) - - fluid density + - 'vertical depth below the fluid surface' + - 'total absolute pressure at that depth' + - 'surface pressure, fixed at 101325 Pa' + - 'constant fluid density in kg/m³' --- ## Try it -1. Watch the curve start at the surface, x = 0. -2. Drag the slider "depth x" deeper. Watch the pressure climb in a straight line. -3. Now raise "fluid density ρ" toward something denser, like seawater. The line's slope gets steeper. +1. Set density to 1000 kg/m³ and depth to 0 m. The graph reads 101.325 kPa, the surface pressure used in this model, rather than zero. +2. Increase depth to 10 m. The fluid adds 98.1 kPa, giving total pressure 199.425 kPa. +3. Keep depth at 10 m and increase density to 1200 kg/m³. The added pressure becomes 117.72 kPa and total pressure 219.045 kPa. Density changes the slope of the line, not its surface intercept. ## Real-life examples -1. **Swimming pool, 3 m deep.** In fresh water (1000 kg/m³), the pressure at the bottom of a 3 m pool is already noticeably higher than at the surface. -2. **Scuba diving in the sea at 10 m.** Seawater is slightly denser (1020 kg/m³) than fresh water, and at 10 m depth the pressure has risen by about one atmosphere. -3. **Floating in the Dead Sea at 5 m.** The Dead Sea's water is far saltier and denser (1240 kg/m³), so pressure builds up faster with depth than in ordinary seawater. +1. **A water-like fluid at 3 m.** At density 1000 kg/m³, the increase is 29.43 kPa and total pressure is 130.755 kPa. +2. **A slightly denser fluid at 10 m.** At 1020 kg/m³, the increase is 100.062 kPa and total pressure is 201.387 kPa. +3. **A denser fluid at 5 m.** At 1240 kg/m³, the increase is 60.822 kPa and total pressure is 162.147 kPa. These chosen densities illustrate the model; fluid composition and temperature affect actual values. ## Test yourself -1. Make the total pressure reach 200,000 Pa (about twice atmospheric pressure). -2. Find a depth and density where the pressure increase from the surface alone equals 50,000 Pa. -3. Keeping the fluid as fresh water (ρ=1000 kg/m³), find the depth where the pressure reaches 150,000 Pa. +1. Make total pressure approximately 200000 Pa, shown as 200 kPa on the graph. +2. Make the pressure increase above the surface value approximately 50000 Pa, or 50 kPa. +3. Keep density at 1000 kg/m³ and make total pressure within 3000 Pa of 150000 Pa. ## Intuition -Picture diving to 3 metres in a swimming pool, fresh water with density 1000 kg/m³. Drag the slider "depth x" deeper and watch the curve climb in a dead straight line: no curving, no flattening, because each extra metre of water above you adds exactly the same weight on top of everything below it. At depth zero the curve starts at ordinary atmospheric pressure, not zero, because the air above the surface is already pressing down. +Imagine a small stationary column of fluid. Pressure at its bottom must be greater than at its top to support the fluid's weight. Adding another metre of the same-density fluid adds the same weight per unit area, so pressure increases linearly with depth when density and gravity are constant. -Now raise "fluid density ρ" from fresh water toward something denser, like seawater at 1020 kg/m³ or the salty Dead Sea at 1240 kg/m³, and watch the line's slope get steeper: the same depth now carries far more weight per square metre, so the pressure at any given depth jumps up. +The surface is already under pressure. Here that pressure is fixed at 101325 Pa, and the liquid adds more as depth increases. The total is called absolute pressure; the increase relative to the surface is the pressure difference ρgx. Pressure acts in every direction at a point in a fluid at rest, so the side walls also experience pressure. It is not a force that acts only downward. ## Formal -Hydrostatic pressure grows linearly with depth: $P = P_0 + \rho g x$, where $P_0$ is the pressure at the surface and $x$ is measured straight down from it. +For a stationary fluid of constant density ρ and constant gravitational acceleration g, $P=P_0+\rho gx$. Here x is vertical depth below the surface and P₀ is surface pressure. This model uses $P_0=101325\ \mathrm{Pa}$ and $g=9.81\ \mathrm{m/s^2}$. -The slope of that line is $\rho g$ — pressure per metre of depth — so doubling the fluid's density doubles how fast pressure builds with depth. +The difference from surface pressure is $\Delta P=\rho gx$, while the slope is $dP/dx=\rho g$. One pascal is one newton per square metre; $1\ \mathrm{kPa}=1000\ \mathrm{Pa}$. The 2D graph and 3D probe display total pressure in kPa, whereas the challenges calculate in Pa. ## Advanced -This formula assumes an incompressible fluid of uniform density, which is an excellent approximation for water or mercury over ordinary depths but breaks down for a gas like air, whose density itself falls with altitude — the true atmospheric pressure profile is exponential, not linear, because $\rho$ in the formula is no longer constant. +If density or gravity varies significantly with depth, integrate dP/dx = ρ(x)g(x) instead of using one constant product. An exponential atmospheric profile follows under additional assumptions such as an isothermal ideal gas and constant gravity; it is not the general profile of every atmosphere. The display uses a fixed surface pressure and does not model flowing-fluid effects. ## Derivation -1. A thin horizontal slab of fluid, thickness $dx$, adds its own weight per unit area, $\rho g\,dx$, to the pressure pushing down on everything beneath it. -2. Adding up all those slabs from the surface down to depth $x$ gives the total extra pressure, $\rho g x$, on top of the surface pressure. -3. Adding that to the surface pressure gives the pressure at any depth, $P = P_0 + \rho g x$. +1. Balance forces on a thin horizontal fluid slab. The pressure increase across thickness dx must support its weight per area, ρg dx. +2. Integrate from the surface to depth x with constant density and gravity. +3. Add the resulting increase to the given surface pressure to obtain total pressure. ## Real world -### Ears hurting when diving -Water is roughly 800 times denser than air, so descending just a few metres in a pool already adds a noticeable fraction of an atmosphere, enough to feel in your eardrums. +### Connected containers -### Dams built thicker at the base -Engineers make a dam far thicker near the bottom because the water pressure there, and the force it exerts on the wall, is much greater than near the surface. +The same stationary fluid connected beneath the surface has equal pressure at equal depths when the surface conditions agree, even if the containers have different shapes. -### The 10-metre rule for divers -Water pressure rises by about one atmosphere for roughly every 10 metres of depth, a rule of thumb divers use to plan how their tanks and buoyancy will behave. +### Forces on walls -### Submarine hulls -Submarine hulls are built to withstand steadily rising hydrostatic pressure as they dive, with a strict depth limit set by how much pressure the hull can take before failing. +Pressure increases toward the bottom of a liquid-filled tank. To find the total force on a wall, integrate pressure over its area and account for pressure on the other side. diff --git a/content/lessons/physics/projectile-motion/ar.md b/content/lessons/physics/projectile-motion/ar.md index 96cc931b..c8b64183 100644 --- a/content/lessons/physics/projectile-motion/ar.md +++ b/content/lessons/physics/projectile-motion/ar.md @@ -1,65 +1,63 @@ --- title: حركة المقذوفات -summary: >- - كل كرة سلة ونافورة ترسم القوس نفسه، وزاوية 45 درجة تعطي أبعد رمية. +summary: 'افصل حركة المقذوف المثالي إلى حركة أفقية بسرعة ثابتة، وحركة رأسية تتغير سرعتها بفعل الجاذبية.' parameters: - v: سرعة الإطلاق v - th: زاوية الإطلاق θ - x: الموضع الأفقي x + v: 'v — السرعة الابتدائية' + th: 'θ — زاوية الإطلاق فوق الأفقي' + x: 'x — الموضع الأفقي' variables: - - سرعة الإطلاق - - زاوية الإطلاق فوق الأفق - - تسارع الجاذبية الأرضية، 9.81 m/s² - - المسافة الأفقية والارتفاع، والأرض عندها y = 0 + - 'مقدار السرعة لحظة الإطلاق' + - 'زاوية الإطلاق مقيسة فوق الاتجاه الأفقي' + - 'تسارع الجاذبية الثابت إلى أسفل، 9.81 m/s²' + - 'الموضع الأفقي والارتفاع بالنسبة إلى نقطة الإطلاق' --- ## Try it -1. راقب الكرة تنطلق وترسم مسارًا منحنيًا في الهواء. -2. حرّك المنزلق «زاوية الإطلاق θ» من 5° إلى 85°. راقب نقطة الهبوط تتباعد ثم تبلغ أقصاها ثم تعود. -3. حرّك الآن «سرعة الإطلاق v» إلى الأعلى. يتمدد القوس كله بعيدًا وعاليًا أكثر. +1. في العرض الثنائي الأبعاد، أوقف الحركة واجعل v = 20 m/s وθ = 45°. يعود المسار إلى ارتفاع الإطلاق عند x ≈ 40.77 m. +2. حرّك x على المنحنى. يكون المماس أفقيًا قرب x = 20.39 m، عند أعلى نقطة. السرعة الرأسية هناك صفر، لكن السرعة الأفقية والتسارع إلى أسفل ليسا صفرًا. +3. أبقِ v = 20 m/s وقارن θ = 30° و60°. المدى في الحالتين نحو 35.31 m، لكن زاوية 60° تعطي ارتفاعًا أكبر وزمن تحليق أطول. سرعة عرض المؤشر الثنائي توضيحية؛ فـx موضع أفقي، وليس زمنًا منقضيًا. ## Real-life examples -1. **رمية كرة سلة حرة.** بسرعة إطلاق نحو 8 m/s وقوس حاد 50°، تسقط الكرة في السلة من الأعلى. -2. **رمية جافلين.** بسرعة نحو 25 m/s وزاوية 35°، توازن الرمية المتقنة بين زاوية الإطلاق ومدى الجافلين قبل أن يهبط. -3. **ضربة غولف بعيدة.** إطلاق منخفض وسريع بزاوية 15° وسرعة 30 m/s يرسل الكرة تنزلق بعيدًا على طول الملعب بدل أن ترتفع عاليًا. +1. **رمي قصير في نموذج مثالي.** عند 8 m/s و50°، يبلغ المدى عند العودة إلى ارتفاع الإطلاق نحو 6.42 m، والارتفاع الأقصى فوقه 1.91 m. الهدف الموجود عند ارتفاع مختلف يحتاج إلى حساب آخر. +2. **زاوية متوسطة.** عند 25 m/s و35°، يبلغ المدى نحو 59.87 m والارتفاع الأقصى نحو 10.48 m، في نموذج يهمل مقاومة الهواء. +3. **زاوية منخفضة.** عند 30 m/s و15°، يبلغ المدى نحو 45.87 m، بينما لا يتجاوز الارتفاع الأقصى 3.07 m. هذه قيم لمقذوف مثالي، وليست وصفًا دقيقًا لكرة غولف تتأثر بالرفع والمقاومة. ## Test yourself -1. اجعل الكرة تهبط على بعد 40 m بالضبط. -2. أبقِ سرعة الإطلاق عند 20 m/s وجِد الزاوية التي تعطي أبعد مدى ممكن. -3. مع تثبيت السرعة عند 20 m/s، جِد زاوية أقل من 40° تُهبط الكرة عند المسافة نفسها 40 m التي تعطيها زاوية 45°. +1. اختر سرعة وزاوية تعطيان مدى قريبًا من 40 m عند العودة إلى ارتفاع الإطلاق. +2. اجعل السرعة 20 m/s، واختر الزاوية التي تعطي أكبر مدى في هذا النموذج. +3. أبقِ السرعة 20 m/s، وابحث عن زاوية أقل من 40° تعطي مدى لا يبتعد عن 40 m بأكثر من متر. مدى الإطلاق بزاوية 45° نحو 40.77 m، وليس 40 m بالضبط. ## Intuition -تخيل كرة سلة تُقذف بسرعة 8 أمتار في الثانية وزاوية حادة قدرها 50°. تفعل الكرة أمرين مستقلين في آن واحد. تنجرف جانبيًا بسرعة ثابتة، وتسقط تمامًا كأنك أسقطتها من دون قذف. يُظهر خط المماس على المنحنى اتجاه حركتها في كل لحظة، وهو أفقي تمامًا عند قمة القوس، حيث تكون السرعة الرأسية قد استُهلكت بالكامل. +تخيّل أن الجاذبية هي القوة الوحيدة المؤثرة بعد الإطلاق. لا يوجد تسارع أفقي، لذلك يقطع المقذوف إزاحات أفقية متساوية خلال أزمنة متساوية. أما رأسيًا، فيبدأ بسرعة إلى أعلى، وتقل هذه المركبة بمقدار 9.81 m/s كل ثانية. تصل السرعة الرأسية إلى صفر عند القمة، ثم تزداد سرعتها إلى أسفل. جمع الحركتين يعطي مسارًا على شكل قطع مكافئ. -حرّك المنزلق «زاوية الإطلاق θ» من 5° حتى 85°. تتباعد نقطة الهبوط أولًا ثم تبلغ أقصاها عند 45° ثم تعود، وتهبط الكرة في النقطة نفسها عند زاويتين يكون مجموعهما 90°، مثل 30° و60°. الجزء من المنحنى الواقع تحت الأرض هو المسار الذي كانت ستواصله الكرة لو لم تكن الأرض موجودة. +توزع زاوية الإطلاق السرعة الابتدائية على مركبتين أفقية ورأسية. الزاوية الأكبر تعطي مركبة رأسية أكبر وأفقية أصغر. عند ثبات سرعة الإطلاق وتساوي ارتفاعي البداية والنهاية وإهمال المقاومة، تحقق زاوية 45° أكبر مدى. الجزء الواقع تحت y = 0 امتداد رياضي بعد المرور بارتفاع الإطلاق، وليس مسارًا داخل أرض صلبة. يتوقف العرض الثلاثي الأبعاد عند نقطة الهبوط على ارتفاع البداية نفسه. ## Formal -يتحقّق $x = v\cos\theta\, t$ و$y = v\sin\theta\, t - \tfrac12 g t^2$، وحذف $t$ من المعادلتين يعطي مسار الحركة. +إذا اخترنا نقطة الإطلاق أصلًا والاتجاه إلى أعلى موجبًا، فإن $x=v\cos\theta\,t$ و$y=v\sin\theta\,t-\tfrac12gt^2$، مع $g=9.81\ \mathrm{m/s^2}$. نفترض جاذبية ثابتة ونهمل مقاومة الهواء. تمثل v السرعة الابتدائية، لا مقدار السرعة طوال الرحلة. -المدى $R = \dfrac{v^2 \sin 2\theta}{g}$، والارتفاع الأقصى $\dfrac{v^2\sin^2\theta}{2g}$. +للزوايا الموجبة الأقل من 90° والهبوط عند ارتفاع الإطلاق، تكون $T=2v\sin\theta/g$ و$R=v^2\sin(2\theta)/g$ و$H=v^2\sin^2\theta/(2g)$. يمثل T زمن التحليق، وR المدى الأفقي، وH أقصى ارتفاع فوق نقطة الإطلاق. ولأن أكبر قيمة للجيب هي واحد، يبلغ المدى أقصاه عند 45° ضمن هذه الافتراضات. ## Advanced -مع مقاومة هواء خطية $-b\mathbf{v}$ تظل المركبتان منفصلتين، لكن المسار لم يعد متماثلًا وتنخفض الزاوية المثلى عن 45°. أما مع مقاومة تربيعية فتترابط المعادلتان ويجب حلها عدديًا. +بحذف الزمن نحصل على معادلة y(x) المعروضة، بشرط ألا تكون مركبة السرعة الأفقية الابتدائية صفرًا. ميل المسار هو dy/dx = vᵧ/vₓ، أي نسبة تحدد الاتجاه، وليس السرعة الرأسية نفسها. تغيّر مقاومة الهواء أو الدوران أو الجاذبية المتغيرة أو اختلاف ارتفاعي البداية والنهاية المسألة؛ فلا نعمم نتيجة 45° دون مراجعة الافتراضات الجديدة. ## Derivation -1. لا توجد قوة أفقية، بل قوة رأسية ثابتة نحو الأسفل فقط مقدارها $mg$. -2. حل المعادلة الأولى لإيجاد الزمن. -3. عوّض فتنتج معادلة تربيعية في $x$، أي قطع مكافئ. +1. نستخدم تسارعًا أفقيًا صفريًا وتسارعًا رأسيًا ثابتًا −g لكتابة معادلتي الموضع. +2. نحل المعادلة الأفقية لإيجاد الزمن. يتطلب ذلك ألا تساوي v cos θ صفرًا. +3. نعوض الزمن في المعادلة الرأسية، فنحصل على مسار القطع المكافئ. ## Real world -### الرياضة -أقواس كرة السلة والوثب الطويل وضربات الغولف كلها مسائل تتعلق بزاوية الإطلاق. +### جسم مقذوف -### النوافير والخراطيم -تتبع كل قطرة ماء تخرج من نافورة أو خرطوم القطع المكافئ نفسه، والتيار كله يرسمه أمامك. +قد يقارب هذا النموذج حركة جسم كثيف لمسافة قصيرة عندما تكون مقاومة الهواء صغيرة. عند مقارنة الحساب بقياس فعلي، نستخدم ارتفاعي الإطلاق والهبوط الحقيقيين. -### الرحلات الفضائية -اقذف بسرعة كافية فتنحني الأرض بعيدًا بالسرعة نفسها التي تسقط بها. فالمدار هو مقذوف يظل يخطئ الأرض باستمرار. +### تيار ماء + +قد ترسم قطرات الماء الخارجة من فوهة مسارًا قريبًا من مسار المقذوف. تحد مقاومة الهواء وتفتت التيار وتفاعل القطرات من دقة هذا التقريب. diff --git a/content/lessons/physics/projectile-motion/en.md b/content/lessons/physics/projectile-motion/en.md index e945ed0b..64476cea 100644 --- a/content/lessons/physics/projectile-motion/en.md +++ b/content/lessons/physics/projectile-motion/en.md @@ -1,66 +1,63 @@ --- title: Projectile motion -summary: >- - This is the physics behind every basketball arc, fountain jet and long - jump — and why 45° gives you the longest possible throw. +summary: 'Split an ideal projectile’s motion into constant horizontal velocity and vertically accelerated motion under gravity.' parameters: - v: launch speed v - th: launch angle θ - x: horizontal position x + v: 'v — initial speed' + th: 'θ — launch angle above horizontal' + x: 'x — horizontal position' variables: - - launch speed - - launch angle above the horizontal - - 'gravitational acceleration, 9.81 m/s²' - - horizontal distance and height; the ground is y = 0 + - 'speed at launch' + - 'launch angle above the horizontal' + - 'constant downward gravitational acceleration, 9.81 m/s²' + - 'horizontal position and height relative to the launch point' --- ## Try it -1. Watch the ball launch and trace a curved path through the air. -2. Drag the slider "launch angle θ" from 5° to 85°. Watch the landing point move out, peak, then come back. -3. Now drag "launch speed v" up. The whole arc stretches further and higher. +1. In the 2D view, pause the animation and set v = 20 m/s and θ = 45°. The trajectory returns to launch height at about x = 40.77 m. +2. Move x along the curve. Its tangent is horizontal near x = 20.39 m, at the highest point. Vertical velocity is zero there, but horizontal velocity and downward acceleration are not. +3. Keep v = 20 m/s and compare θ = 30° with 60°. Both ranges are about 35.31 m, but 60° gives a higher arc and longer flight. The 2D marker's playback speed is illustrative; x is horizontal position, not elapsed time. ## Real-life examples -1. **A basketball free throw.** Launched at about 8 m/s and a steep 50° arc, the ball drops into the hoop from above. -2. **A javelin throw.** At roughly 25 m/s and 35°, an elite throw balances launch angle against how far the javelin can travel before landing. -3. **A golf drive.** A low, fast 15° launch at 30 m/s sends the ball skimming far down the fairway rather than arcing high. +1. **A short ideal throw.** At 8 m/s and 50°, the same-height range is about 6.42 m and maximum height above launch is 1.91 m. A target at another height requires a different calculation. +2. **A moderate angle.** At 25 m/s and 35°, the range is about 59.87 m and the maximum height about 10.48 m in this drag-free model. +3. **A low angle.** At 30 m/s and 15°, the range is about 45.87 m while maximum height is only 3.07 m. These values describe an ideal projectile, not a realistic golf ball with lift and drag. ## Test yourself -1. Make the ball land exactly 40 m away. -2. Keep the launch speed at 20 m/s and find the angle that gives the greatest possible range. -3. With speed fixed at 20 m/s, find an angle below 40° that lands the ball at the same 40 m distance as a 45° launch. +1. Choose speed and angle giving a same-height range near 40 m. +2. Set speed to 20 m/s and choose the angle that maximizes range in this model. +3. Keep speed at 20 m/s and find an angle below 40° with range within 1 m of 40 m. The 45° range is about 40.77 m, not exactly 40 m. ## Intuition -Picture a basketball launched at 8 m/s at a steep 50° angle: it does two independent things at once, drifting sideways at a steady speed while falling exactly as if it had been dropped. The tangent line on the curve shows its direction of travel at each moment, flat at the top of the arc, where all the vertical speed has been used up. +After launch, imagine gravity is the only force. There is no horizontal acceleration, so equal time intervals give equal horizontal displacements. Vertically, the projectile begins with an upward velocity and loses 9.81 m/s of that component each second. It reaches zero vertical velocity at the top, then gains downward velocity. Combining these motions produces a parabola. -Drag the slider "launch angle θ" from 5° up to 85°: the landing point moves out, peaks at 45°, then comes back in, and two angles that add up to 90°, say 30° and 60°, land in the same spot. The part of the curve below the ground is where the ball would keep going if the floor weren't there. +The launch angle divides the initial velocity into horizontal and vertical components. A steeper launch gives more upward velocity but less horizontal velocity. At a fixed launch speed, equal launch and landing heights, and without drag, 45° balances these effects to give maximum range. The curve below y = 0 is a mathematical continuation after passing launch height, not a path through a solid floor. The 3D animation stops at the same-height landing point. ## Formal -$x = v\cos\theta\, t$ and $y = v\sin\theta\, t - \tfrac12 g t^2$; eliminating $t$ gives the trajectory. +Taking the launch point as the origin and upward as positive, $x=v\cos\theta\,t$ and $y=v\sin\theta\,t-\tfrac12gt^2$, with $g=9.81\ \mathrm{m/s^2}$. The model assumes constant gravity and no air resistance; v here is the initial speed, not the speed throughout flight. -Range $R = \dfrac{v^2 \sin 2\theta}{g}$, maximum height $\dfrac{v^2\sin^2\theta}{2g}$. +For positive launch angles below 90° and landing at the launch height, $T=2v\sin\theta/g$, $R=v^2\sin(2\theta)/g$, and $H=v^2\sin^2\theta/(2g)$. Here T is flight time, R horizontal range and H maximum height above launch. Since sine is at most one, range is largest at 45° under these assumptions. ## Advanced -With linear drag $-b\mathbf{v}$ the components still decouple, but the path is no longer symmetric and the optimum angle drops below 45°. With quadratic drag the equations couple and must be integrated numerically. +Eliminating time gives the displayed y(x) equation when the horizontal launch velocity is nonzero. Its slope is dy/dx = vᵧ/vₓ, a direction ratio, not the vertical velocity itself. Air resistance, spin, varying gravity or unequal endpoint heights change the problem; the 45° result cannot be carried over without checking the new assumptions. ## Derivation -1. No horizontal force; constant downward force $mg$. -2. Solve the first equation for the time. -3. Substitute: a quadratic in $x$ — a parabola. +1. Use zero horizontal acceleration and constant downward acceleration −g to write the two position equations. +2. Solve the horizontal equation for time. This requires v cos θ to be nonzero. +3. Substitute that time into the vertical equation to obtain the parabolic trajectory. ## Real world -### Sport -Basketball arcs, long jumps and golf drives are all launch-angle problems. +### A thrown object -### Fountains and hoses -Each water droplet is a projectile; the stream draws the parabola for you. +A dense object moving over a short distance may be approximately described by this model when air resistance is small. Use the actual launch and landing heights when comparing with a measurement. -### Spaceflight -Throw fast enough and the ground curves away as quickly as you fall — an orbit is a projectile that keeps missing. +### A stream of water + +Droplets leaving a nozzle can trace an approximate projectile path. Air resistance, breakup of the stream and interactions between droplets limit the approximation. diff --git a/content/lessons/physics/simple-harmonic-motion/ar.md b/content/lessons/physics/simple-harmonic-motion/ar.md index f3a6254b..187dcb92 100644 --- a/content/lessons/physics/simple-harmonic-motion/ar.md +++ b/content/lessons/physics/simple-harmonic-motion/ar.md @@ -1,69 +1,64 @@ --- title: الحركة التوافقية البسيطة -summary: >- - ساعة البندول تحافظ على توقيتها مهما اتسع تأرجحها. لكل وتر ونابض إيقاعه الخاص. +summary: 'تتبّع نابضًا مثاليًا نتركه من السكون، وافهم كيف تحدد الكتلة والصلابة زمن الاهتزازة.' parameters: - A: السعة A - k: ثابت النابض k - m: الكتلة m - x: الزمن t + A: 'A — أقصى إزاحة عن الاتزان' + k: 'k — ثابت صلابة النابض' + m: 'm — الكتلة المهتزة' + x: 't — الزمن منذ الإطلاق' variables: - - السعة، أي مقدار سحب الكتلة إلى الوراء في البداية - - صلابة النابض - - الكتلة المتذبذبة - - التردد الزاوي للتذبذب + - 'أقصى إزاحة عن موضع الاتزان' + - 'صلابة النابض' + - 'كتلة الجسم المهتز الثابتة' + - 'التردد الزاوي بالراديان لكل ثانية' --- ## Try it -1. شغّل الحركة وراقب الكتلة تتأرجح ذهابًا وإيابًا على النابض. -2. حرّك «السعة A» إلى الأوسع أو الأضيق. احسب الزمن بين القمم، فستجده ثابتًا. -3. حرّك الآن «ثابت النابض k» أو «الكتلة m» بدلًا منها. يتمدد الزمن بين القمم أو يتقلص بوضوح. +1. اجعل A = 3 m وk = 1 N/m وm = 1 kg. يبدأ الموضع عند +3 m بسرعة صفرية، ويتكرر بعد نحو 6.28 s. +2. ثبّت k وm وقلّل A إلى 1 m. تقل الإزاحة القصوى والسرعة القصوى، لكن الزمن بين قمتين متتاليتين يبقى نحو 6.28 s. +3. أبقِ m = 1 kg وزد k إلى 4 N/m. ينخفض الزمن الدوري إلى النصف، نحو 3.14 s. في العرض الثنائي قارن منحنى الموضع بمشتقته المتقطعة: السرعة صفر عند طرفي الحركة، ويبلغ مقدارها أقصاه عند عبور الاتزان. ## Real-life examples -1. **كتلة ثقيلة على نابض صناعي.** سُحبت مسافة 1 m بنابض صلابته 2 N/m يحمل كتلة 3 kg، فتتأرجح ذهابًا وإيابًا كل 7.7 ثانية بصرف النظر عن مقدار سحبها. -2. **نابض تعليق سيارة صلب.** نابض أصلب صلابته 4 N/m مع حمل أخف كتلته 0.5 kg يتذبذب أسرع بكثير، فيكمل دورة كل نحو 2.2 ثانية. -3. **نابض ليّن ومطاطي.** نابض ليّن صلابته 0.3 N/m مع كتلة 1 kg يتذبذب ببطء، فيستغرق نحو 11.5 ثانية للدورة الواحدة، وهذا دليل على أن النابض الأكثر ليونة يعني تذبذبًا أبطأ. +1. **كتلة أكبر في النموذج.** عند A = 1 m وk = 2 N/m وm = 3 kg، يبلغ الزمن الدوري نحو 7.70 s والسرعة القصوى نحو 0.816 m/s. +2. **نابض أصلب وكتلة أخف.** عند A = 0.5 m وk = 4 N/m وm = 0.5 kg، يبلغ الزمن الدوري نحو 2.22 s والسرعة القصوى نحو 1.41 m/s. +3. **نابض أقل صلابة.** عند A = 3 m وk = 0.3 N/m وm = 1 kg، يبلغ الزمن الدوري نحو 11.47 s والسرعة القصوى نحو 1.64 m/s. هذه أمثلة مثالية، وليست مواصفات لنوابض مركبات أو معدات صناعية. ## Test yourself -1. اجعل الدور الزمني للتذبذب 2π ثانية بالضبط (نحو 6.28 s). -2. جِد كتلة لا تقل عن 3 kg تعطي مع ذلك دورًا زمنيًا قريبًا من 2π ثانية. -3. اجعل التذبذب بأقصى اتساع ممكن (A = 4 m) مع إبقاء الدور الزمني أقل من ثانيتين. +1. اجعل الزمن الدوري قريبًا من 6.28 s. +2. اختر m لا يقل عن 3 kg، وقيمة عددية لـk لا تبتعد عن m بأكثر من 0.05. في الوحدات المعطاة يجعل ذلك الزمن الدوري قريبًا من 2π ثانية. +3. اجعل A = 4 m والزمن الدوري أقل من ثانيتين. ## Intuition -تخيل كتلة 3 كجم معلّقة بنابض صلابته 2 نيوتن لكل متر، سُحبت إلى الوراء مسافة 1 متر ثم تُركت. شغّل الحركة وراقب خط المماس ومنحنى المشتقة المتقطع. تساوي المشتقة، أي السرعة، صفرًا بالضبط حين تبلغ الكتلة أبعد نقطة، أي لحظة الانعكاس، وتبلغ أقصاها حين تعبر منتصف المسار بأسرع ما يكون. +نسحب الكتلة بعيدًا عن موضع اتزانها ثم نتركها من السكون. يسحبها النابض نحو الاتزان. عند المركز تكون قوة الإرجاع صفرًا، لكن الكتلة تكون متحركة فتعبره. على الجانب الآخر تبطئها القوة حتى تتوقف وتنعكس حركتها. دون تخميد، يتكرر ذلك من غير تناقص في السعة. -غيّر «السعة A» وحدها فيتسع التذبذب أو يضيق، لكن احسب الزمن بين القمم فلن تجده تغيّر. غيّر الآن «ثابت النابض k» أو «الكتلة m» بدلًا منها، فيتمدد ذلك الزمن أو يتقلص بوضوح. السعة وحدها تحدد مدى اتساع التذبذب، أما الصلابة والكتلة فتحددان سرعته وحدهما. +تتناسب قوة الإرجاع المثالية مع الإزاحة وتعاكس اتجاهها. لذلك تصاحب الإزاحة الأكبر زيادة متناسبة في التسارع، فتستغرق الاهتزازة الأوسع الزمن نفسه. استقلال الزمن الدوري عن السعة يخص النموذج الخطي المثالي. يقيس العرض الثلاثي الإزاحة الموجبة إلى أسفل من علامة الاتزان، ويعرض الرسم الثنائي هذه الإزاحة مقابل الزمن، مع منحنى السرعة على المقياس العددي نفسه رغم اختلاف الوحدات. ## Formal -معادلة الحركة هي $\ddot x + \omega^2 x = 0$ حيث $\omega = \sqrt{k/m}$ وتُشتق من $F = -kx = m\ddot x$. والحل العام هو $x(t) = A\cos(\omega t + \varphi)$. +لكتلة موجبة m وصلابة موجبة k، تتحقق $m\ddot x=-kx$، أو $\ddot x+\omega^2x=0$ مع $\omega=\sqrt{k/m}$. الموضع x إزاحة عن الاتزان، لا الطول الكلي للنابض. يستخدم العرض $x(t)=A\cos(\omega t)$، وهو إطلاق من x = A بسرعة ابتدائية صفرية. -الدور الزمني $T = 2\pi/\omega = 2\pi\sqrt{m/k}$ لا يعتمد على السعة $A$. وهذه هي السمة المميزة للحركة التوافقية البسيطة. +السرعة هي $v(t)=-A\omega\sin(\omega t)$، والزمن الدوري $T=2\pi\sqrt{m/k}$. تغيّر السعة A أقصى إزاحة وأقصى سرعة، لكنها لا تغيّر الزمن الدوري. نقيس التردد الزاوي ω بالراديان لكل ثانية، أما عدد الدورات في الثانية فهو $f=1/T=\omega/(2\pi)$. ## Advanced -استقلال الدور الزمني عن السعة خاصية تخص قوة الاستعادة الخطية تمامًا $F=-kx$. أما النوابض والبندولات الحقيقية فتنحرف عن قانون هوك عند الإزاحات الكبيرة، فيصبح دورها الزمني حينئذ معتمدًا قليلًا على السعة. وتزامن الدور الزمني الذي نراه هنا تبسيط مثالي يحاول مصممو الساعات والمترونومات الاقتراب منه قدر الإمكان ضمن نطاق السعة الذي يعملون فيه. +تضيف شروط بداية أخرى طورًا: x(t) = A cos(ωt+φ). الطاقة المحفوظة هي ½mv² + ½kx² = ½kA². في النابض الرأسي، نقيس x من الاتزان السكوني الذي تتوازن عنده الجاذبية وقوة النابض أصلًا. يقلل التخميد السعة، وقد تجعل قوى الإرجاع غير الخطية الزمن الدوري معتمدًا عليها. ويقارب البندول الحركة التوافقية البسيطة عند الزوايا الصغيرة فقط. ## Derivation -1. قانون هوك مضافًا إليه قانون نيوتن الثاني. -2. جرّب حلًا جيبيًا وعوّضه في المعادلة، فتجده يحققها عند هذه القيمة لـ $\omega$. -3. يتحدد الدور الزمني كليًا بـ $m$ و $k$، لا بـ $A$ ولا $\varphi$. +1. نجمع قانون قوة إرجاع النابض مع قانون نيوتن الثاني، باستخدام الإزاحة من الاتزان. +2. نعوض بدالة جيب تمام ذات تردد زاوي ω. مشتقتها الثانية −ω² مضروبًا في الدالة نفسها، فتتحقق المعادلة عندما ω² = k/m. +3. تتغير الزاوية بمقدار 2π في دورة كاملة، ولذلك T = 2π/ω. لا تظهر السعة في صيغة الزمن الدوري. ## Real world -### ساعات البندول والمترونومات -يعتمد ضبط توقيتها على أن الدور الزمني للتذبذب لا يتغير مع السعة. +### اهتزازات صغيرة -### ارتداد نظام تعليق المركبة -يتذبذب هيكل السيارة على نوابضه بتردد طبيعي تحدده صلابة النوابض وكتلة السيارة. +تملك أنظمة كثيرة قرب اتزان مستقر قوة إرجاع خطية تقريبًا. يمكن عندها لنموذج الكتلة والنابض وصف الحركة الصغيرة حتى لو كان النظام الكامل أعقد. -### الآلات الموسيقية -تتذبذب الأوتار والألسنة وأعمدة الهواء جميعها بشكل توافقي تقريبًا، وهذا ما يحدد طبقة صوتها. +### مقارنة النابض الفعلي بالمثالي -### أجهزة الاستشعار الدقيقة -أنظمة الكتلة والنابض الدقيقة في مقاييس التسارع والجيروسكوبات مذبذبات مصممة تحكمها هذه المعادلة نفسها. +قد تتناقص اهتزازة فعلية أو يتغير زمنها الدوري عند سعة كبيرة. تساعد ملاحظة هذه الاختلافات على تحديد الحاجة إلى تخميد أو نموذج غير خطي. diff --git a/content/lessons/physics/simple-harmonic-motion/en.md b/content/lessons/physics/simple-harmonic-motion/en.md index bd043bf6..18cfce05 100644 --- a/content/lessons/physics/simple-harmonic-motion/en.md +++ b/content/lessons/physics/simple-harmonic-motion/en.md @@ -1,71 +1,64 @@ --- title: Simple harmonic motion -summary: >- - This is why a pendulum clock keeps steady time no matter how far it - swings, and why every guitar string and car suspension settles into its - own natural rhythm. +summary: 'Follow an ideal spring released from rest, and see how mass and stiffness set its oscillation period.' parameters: - A: amplitude A - k: spring constant k - m: mass m - x: time t + A: 'A — maximum displacement from equilibrium' + k: 'k — spring stiffness' + m: 'm — oscillating mass' + x: 't — time since release' variables: - - amplitude — how far the mass is pulled back initially - - spring stiffness - - oscillating mass - - angular frequency of oscillation + - 'maximum displacement from equilibrium' + - 'spring stiffness' + - 'constant oscillating mass' + - 'angular frequency in radians per second' --- ## Try it -1. Let it animate and watch the mass swing back and forth on the spring. -2. Drag "amplitude A" wider or narrower. Time the gap between peaks — it stays the same. -3. Now drag "spring constant k" or "mass m" instead. The time between peaks visibly stretches or shrinks. +1. Set A = 3 m, k = 1 N/m and m = 1 kg. The position starts at +3 m with zero velocity and repeats after about 6.28 s. +2. Keep k and m fixed and reduce A to 1 m. The excursion and maximum speed decrease, but the time between successive peaks remains about 6.28 s. +3. Keep m = 1 kg and increase k to 4 N/m. The period halves to about 3.14 s. In 2D, compare the position curve with its dashed derivative: position extrema have zero velocity, while crossings of equilibrium have maximum speed. ## Real-life examples -1. **A heavy mass on an industrial spring.** Pulled back 1 m with a 2 N/m spring holding a 3 kg mass, it swings back and forth every 7.7 seconds regardless of how far you pull it. -2. **A stiff car suspension spring.** A stiffer 4 N/m spring with a lighter 0.5 kg load oscillates much faster, completing a cycle in about 2.2 seconds. -3. **A soft, stretchy spring.** A soft 0.3 N/m spring with a 1 kg mass swings slowly, taking nearly 11.5 seconds per cycle — proof that a floppier spring means a slower oscillation. +1. **A heavier model mass.** With A = 1 m, k = 2 N/m and m = 3 kg, the period is about 7.70 s and maximum speed about 0.816 m/s. +2. **A stiffer, lighter model.** With A = 0.5 m, k = 4 N/m and m = 0.5 kg, the period is about 2.22 s and maximum speed about 1.41 m/s. +3. **A softer model spring.** With A = 3 m, k = 0.3 N/m and m = 1 kg, the period is about 11.47 s and maximum speed about 1.64 m/s. These are idealized examples, not specifications for vehicle or industrial springs. ## Test yourself -1. Make the oscillation period exactly 2π seconds (about 6.28 s). -2. Find a mass of at least 3 kg that still gives a period of about 2π seconds. -3. Make the swing as wide as possible (A = 4 m) while keeping the period under 2 seconds. +1. Make the period approximately 6.28 s. +2. Choose m at least 3 kg and a numerical k within 0.05 of m. In the given units this makes the period close to 2π seconds. +3. Set A = 4 m and make the period less than 2 s. ## Intuition -Picture a 3 kg mass on a spring with stiffness 2 N/m, pulled back 1 metre and let go. Let it animate and watch the tangent line and the dashed derivative curve: the derivative, its velocity, is zero exactly when the mass is at its farthest point, turning around, and largest exactly when it crosses the middle, moving fastest. +Pull a mass away from its equilibrium position and release it from rest. The spring pulls it back toward equilibrium. At the centre, the restoring force is zero, but the mass is moving, so it passes through. On the other side the force slows it until it stops and reverses. Without damping, this sequence repeats without losing amplitude. -Change "amplitude A" alone and the swing widens or narrows, but time the gap between peaks: it never changes. Now change "spring constant k" or "mass m" instead, and that gap visibly stretches or shrinks. Amplitude sets how far the mass swings; stiffness and mass alone set how fast it swings. +The ideal restoring force is proportional to displacement and points in the opposite direction. A larger displacement therefore brings a proportionally larger acceleration, allowing a wider oscillation to take the same time. This amplitude-independent period belongs to the ideal linear model. The 3D scene measures positive displacement downward from its equilibrium marker; the 2D graph shows that displacement against time, with velocity overlaid on the same numerical scale in different units. ## Formal -The equation of motion is $\ddot x + \omega^2 x = 0$ with $\omega = \sqrt{k/m}$ from $F = -kx = m\ddot x$; general solution $x(t) = A\cos(\omega t + \varphi)$. +For positive mass m and stiffness k, $m\ddot x=-kx$, or $\ddot x+\omega^2x=0$ with $\omega=\sqrt{k/m}$. The position x is displacement from equilibrium, not the spring's total length. The display uses $x(t)=A\cos(\omega t)$, corresponding to release from x = A with zero initial velocity. -Period $T = 2\pi/\omega = 2\pi\sqrt{m/k}$ is independent of amplitude $A$ — the defining feature of simple harmonic motion. +The velocity is $v(t)=-A\omega\sin(\omega t)$ and the period is $T=2\pi\sqrt{m/k}$. Amplitude A changes the maximum displacement and speed but not the period. The angular frequency ω is in radians per second; cycles per second are $f=1/T=\omega/(2\pi)$. ## Advanced -Amplitude-independence of the period is special to the exactly linear restoring force $F=-kx$; real springs and pendulums deviate from Hooke's law at large displacement, and their period then does depend slightly on amplitude — the isochronism seen here is an idealisation that clock and metronome designers approximate as closely as possible over their working amplitude range. +Other initial conditions introduce a phase: x(t) = A cos(ωt+φ). The conserved energy is ½mv² + ½kx² = ½kA². For a vertical spring, measure x from the static equilibrium where gravity and spring force already balance. Damping reduces amplitude, and nonlinear restoring forces can make period depend on amplitude. A pendulum approximates simple harmonic motion only at small angles. ## Derivation -1. Hooke's law plus Newton's second law. -2. Try a sinusoidal solution and substitute back; it satisfies the equation for this $\omega$. -3. The period is set entirely by $m$ and $k$, not by $A$ or $\varphi$. +1. Combine the spring's restoring force with Newton's second law, using displacement from equilibrium. +2. Substitute a cosine with angular frequency ω. Its second derivative is −ω² times itself, so the equation holds when ω² = k/m. +3. One full cycle changes phase by 2π, giving T = 2π/ω. No amplitude appears in this period formula. ## Real world -### Pendulum clocks and metronomes -Their timekeeping relies on the amplitude-independence of the oscillation period. +### Small oscillations -### Vehicle suspension bounce -A car body on its springs oscillates with a natural frequency set by spring stiffness and vehicle mass. +Many systems near a stable equilibrium have an approximately linear restoring force. A spring-mass model can then describe small motion even when the full system is more complicated. -### Musical instruments -Strings, reeds and air columns all oscillate approximately harmonically, setting their pitch. +### Comparing real and ideal springs -### MEMS sensors -Tiny spring-mass systems in accelerometers and gyroscopes are engineered oscillators governed by this same equation. +A real oscillation may decay or change period at large amplitude. Observing those differences helps identify when damping or a nonlinear model is needed. diff --git a/content/lessons/physics/torque-and-levers/ar.md b/content/lessons/physics/torque-and-levers/ar.md index 542712cd..a32af26c 100644 --- a/content/lessons/physics/torque-and-levers/ar.md +++ b/content/lessons/physics/torque-and-levers/ar.md @@ -1,67 +1,62 @@ --- title: توازن العزم والرافعة -summary: >- - العتلة الطويلة ترفع الحمل نفسه بجهد أقل بكثير من القصيرة. +summary: 'وازن عزوم القوى حول محور ارتكاز، وافهم لماذا يحتاج ذراع القوة العمودي الأطول إلى قوة أصغر.' parameters: - F1: القوة المعلومة F1 - d1: بُعدها عن نقطة الارتكاز d1 - x: ذراع الرافعة لـ F2، أي d2 + F1: 'F₁ — القوة المعلومة' + d1: 'd₁ — ذراعها العمودي' + x: 'd₂ — الذراع العمودي لقوة الموازنة' variables: - - قوة معلومة وبُعدها عن نقطة الارتكاز - - بُعد القوة الموازِنة عن نقطة الارتكاز (المحور الأفقي) - - القوة اللازمة عند البُعد $d_2$ لموازنة الرافعة + - 'القوة المعلومة وذراعها العمودي حول المحور' + - 'الذراع العمودي لقوة الموازنة' + - 'القوة اللازمة لإنتاج عزم مساوٍ ومعاكس' --- ## Try it -1. راقب الرافعة متوازنة بقوة F1 على بُعد ثابت d1 من نقطة الارتكاز. -2. حرّك المنزلق «ذراع الرافعة لـ F2، أي d2» بعيدًا عن نقطة الارتكاز. راقب القوة الموازِنة F2 تنخفض. -3. حرّكه الآن قريبًا من نقطة الارتكاز بدلًا من ذلك. تقفز القوة الموازِنة المطلوبة إلى الأعلى. +1. اجعل F₁ = 20 N وd₁ = 2 m وd₂ = 4 m. مقدار العزم الأول 40 N·m، وتوازنه قوة F₂ = 10 N على الجانب الآخر. +2. ثبّت F₁ وd₁ وضاعف d₂ إلى 8 m. تنخفض قوة الموازنة إلى النصف، أي 5 N، بينما يبقى عزم الموازنة المطلوب 40 N·m. +3. قلّل d₂ إلى 1 m. ترتفع القوة المطلوبة إلى 40 N. في العرض الثلاثي يتعدل الثقل بعد ميل بصري قصير؛ أما المنحنى الثنائي فيعطي قيمة الاتزان دائمًا، لا القوة أثناء الانتقال. ## Real-life examples -1. **تحريك صخرة بعتلة.** دفعة قدرها 40 N عند الطرف البعيد (0.5 m من نقطة الارتكاز) لا تحتاج إلا 4 N من القوة الموازِنة عند ذراع طوله 5 m، فالرافعة تحوّل دفعة متواضعة إلى تأثير أكبر بكثير قرب الصخرة. -2. **موازنة أرجوحة.** جانب بقوة 30 N يجلس على بُعد 1.5 m من نقطة الارتكاز يوازن جانبًا بقوة 15 N يجلس على ضعف تلك المسافة، أي 3 m. -3. **الرفع بعربة يد.** حمل بقوة 45 N يستقر على بُعد 0.5 m فقط من العجلة (نقطة الارتكاز) لا يحتاج إلا 15 N من قوة الرفع عند المقابض، على بُعد 1.5 m. +1. **ذراع جهد طويل.** حمل قوته 40 N وذراعه 0.5 m يعطي عزمًا 20 N·m. يحتاج جهد معاكس بذراع 5 m إلى 4 N فقط في نموذج الاتزان المثالي. +2. **جانبا رافعة.** قوة 30 N عند 1.5 m توازن قوة 15 N عند 3 m. مقدار كل عزم 45 N·m. +3. **ذراع أطول بثلاث مرات.** حمل 45 N عند 0.5 m يوازنه جهد 15 N عند 1.5 m. يقلل ذراع الجهد الأطول القوة، لكنه يزيد المسافة التي تتحركها نقطة الجهد عند دوران صغير محدد. ## Test yourself -1. اجعل القوة الموازِنة F₂ تساوي 10 N بالضبط. -2. مع F1 = 40 N، جِد بُعدًا d1 عن نقطة الارتكاز وذراع رافعة تحتاج عندهما 8 N فقط لموازنتها. -3. جِد تركيبة من القوى والمسافات تجعل القوة الموازِنة F₂ تنخفض دون 2 N. +1. اجعل قوة الموازنة المطلوبة قريبة من 10 N. +2. أبقِ F₁ عند 40 N، واختر الذراعين بحيث لا تبتعد F₂ عن 8 N بأكثر من 0.3 N. +3. اجعل قوة الموازنة المطلوبة أقل من 2 N. ## Intuition -تخيل أنك تحاول تحريك صخرة بعتلة. تدفع بقوة 40 نيوتن على بُعد 0.5 متر من نقطة الارتكاز. حرّك المنزلق «ذراع الرافعة لـ F2، أي d2» مبتعدًا عن نقطة الارتكاز. تنخفض القوة الموازِنة المطلوبة بشدة، لأن إبعاد القوة عن نقطة الارتكاز يمنحها تأثير دوران أكبر بكثير. +يعتمد أثر القوة في الدوران على موضع تأثيرها واتجاهها. قوة 10 N بذراع عمودي 4 m تعطي مقدار العزم نفسه الذي تعطيه قوة 20 N بذراع 2 m. إذا كان العزمان متعاكسين في اتجاه الدوران، أمكن أن يتوازنا حول المحور. -ادفعه نحو نقطة الارتكاز بدلًا من ذلك فيرتفع المنحنى ارتفاعًا حادًا، إذ تتطلب موازنة قوة قريبة من نقطة الارتكاز بذراع رافعة يكاد لا يُذكر قوة هائلة. وهذا هو السبب العملي في أن العتلة الطويلة تحتاج جهدًا أقل بكثير من العتلة القصيرة لتحريك الحمل نفسه. +يسأل الرسم عن القوة اللازمة للموازنة عندما يتغير ذراعها. ثبات العزم الأول يعني ضرورة ثبات حاصل الضرب F₂d₂، لذلك يحتاج الذراع الأطول إلى قوة أصغر. لا ينتج هذا طاقة إضافية؛ ففي رافعة مثالية متحركة، تقطع النقطة الأبعد عن المحور مسافة أكبر للدوران نفسه. كما يؤثر المحور الثابت بقوة دعم يجب إدخالها عند موازنة القوى على الرافعة كلها. ## Formal -يتطلب الاتزان عزمين متساويين ومتعاكسين: $F_1 d_1 = F_2 d_2$، ومن ثم $F_2 = F_1 d_1 / d_2$. +مقدار عزم القوة هو $\tau=Fd_\perp$، حيث d⊥ المسافة العمودية من المحور إلى خط عمل القوة. عندما تكون القوة عمودية على ذراع موضعها، تساوي هذه المسافة طول الذراع. يتوازن العزمان المتعاكسان عندما $F_1d_1=F_2d_2$. -هذه دالة زائدية (هايبربولا) في $d_2$: فـ $F_2$ و $d_2$ متناسبان عكسيًا عند ثبات $F_1 d_1$. +عندما $d_2>0$، تكون القوة المطلوبة $F_2=F_1d_1/d_2$. تفترض الصيغة محورًا ثابتًا، ولا تشمل عزمًا إضافيًا من وزن الرافعة أو الاحتكاك. انعدام محصلة العزم يعني انعدام التسارع الزاوي في نموذج المحور الثابت، لا انعدام السرعة الزاوية بالضرورة؛ والرافعة المتزنة الساكنة تبدأ من السكون أيضًا. ## Advanced -هذه حالة خاصة من العزم $\boldsymbol\tau = \mathbf r \times \mathbf F$ للقوى العمودية على ذراع الرافعة، حيث يكون المقدار ببساطة $rF$. وتبادل الميزة الميكانيكية $d_1/d_2$ القوة بمسافة الحركة، إذ يقطع طرف الجهد في الرافعة مسافة أكبر، فلا تُكتسب طاقة. الشغل الداخل يساوي الشغل الخارج، وهذا أول توضيح لمبدأ حفظ الطاقة الكامن وراء كل آلة بسيطة. +إذا صنعت القوة زاوية θ مع متجه موضعها، فمقدار العزم rF sin θ. لا تساهم المركبة التي يمر خط عملها بالمحور في العزم. إذا كانت F₁ الحمل وF₂ الجهد هنا، فإن الفائدة المثالية في القوة F₁/F₂ تساوي d₂/d₁. هذه مقلوب نسبة قوة الجهد إلى الحمل، لذلك نحدد النسبة المقصودة قبل استعمال «الفائدة الميكانيكية». ## Derivation -1. العزم هو حاصل ضرب القوة في البُعد عن نقطة الارتكاز. -2. الرافعة المتوازنة لها عزمان متساويان ومتعاكسان. -3. حلّ لإيجاد القوة الموازِنة. +1. نحسب مقدار كل عزم بضرب القوة في ذراعها العمودي. +2. للاتزان الدوراني يجب أن يتساوى مقدار العزم مع عقارب الساعة ومقدار العزم عكسها. +3. نقسم على الذراع الموجب d₂ للحصول على قوة الموازنة المطلوبة F₂. ## Real world -### العتلات والمفاتيح -المقبض الأطول يضاعف قوة الدوران التي يمكنك تطبيقها بالجهد نفسه. +### استخدام مقبض -### الأرجوحة المتأرجحة -يتوازن شخصان مختلفا الوزن بالجلوس على بُعدين مختلفين عن نقطة الارتكاز. +تطبيق القوة أبعد عن محور ثابت يزيد أثرها الدوراني عند ثبات المركبة العمودية. أما الدفع مباشرة نحو المحور فلا يعطي عزمًا حوله. -### عربات اليد -تحدد مواضع الحمل والعجلة والمقبض ميزة ميكانيكية عبر توازن العزم هذا بالضبط. +### موازنة أحمال -### تصميم الجسور والرافعات -تُوضع الأثقال الموازِنة عند مسافات محسوبة لموازنة عزم الحمل الذي يتم رفعه. +يمكن لأحمال مختلفة الوزن أن تتوازن عند مسافات عمودية مختلفة. يحمل السند الحمل المجمع رغم إلغاء العزوم بعضها بعضًا. diff --git a/content/lessons/physics/torque-and-levers/en.md b/content/lessons/physics/torque-and-levers/en.md index dff3d84c..37321dee 100644 --- a/content/lessons/physics/torque-and-levers/en.md +++ b/content/lessons/physics/torque-and-levers/en.md @@ -1,68 +1,62 @@ --- title: Torque balance and the lever -summary: >- - This is why a long crowbar needs so much less effort than a short one to - lift the same heavy load. +summary: 'Balance turning effects about a pivot and see why a longer perpendicular lever arm needs less force.' parameters: - F1: known force F1 - d1: its distance from pivot d1 - x: 'lever arm for F2, d2' + F1: 'F₁ — known force' + d1: 'd₁ — its perpendicular arm' + x: 'd₂ — balancing force’s perpendicular arm' variables: - - a known force and its distance from the pivot - - distance of the balancing force from the pivot (the horizontal axis) - - force needed at distance $d_2$ to balance the lever + - 'known force and its perpendicular arm about the pivot' + - 'perpendicular arm of the balancing force' + - 'force needed to give an equal, opposite torque' --- ## Try it -1. Watch the lever balanced with a force F1 at a fixed distance d1 from the pivot. -2. Drag the slider "lever arm for F2, d2" further from the pivot. Watch the balancing force F2 drop. -3. Now drag it close to the pivot instead. The balancing force needed shoots up. +1. Set F₁ = 20 N, d₁ = 2 m and d₂ = 4 m. The first torque has magnitude 40 N·m, balanced by F₂ = 10 N on the other side. +2. Keep F₁ and d₁ fixed and double d₂ to 8 m. The balancing force halves to 5 N; the required balancing torque stays 40 N·m. +3. Reduce d₂ to 1 m. The required force rises to 40 N. In 3D the counterweight adjusts after a brief visual tilt; the 2D curve always gives the balanced value, not the transient force. ## Real-life examples -1. **Prying a rock with a crowbar.** A 40 N push at the far end (0.5 m from the pivot) needs only 4 N of resistance-matching force at a 5 m arm — leverage that turns a modest push into a much larger effect near the rock. -2. **Balancing a seesaw.** A 30 N side sitting 1.5 m from the pivot balances a 15 N side sitting twice as far out, at 3 m. -3. **Lifting with a wheelbarrow.** A 45 N load resting just 0.5 m from the wheel (the pivot) needs only 15 N of lifting force at the handles, 1.5 m away. +1. **A long effort arm.** A 40 N load with arm 0.5 m produces 20 N·m. An opposing effort with arm 5 m needs only 4 N in the ideal balance model. +2. **Two sides of a lever.** A 30 N force at 1.5 m balances a 15 N force at 3 m. Both torque magnitudes are 45 N·m. +3. **A three-to-one arm ratio.** A 45 N load at 0.5 m balances a 15 N effort at 1.5 m. The longer effort arm reduces force while increasing the distance that the effort point moves for a given small rotation. ## Test yourself -1. Make the balancing force F₂ exactly 10 N. -2. With F1 = 40 N, find a distance d1 from the pivot and a lever arm where only 8 N is needed to balance it. -3. Find a combination of forces and distances where the balancing force F₂ drops below 2 N. +1. Make the required balancing force approximately 10 N. +2. Keep F₁ at 40 N and choose the arms so F₂ is within 0.3 N of 8 N. +3. Make the required balancing force less than 2 N. ## Intuition -Picture prying a rock with a crowbar: pushing with 40 N at 0.5 m from the pivot. Drag the slider "lever arm for F2, d2" outward, away from the pivot: the required balancing force drops sharply, because moving the same force further from the pivot buys a much bigger turning effect, so less force is needed to match the push on the other side. +A force's turning effect depends on where and how it acts. A 10 N force with a perpendicular arm of 4 m produces the same torque magnitude as 20 N with an arm of 2 m. If the two torques act in opposite directions, they can balance about the pivot. -Push it toward the pivot instead and the curve shoots upward: balancing a force close to the pivot with almost no lever arm of your own takes enormous force — the practical reason a long crowbar needs so much less effort than a short one to move the same load. +The graph asks how much balancing force is needed as its arm changes. Keeping the first torque fixed means the product F₂d₂ must stay fixed, so a longer arm needs a smaller force. It does not create energy: in an ideal moving lever, the point with the longer arm travels farther for the same rotation. The fixed pivot also supplies a support force, which must be included when balancing forces on the whole lever. ## Formal -Equilibrium requires equal and opposite torques: $F_1 d_1 = F_2 d_2$, so $F_2 = F_1 d_1 / d_2$. +Torque magnitude is $\tau=Fd_\perp$, where d⊥ is the perpendicular distance from the pivot to the force's line of action. For forces perpendicular to their position arms, this equals the arm length. Opposite torques balance when $F_1d_1=F_2d_2$. -This is a hyperbola in $d_2$: $F_2$ and $d_2$ are inversely proportional for fixed $F_1 d_1$. +For $d_2>0$, the required force is $F_2=F_1d_1/d_2$. The formula assumes a fixed pivot and includes no extra torque from the lever's own weight or friction. Zero net torque means zero angular acceleration in this fixed-axis model, not necessarily zero angular velocity; a stationary balanced lever also starts at rest. ## Advanced -This is the special case of torque $\boldsymbol\tau = \mathbf r \times \mathbf F$ for forces perpendicular to the lever arm, where the magnitude is simply $rF$; a mechanical advantage of $d_1/d_2$ trades force for distance moved (the lever's effort end travels further), so no energy is gained — work in equals work out, a first illustration of the conservation principle behind every simple machine. +For a force making angle θ with its position vector, torque magnitude is rF sin θ. The component directed through the pivot contributes no torque. If F₁ is the load and F₂ is the effort here, the ideal force advantage F₁/F₂ is d₂/d₁. This is the reciprocal of the effort-to-load force ratio, so define the ratio before using the term “mechanical advantage.” ## Derivation -1. Torque is force times distance from the pivot. -2. A balanced lever has equal and opposite torques. -3. Solve for the balancing force. +1. Find each torque magnitude by multiplying force by its perpendicular arm. +2. For rotational balance, the clockwise and counterclockwise torque magnitudes must be equal. +3. Divide by the positive arm d₂ to find the required balancing force F₂. ## Real world -### Crowbars and wrenches -A longer handle multiplies the turning force you can apply for the same effort. +### A handle -### Seesaws -Two people of different weight balance by sitting at different distances from the pivot. +Applying a force farther from a fixed pivot increases its turning effect when the perpendicular component is unchanged. Pushing directly toward the pivot gives no torque about it. -### Wheelbarrows -The load, wheel and handle positions set a mechanical advantage via exactly this torque balance. +### Balancing loads -### Bridge and crane design -Counterweights are placed at calculated distances to balance the torque of a load being lifted. +Loads of different weights can balance at different perpendicular distances. The support carries the combined load even though the torques cancel. diff --git a/content/lessons/physics/torque-and-levers/lesson.yaml b/content/lessons/physics/torque-and-levers/lesson.yaml index 1ac4acd9..4d3e6cff 100644 --- a/content/lessons/physics/torque-and-levers/lesson.yaml +++ b/content/lessons/physics/torque-and-levers/lesson.yaml @@ -50,7 +50,7 @@ variables: - F_2 derivation: - \tau_1 = F_1 d_1, \qquad \tau_2 = F_2 d_2 - - "\\tau_1 = \\tau_2 \\quad \\text{(equilibrium: no net rotation)}" + - "\\tau_1 = \\tau_2 \\quad \\text{(zero net torque about the pivot)}" - F_2 = \frac{F_1 d_1}{d_2} charts: [] primary: x diff --git a/content/lessons/physics/universal-gravitation/ar.md b/content/lessons/physics/universal-gravitation/ar.md index 29cb0cfd..7b7efcc0 100644 --- a/content/lessons/physics/universal-gravitation/ar.md +++ b/content/lessons/physics/universal-gravitation/ar.md @@ -1,65 +1,60 @@ --- title: 'الجاذبية الكونية: كيف تضعف مع البعد' -summary: >- - رواد الفضاء في المدار القريب يشعرون بمعظم الجاذبية، والقمر الصناعي البعيد لا يكاد يشعر بها. +summary: 'احسب تسارع الجاذبية خارج نموذج كروي للأرض باستخدام المسافة من مركزها، لا الارتفاع فوق سطحها.' parameters: - x: المسافة من مركز الأرض r + x: 'r — المسافة من مركز الأرض' variables: - - 'المسافة من مركز الأرض، بآلاف الكيلومترات' - - شدة المجال الجاذبي (التسارع) عند تلك المسافة - - 'ثابت الجاذبية الأرضي، $3.986\times10^{14}\ \text{m}^3/\text{s}^2$' + - 'المسافة من المركز إلى الجسم بآلاف الكيلومترات' + - 'مقدار تسارع الجاذبية عند ذلك البعد' + - 'معامل جاذبية نموذج الأرض، 3.986 × 10¹⁴ m³/s²' --- ## Try it -1. راقب النقطة تبدأ عند r = 6.4 (سطح الأرض). يقرأ المجال نحو 9.8 m/s². -2. حرّك «المسافة من مركز الأرض r» مبتعدًا. راقب المنحنى ينهار بحدة في البداية. -3. واصل الابتعاد نحو 42 (مسافة المدار الثابت بالنسبة للأرض). يكون المنحنى قد تسطّح إلى جزء ضئيل من قيمته عند السطح. +1. اجعل r في أداة التحكم 6.4. هذا يعني 6400 km من مركز الأرض، وليس فوق سطحها. يعطي النموذج g ≈ 9.73 m/s². +2. ضاعف القيمة إلى 12.8. ينخفض التسارع إلى نحو 2.43 m/s²، أي ربع قيمته السابقة. +3. اجعل r = 20، أي 20000 km من المركز. يصبح التسارع نحو 0.997 m/s². تبقى الجاذبية غير صفرية في نطاق الرسم كله. ## Real-life examples -1. **محطة الفضاء الدولية.** بمدار على ارتفاع بضع مئات من الكيلومترات فقط (r≈6800 كم من مركز الأرض)، ما زال رواد الفضاء يشعرون بجاذبية قريبة جدًا من جاذبية سطح الأرض. -2. **أقمار نظام تحديد المواقع GPS.** عند نحو r≈26,600 كم، تشعر أقمار GPS بجاذبية انخفضت إلى جزء صغير من قيمتها عند السطح. -3. **الأقمار الصناعية الثابتة بالنسبة للأرض.** عند r≈42,200 كم، يدور القمر الصناعي مرة كل يوم مطابقًا دوران الأرض، بجاذبية تصل إلى نحو 1/40 من قوتها عند السطح. +1. **بعد قريب من الأرض.** عند مسافة 6800 km من المركز، يعطي النموذج نحو 8.62 m/s². لا يتعارض هذا التسارع الكبير مع انعدام الوزن الظاهري أثناء السقوط الحر. +2. **مدار أبعد.** عند 26600 km من المركز، يكون التسارع نحو 0.563 m/s². زمن دورة المدار الدائري في هذا النموذج نحو 11.99 ساعة. +3. **دورة تقارب يومًا.** عند 42200 km من المركز، يكون التسارع نحو 0.224 m/s² وزمن الدورة الدائرية نحو 23.97 ساعة. البقاء فوق الموقع نفسه يتطلب أيضًا مدارًا استوائيًا في اتجاه دوران الأرض. ## Test yourself -1. جِد المسافة من مركز الأرض التي تنخفض عندها الجاذبية إلى 1 m/s² بالضبط. -2. جِد المسافة التي تصبح عندها الجاذبية ربع قيمتها عند السطح (نحو 2.43 m/s²). -3. جِد مسافة بعيدة بما يكفي لتضعف عندها الجاذبية دون 0.2 m/s². +1. ابحث عن بعد يعطي تسارع جاذبية قريبًا من 1 m/s². +2. ابحث عن بعد يعطي نحو 2.43 m/s²، أي ربع القيمة عند 6400 km تقريبًا. +3. ابحث عن بعد يقل فيه تسارع الجاذبية عن 0.2 m/s². ## Intuition -تخيل أنك تقف على سطح الأرض، على بُعد 6400 كم من مركزها، وهو تقريبًا حيث تبدأ النقطة عند r = 6.4. الجاذبية هناك نحو 9.8 مترًا في الثانية مربعة، وهي الجذب الذي تشعر به كل يوم. حرّك المنزلق «المسافة من مركز الأرض r» مبتعدًا وراقب المنحنى ينهار بحدة لا بلطف، لأن مضاعفة المسافة تقسم الجاذبية على أربعة، لا على اثنين. +تنتج الكتلة الجاذبة نفسها مجالًا أضعف كلما ابتعدنا عنها. في هذا النموذج، تؤدي مضاعفة المسافة من المركز إلى قسمة تسارع الجاذبية على أربعة. أما مضاعفة الارتفاع فوق السطح فلا تفعل ذلك عمومًا؛ نضيف الارتفاع أولًا إلى نصف قطر الجسم للحصول على المسافة من المركز. -واصل الابتعاد نحو مسافة المدار الثابت بالنسبة للأرض، نحو 42,000 كم، أي r≈42. يكون المنحنى قد تسطّح بشكل كبير، عند جزء ضئيل جدًا من قيمته عند السطح. لا تصل الجاذبية إلى الصفر في هذا الرسم، لكنها تصبح ضعيفة جدًا حتى تقارب الصفر، وهذا بالضبط سبب قدرة الأجسام البعيدة جدًا على الاستقرار في مدار بطيء وثابت. +تبقى الجاذبية قوية في المدارات القريبة من الأرض. يسقط الجسم المداري باستمرار، بينما تنقله حركته الجانبية حول الكوكب. يحدث انعدام الوزن الظاهري لأن الجسم ومحيطه يسقطان معًا، لا لأن الجاذبية اختفت. يستخدم المدار الثلاثي عرضًا زمنيًا مسرعًا وحدًا أدنى للمسافة المرسومة قدره 6571 km؛ وللقيمة المختارة، بما فيها القيم الأصغر، نعتمد الرسم الثنائي. ## Formal -$g(r) = GM/r^2$: قانون تربيعي عكسي، أي أن $g$ يتناسب مع $1/r^2$. +خارج جسم كتلته M ومتماثل كرويًا، يكون مقدار تسارع الجاذبية $g(r)=GM/r^2$ واتجاهه نحو المركز. يجب قياس r من المركز. يستخدم نموذج الأرض هنا $GM=3.986\times10^{14}\ \mathrm{m^3/s^2}$، ويحوّل آلاف الكيلومترات في أداة التحكم إلى أمتار. -بالنسبة لمدار دائري، توفر الجاذبية التسارع المركزي: $GM/r^2 = v^2/r$، وهو ما يعطي سرعة مدارية $v = \sqrt{GM/r}$، فالمدارات الأبعد تتحرك بسرعة أبطأ. +تؤثر في كتلة اختبار m قوة مقدارها $F=mg=GMm/r^2$. لا يعتمد التسارع على كتلة الاختبار في هذا النموذج. وللمدار الدائري الذي تهيمن عليه جاذبية الجسم المركزي، تكون $v=\sqrt{GM/r}$ و$T=2\pi\sqrt{r^3/(GM)}$. يحتاج المدار الدائري إلى هذه السرعة المتوافقة مع البعد، لا إلى اختيار البعد وحده. ## Advanced -الصيغة التربيعية العكسية هي نتيجة هندسية لانتشار تأثير الجاذبية على سطح كرة متمددة مساحتها $4\pi r^2$. فنفس "التدفق" الكلي لخطوط المجال الجاذبي يتوزع على مساحة تنمو مع $r^2$. وهذا هو سبب مشاركة كل قانون تربيعي عكسي (الجاذبية، الكهروستاتيكا، شدة الإضاءة) لهذا الشكل الرياضي نفسه، رغم وصفها لفيزياء مختلفة تمامًا. +تنطبق صيغة التربيع العكسي خارج توزيع كتلة كروي، ولا يصح تمديدها كما هي نحو المركز داخل الأرض. ينعدم مجال القشرة الكروية داخلها، لذلك يعتمد المجال الداخلي على توزيع الكتلة. الأرض الفعلية ليست كرة مثالية، كما يؤثر دورانها والأجرام الجاذبة الأخرى في الحسابات الأدق. ## Derivation -1. قانون نيوتن للجذب العام. -2. شدة المجال هي القوة لكل وحدة كتلة، فاقسم على كتلة الاختبار $m$. -3. عند تقييمها عند نصف قطر سطح الأرض، تتطابق هذه القيمة مع الجاذبية اليومية المألوفة. +1. نبدأ بقانون نيوتن لقوة التجاذب بين كتلتين نقطيتين، أو للمجال الخارجي لجسم مركزي كروي. +2. نقسم مقدار القوة على كتلة الاختبار للحصول على تسارع الجاذبية. +3. نعوض r = 6.4 ملايين متر وقيمة GM المختارة. النتيجة نحو 9.73 m/s²، وهي قريبة من جاذبية السطح المألوفة، لكنها ليست نموذجًا دقيقًا للسطح. ## Real world -### تخطيط ارتفاع الأقمار الصناعية -يوازن اختيار المدار الأرضي المنخفض مقابل المدار الثابت بالنسبة للأرض بين الجذب الجاذبي والسرعة المدارية والتغطية باستخدام هذه العلاقة نفسها. +### مقارنة أحجام المدارات -### انعدام الوزن في المدار -رواد الفضاء الذين يدورون بالقرب من الأرض ما زالوا يخضعون لمعظم جاذبيتها. فانعدام الوزن الظاهري ناتج عن السقوط الحر، لا عن المسافة، وهذا المنحنى يُظهر أن الجاذبية ما زالت قوية هناك. +المدار الدائري الأكبر حول الجسم المهيمن نفسه له سرعة أقل وزمن دورة أطول. ويبقى التسارع هو ما يغيّر اتجاه الحركة لتتبع المدار. -### المد والجزر -جذب القمر، وتدرّجه عبر الأرض، هو المحرك لظاهرة المد والجزر في المحيطات. +### القوة والوزن الظاهري -### المسارات بين الكواكب -يعتمد تخطيط مسار المركبات الفضائية بشكل حاسم على كيفية ضعف الجذب الجاذبي مع المسافة عن كل جرم. +يقيس السند أو الميزان قوة تماس، وقد تكون صفرًا أثناء السقوط الحر رغم كِبر قوة الجاذبية. لذلك لا يعني «انعدام الوزن» انعدام الجاذبية. diff --git a/content/lessons/physics/universal-gravitation/en.md b/content/lessons/physics/universal-gravitation/en.md index da41b0c9..2e254af9 100644 --- a/content/lessons/physics/universal-gravitation/en.md +++ b/content/lessons/physics/universal-gravitation/en.md @@ -1,67 +1,60 @@ --- title: Gravitational field strength with distance -summary: >- - This is why astronauts orbiting close to Earth still feel almost full - gravity, but a satellite far out in geostationary orbit feels barely any - pull at all. +summary: 'Use distance from Earth’s centre to calculate gravitational acceleration outside a spherical Earth model.' parameters: - x: distance from Earth's center r + x: 'r — distance from Earth’s centre' variables: - - 'distance from the center of the Earth, in thousands of km' - - gravitational field strength (acceleration) at that distance - - 'Earth''s gravitational parameter, $3.986\times10^{14}\ \text{m}^3/\text{s}^2$' + - 'centre-to-object distance in thousands of kilometres' + - 'gravitational acceleration magnitude at that distance' + - 'Earth-model gravitational parameter, 3.986 × 10¹⁴ m³/s²' --- ## Try it -1. Watch the point start at r = 6.4 (Earth's surface). The field reads about 9.8 m/s². -2. Drag "distance from Earth's center r" outward. Watch the curve plunge steeply at first. -3. Keep dragging out toward 42 (geostationary orbit distance). The curve has flattened to a tiny fraction of its surface value. +1. Set r to 6.4 on the control. This means 6400 km from Earth's centre, not 6400 km above its surface. The model gives g ≈ 9.73 m/s². +2. Double the setting to 12.8. The acceleration falls to about 2.43 m/s², one-quarter as much. +3. Set r to 20, meaning 20000 km from the centre. The acceleration is about 0.997 m/s². Gravity remains nonzero throughout the plotted range. ## Real-life examples -1. **The International Space Station.** Orbiting only a few hundred km up (r≈6800 km from Earth's center), astronauts still feel nearly the same gravity as on the ground. -2. **GPS satellites.** At around r≈26,600 km, GPS satellites feel gravity that's dropped to a small fraction of its surface value. -3. **Geostationary satellites.** At r≈42,200 km, a satellite orbits once per day exactly matching Earth's rotation, with gravity down to about 1/40th its surface strength. +1. **A low-orbit distance.** At a centre-to-object distance of 6800 km, the model gives about 8.62 m/s². This strong gravitational acceleration is compatible with apparent weightlessness during free fall. +2. **A larger orbit.** At 26600 km from the centre, acceleration is about 0.563 m/s². A circular orbit in this model has a period of about 11.99 hours. +3. **Roughly a one-day orbit.** At 42200 km from the centre, acceleration is about 0.224 m/s² and the circular period is about 23.97 hours. Remaining above one location also requires an equatorial orbit in the direction of Earth's rotation. ## Test yourself -1. Find the distance from Earth's center where gravity has dropped to exactly 1 m/s². -2. Find the distance where gravity is a quarter of its surface value (about 2.43 m/s²). -3. Find a distance far enough out that gravity has weakened below 0.2 m/s². +1. Find a distance giving gravitational acceleration close to 1 m/s². +2. Find a distance giving about 2.43 m/s², approximately one-quarter of the value at 6400 km. +3. Find a distance where gravitational acceleration is less than 0.2 m/s². ## Intuition -Picture standing on Earth's surface, distance 6,400 km from the center, roughly where the point starts at r = 6.4: gravity there is about 9.8 metres per second squared, the pull you feel every day. Drag the slider "distance from Earth's center r" outward and watch the curve drop steeply, not gently — doubling the distance divides gravity by four, not two. +Distance matters because the same attracting mass produces a weaker field farther away. For this model, doubling the distance from the centre divides gravitational acceleration by four. Doubling height above the surface does not generally do that: height must first be added to the body's radius to obtain the centre-to-object distance. -Keep dragging out toward geostationary orbit distance, about 42,000 km, so r ≈ 42: the curve has flattened dramatically, hovering near a tiny fraction of its surface value. Gravity never reaches zero on this plot, but it becomes vanishingly weak, which is exactly why objects that far out can coast in a stable, slow orbit. +Gravity is still strong close to Earth in orbit. An orbiting object continually falls while its sideways motion carries it around the planet. Apparent weightlessness occurs because the object and its surroundings fall together, not because gravity has vanished. The 3D orbit uses accelerated playback and a minimum displayed radius of 6571 km; use the 2D graph for the selected distance, including smaller settings. ## Formal -$g(r) = GM/r^2$: an inverse-square law, so $g$ scales as $1/r^2$. +Outside a spherically symmetric body of mass M, the gravitational acceleration magnitude is $g(r)=GM/r^2$, directed toward its centre. The distance r must be measured from the centre. The Earth model here uses $GM=3.986\times10^{14}\ \mathrm{m^3/s^2}$ and converts the control's thousands of kilometres into metres. -For a circular orbit, gravity supplies the centripetal acceleration: $GM/r^2 = v^2/r$, giving orbital speed $v = \sqrt{GM/r}$ — orbits farther out move slower. +A test mass m experiences force magnitude $F=mg=GMm/r^2$. The acceleration is independent of that test mass in this model. For a circular orbit dominated by the central body, $v=\sqrt{GM/r}$ and $T=2\pi\sqrt{r^3/(GM)}$. A circular orbit needs this matching speed, not just a chosen radius. ## Advanced -The inverse-square form is a geometric consequence of gravity spreading its influence over the surface of an expanding sphere of area $4\pi r^2$: the same total "flux" of gravitational field lines is divided over an area that grows as $r^2$, which is why every inverse-square law (gravity, electrostatics, light intensity) shares this identical mathematical shape despite describing entirely different physics. +The inverse-square expression applies outside a spherical mass distribution; it cannot be extended unchanged toward the centre inside Earth. A spherical shell's field vanishes inside that shell, so interior fields depend on how mass is distributed. Real Earth is not perfectly spherical, and rotation and other gravitating bodies also matter in more precise calculations. ## Derivation -1. Newton's law of universal gravitation. -2. Field strength is force per unit mass — divide by the test mass $m$. -3. Evaluated at Earth's surface radius, this matches familiar everyday gravity. +1. Start with Newton's force law for two point masses, or the exterior field of a spherical central body. +2. Divide the force magnitude by the test mass to obtain gravitational acceleration. +3. Substitute r = 6.4 million metres and the chosen GM. The result is about 9.73 m/s², close to familiar surface gravity but not a precision surface model. ## Real world -### Satellite altitude planning -Low Earth orbit versus geostationary orbit trade off gravitational pull, orbital speed and coverage using this exact relationship. +### Comparing orbital scales -### Weightlessness in orbit -Astronauts orbiting close to Earth still feel most of Earth's gravity — apparent weightlessness comes from free-fall, not distance, but this curve shows gravity is still strong there. +Larger circular orbits around the same dominant body have lower speeds and longer periods. The acceleration remains what bends the motion into an orbit. -### Tides -The Moon's gravitational pull, and its gradient across the Earth, drives ocean tides. +### Distinguishing force from apparent weight -### Interplanetary trajectories -Spacecraft trajectory planning depends critically on how gravitational pull weakens with distance from each body. +A support or scale measures a contact force, which can be zero in free fall even when gravitational force is substantial. This distinction explains why “weightless” does not mean “without gravity.” diff --git a/content/lessons/physics/universal-gravitation/lesson.yaml b/content/lessons/physics/universal-gravitation/lesson.yaml index f9463a48..cc7dc96c 100644 --- a/content/lessons/physics/universal-gravitation/lesson.yaml +++ b/content/lessons/physics/universal-gravitation/lesson.yaml @@ -3,24 +3,24 @@ subject: physics difficulty: university equation: g(r) = \frac{GM}{r^2} concepts: -- gravitation -- inverse-square-law -- orbit + - gravitation + - inverse-square-law + - orbit prerequisites: -- newtons-second-law + - newtons-second-law related: -- newtons-second-law -- circular-motion + - newtons-second-law + - circular-motion visualization: type: function-plot options: expr: 3.986e14/(x*1e6)^2 domain: - - 6.4 - - 50 + - 6.4 + - 50 range: - - 0 - - 10 + - 0 + - 10 mode: plain parameters: x: @@ -28,15 +28,15 @@ parameters: max: 50 step: 0.1 value: 6.4 - unit: "×1000 km" + unit: '×1000 km' variables: -- r -- g(r) -- GM + - r + - g(r) + - GM derivation: -- F = \frac{GMm}{r^2} -- g = \frac{F}{m} = \frac{GM}{r^2} -- g(6.4\times10^6\ \text{m}) \approx 9.8\ \text{m/s}^2 + - F = \frac{GMm}{r^2} + - g = \frac{F}{m} = \frac{GM}{r^2} + - g(6.4\times10^6\ \text{m}) \approx 9.73\ \text{m/s}^2 charts: [] visualization3d: type: orbit diff --git a/content/lessons/physics/velocity-time-area/ar.md b/content/lessons/physics/velocity-time-area/ar.md index 6e3c49cb..afe659a3 100644 --- a/content/lessons/physics/velocity-time-area/ar.md +++ b/content/lessons/physics/velocity-time-area/ar.md @@ -1,69 +1,63 @@ --- title: 'مخطط السرعة والزمن: المساحة إزاحة' -summary: >- - المساحة تحت مخطط السرعة هي المسافة المقطوعة. هكذا يحوّل جهاز GPS سرعاتك اللحظية إلى - طريق كامل. +summary: 'احسب الإزاحة من المساحة الموقعة تحت منحنى السرعة، والمسافة الكلية بجمع المساحات دون إلغاء.' parameters: - v0: السرعة الابتدائية v₀ - acc: التسارع - a: a (زمن البداية) - b: b (زمن النهاية) + v0: 'v₀ — السرعة عند الزمن صفر' + acc: 'التسارع الثابت' + a: 'a — زمن البداية' + b: 'b — زمن النهاية' variables: - - السرعة كدالة في الزمن - - الإزاحة الصافية، وهي المساحة الموجّهة (بإشارتها) - - زمنا البداية والنهاية للفترة المدروسة + - 'السرعة المتجهة بإشارتها عند كل زمن' + - 'الإزاحة: موضع نهاية الفترة ناقص موضع بدايتها' + - 'زمنا بداية الفترة ونهايتها، مع a ≤ b' --- ## Try it -1. راقب المساحة المظللة بين خط السرعة ومحور الزمن. -2. حرّك «b (زمن النهاية)» عبر منطقة ينخفض فيها الخط تحت الصفر. راقب التظليل يظهر أسفل المحور. -3. واصل تحريك «b» متجاوزًا النقطة التي يقطع عندها الخط الصفر. التظليل الجديد فوق المحور يبدأ بإلغاء التظليل أسفله. +1. اجعل v₀ = 4 m/s والتسارع −2 m/s² وa = 0 s وb = 2 s. مساحة المثلث الموجبة 4 m؛ فالسرعة تنخفض من 4 m/s إلى صفر. +2. زد b إلى 4 s. تصبح السرعة سالبة بعد ثانيتين، فتضاف مساحة موقعة قدرها −4 m. تعود الإزاحة الصافية إلى صفر، بينما تبلغ المسافة الكلية 8 m. +3. اجعل v₀ = 5 m/s والتسارع 0، مع إبقاء a = 0 وb = 4. مساحة المستطيل 20 m. استخدم a < b عند تفسير الفترة على أنها زمن يمضي إلى الأمام. ## Real-life examples -1. **الانطلاق بسرعة ثابتة 5 m/s.** بلا أي تسارع، تعطي مساحة المستطيل المظلل 25 m بالضبط مقطوعة خلال 5 ثوانٍ، وهي حركة بسيطة بسرعة ثابتة. -2. **كرة تُقذف رأسيًا إلى الأعلى.** بإطلاق سرعته 4 m/s وتباطؤ يشبه الجاذبية مقداره 2 m/s²، ترتفع الكرة ثم تعود إلى الارتفاع نفسه بعد 4 ثوانٍ، فتُلغي المساحتان الموجبة والسالبة إحداهما الأخرى تمامًا، فتكون الإزاحة الصافية صفرًا. -3. **دراج يكبح حتى التوقف.** بدءًا من 8 m/s وبكبح مقداره 2 m/s²، يتوقف الدراج تمامًا بعد 4 ثوانٍ بالضبط، بعد أن يقطع 16 m. +1. **سرعة متجهة ثابتة.** عند 5 m/s لمدة 5 s، تساوي الإزاحة والمسافة كلتاهما 25 m. المساحة مستطيل وحداته (m/s) × s = m. +2. **انعكاس الاتجاه.** عند سرعة ابتدائية 4 m/s وتسارع −2 m/s² خلال 0–4 s، يتحرك الجسم 4 m إلى الأمام ثم 4 m عائدًا. الإزاحة صفر والمسافة 8 m. +3. **توقف عند نهاية الفترة.** عند سرعة ابتدائية 8 m/s وتسارع −2 m/s² خلال 0–4 s، تبلغ مساحة المثلث 16 m. تصل السرعة إلى صفر عند 4 s، واستمرار المعادلة بعدها يعني انعكاس الحركة. ## Test yourself -1. اجعل الإزاحة الصافية خلال الفترة 20 m بالضبط. -2. جِد قيمًا يتحرك عندها الجسم بوضوح (v₀ ≠ 0) لكنه ينتهي بإزاحة صافية صفر مع ذلك. -3. اجعل الجسم يبدأ الحركة إلى الأمام، ثم يعكس اتجاهه قبل نهاية الفترة. +1. اختر a < b، واجعل الإزاحة الموقعة قريبة من 20 m. +2. اختر a < b، وسرعة ابتدائية يزيد مقدارها على 1 m/s، وإزاحة صافية لا تبتعد عن الصفر بأكثر من 0.5 m. لمثال واضح على الذهاب والعودة، استخدم a = 0 واجعل الانعكاس داخل الفترة. +3. ابدأ الفترة قبل 0.5 s بسرعة موجبة، واستخدم تسارعًا سالبًا، ثم أنهِ الفترة بعد أن تصبح السرعة سالبة. ## Intuition -تخيل دراجًا يبدأ بسرعة 8 m/s ويكبح بمقدار 2 m/s² حتى يتوقف تمامًا عند الثانية 4، فتعطي المساحة المظللة تحت الخط من a = 0 إلى b = 4 مسافة قدرها 16 مترًا. حرّك «b (زمن النهاية)» عبر منطقة ينخفض فيها خط السرعة تحت الصفر بدلًا من ذلك، فيظهر التظليل أسفل محور الزمن وتنخفض قراءة الإزاحة التراكمية، لأننا نحسب الحركة إلى الخلف كمساحة سالبة، فنطرحها من التقدّم بدلًا من أن نضيفها إليه. +عند سرعة ثابتة 5 m/s، تضيف كل ثانية 5 m إلى الموضع. خلال أربع ثوانٍ تبلغ مساحة المستطيل تحت منحنى السرعة 20، ووحدتها المتر. عندما تتغير السرعة، نقسم الزمن إلى فترات قصيرة. حاصل ضرب السرعة في مدة قصيرة يقارب إزاحتها، ويعطي جمع الأجزاء المساحة عند أخذ النهاية. -واصل تحريك «b» متجاوزًا النقطة التي يقطع عندها الخط الصفر، فيظهر تظليل فوق المحور أيضًا وتبدأ تلك المساحة الموجبة بإلغاء المساحة السالبة السابقة. وإذا عاد الجسم أدراجه وقطع المسار نفسه تمامًا يمكن أن تُلغي المنطقتان المظللتان بعضهما كليًا، فتكون الإزاحة الصافية صفرًا رغم أن الجسم تحرّك فعلًا بوضوح. +للسرعة المتجهة إشارة لأن الاتجاه مهم. المساحة فوق الصفر تزيد الموضع، والمساحة تحته تقلله. قد تلغي المساهمتان بعضهما رغم أن الجسم قطع مسافة كبيرة. لإيجاد المسافة الكلية نحسب المساحتين موجبتين. هذا رسم للسرعة مقابل الزمن، وليس صورة لمسار الجسم في المكان. ## Formal -يتحقّق $\Delta x = \int_a^b v(t)\,dt$، فالمناطق الواقعة فوق المحور تُسهم بقيمة موجبة، والمناطق الواقعة تحته تُسهم بقيمة سالبة. +خلال فترة زمنية تحقق $a\le b$، تكون الإزاحة $\Delta x=x(b)-x(a)=\int_a^b v(t)\,dt$. الحدّان a وb زمنان، لا موضعان. عكس حدّي التكامل يغيّر الإشارة رياضيًا، لكنه لا يصف فترة يمضي زمنها إلى الأمام. -هذا تطبيق مباشر لنظرية التفاضل والتكامل الأساسية على $v = \dot x$: فالإزاحة هي الدالة الأصلية (المعكوسة) للسرعة، مقيَّمة بين حدَّي الفترة. +المسافة الكلية هي $D=\int_a^b|v(t)|\,dt$. تساوي الإزاحة الموقعة عندما تكون السرعة غير سالبة طوال الفترة. وإذا كانت السرعة غير موجبة طوالها، تساوي المسافة مقدار الإزاحة. هنا $v(t)=v_0+\mathrm{acc}\,t$، ولذلك $\Delta x=v_0(b-a)+\tfrac12\mathrm{acc}(b^2-a^2)$. ## Advanced -أما المسافة الكلية المقطوعة، وهي قراءة عداد المسافة الدائمًا غير السالبة، فتُحسب بدلًا من ذلك بالصيغة $\int_a^b |v(t)|\,dt$، بتقسيم الفترة عند كل تغيّر في إشارة $v$ وجمع القيمة المطلقة لمساحة كل جزء. وتتطابق الإزاحة مع المسافة فقط عندما لا يغيّر الجسم اتجاهه إطلاقًا. +للرسم الخطي للسرعة، يمكن حساب الإزاحة بضرب مدة الفترة في متوسط سرعتي طرفيها. تكون قاعدة شبه المنحرف دقيقة لهذه الدالة الخطية، بما في ذلك إلغاء المساحات ذات الإشارات المختلفة. ولحساب المسافة عند تغير إشارة السرعة، نقسم الفترة عند الصفر ثم نجمع مقداري التكاملين. ## Derivation -1. تُعرَّف السرعة بأنها معدل تغيّر الموضع. -2. طبّق نظرية التفاضل والتكامل الأساسية. -3. هذا الفرق هو، بحسب التعريف، الإزاحة الصافية خلال الفترة $[a,b]$. +1. السرعة المتجهة هي مشتقة الموضع بالنسبة إلى الزمن. +2. تكامل هذه المشتقة بين زمنين يعطي الفرق بين موضعي الطرفين. +3. فرق الموضع هو الإزاحة. وهو لا يعدّ كل متر قطعه الجسم إذا انعكس اتجاهه. ## Real world -### تخطيط الرحلات -تُكامِل أجهزة تحديد المواقع (GPS) السرعة المقاسة عبر الزمن لحساب إجمالي المسافة المقطوعة. +### عربة تتحرك ذهابًا وإيابًا -### تحليلات رياضية -تكامل منحنى سرعة عدّاء السرعة يعطي المسافات الجزئية في أي نقطة من السباق. +قد تعود عربة إلى بدايتها بإزاحة صفرية بعد قطع عدة أمتار. تكامل السرعة المتجهة وتكامل مقدارها يجيبان عن هذين السؤالين المختلفين. -### الملاحة الجوية والبحرية -تُحسب إزاحة الرحلة الجوية أو البحرية بتكامل سجلات السرعة، مع مراعاة أي عودة إلى الوراء. +### تقدير الحركة من قياسات -### قياس المسافة في الروبوتات -تُقدّر الروبوتات ذات العجلات موضعها بتكامل قراءات مستشعرات سرعة العجلات عبر الزمن. +يمكن تجميع قياسات السرعة مع الزمن لتقدير الإزاحة. لكن خطأ المستشعر قد يتراكم أيضًا، فلا تضمن العلاقة الرياضية وحدها دقة تقدير الموضع. diff --git a/content/lessons/physics/velocity-time-area/en.md b/content/lessons/physics/velocity-time-area/en.md index e6881e0c..6ad9d5fe 100644 --- a/content/lessons/physics/velocity-time-area/en.md +++ b/content/lessons/physics/velocity-time-area/en.md @@ -1,69 +1,63 @@ --- title: Area under a velocity-time graph is displacement -summary: >- - This is how GPS devices and sports trackers turn a recorded speed into the - actual distance travelled, even when the path doubles back on itself. +summary: 'Use signed area under a velocity graph to find displacement, and absolute area to find total distance.' parameters: - v0: initial velocity v₀ - acc: acceleration - a: a (start time) - b: b (end time) + v0: 'v₀ — velocity at time zero' + acc: 'constant acceleration' + a: 'a — start time' + b: 'b — end time' variables: - - velocity as a function of time - - net displacement — the signed area - - start and end times of the interval considered + - 'signed velocity at each time' + - 'displacement: final position minus initial position for the interval' + - 'start and end times, with a ≤ b' --- ## Try it -1. Watch the shaded area between the velocity line and the time axis. -2. Drag "b (end time)" across a region where the line dips below zero. Watch the shading appear below the axis. -3. Keep dragging "b" past where the line crosses zero. The new shading above the axis starts cancelling the shading below. +1. Set v₀ = 4 m/s, acceleration = −2 m/s², a = 0 s and b = 2 s. The positive triangular area is 4 m: velocity falls from 4 m/s to zero. +2. Extend b to 4 s. Velocity becomes negative after 2 s, adding an area of −4 m. Net displacement returns to zero, while total distance is 8 m. +3. Set v₀ = 5 m/s and acceleration = 0, keeping a = 0 and b = 4. The rectangular area is 20 m. Keep a < b when interpreting an interval of forward-running time. ## Real-life examples -1. **Cruising at a steady 5 m/s.** With no acceleration, the shaded rectangle's area gives exactly 25 m traveled over 5 seconds — simple constant-speed motion. -2. **A ball tossed straight up.** Launched at 4 m/s and pulled back by 2 m/s² of gravity-like deceleration, the ball rises then falls back to the same height after 4 s — the positive and negative areas exactly cancel, for zero net displacement. -3. **A cyclist braking to a stop.** Starting at 8 m/s and braking at 2 m/s², the cyclist coasts to a complete stop after exactly 4 s, covering 16 m in the process. +1. **Constant velocity.** At 5 m/s for 5 s, displacement and distance are both 25 m. The area is a rectangle with units (m/s) × s = m. +2. **A reversal.** With initial velocity 4 m/s and acceleration −2 m/s² over 0–4 s, the object goes 4 m forward and 4 m back. Displacement is zero; distance is 8 m. +3. **Stopping at the endpoint.** With initial velocity 8 m/s and acceleration −2 m/s² over 0–4 s, the triangular area is 16 m. The object reaches zero velocity at 4 s; continuing the formula beyond that would reverse its motion. ## Test yourself -1. Make the net displacement over the interval exactly 20 m. -2. Find values where the object clearly moves (v₀ ≠ 0) but still ends up with zero net displacement. -3. Make the object start moving forward, then reverse direction before the end of the interval. +1. Choose a < b and make the signed displacement approximately 20 m. +2. Choose a < b, an initial velocity with magnitude greater than 1 m/s, and net displacement within 0.5 m of zero. For a clear return journey, use a = 0 and put a reversal inside the interval. +3. Start the interval before 0.5 s with positive velocity, use negative acceleration, and end after the velocity becomes negative. ## Intuition -Picture a cyclist starting at 8 m/s and braking at 2 m/s² until stopping exactly at 4 seconds — the shaded area under the line from a = 0 to b = 4 gives 16 metres travelled. Drag "b (end time)" across a region where the velocity line dips below zero instead: the shading appears below the time axis and the running displacement readout goes down, because moving backward counts as negative area, subtracting from progress rather than adding to it. +At a constant velocity of 5 m/s, each second adds 5 m to position. Over four seconds, the rectangle under the velocity graph has area 20, and its units are metres. When velocity changes, divide the time into short intervals. Velocity times each short duration approximates that interval's displacement; adding the pieces gives the area in the limit. -Keep dragging "b" past the point where the line crosses zero: shading now appears above the axis too, and that positive area starts cancelling the earlier negative area. If the object reverses and retraces its path exactly, the two shaded regions can cancel completely — zero net displacement even though it clearly moved. +Velocity has a sign because direction matters. Area above zero increases position, and area below zero decreases it. The two contributions can cancel even when the object has moved a long way. To find total distance, count both areas as positive. This graph is velocity against time, not a drawing of the object's path through space. ## Formal -$\Delta x = \int_a^b v(t)\,dt$; regions above the axis contribute positively, regions below contribute negatively. +Over a forward time interval $a\le b$, displacement is $\Delta x=x(b)-x(a)=\int_a^b v(t)\,dt$. The bounds a and b are times; they are not positions. Reversing the integration bounds changes the sign mathematically, but does not describe elapsed time running forward. -This is exactly the Fundamental Theorem of Calculus applied to $v = \dot x$: displacement is the antiderivative of velocity, evaluated between the bounds. +Total distance is $D=\int_a^b|v(t)|\,dt$. It equals signed displacement when velocity is nonnegative throughout the interval. If velocity is nonpositive throughout, distance equals the magnitude of displacement. Here $v(t)=v_0+\mathrm{acc}\,t$, giving $\Delta x=v_0(b-a)+\tfrac12\mathrm{acc}(b^2-a^2)$. ## Advanced -Total distance travelled (odometer reading, always non-negative) is instead $\int_a^b |v(t)|\,dt$ — splitting the interval at every sign change of $v$ and adding the absolute value of each piece's area. Displacement and distance agree only when the object never reverses direction. +For a linear velocity graph, displacement is also the interval duration multiplied by the average of the two endpoint velocities. This trapezoid rule is exact for the linear function, including signed cancellation. To calculate distance when velocity changes sign, split the interval at its zero and add the magnitudes of the resulting integrals. ## Derivation -1. Velocity is defined as the rate of change of position. -2. Apply the Fundamental Theorem of Calculus. -3. This difference is, by definition, the net displacement over $[a,b]$. +1. Velocity is the derivative of position with respect to time. +2. Integrating that derivative between the two times gives the difference between the endpoint positions. +3. That position difference is displacement. It does not count every metre travelled if the object reverses direction. ## Real world -### Trip planning -GPS devices integrate measured speed over time to compute total distance travelled. +### A cart moving back and forth -### Sports analytics -A sprinter's velocity curve, integrated, gives split distances at any point in the race. +A cart can return to its start with zero displacement after travelling several metres. Integrating signed velocity and integrating speed answer these different questions. -### Air traffic and shipping -Flight or voyage displacement is computed by integrating velocity logs, accounting for any backtracking. +### Estimating motion from measurements -### Robotics odometry -Wheeled robots estimate position by integrating wheel-speed sensor readings over time. +Measured velocity can be accumulated over time to estimate displacement. Sensor error can also accumulate, so the mathematical relationship alone does not guarantee an accurate position estimate. diff --git a/content/lessons/physics/velocity-time-area/lesson.yaml b/content/lessons/physics/velocity-time-area/lesson.yaml index 0dff765c..287908da 100644 --- a/content/lessons/physics/velocity-time-area/lesson.yaml +++ b/content/lessons/physics/velocity-time-area/lesson.yaml @@ -73,7 +73,7 @@ presets: a: 0 b: 4 challenges: - - check: v0*(b-a)+0.5*acc*(b^2-a^2) + - check: 'b > a ? v0*(b-a)+0.5*acc*(b^2-a^2) : -1' target: 20 - - check: abs(v0*(b-a)+0.5*acc*(b^2-a^2))<0.5 and abs(v0)>1 - - check: v0>0 and acc<0 and (v0+acc*b)<0 and a<0.5 + - check: b>a and abs(v0*(b-a)+0.5*acc*(b^2-a^2))<0.5 and abs(v0)>1 + - check: b>a and (v0+acc*a)>0 and acc<0 and (v0+acc*b)<0 and a<0.5 diff --git a/content/lessons/physics/work-and-energy/ar.md b/content/lessons/physics/work-and-energy/ar.md index 9eddcaf9..b1d921df 100644 --- a/content/lessons/physics/work-and-energy/ar.md +++ b/content/lessons/physics/work-and-energy/ar.md @@ -1,67 +1,62 @@ --- title: 'الشغل: المساحة تحت منحنى القوة' -summary: >- - شدّ القوس الصلب يحتاج جهدًا أكبر، وذلك الجهد يُخزَّن طاقةً جاهزة لإطلاق السهم. +summary: 'احسب الشغل اللازم لتمديد نابض مثالي من المساحة تحت منحنى القوة المطبقة.' parameters: - k: ثابت النابض k - a: a (الإزاحة الابتدائية) - b: b (الإزاحة النهائية) + k: 'k — ثابت صلابة النابض' + a: 'a — الاستطالة الابتدائية' + b: 'b — الاستطالة النهائية' variables: - - قوة استعادة النابض، وهي متناسبة مع مقدار الاستطالة (قانون هوك) - - صلابة النابض - - الشغل المبذول في الشد من $a$ إلى $b$، وهو المساحة المظللة + - 'القوة المطبقة للتمديد البطيء، وهي عكس قوة النابض' + - 'صلابة النابض بوحدة نيوتن لكل متر' + - 'الشغل المطبق من الاستطالة a إلى b' --- ## Try it -1. راقب المثلث المظلل تحت خط القوة المتصاعد، من a إلى b. -2. حرّك «b (الإزاحة النهائية)» مبتعدًا عن a = 0. راقب المثلث يكبر عرضًا وارتفاعًا معًا. -3. ارفع الآن «ثابت النابض k». الاستطالة نفسها تحتاج مثلثًا أعلى، أي شغلًا أكبر. +1. اجعل k = 1.5 N/m وa = 0 m وb = 5 m. ترتفع القوة المطبقة من صفر إلى 7.5 N، وتبلغ مساحة المثلث 18.75 J. +2. ثبّت k وa وقلّل b إلى 2.5 m. خفض الاستطالة إلى النصف يخفض بعدَي المثلث إلى النصف، فيصبح الشغل 4.6875 J، أي ربع قيمته السابقة. +3. اجعل a = 2 m وb = 5 m. تصبح المنطقة المظللة شبه منحرف، وتعطي 15.75 J من الشغل الإضافي. لا تشمل الطاقة المخزنة أصلًا عند استطالة 2 m. ## Real-life examples -1. **شدّ رباط مطاطي.** رباط ليّن ثابته 0.3 N/m يُشدّ مسافة 6 m (تخيل رباط عرض ضخم) يتطلب نحو 5.4 J من الشغل، بمقاومة لطيفة طوال الوقت. -2. **نابض ترامبولين.** نابض متوسط الصلابة ثابته 1.5 N/m يُشدّ مسافة 5 m يتطلب قرابة 19 J، بمقاومة تزداد قوة كلما شُدّ أبعد. -3. **شدّ قوس الرماية.** «نابض قوس» صلب ثابته 3.5 N/m يُسحب إلى الوراء 4 m. يتطلب ذلك 28 J من الشغل، تتحول إلى طاقة مخزَّنة جاهزة لإطلاق السهم. +1. **نابض قليل الصلابة في النموذج.** عند k = 0.3 N/m، يحتاج التمديد من 0 إلى 6 m إلى 5.4 J في النموذج الخطي المثالي. +2. **صلابة متوسطة.** عند k = 1.5 N/m، يحتاج التمديد من 0 إلى 5 m إلى 18.75 J. +3. **نابض أكثر صلابة في النموذج.** عند k = 3.5 N/m، يحتاج التمديد من 0 إلى 4 m إلى 28 J. هذه الاستطالات الكبيرة توضح الصيغة، وليست مواصفات لأقواس أو أربطة مطاطية أو نوابض تعليق فعلية. ## Test yourself -1. اجعل الشغل المبذول 20 J بالضبط (بدءًا من a = 0). -2. بدءًا من a = 0، جِد ثابت نابض ومسافة شدّ يجعلان الشغل المبذول 24 J بالضبط. -3. ارفع الشغل فوق 25 J مع إبقاء الاستطالة الكلية أقل من 5 m. +1. اجعل الشغل من a إلى b قريبًا من 20 J؛ لا يلزم أن يكون a صفرًا. +2. اختر a لا يبتعد عن الصفر بأكثر من 0.3 m، وشغلًا لا يبتعد عن 24 J بأكثر من 2 J. +3. أبقِ الاستطالة النهائية b أقل من 5 m، واجعل الشغل أكبر من 25 J. ## Intuition -تخيل شدّ نابض صلب يشبه القوس، ثابته 3.5 نيوتن لكل متر، مسافة 4 أمتار. يتطلب ذلك 28 جولًا من الشغل، يتحول إلى طاقة مخزَّنة جاهزة لإطلاق سهم. حرّك «b (الإزاحة النهائية)» مبتعدًا عن a=0، فيرتفع خط القوة بثبات ويكبر المثلث المظلل، ليس فقط عرضًا بل ارتفاعًا أيضًا، فتنمو المساحة، وبالتالي الشغل، أسرع من نمو الإزاحة نفسها. +تزداد مقاومة النابض المثالي كلما مددناه أكثر. لتمديده ببطء نطبق قوة توازن هذه المقاومة. إذا تضاعفت الاستطالة، تضاعفت القوة النهائية أيضًا. لكن الشغل يعتمد على القوة خلال الحركة كلها؛ فلا نضرب القوة النهائية في الاستطالة الكاملة، لأن ذلك يتجاهل أن القوة كانت أقل في بداية التمديد. -ارفع الآن «ثابت النابض k» لتصلّب النابض، فالآن تحتاج الاستطالة نفسها إلى مثلث قوة أعلى، ويزداد الشغل اللازم للوصول إلى أي إزاحة معينة بتناسب طردي مع k. النابض الأكثر صلابة يخزّن طاقة أكبر عند الاستطالة نفسها. +عند التمديد من الصفر، يكون منحنى القوة خطًا مستقيمًا، والشغل مساحة مثلث. متوسط القوة يساوي نصف قيمتها النهائية. وإذا بدأنا من استطالة غير صفرية، نحسب المساحة بين الحدين فقط. يوضح العرض الثلاثي التمديد وتغير الطاقة؛ ومقدار الطاقة المعروض ليس قوة إضافية أو مصدرًا مستقلًا للطاقة. ## Formal -$W = \int_0^x kx'\,dx' = \tfrac12 kx^2$، وهي مساحة مثلث قاعدته $x$ وارتفاعه $kx$. +لنابض مثالي يتبع قانون هوك، وتبلغ استطالته x، تكون قوة النابض $F_{\mathrm{spring}}=-kx$. أما الرسم فيعرض القوة المطبقة المقابلة $F_{\mathrm{applied}}=kx$ أثناء تمديد بطيء يمكن فيه إهمال تغير الطاقة الحركية. الثابت الموجب k وحدته N/m. -يُخزَّن هذا الشغل على هيئة طاقة كامنة مرنة، أي $U(x) = \tfrac12 kx^2$. +إذا اخترنا طاقة الوضع المرونية صفرًا عند الطول غير الممدود، فإن $U(x)=\tfrac12kx^2$. الشغل المطبق من الاستطالة a إلى b هو $W_{\mathrm{applied}}=\int_a^b kx\,dx=\tfrac12k(b^2-a^2)=\Delta U$. يبذل النابض شغلًا معاكس الإشارة. والجول يساوي نيوتن مترًا. ## Advanced -بما أن $F=kx$ علاقة خطية، فإن العلاقة بين الشغل والإزاحة تربيعية. أما بالنسبة لقوة استعادة غير خطية عامة $F(x)$، فتبقى الطاقة المخزنة $U(x)=\int_0^x F(x')dx'$، لكن شكل $U$ يعكس أي لاخطية توجد في $F$. النابض المتصلّب (حيث تنمو $F$ أسرع من الخطية) يخزّن طاقة تتصاعد أسرع من التربيعية. +لقوة نابض محافظة، تكون Fspring = −dU/dx. وقد تكون للنابض غير الخطي طاقة وضع أيضًا، لكن العلاقة بين القوة والمساحة لا تكون بالضرورة مثلثية أو تربيعية. الاحتكاك والفقد الداخلي يعنيان أننا لا نستعيد كل الشغل عند التحرير. إذا كان b < a، يكون الشغل المطبق سالبًا أثناء إرجاع متحكم فيه؛ استخدم a ≤ b لدراسة التمديد في الحركة المعروضة. ## Derivation -1. قانون هوك، قوة الاستعادة تتناسب مع مقدار الاستطالة. -2. الشغل هو تراكم القوة على طول الإزاحة. -3. احسب التكامل لتحصل على طاقة النابض الكامنة المألوفة. +1. عند التمديد البطيء، توازن القوة المطبقة kx قوة إرجاع النابض المعاكسة لها. +2. نجمع مساهمات الشغل الصغيرة F dx من الاستطالة الصفرية إلى الاستطالة النهائية. +3. تكامل kx يعطي نصف k مضروبًا في مربع الاستطالة، وهو زيادة طاقة الوضع المرونية للنابض المثالي. ## Real world -### الرماية بالقوس والمنجنيق -شدّ القوس أو المنجنيق يخزّن طاقة مرنة تُحسب تمامًا بالصيغة $\tfrac12 kx^2$، وتتحرر كطاقة حركية عند الإطلاق. +### آليات النوابض -### أنظمة تعليق المركبات -تخزّن النوابض والمخمّدات الطاقة وتبدّدها وفق علاقة الشغل-المساحة نفسها. +يمكن تكامل منحنى قوة واستطالة مقاس لتقدير الشغل. وقد يصلح التقريب الخطي خلال نطاق محدود من الاستطالات فقط. -### الفرشات والترامبولين -تنضغط المواد المرنة تحت الحمل، فتخزّن طاقة تتناسب مع مربع مقدار الانضغاط. +### النابض والمخمّد -### الروابط الجزيئية -بالقرب من نقطة الاتزان، غالبًا ما تُقرَّب الطاقة الكامنة للرابطة الكيميائية بهذه الصيغة التربيعية (التوافقية) نفسها. +يخزن النابض طاقة مرونية قابلة للاستعادة في النموذج المثالي. أما المخمّد فيبدد طاقة ميكانيكية؛ فوظيفتاهما مختلفتان. diff --git a/content/lessons/physics/work-and-energy/en.md b/content/lessons/physics/work-and-energy/en.md index 6df8f925..6558002d 100644 --- a/content/lessons/physics/work-and-energy/en.md +++ b/content/lessons/physics/work-and-energy/en.md @@ -1,68 +1,62 @@ --- title: Work as the area under a force curve -summary: >- - This is why drawing a stiff bow takes far more effort than a soft one, - and where that effort goes: stored energy ready to launch the arrow. +summary: 'Calculate the work needed to stretch an ideal spring by measuring the area under its applied-force curve.' parameters: - k: spring constant k - a: a (start displacement) - b: b (end displacement) + k: 'k — spring stiffness' + a: 'a — starting extension' + b: 'b — final extension' variables: - - 'spring restoring force, proportional to stretch (Hooke''s law)' - - spring stiffness - - work done stretching from $a$ to $b$ — the shaded area + - 'applied force needed for slow stretching, opposite to the spring force' + - 'spring stiffness in newtons per metre' + - 'applied work from extension a to b' --- ## Try it -1. Watch the shaded triangle under the rising force line, from a to b. -2. Drag "b (end displacement)" outward from a = 0. Watch the triangle grow both wider and taller. -3. Now raise "spring constant k". The same stretch needs a taller triangle, so more work. +1. Set k = 1.5 N/m, a = 0 m and b = 5 m. The applied force rises from zero to 7.5 N, and the triangular area is 18.75 J. +2. Keep k and a fixed and reduce b to 2.5 m. Halving the extension halves both triangle dimensions, so the work becomes 4.6875 J, one-quarter as much. +3. Set a = 2 m and b = 5 m. The shaded region is now a trapezoid, giving 15.75 J of additional work. It excludes the energy already stored at extension 2 m. ## Real-life examples -1. **Stretching a rubber band.** A soft 0.3 N/m band stretched 6 m (imagine a giant demo band) takes about 5.4 J of work — gentle resistance throughout. -2. **A trampoline spring.** A moderately stiff 1.5 N/m spring stretched 5 m takes nearly 19 J, resisting more strongly the further it's pulled. -3. **Drawing an archery bow.** A stiff 3.5 N/m "bow spring" pulled back 4 m takes 28 J of work, stored ready to launch the arrow. +1. **A soft model spring.** With k = 0.3 N/m, stretching from 0 to 6 m requires 5.4 J in the ideal linear model. +2. **An intermediate stiffness.** With k = 1.5 N/m, stretching from 0 to 5 m requires 18.75 J. +3. **A stiffer model spring.** With k = 3.5 N/m, stretching from 0 to 4 m requires 28 J. These large extensions illustrate the formula; they are not specifications for real bows, rubber bands or suspension springs. ## Test yourself -1. Make the work done exactly 20 J (starting from a = 0). -2. Starting from a = 0, find a spring constant and stretch distance where the work done is exactly 24 J. -3. Get the work above 25 J while keeping the total stretch under 5 m. +1. Make the work from a to b approximately 20 J; a need not be zero. +2. Choose a within 0.3 m of zero and work within 2 J of 24 J. +3. Keep the final extension b below 5 m and make the work greater than 25 J. ## Intuition -Picture drawing a stiff bow-like spring, constant 3.5 N/m, back 4 metres: that takes 28 joules of work, stored ready to launch an arrow. Drag "b (end displacement)" outward from a = 0: the force line rises steadily and the shaded triangle grows, not just wider but taller too, so the area, and hence the work, grows faster than the displacement itself. +An ideal spring resists more strongly as it is stretched farther. To stretch it slowly, we apply a force matching that resistance. If the extension doubles, the final force doubles too. Work depends on the force over the whole motion, so we cannot multiply the final force by the full extension: that would overcount the smaller forces used earlier. -Now raise "spring constant k" to stiffen the spring: the same stretch needs a taller triangle of force, so the work to reach any given displacement increases in direct proportion to k — a stiffer spring stores more energy for the same stretch. +For a stretch from zero, the force graph is a straight line and the work is a triangular area. Its average force is half the final force. For a stretch starting at a nonzero extension, the work is the area between the two bounds. The 3D view illustrates stretching and the energy change; the displayed energy amount is not an additional force or an independent source of energy. ## Formal -$W = \int_0^x kx'\,dx' = \tfrac12 kx^2$ — the area of a triangle with base $x$ and height $kx$. +For an ideal Hooke's-law spring with extension x, the spring's force is $F_{\mathrm{spring}}=-kx$. The graph instead shows the opposing applied force $F_{\mathrm{applied}}=kx$ for slow stretching with negligible change in kinetic energy. The positive constant k has units N/m. -This work is stored as elastic potential energy: $U(x) = \tfrac12 kx^2$. +Taking elastic potential energy as zero at the unstretched length, $U(x)=\tfrac12kx^2$. Applied work from extension a to b is $W_{\mathrm{applied}}=\int_a^b kx\,dx=\tfrac12k(b^2-a^2)=\Delta U$. The spring does the opposite work. One joule is one newton metre. ## Advanced -Because $F=kx$ is linear, the work-displacement relationship is quadratic; for a general nonlinear restoring force $F(x)$, the stored energy is still $U(x)=\int_0^x F(x')dx'$, but the shape of $U$ mirrors whatever nonlinearity $F$ has — a hardening spring ($F$ growing faster than linear) stores energy that rises faster than quadratically. +For a conservative spring force, Fspring = −dU/dx. A nonlinear spring can still have potential energy, but its force-area relationship need not be triangular or quadratic. Friction and internal losses mean not all applied work is recovered on release. With b < a, the signed applied work is negative in a controlled return; use a ≤ b to study stretching in the displayed animation. ## Derivation -1. Hooke's law: restoring force proportional to stretch. -2. Work is the accumulated force over the displacement. -3. Evaluate the integral — the familiar spring potential energy. +1. For slow extension, the applied force kx balances the spring's restoring force in the opposite direction. +2. Add the small work contributions F dx from zero extension to the final extension. +3. Integrating kx gives half k times extension squared, the increase in elastic potential energy for this ideal spring. ## Real world -### Archery and catapults -Drawing a bow or catapult stores elastic energy exactly as $\tfrac12 kx^2$, released as kinetic energy on firing. +### Spring mechanisms -### Vehicle suspensions -Springs and shock absorbers store and dissipate energy according to this same work-area relationship. +A measured force-extension curve can be integrated to estimate work. A linear approximation may apply only over a limited range of extensions. -### Mattresses and trampolines -Elastic materials compress under load, storing energy proportional to the square of the compression. +### Springs and dampers -### Molecular bonds -Near equilibrium, chemical bond potential energy is often approximated as this same quadratic (harmonic) form. +A spring stores recoverable elastic energy in an ideal model. A damper dissipates mechanical energy; the two components do not perform the same role. diff --git a/content/lessons/quantum/de-broglie-waves/ar.md b/content/lessons/quantum/de-broglie-waves/ar.md index d9b28149..821a29fe 100644 --- a/content/lessons/quantum/de-broglie-waves/ar.md +++ b/content/lessons/quantum/de-broglie-waves/ar.md @@ -15,27 +15,27 @@ charts: [] ## Try it -1. راقب المنحنى على الشاشة. يتقلّص طول موجة الإلكترون كلما زادت سرعته. -2. اسحب النقطة على المنحنى نحو سرعة أعلى. تهبط قراءة طول الموجة بسرعة. -3. اسحبها عائدًا نحو سرعة منخفضة، وراقب طول الموجة يكبر مع خط المماس الذي يتبعه. +1. انظر إلى المنحنى على الشاشة: يقصر طول موجة الإلكترون كلما زادت سرعته. «x» هي السرعة بوحدة km/s، و«f(x)» هو طول الموجة بالنانومتر. عند x = 100 تجد f(x) = 7.27. +2. اسحب النقطة على المنحنى إلى x = 200. ينزل f(x) إلى 3.635: ضاعفنا السرعة فصار طول الموجة نصف ما كان. +3. واصل السحب إلى x = 1000. تجد f(x) = 0.727، أي أقصر بعشر مرات مما كان عند x = 100، ويصبح خط المماس المرافق للنقطة شبه أفقي. ## Real-life examples -1. **حزمة إلكترونات بطيئة.** عند سرعة منخفضة يكبر طول موجة الإلكترون حتى يظهر بوضوح على الرسم. -2. **حزمة إلكترونات أسرع.** سرّع الإلكترون فيتقلّص طول موجته بوضوح. -3. **حزمة مجهر إلكتروني.** عند أعلى سرعة هنا يقترب طول الموجة من حجم ذرة واحدة، ولهذا تصوّر المجاهر الإلكترونية ما يعجز عنه المجهر الضوئي. +1. **حزمة إلكترونات بطيئة.** عند سرعة 100 km/s يكون طول موجة الإلكترون 7.27 نانومتر، أي بعرض بضع عشرات من الذرات المتجاورة. +2. **حزمة إلكترونات أسرع.** عند سرعة 500 km/s يقصر طول الموجة إلى نحو 1.45 نانومتر، أي أقصر بخمس مرات. +3. **حزمة مجهر إلكتروني.** عند سرعة 1500 km/s يصبح طول الموجة نحو 0.48 نانومتر، وهذا قريب من حجم ذرة واحدة. ولهذا تصوّر المجاهر الإلكترونية ما يعجز عنه المجهر الضوئي. ## Test yourself -1. اضبط السرعة بحيث تقرأ طول الموجة نحو 7.3 على الرسم. -2. ادفع السرعة عاليًا حتى يهبط طول الموجة دون 1. -3. أوصل طول الموجة إلى 2 بالضبط. +1. اجعل طول الموجة نصف ما بدأ به: اضبط السرعة حتى تصبح قراءة f(x) نحو 3.6. +2. زد السرعة حتى ينزل طول الموجة إلى أقل من 1 نانومتر. +3. أوصل طول الموجة إلى 2 نانومتر (بفارق لا يتجاوز 0.05). ## Intuition للكرة المقذوفة طول موجة أيضًا، بالفيزياء نفسها، لكنه أصغر من الكرة نفسها بتريليونات المرات فلا يظهر عليها أي أثر موجي أبدًا. أما الإلكترون فمختلف. فهو خفيف جدًا حتى إن طول موجته قد يبلغ حجم ذرة، فيظهر جانبه الموجي في كل مكان، بما في ذلك خطوط تجربة الشقين في الدرس السابق. -اسحب النقطة على المنحنى واقرأ رقم طول الموجة مع تغيّر السرعة. للإلكترون البطيء طول موجة كبير نسبيًا. والإلكترون نفسه إن سرّعته عشر مرات يصبح طول موجته أقصر بعشر مرات، لأن السرعة وطول الموجة يتحركان في اتجاهين متعاكسين تمامًا. +اسحب النقطة على المنحنى واقرأ رقم طول الموجة مع تغيّر السرعة. للإلكترون البطيء طول موجة كبير نسبيًا. والإلكترون نفسه إن سرّعته عشر مرات يصبح طول موجته أقصر بعشر مرات، فكلما زادت السرعة قصر طول الموجة بالنسبة نفسها. ## Formal @@ -45,7 +45,7 @@ charts: [] ## Advanced -اقترح لويس دي بروي الموجات المادية في أطروحة دكتوراه سنة 1924، انطلاقًا فقط من تناظر مع الضوء، الذي كان معروفًا حينها بسلوكه المزدوج موجةً وجسيمًا. وتأكدت الفكرة بعد ثلاث سنوات حين أنتج تشتت إلكترونات عن بلورة نيكل نمط تداخل مطابقًا لما تعطيه أشعة X. فأثبت هذا أن الإلكترونات تتحيّد فعلًا كالموجات. +اقترح لويس دي بروي الموجات المادية في أطروحة دكتوراه سنة 1924، انطلاقًا فقط من تناظر مع الضوء، الذي كان معروفًا حينها بسلوكه المزدوج موجةً وجسيمًا. وتأكدت الفكرة بعد ثلاث سنوات حين أنتج تشتت إلكترونات عن بلورة نيكل نمط تداخل مطابقًا لما تعطيه الأشعة السينية. فأثبت هذا أن الإلكترونات تحيد فعلًا كما تحيد الموجات. ## Derivation @@ -56,10 +56,13 @@ charts: [] ## Real world ### المجاهر الإلكترونية + تحمل الإلكترونات السريعة طول موجة أقصر بآلاف المرات من الضوء المرئي. لهذا تميّز المجاهر الإلكترونية تفاصيل أدق بكثير من أي مجهر ضوئي. ### حيود الإلكترونات في الكيمياء + يطلق الكيميائيون حزم إلكترونات نحو بلورات، ويقرؤون نمط الحيود الناتج ليحددوا مكان كل ذرة. ### تشتت النيوترونات + تحمل حزم النيوترونات أيضًا طول موجة دي بروي، ويستخدمها العلماء لسبر بنية مواد كثيفة أو معتمة يعجز الضوء والإلكترون عن اختراقها. diff --git a/content/lessons/quantum/de-broglie-waves/en.md b/content/lessons/quantum/de-broglie-waves/en.md index 60bdf916..ee7c2bf9 100644 --- a/content/lessons/quantum/de-broglie-waves/en.md +++ b/content/lessons/quantum/de-broglie-waves/en.md @@ -16,21 +16,21 @@ charts: [] ## Try it -1. Look at the curve on screen: it shows how an electron's wavelength shrinks as its speed grows. -2. Drag the point along the curve toward higher speed. The wavelength reading drops fast. -3. Drag it back toward low speed and watch the wavelength grow instead, tracing the tangent line as you go. +1. Look at the curve on screen: it shows how an electron's wavelength shrinks as its speed grows. «x» is the speed in km/s and «f(x)» is the wavelength in nanometres. At x = 100, f(x) reads 7.27. +2. Drag the point along the curve to x = 200. f(x) drops to 3.635: twice the speed, half the wavelength. +3. Drag it on to x = 1000. f(x) reads 0.727, ten times shorter than at x = 100, and the tangent line that follows the point is now almost flat. ## Real-life examples -1. **A slow electron beam.** At low speed the electron's wavelength is large enough to show up clearly on the plot. -2. **A faster electron beam.** Speeding the electron up shrinks its wavelength noticeably. -3. **An electron-microscope beam.** At the highest speeds shown here the wavelength shrinks toward the size of a single atom, which is exactly why electron microscopes can image things a light microscope never could. +1. **A slow electron beam.** At 100 km/s the electron's wavelength is 7.27 nm, as wide as a few dozen atoms side by side. +2. **A faster electron beam.** At 500 km/s the wavelength shrinks to about 1.45 nm, five times shorter. +3. **An electron-microscope beam.** At 1500 km/s the wavelength is about 0.48 nm, close to the size of a single atom, which is exactly why electron microscopes can image things a light microscope never could. ## Test yourself -1. Set the speed so the wavelength reads about 7.3 on the plot. -2. Push the speed high enough that the wavelength drops below 1. -3. Land the wavelength on exactly 2. +1. Cut the starting wavelength in half: set the speed so f(x) reads about 3.6. +2. Push the speed high enough that the wavelength drops below 1 nm. +3. Land the wavelength on 2 nm (to within 0.05). ## Intuition @@ -57,10 +57,13 @@ Louis de Broglie proposed matter waves in his 1924 doctoral thesis purely from s ## Real world ### Electron microscopes + Because fast electrons have a wavelength thousands of times shorter than visible light, electron microscopes can resolve details far finer than any light microscope. ### Electron diffraction in chemistry + Chemists fire electron beams at crystals and read the resulting diffraction pattern to work out where every atom sits. ### Neutron scattering + Neutron beams, which also carry a de Broglie wavelength, probe the atomic structure of materials too dense or opaque for light or electrons to penetrate. diff --git a/content/lessons/quantum/de-broglie-waves/lesson.yaml b/content/lessons/quantum/de-broglie-waves/lesson.yaml index 91766c09..c4491902 100644 --- a/content/lessons/quantum/de-broglie-waves/lesson.yaml +++ b/content/lessons/quantum/de-broglie-waves/lesson.yaml @@ -47,8 +47,8 @@ presets: - x: 1500 challenges: - check: 727/x - target: 7.27 - tol: 0.2 + target: 3.635 + tol: 0.05 - check: 727/x < 1 - check: 727/x target: 2 diff --git a/content/lessons/quantum/double-slit-experiment/ar.md b/content/lessons/quantum/double-slit-experiment/ar.md index 7fe0e2d6..a23bfbf7 100644 --- a/content/lessons/quantum/double-slit-experiment/ar.md +++ b/content/lessons/quantum/double-slit-experiment/ar.md @@ -16,27 +16,27 @@ charts: [] ## Try it -1. راقب الشاشة وهي تمتلئ بخطوط مضيئة وأخرى مظلمة مع وصول الجسيمات واحدًا واحدًا عبر الشقين. -2. وسّع «المسافة بين الشقين d». تقترب الخطوط من بعضها أكثر. -3. شغّل «كاشف المسار». تختفي الخطوط، ولا يبقى سوى بقعتين بسيطتين، واحدة خلف كل شق. +1. راقب الشاشة وهي تمتلئ بخطوط مضيئة وأخرى مظلمة مع وصول الجسيمات واحدًا واحدًا عبر الشقين. عند d = 3 و λ = 2 تكون قراءة «المسافة بين الخطوط» 0.267. +2. اسحب «المسافة بين الشقين d» من 3 إلى 6. تتقارب الخطوط، وتنزل «المسافة بين الخطوط» إلى النصف: 0.133. +3. اجعل «كاشف المسار» يساوي 1. تختفي الخطوط، وتظهر في خانة «المسافة بين الخطوط» شرطة —، ولا يبقى سوى بقعتين عاديتين، واحدة خلف كل شق. ## Real-life examples -1. **ليزر موجّه نحو شقين ضيقين.** حين يتقارب الشقان، تمتلئ الشاشة بخطوط عريضة متباعدة بوضوح. -2. **ضوء أطول موجة عبر شقين متقاربين.** الضوء الأحمر أطول موجة، فحين يعبر شقين متقاربين تبتعد خطوطه عن بعضها أكثر. +1. **ليزر موجّه نحو شقين ضيقين.** عند d = 3 و λ = 2 تمتلئ الشاشة بخطوط منتظمة، والمسافة بين كل خطين 0.267. +2. **ضوء أطول موجة عبر شقين متقاربين.** الضوء الأحمر أطول موجة (λ = 4)، فإذا قرّبنا الشقين إلى d = 1.5 تباعدت الخطوط إلى 1.067، أي أربعة أضعاف. 3. **كاشف يراقب أي شق يأخذه كل جسيم.** فور معرفة المسار تختفي الخطوط تمامًا. ## Test yourself -1. اجعل الخطوط أعرض من الوضع الافتراضي بمرتين. +1. ضاعف المسافة بين الخطوط: من القيمة الابتدائية 0.267 إلى نحو 0.533. 2. شغّل الكاشف وراقب اختفاء التداخل. 3. اجعل المسافة بين الخطوط أضيق من 0.15، واترك الكاشف مطفأً. ## Intuition -أطلق إلكترونًا واحدًا في كل مرة عبر شقين ضيقين، ولو فصلت بين الإطلاقتين ساعات، وستهبط كل نقطة على الشاشة في مكان عشوائي. لكن بعد آلاف النقاط تتجمّع في نمط من خطوط وفجوات، تمامًا كما تفعل موجتا ماء متداخلتان، لا كالبقعتين البسيطتين اللتين تتوقعهما من طلقتين من رصاص صغير. +أطلق إلكترونًا واحدًا في كل مرة عبر شقين ضيقين، ولو فصلت بين الإطلاقتين ساعات، وستهبط كل نقطة على الشاشة في مكان عشوائي. لكن بعد آلاف النقاط تتجمّع في نمط من خطوط وفجوات، تمامًا كما تفعل موجتا ماء متداخلتان، لا كالبقعتين العاديتين اللتين تتوقعهما لو كانت الإلكترونات رصاصات صغيرة تمر من الشقين. -شغّل «كاشف المسار» لتتحقق من الشق الذي مرّ منه كل إلكترون فعلًا، فتختفي الخطوط فورًا ولا يبقى سوى بقعتين عاديتين. مراقبة المسار تدمّر النمط الموجي. وعدم المراقبة تترك كل إلكترون وكأنه يستكشف الشقين معًا. +شغّل «كاشف المسار» لتتحقق من الشق الذي مرّ منه كل إلكترون فعلًا، فتختفي الخطوط فورًا ولا يبقى سوى بقعتين عاديتين. مراقبة المسار تمحو النمط الموجي. وإذا لم نراقب، تصرّف كل إلكترون كأنه مرّ من الشقين معًا. ## Formal @@ -57,10 +57,13 @@ charts: [] ## Real world ### المجاهر الإلكترونية + يحدّ تداخل الإلكترونات، وهو الأثر نفسه المسؤول عن هذه الخطوط، من دقة تركيز حزمة المجهر الإلكتروني. ### كواشف الموجات الثقالية + يقسم كاشف LIGO حزمة ليزر إلى مسارين طول كل منهما كيلومترات، ثم يجمعهما، ويقرأ مرور موجة ثقالية من إزاحة خطوط تداخلهما. ### تداخل النيوترونات والجزيئات + أرسل الفيزيائيون جزيئات كاملة من مئات الذرات عبر شقين، ورأوا خطوط تداخل رغم ذلك، مما يثبت أن الأثر لا يقتصر على الإلكترونات والفوتونات. diff --git a/content/lessons/quantum/double-slit-experiment/en.md b/content/lessons/quantum/double-slit-experiment/en.md index ebbfcb7a..b7883d24 100644 --- a/content/lessons/quantum/double-slit-experiment/en.md +++ b/content/lessons/quantum/double-slit-experiment/en.md @@ -17,19 +17,19 @@ charts: [] ## Try it -1. Watch the screen fill with bright and dark stripes as particles arrive one by one through the two slits. -2. Drag «slit separation d» wider. The stripes squeeze closer together. -3. Turn on the «which-path detector». The stripes vanish, and only two plain blobs remain — one behind each slit. +1. Watch the screen fill with bright and dark stripes as particles arrive one by one through the two slits. With d = 3 and λ = 2, «stripe spacing» reads 0.267. +2. Drag «slit separation d» from 3 up to 6. The stripes squeeze closer together and «stripe spacing» halves to 0.133. +3. Set «which-path detector» to 1. The stripes vanish, «stripe spacing» shows —, and only two plain blobs remain, one behind each slit. ## Real-life examples -1. **A laser aimed at two narrow slits.** With the slits close together, wide, well-spaced stripes cover the screen. -2. **Longer-wavelength light through close slits.** Redder light with slits pulled in tight spreads the stripes out even further. +1. **A laser aimed at two narrow slits.** With d = 3 and λ = 2, evenly spaced stripes cover the screen, 0.267 apart. +2. **Longer-wavelength light through close slits.** Redder light (λ = 4) with the slits pulled in to d = 1.5 spreads the stripes out to 1.067 apart, four times wider. 3. **A detector watching which slit each particle takes.** The moment you know the path, the stripes disappear completely. ## Test yourself -1. Make the stripes twice as wide as the default setting. +1. Double the stripe spacing from the default 0.267 to about 0.533. 2. Switch on the detector and watch interference disappear. 3. Squeeze the stripe spacing tighter than 0.15, with the detector switched off. @@ -51,17 +51,20 @@ Richard Feynman called this "the only mystery" of quantum mechanics: the interfe ## Derivation -1. Wider light waves make the stripe spacing wider. +1. Longer light waves make the stripe spacing wider. 2. Moving the two slits apart squeezes the stripes closer together. 3. Combining both effects gives the stripe spacing used by this simulation, with a constant fixed by the screen's geometry. ## Real world ### Electron microscopes + Electron interference, the same effect behind these stripes, limits how sharply an electron microscope can focus its beam. ### Gravitational-wave detectors + LIGO splits a laser beam down two paths kilometres long and recombines them, reading a passing gravitational wave from the shift in their interference stripes. ### Neutron and molecule interferometry + Physicists have sent whole molecules of hundreds of atoms through slits and still seen interference stripes, showing the effect is not just for electrons and photons. diff --git a/content/lessons/quantum/double-slit-experiment/lesson.yaml b/content/lessons/quantum/double-slit-experiment/lesson.yaml index d0e450fb..8967b4ce 100644 --- a/content/lessons/quantum/double-slit-experiment/lesson.yaml +++ b/content/lessons/quantum/double-slit-experiment/lesson.yaml @@ -64,7 +64,7 @@ presets: rate: 100 challenges: - check: lam/(2.5*d) - target: 0.5 + target: 0.533 tol: 0.02 - check: detector == 1 - check: lam/(2.5*d) < 0.15 and detector == 0 diff --git a/content/lessons/quantum/entanglement/ar.md b/content/lessons/quantum/entanglement/ar.md index 405daa33..bdd281e0 100644 --- a/content/lessons/quantum/entanglement/ar.md +++ b/content/lessons/quantum/entanglement/ar.md @@ -15,27 +15,27 @@ charts: [] ## Try it -1. اضبط «زاوية كاشف أليس a» و«زاوية كاشف بوب b» على القيمة نفسها. كل زوج تقيسه أدناه يعود متطابقًا، إما «صورة» مع «صورة» أو «كتابة» مع «كتابة». -2. اضبط «زاوية كاشف بوب b» على 180° بعيدًا تمامًا عن «زاوية كاشف أليس a». الآن يعود كل زوج بنتيجتين متعاكستين. -3. اضبط «زاوية كاشف بوب b» على 90° بعيدًا عن «زاوية كاشف أليس a» وارفع «عدد الأزواج المقيسة» نحو 500. تستقر نسبة التطابق عند نحو النصف بالضبط. +1. اضبط «زاوية كاشف أليس a» و«زاوية كاشف بوب b» كلتيهما على 0°، واضغط زر تشغيل 100 زوج. تصبح «فرصة التطابق المتوقعة» 100 %، ويخرج كل زوج متطابقًا: H مع H (صورة) أو T مع T (كتابة). +2. أبقِ a = 0° واضبط «زاوية كاشف بوب b» على 180°. تصبح «فرصة التطابق المتوقعة» 0 %. شغّل الأزواج مرة أخرى: يخرج كل زوج الآن بنتيجتين متعاكستين. +3. اضبط b = 90°، وارفع «عدد الأزواج المقيسة» إلى 500، ثم اضغط زر تشغيل 500 زوج. تصبح «فرصة التطابق المتوقعة» 50 %، وتستقر «نسبة التطابق المشاهَدة» قريبًا منها. ## Real-life examples 1. **كاشفان على المحاذاة نفسها، a = 0° وb = 0°.** يتفق كل زوج، تطابق مؤكد. -2. **كاشفان يفصل بينهما 90°، a = 0° وb = 90°.** تنقسم الأزواج تقريبًا مناصفة بين التطابق وعدمه، كقذف عملة نزيهة. +2. **كاشفان يفصل بينهما 90°، a = 0° وb = 90°.** نصف الأزواج تقريبًا يتطابق ونصفها لا يتطابق، كرمي قطعة نقد عادلة. 3. **كاشفان متعاكسان، a = 0° وb = 180°.** يختلف كل زوج، تعارض مؤكد. ## Test yourself -1. اجعل فرصة التطابق قريبة جدًا من 1. -2. اجعل فرصة التطابق قريبة جدًا من 0.5. +1. اجعل «فرصة التطابق المتوقعة» قريبة جدًا من 100 %. +2. اجعل «فرصة التطابق المتوقعة» 75 %. 3. باعد بين زاويتي الكاشفين 170° على الأقل. ## Intuition -مصدر في وسط المختبر يصنع أزواجًا من الجسيمات معًا، في حالة واحدة مشتركة بينهما، ويرسل فردًا من كل زوج إلى صندوق أليس وفردًا آخر إلى صندوق بوب. في عام 2017 أرسل قمر صناعي صيني أزواجًا من الفوتونات المتشابكة إلى محطتين أرضيتين تفصل بينهما 1200 كيلومترًا، مسافة أبعد مما يستطيع أي سلك أن ينقل عبرها إشارة مفيدة بسهولة، ومع ذلك اتفق الطرفان تمامًا كما تتفق صندوقا هذا الدرس. الضغط على زر القياس يُظهر نتيجة في صندوق أليس ونتيجة في صندوق بوب، ولا تكشف المقارنة بين النتيجتين إلا حين تجمعهما معًا لاحقًا، عبر مكالمة هاتفية عادية لا تتجاوز سرعة الضوء. +مصدر في وسط المختبر يصنع أزواجًا من الجسيمات معًا، في حالة واحدة مشتركة بينهما، ويرسل فردًا من كل زوج إلى صندوق أليس وفردًا آخر إلى صندوق بوب. في عام 2017 أرسل قمر صناعي صيني أزواجًا من الفوتونات المتشابكة إلى محطتين أرضيتين تفصل بينهما 1200 كيلومتر، وهي مسافة يصعب أن ينقل سلك عبرها إشارة مفيدة، ومع ذلك اتفق الطرفان تمامًا كما يتفق صندوقا هذا الدرس. الضغط على زر القياس يُظهر نتيجة في صندوق أليس ونتيجة في صندوق بوب. ولا نعرف هل تطابقت النتيجتان إلا حين نقارن بينهما لاحقًا، عبر مكالمة هاتفية عادية لا تتجاوز سرعة الضوء. -نتائج أليس وحدها، بمعزل عن بوب، مجرد قذف عملة نزيه بنسبة 50/50 مهما كانت «زاوية كاشف بوب b»، فلا يستطيع بوب أبدًا أن يستخدم اختيار زاويته ليرسل لأليس رسالة. لا يظهر الترابط بينهما إلا حين يجمع أحدهم قائمتي النتيجتين معًا. أثبت الفيزيائي جون بل أن أي خطة «أجوبة متفق عليها سرًّا مسبقًا» مكتوبة داخل الجسيمين لحظة صنعهما لا تستطيع أن تعيد إنتاج المنحنى ذاته الذي ترسمه «زاوية كاشف أليس a» و«زاوية كاشف بوب b» وأنت تحركهما. الجسيمات المتشابكة الحقيقية تفعل ما لا تستطيعه ورقة سرية مشتركة أبدًا. +نتائج أليس وحدها، بمعزل عن بوب، مثل رمي قطعة نقد عادلة بنسبة 50/50 مهما كانت «زاوية كاشف بوب b»، فلا يستطيع بوب أبدًا أن يستخدم اختيار زاويته ليرسل لأليس رسالة. لا يظهر الترابط بينهما إلا حين يجمع أحدهم قائمتي النتيجتين معًا. أثبت الفيزيائي جون بل أن أي خطة «أجوبة متفق عليها سرًّا مسبقًا» مكتوبة داخل الجسيمين لحظة صنعهما لا تستطيع أن تعيد إنتاج المنحنى ذاته الذي ترسمه «زاوية كاشف أليس a» و«زاوية كاشف بوب b» وأنت تحركهما. الجسيمات المتشابكة الحقيقية تفعل ما لا تستطيعه ورقة سرية مشتركة أبدًا. ## Formal @@ -49,20 +49,24 @@ charts: [] ## Derivation -1. حين يشير الكاشفان الاتجاه نفسه، تضمن الحالة المشتركة القراءة نفسها على الجانبين. -2. حين يشير الكاشفان اتجاهين متعاكسين تمامًا، تضمن الحالة المشتركة قراءتين متعاكستين. +1. حين يشير الكاشفان في الاتجاه نفسه، تضمن الحالة المشتركة القراءة نفسها على الجانبين. +2. حين يشير الكاشفان في اتجاهين متعاكسين تمامًا، تضمن الحالة المشتركة قراءتين متعاكستين. 3. بين هذين الطرفين تتبع فرصة التطابق منحنى ناعمًا لا يحدده إلا الفرق بين زاويتي الكاشفين. ## Real world ### توزيع المفتاح الكمي -تنقل بنوك وحكومات بالفعل مفاتيح سرية عبر روابط فوتونات متشابكة، وأي متنصت يعترض فوتونًا يُخِلّ بالترابط بطريقة يستطيع الطرفان الشرعيان كشفها. + +نقلت شبكات بحثية بالفعل مفاتيح سرية عبر روابط فوتونات متشابكة، وأي متنصت يعترض فوتونًا يُخِلّ بالترابط بطريقة يستطيع الطرفان الشرعيان كشفها. ### الحواسيب الكمية + ربط الكيوبتات بالتشابك يجعل نتائج القياس في حاسوب كمي مترابطة بطرق لا تستطيعها بتات أي حاسوب عادي، وهذا مصدر جزء كبير من قوته الإضافية. ### اختبار أسس الفيزياء + حوّلت متراجحة بل سؤال «هل الطبيعة كلاسيكية في جوهرها؟» من سؤال فلسفي إلى قياس مخبري، أحد أكثر الاختبارات تكرارًا وحسمًا في الفيزياء. ### شبكات كمية عبر الأقمار الصناعية + تجربة القمر الصناعي المذكورة أعلاه خطوة أولى نحو شبكة عالمية توزّع أزواجًا متشابكة بين محطات أرضية بعيدة لأجل اتصال آمن. diff --git a/content/lessons/quantum/entanglement/en.md b/content/lessons/quantum/entanglement/en.md index ed754b07..e5657735 100644 --- a/content/lessons/quantum/entanglement/en.md +++ b/content/lessons/quantum/entanglement/en.md @@ -18,9 +18,9 @@ charts: [] ## Try it -1. Set «Alice's detector angle a» and «Bob's detector angle b» to the same value. Every pair you measure below comes back matching — both "heads" or both "tails". -2. Set «Bob's detector angle b» exactly 180° away from «Alice's detector angle a». Now every pair comes back opposite. -3. Set «Bob's detector angle b» 90° away from «Alice's detector angle a» and raise «number of pairs measured» toward 500. The match rate settles at almost exactly one half. +1. Set «Alice's detector angle a» and «Bob's detector angle b» both to 0° and press «run 100 pairs». «predicted match chance» reads 100 %, and every pair comes back matching: both H (heads) or both T (tails). +2. Keep a = 0° and set «Bob's detector angle b» to 180°. «predicted match chance» reads 0 %. Run the pairs again: now every pair comes back opposite. +3. Set b = 90°, raise «number of pairs measured» to 500 and press «run 500 pairs». «predicted match chance» reads 50 %, and «observed match rate» settles close to it. ## Real-life examples @@ -30,8 +30,8 @@ charts: [] ## Test yourself -1. Get the match chance to (very nearly) 1. -2. Get the match chance to almost exactly 0.5. +1. Get «predicted match chance» to (very nearly) 100 %. +2. Get «predicted match chance» to 75 %. 3. Push the two detector angles at least 170° apart. ## Intuition @@ -59,13 +59,17 @@ A local hidden-variable model, in which each particle secretly carries a fixed p ## Real world ### Quantum key distribution -Banks and governments already send secret keys over entangled-photon links; any eavesdropper who intercepts a photon disturbs the correlation in a way the two legitimate ends can detect. + +Research networks have already sent secret keys over entangled-photon links; any eavesdropper who intercepts a photon disturbs the correlation in a way the two legitimate ends can detect. ### Quantum computers + Linking qubits with entanglement lets a quantum computer's measurements depend on each other in ways no ordinary computer's bits can, which is where a lot of its extra power comes from. ### Testing the foundations of physics + Bell's inequality turned "is nature secretly classical underneath?" from a philosophical question into a lab measurement, one of the most repeated and most decisively answered tests in physics. ### Satellite quantum networks + The Micius satellite experiment mentioned above is the first step toward a global network that shares entangled pairs between distant ground stations for secure communication. diff --git a/content/lessons/quantum/entanglement/lesson.yaml b/content/lessons/quantum/entanglement/lesson.yaml index 298090cb..d8b08038 100644 --- a/content/lessons/quantum/entanglement/lesson.yaml +++ b/content/lessons/quantum/entanglement/lesson.yaml @@ -21,13 +21,13 @@ parameters: max: 180 step: 5 value: 0 - unit: "°" + unit: '°' b: min: 0 max: 180 step: 5 value: 90 - unit: "°" + unit: '°' shots: min: 1 max: 500 @@ -58,6 +58,6 @@ challenges: target: 1 tol: 0.02 - check: cos((a-b)*pi/180/2)^2 - target: 0.5 + target: 0.75 tol: 0.03 - check: abs(a-b) >= 170 diff --git a/content/lessons/quantum/hydrogen-spectrum/ar.md b/content/lessons/quantum/hydrogen-spectrum/ar.md index f8b9bf6c..fc329846 100644 --- a/content/lessons/quantum/hydrogen-spectrum/ar.md +++ b/content/lessons/quantum/hydrogen-spectrum/ar.md @@ -15,51 +15,54 @@ charts: [] ## Try it -1. راقب سلّم المستويات الطاقية على الشاشة والإلكترون وهو يهبط من درجة إلى درجة أدنى منها. -2. اضبط «المستوى الأولي nᵢ» على 3 و«المستوى النهائي n_f» على 2. يضيء خط أحمر، اللون الأحمر نفسه الذي يُرى في أنبوب تفريغ هيدروجين. -3. ارفع «المستوى الأولي nᵢ» واترك «المستوى النهائي n_f» عند 2. يتحول لون الضوء المنبعث نحو الأزرق ثم البنفسجي. +1. انظر إلى سلّم مستويات الطاقة على الشاشة، والإلكترون يهبط من درجة إلى درجة أدنى منها. +2. اضبط «المستوى الأولي nᵢ» على 3 و«المستوى النهائي n_f» على 2. تصبح «طاقة الفوتون» 1.89 eV و«الطول الموجي» 656 nm، ويضيء خط أحمر، وهو الأحمر نفسه الذي نراه في أنبوب تفريغ الهيدروجين. +3. ارفع «المستوى الأولي nᵢ» إلى 4 ثم 5 ثم 6، واترك «المستوى النهائي n_f» عند 2. ينزل الطول الموجي إلى 486 nm ثم 434 nm ثم 410 nm، ويتغير اللون من الأحمر إلى الأزرق المخضر ثم البنفسجي. ## Real-life examples 1. **خط بالمر-ألفا، الخط الأحمر للهيدروجين.** حين يهبط الإلكترون من المستوى 3 إلى المستوى 2 ينبعث ضوء أحمر عند 656 نانومتر، وهو اللون نفسه الذي يُرى في أي أنبوب تفريغ هيدروجين. 2. **خط بالمر-بيتا، خط أزرق مخضر.** حين يهبط الإلكترون من المستوى 4 إلى المستوى 2 ينبعث ضوء عند نحو 486 نانومتر. -3. **خط ليمان-ألفا، الخط فوق البنفسجي الذي كشف الهيدروجين في النجوم.** حين يهبط الإلكترون من المستوى 2 إلى المستوى 1 ينبعث ضوء فوق بنفسجي، أقوى خط طيفي مفرد في الكون كله. +3. **خط لايمان-ألفا، الخط فوق البنفسجي الذي يرسم به الفلكيون خريطة الهيدروجين في الفضاء.** حين يهبط الإلكترون من المستوى 2 إلى المستوى 1 ينبعث ضوء فوق بنفسجي عند نحو 122 نانومتر، وهو أقوى خطوط طيف الهيدروجين. ## Test yourself -1. أعد إنتاج خط بالمر-ألفا الأحمر عند نحو 656 نانومتر. -2. جد قفزة يقع ضوؤها في فوق البنفسجي، تحت 200 نانومتر. -3. أعد إنتاج خط بالمر-بيتا الأزرق المخضر عند نحو 486 نانومتر. +1. أظهر خط بالمر البنفسجي المزرق عند نحو 434 نانومتر. +2. ابحث عن قفزة يقع ضوؤها في الأشعة فوق البنفسجية، عند أقل من 200 نانومتر. +3. أظهر خط بالمر-بيتا الأزرق المخضر عند نحو 486 نانومتر. ## Intuition -سخّن أنبوب زجاج مليئًا بغاز الهيدروجين فيتوهج، لكن ليس بقوس قزح ناعم. بل تخرج حفنة ألوان دقيقة فقط، كنغمات موسيقية ثابتة لا انزلاق ناعم بينها. لا يستطيع كل إلكترون داخل الغاز الجلوس إلا على درجة واحدة من سلّم ثابت، وكل فوتون ضوء يبعثه يقابل هبوطًا واحدًا بالضبط من درجة أعلى إلى درجة أدنى. +سخّن أنبوبًا زجاجيًا مملوءًا بغاز الهيدروجين فيتوهج، لكن ضوءه ليس قوس قزح متصل الألوان. تخرج منه بضعة ألوان محددة فقط، كنغمات ثابتة منفصلة لا كصوت ينزلق بين النغمات. لا يستطيع الإلكترون داخل الغاز أن يقف إلا على درجة من درجات سلّم ثابت، وكل فوتون ضوء يبعثه يقابل هبوطًا واحدًا بالضبط من درجة أعلى إلى درجة أدنى. -اضبط «المستوى الأولي nᵢ» على 3 و«المستوى النهائي n_f» على 2 فيضيء على الشاشة خط أحمر محدد، الأحمر نفسه دائمًا. ارفع «المستوى الأولي nᵢ» مع بقاء «المستوى النهائي n_f» عند 2، وكل هبوط أكبر يطلق فوتونًا أقوى طاقة وأميل إلى الزرقة، لأن الدرجات تتقارب من بعضها كلما صعدت أعلى. +اضبط «المستوى الأولي nᵢ» على 3 و«المستوى النهائي n_f» على 2 فيضيء على الشاشة خط أحمر محدد، الأحمر نفسه دائمًا. ارفع «المستوى الأولي nᵢ» واترك «المستوى النهائي n_f» عند 2، فيطلق كل هبوط أكبر فوتونًا أعلى طاقة وأقرب إلى الأزرق. والدرجات يقترب بعضها من بعض كلما صعدت إلى أعلى. ## Formal -المستويات الطاقية المسموحة لإلكترون الهيدروجين هي $E_n = -\dfrac{13.6}{n^2}$ eV، فالهبوط من المستوى $n_i$ إلى المستوى $n_f$ يطلق فوتونًا طاقته $\Delta E = 13.6\left(\dfrac{1}{n_f^2}-\dfrac{1}{n_i^2}\right)$ eV. +مستويات الطاقة المسموحة لإلكترون الهيدروجين هي $E_n = -\dfrac{13.6}{n^2}$ eV، فالهبوط من المستوى $n_i$ إلى المستوى $n_f$ يطلق فوتونًا طاقته $\Delta E = 13.6\left(\dfrac{1}{n_f^2}-\dfrac{1}{n_i^2}\right)$ eV. ويُشتق طول موجة ذلك الفوتون من طاقته بالصيغة $\lambda = \dfrac{1240}{\Delta E}$ nm، باستخدام $hc \approx 1240$ eV·nm. ## Advanced -لكل عنصر سلّم مستويات طاقية خاص به، فتعمل خطوط انبعاثه وامتصاصه كبصمة لا تخطئها العين. ويقرأ الفلكيون الضوء الواصل من نجوم ومجرات بعيدة، ويطابقون خطوطه بهذه البصمات ليحددوا مم تتكون تلك الأجرام، دون أن يزوروها أبدًا. +لكل عنصر سلّم مستويات طاقة خاص به، فتعمل خطوط انبعاثه وامتصاصه كبصمة لا تخطئها العين. ويقرأ الفلكيون الضوء الواصل من نجوم ومجرات بعيدة، ويطابقون خطوطه بهذه البصمات ليحددوا مم تتكون تلك الأجرام، دون أن يزوروها أبدًا. ## Derivation -1. لكل مدار مسموح طاقة ثابتة خاصة به، أكثر ارتباطًا وأكثر سلبية كلما اقترب من النواة. +1. لكل مدار مسموح طاقة ثابتة خاصة به. وكلما اقترب المدار من النواة اشتد ارتباط الإلكترون بها، ونزلت طاقته أكثر تحت الصفر. 2. الهبوط من مستوى أعلى إلى مستوى أدنى يطلق فرق هذه الطاقة بالضبط كفوتون واحد. 3. طول موجة الفوتون يُشتق مباشرة من مقدار الطاقة التي يحملها. ## Real world ### التحليل الطيفي الفلكي + يتعرف الفلكيون على الهيدروجين والهيليوم وعناصر أخرى في النجوم والسدم بمطابقة أطوال موجات الضوء الواصل مع الخطوط المعروفة لكل عنصر. ### إضاءة النيون والصوديوم -تتوهج لافتات النيون بلون برتقالي محمر، وتتوهج مصابيح الصوديوم في الشوارع بلون أصفر مائل للبرتقالي. لكل غاز مجموعته الثابتة الخاصة من الهبوطات الطاقية المسموحة، خلافًا لمصباح متوهج بطيف ناعم متصل. + +تتوهج لافتات النيون بلون برتقالي محمر، وتتوهج مصابيح الصوديوم في الشوارع بلون أصفر مائل للبرتقالي. فلكل غاز مجموعته الثابتة من القفزات المسموحة بين مستويات الطاقة، خلافًا للمصباح المتوهج الذي يعطي طيفًا متصلًا. ### اكتشاف الهيليوم + اكتشف الفلكيون الهيليوم أول مرة في طيف الشمس سنة 1868، قبل عقود من العثور عليه على الأرض، بالاعتماد فقط على خط انبعاث لم يطابق أي عنصر معروف. diff --git a/content/lessons/quantum/hydrogen-spectrum/en.md b/content/lessons/quantum/hydrogen-spectrum/en.md index 89828f14..183688cc 100644 --- a/content/lessons/quantum/hydrogen-spectrum/en.md +++ b/content/lessons/quantum/hydrogen-spectrum/en.md @@ -17,18 +17,18 @@ charts: [] ## Try it 1. Look at the ladder of energy levels on screen and the electron dropping from one rung to a lower one. -2. Set «starting level nᵢ» to 3 and «landing level n_f» to 2. A red line lights up — the same red seen in a hydrogen discharge tube. -3. Raise «starting level nᵢ» while keeping «landing level n_f» at 2. The emitted colour shifts toward blue and then violet. +2. Set «starting level nᵢ» to 3 and «landing level n_f» to 2. «photon energy» reads 1.89 eV and «wavelength» reads 656 nm: a red line lights up, the same red seen in a hydrogen discharge tube. +3. Raise «starting level nᵢ» to 4, 5 and 6 while keeping «landing level n_f» at 2. The wavelength steps down to 486 nm, 434 nm and 410 nm, and the colour shifts from red to blue-green and then violet. ## Real-life examples 1. **Balmer-alpha, the red line of hydrogen.** The drop from level 3 to level 2 gives out red light at 656 nm, visible in any hydrogen discharge tube. 2. **Balmer-beta, a blue-green line.** The drop from level 4 to level 2 gives out light at about 486 nm. -3. **Lyman-alpha, the ultraviolet line that revealed hydrogen in stars.** The drop from level 2 to level 1 gives out ultraviolet light, the strongest single spectral line in the whole universe. +3. **Lyman-alpha, the ultraviolet line astronomers use to map hydrogen in space.** The drop from level 2 to level 1 gives out ultraviolet light at about 122 nm, hydrogen's strongest spectral line. ## Test yourself -1. Reproduce the red Balmer-alpha line at about 656 nm. +1. Find the violet-blue Balmer line at about 434 nm. 2. Find a jump whose light lands in the ultraviolet, below 200 nm. 3. Reproduce the blue-green Balmer-beta line at about 486 nm. @@ -57,10 +57,13 @@ Every element has its own unique ladder of energy levels, so its emission and ab ## Real world ### Astronomical spectroscopy + Astronomers identify hydrogen, helium and other elements in stars and nebulae by matching the exact wavelengths of light they receive to each element's known spectral lines. ### Neon and sodium lighting + Neon signs glow orange-red and sodium street lamps glow yellow-orange because each gas has its own fixed set of allowed energy drops, unlike a smooth-spectrum incandescent bulb. ### The discovery of helium + Helium was first detected in the Sun's spectrum in 1868, decades before it was ever found on Earth, purely from an emission line that matched no known element. diff --git a/content/lessons/quantum/hydrogen-spectrum/lesson.yaml b/content/lessons/quantum/hydrogen-spectrum/lesson.yaml index 854fb5ec..354d12c1 100644 --- a/content/lessons/quantum/hydrogen-spectrum/lesson.yaml +++ b/content/lessons/quantum/hydrogen-spectrum/lesson.yaml @@ -48,7 +48,7 @@ presets: nf: 1 challenges: - check: 1240/(13.6*(1/nf^2-1/ni^2)) - target: 656 + target: 434 tol: 5 - check: 1240/(13.6*(1/nf^2-1/ni^2)) < 200 - check: 1240/(13.6*(1/nf^2-1/ni^2)) diff --git a/content/lessons/quantum/lasers-and-stimulated-emission/ar.md b/content/lessons/quantum/lasers-and-stimulated-emission/ar.md index cde3aee5..227926aa 100644 --- a/content/lessons/quantum/lasers-and-stimulated-emission/ar.md +++ b/content/lessons/quantum/lasers-and-stimulated-emission/ar.md @@ -16,27 +16,27 @@ charts: [] ## Try it -1. اضبط «نسبة الضخ η» على 0.5. مهما ضبطت «عدد مرات العبور داخل التجويف p»، لا تزداد الحزمة سطوعًا ولا تخفت، فهذه هي نقطة العتبة بالضبط. -2. ارفع «نسبة الضخ η» فوق 0.5 وزد «عدد مرات العبور داخل التجويف p». تزداد الحزمة سطوعًا قليلًا مع كل عبور، وهذا هو انعكاس الترتيب السكاني وهو يعمل. -3. اخفض «نسبة الضخ η» دون 0.5. تفقد الحزمة الآن قليلًا من سطوعها مع كل عبور بدلًا من أن تزداد، حتى مع عبورات كثيرة. +1. اضبط «نسبة الضخ η» على 0.5. مهما غيّرت «عدد مرات العبور داخل التجويف p» يبقى «التضخيم G» عند ×1، فلا تزداد الحزمة سطوعًا ولا تخفت. هذه هي نقطة العتبة بالضبط. +2. ارفع «نسبة الضخ η» إلى 0.7 و«عدد مرات العبور داخل التجويف p» إلى 10. تصبح قراءة «انعكاس الترتيب السكاني ΔN» 0.4، وتزداد الحزمة سطوعًا مع كل عبور حتى تبلغ ×4.06. +3. اخفض «نسبة الضخ η» إلى 0.3 واترك p عند 10. تصبح قراءة ΔN تساوي -0.4، وتفقد الحزمة الآن شيئًا من سطوعها مع كل عبور حتى تنزل إلى ×0.25. ## Real-life examples -1. **عند نقطة العتبة بالضبط.** عند η = 0.5 وp = 1 عبور، تخرج الحزمة بالسطوع نفسه الذي دخلت به. -2. **ليزر يعمل فعليًا، بضخ قوي.** عند η = 0.9 وp = 8 عبورات، تخرج الحزمة أسطع بنحو عشر مرات، ليزر حقيقي يعمل. +1. **عند نقطة العتبة بالضبط.** عند η = 0.5 و p = 1 (عبور واحد)، تخرج الحزمة بالسطوع نفسه الذي دخلت به. +2. **ليزر يعمل فعليًا، بضخ قوي.** عند η = 0.9 وp = 8 عبورات، تخرج الحزمة أسطع بنحو عشر مرات. هذا ليزر يعمل فعلًا. 3. **ضخ غير كافٍ.** عند η = 0.2 وp = 8 عبورات، يخفت سطوع الحزمة إلى خُمس ما بدأت به. عدد الذرات التي تمتص الضوء أكبر من التي تبعثه، فلا يحدث ليزر. ## Test yourself -1. صل إلى تضخيم يبلغ نحو خمس مرات. -2. اجعل الحزمة تخفت بدلًا من أن تزداد سطوعًا، بضخ ضعيف وعبورات عدة. -3. استقر عند نقطة العتبة بالضبط، دون أن تزداد الحزمة سطوعًا أو تخفت. +1. اجعل الحزمة أسطع بنحو خمس مرات («التضخيم G» بين ×4.5 و ×5.5). +2. اجعل الحزمة تخفت بدلًا من أن تزداد سطوعًا: نسبة ضخ أقل من 0.5 مع 5 عبورات على الأقل. +3. قف عند نقطة العتبة بالضبط، فلا تزداد الحزمة سطوعًا ولا تخفت (G = ×1). ## Intuition -تُضيء اللمبة العادية لأن ذراتها تهبط إلى طاقة أقل في لحظات عشوائية وفي اتجاهات عشوائية، فتبثّ ضوءًا من ألوان كثيرة في كل اتجاه، وهو ما يسمى الانبعاث التلقائي. يبدأ الليزر بالطريقة نفسها، إذ تجلس معظم ذراته في حالتها الأرضية منخفضة الطاقة، لكنه يضخ أولًا طاقة من الخارج، تيارًا كهربائيًا أو ومضة ضوء، حتى يصير عدد الذرات في حالة مثارة مرتفعة الطاقة أكبر من عددها في الحالة الأرضية. هذا الانقلاب لا يحدث من تلقاء نفسه أبدًا. يحتاج ضخًّا متعمدًا، ويسميه الفيزيائيون انعكاس الترتيب السكاني. +يضيء المصباح العادي لأن ذراته تهبط إلى طاقة أقل في لحظات عشوائية وفي اتجاهات عشوائية، فتبعث ضوءًا من ألوان كثيرة في كل اتجاه، وهو ما يسمى الانبعاث التلقائي. يبدأ الليزر بالطريقة نفسها، إذ تكون معظم ذراته في حالتها الأرضية منخفضة الطاقة، لكنه يضخ أولًا طاقة من الخارج، تيارًا كهربائيًا أو ومضة ضوء، حتى يصير عدد الذرات في حالة مثارة مرتفعة الطاقة أكبر من عددها في الحالة الأرضية. هذا الانقلاب لا يحدث من تلقاء نفسه أبدًا. يحتاج ضخًّا متعمدًا، ويسميه الفيزيائيون انعكاس الترتيب السكاني. -بعد هذا الانعكاس، يستطيع فوتون عابر واحد بالطاقة المناسبة تمامًا، حين يمر بذرة مثارة، أن يحفّزها على الهبوط وبعث فوتون ثانٍ هو نسخة مطابقة تمامًا للأول، باللون نفسه وفي الاتجاه نفسه ومتزامنًا معه. وهذا هو الانبعاث المحفَّز. ارتداد الضوء بين مرآتين، إحداهما مطلية بالكامل والأخرى تسمح بتسرّب جزء بسيط، يعني أن الفوتونات التي تسير بالضبط على محور المرآتين وحدها تستمر في التضاعف مع كل «عدد مرات العبور داخل التجويف p»، أما أي فوتون يسير جانبيًّا فيهرب من الجوانب ويضيع. لهذا يخرج من المرآة نصف المطلية شعاع واحد ضيق بلون واحد محدد، لا رذاذ الضوء الذي تبثه لمبة عادية. +بعد هذا الانعكاس، يستطيع فوتون عابر واحد بالطاقة المناسبة تمامًا، حين يمر بذرة مثارة، أن يحفّزها على الهبوط وبعث فوتون ثانٍ هو نسخة مطابقة تمامًا للأول، باللون نفسه وفي الاتجاه نفسه ومتزامنًا معه. وهذا هو الانبعاث المحفَّز. ارتداد الضوء بين مرآتين، إحداهما مطلية بالكامل والأخرى تسمح بتسرّب جزء بسيط، يعني أن الفوتونات التي تسير بالضبط على محور المرآتين وحدها تستمر في التضاعف مع كل عبور من «عدد مرات العبور داخل التجويف p»، أما أي فوتون يسير جانبيًّا فيهرب من الجوانب ويضيع. لهذا يخرج من المرآة نصف المطلية شعاع واحد ضيق بلون واحد محدد، لا ضوء مبعثر كالذي يبعثه المصباح العادي. ## Formal @@ -57,13 +57,17 @@ charts: [] ## Real world ### قارئات الباركود وأقلام الليزر + ينتج أنبوب هيليوم-نيون رخيص أو دايود ليزر شعاعًا أحمر ضيقًا بلون واحد بفضل حيلة المرآتين والانعكاس السكاني في هذا الدرس بالضبط. ### إنترنت الألياف الضوئية + تُشغَّل دايودات الليزر وتُطفأ مليارات المرات في الثانية لإرسال نبضات ضوء عبر ألياف بصرية، تحمل معظم حركة الإنترنت طويلة المسافة في العالم. ### جراحة العين بالليزر -تستخدم جراحة الليزك ليزر إكسايمر مضبوطًا على طول موجي فوق بنفسجي واحد محدد لإعادة تشكيل القرنية بدقة لا تستطيعها أي لمبة عادية. + +تستخدم جراحة الليزك ليزر إكسايمر مضبوطًا على طول موجي فوق بنفسجي واحد محدد لإعادة تشكيل القرنية بدقة لا يبلغها أي مصباح عادي. ### الأقراص الضوئية + تقرأ أجهزة السي دي والدي في دي والبلو-راي البيانات بدايودات ليزر ذات طول موجي أقصر فأقصر، لأن الشعاع الأحادي اللون الضيق يستطيع تمييز حفر أصغر فأصغر على القرص. diff --git a/content/lessons/quantum/lasers-and-stimulated-emission/en.md b/content/lessons/quantum/lasers-and-stimulated-emission/en.md index 740a817d..a9e7919f 100644 --- a/content/lessons/quantum/lasers-and-stimulated-emission/en.md +++ b/content/lessons/quantum/lasers-and-stimulated-emission/en.md @@ -19,9 +19,9 @@ charts: [] ## Try it -1. Set «pump fraction η» to 0.5. Whatever you set «number of cavity passes p» to, the beam neither grows nor fades: this is exactly the threshold. -2. Raise «pump fraction η» above 0.5 and push «number of cavity passes p» up. The beam grows a little more with every pass — population inversion switching on. -3. Lower «pump fraction η» below 0.5. Now the beam loses a little brightness on every pass instead, even with many passes. +1. Set «pump fraction η» to 0.5. Whatever you set «number of cavity passes p» to, «amplification G» stays at ×1 and the beam neither grows nor fades: this is exactly the threshold. +2. Raise «pump fraction η» to 0.7 and «number of cavity passes p» to 10. «population inversion ΔN» reads 0.4 and the beam grows a little more with every pass, up to ×4.06. +3. Lower «pump fraction η» to 0.3 with p still at 10. ΔN reads -0.4 and the beam now loses brightness on every pass, down to ×0.25. ## Real-life examples @@ -31,9 +31,9 @@ charts: [] ## Test yourself -1. Reach roughly five times amplification. -2. Make the beam fade instead of grow, using a weak pump with several passes. -3. Sit exactly at threshold, with the beam neither growing nor fading. +1. Reach roughly five times amplification («amplification G» between ×4.5 and ×5.5). +2. Make the beam fade instead of grow: a pump fraction below 0.5 with at least 5 passes. +3. Sit exactly at threshold, with the beam neither growing nor fading (G = ×1). ## Intuition @@ -60,13 +60,17 @@ Real gain media range from a helium-neon gas tube to a semiconductor diode barel ## Real world ### Barcode scanners and laser pointers + A cheap helium-neon or diode laser produces a tight, single-coloured red beam precisely because of the mirror-and-inversion trick in this lesson. ### Fibre-optic internet + Laser diodes switch on and off billions of times a second to send pulses of light down optical fibres, carrying most of the world's long-distance internet traffic. ### Laser eye surgery + LASIK surgery uses an excimer laser tuned to one exact ultraviolet wavelength to reshape the cornea with a precision no ordinary lamp could match. ### Optical discs + CD, DVD and Blu-ray players read data with laser diodes of ever-shorter wavelength, since a tighter single-colour beam can resolve smaller and smaller pits on the disc. diff --git a/content/lessons/quantum/lasers-and-stimulated-emission/lesson.yaml b/content/lessons/quantum/lasers-and-stimulated-emission/lesson.yaml index 6e98c798..ddb408cb 100644 --- a/content/lessons/quantum/lasers-and-stimulated-emission/lesson.yaml +++ b/content/lessons/quantum/lasers-and-stimulated-emission/lesson.yaml @@ -18,7 +18,7 @@ parameters: min: 0 max: 1 step: 0.05 - value: 0.5 + value: 0.6 p: min: 1 max: 10 diff --git a/content/lessons/quantum/photoelectric-effect/ar.md b/content/lessons/quantum/photoelectric-effect/ar.md index 61a53478..3b1a99aa 100644 --- a/content/lessons/quantum/photoelectric-effect/ar.md +++ b/content/lessons/quantum/photoelectric-effect/ar.md @@ -16,33 +16,33 @@ charts: [] ## Try it -1. ابدأ بـ«تردد f» منخفض. لن يغادر أي إلكترون المعدن مهما رفعت «سطوع I». -2. ارفع «تردد f» رويدًا رويدًا. عند نقطة واحدة بالضبط تبدأ الإلكترونات بالتطاير فجأة، وهذا هو التردد الحرج. -3. ادفع «تردد f» بعيدًا بعد تلك النقطة وراقب الإلكترونات المتحررة تغادر أسرع، إذ تحمل الطاقة الزائدة. +1. ابدأ و«تردد الضوء f» عند 5 و«دالة الشغل φ» عند 2.3 eV. تجد «طاقة الفوتون الواحد» 2.07 eV، وهي أقل من 2.3 eV اللازمة، فلا يخرج أي إلكترون من المعدن حتى لو رفعت «سطوع الضوء I» إلى 10. +2. ارفع «تردد الضوء f» ببطء. عند 5.6 تصل طاقة الفوتون إلى 2.32 eV، فتبدأ الإلكترونات بالخروج فجأة. هذا هو التردد الحرج. +3. ارفع «تردد الضوء f» إلى 10. تصبح طاقة الفوتون 4.14 eV و«الطاقة المتبقية للإلكترون» 1.84 eV، وتخرج الإلكترونات أسرع لأنها تحمل الطاقة الزائدة. ## Real-life examples -1. **الصوديوم تحت ضوء مرئي.** دالة شغل الصوديوم منخفضة، فيحرر الضوء المرئي العادي عند تردد 6.0×10¹⁴ Hz إلكترونات من سطحه مباشرة. -2. **الزنك تحت ضوء فوق بنفسجي.** يمسك الزنك بإلكتروناته بقوة أكبر، فلا يكفي لتحريرها سوى الضوء فوق البنفسجي عند نحو 1.2×10¹⁵ Hz، إذ يحمل كل فوتون منه طاقة كافية. -3. **السيزيوم تحت ضوء أحمر خافت.** دالة شغل السيزيوم منخفضة جدًا، فيطرد حتى الضوء الأحمر الخافت عند نحو 5×10¹⁴ Hz إلكترونات، وإن كانت أبطأ من غيرها. +1. **الصوديوم تحت ضوء مرئي.** دالة شغل الصوديوم منخفضة (2.3 eV)، فالضوء المرئي العادي عند تردد 6.0×10¹⁴ Hz، وطاقة فوتونه 2.48 eV، يحرر إلكترونات من سطحه ويبقى لكل إلكترون 0.18 eV. +2. **الزنك تحت ضوء فوق بنفسجي.** يمسك الزنك بإلكتروناته بقوة أكبر (4.3 eV)، فلا يكفي لتحريرها سوى الضوء فوق البنفسجي عند نحو 1.2×10¹⁵ Hz، وطاقة فوتونه 4.96 eV. +3. **السيزيوم تحت ضوء برتقالي خافت.** دالة شغل السيزيوم منخفضة جدًا (1.9 eV)، فحتى الضوء البرتقالي الخافت عند نحو 5×10¹⁴ Hz، وطاقة فوتونه 2.07 eV، يحرر إلكترونات. عددها قليل لأن الضوء خافت، لكنها تخرج. ## Test yourself -1. قرّب الضوء من التردد الحرج، حيث تبدأ الإلكترونات بالمغادرة بالكاد. -2. أثبت أن السطوع وحده لا يفيد. ارفع السطوع إلى أقصاه، واترك التردد دون الحد الحرج. +1. قرّب الضوء من التردد الحرج: اجعل الفرق بين طاقة الفوتون ودالة الشغل أقل من 0.1 eV. +2. أثبت أن السطوع وحده لا يفيد. ارفع السطوع إلى 8 أو أكثر، واترك التردد تحت التردد الحرج. 3. أعطِ الإلكترونات المتحررة طاقة حركية نحو 2 eV. ## Intuition -دالة شغل الصوديوم نحو 2.3 eV، وهي رسم ثابت يدفعه كل إلكترون ليهرب من المعدن. الفوتونات الأضعف من هذه الطاقة لا يمكنها أبدًا دفع هذا الرسم، مهما وصل منها معًا. ارفع منزلق «سطوع I» إلى أقصاه وستبقى صفيحة المعدن صامتة دون إلكترون واحد. +دالة شغل الصوديوم نحو 2.3 eV، وهي مثل رسم عبور ثابت يدفعه كل إلكترون ليخرج من المعدن. الفوتونات الأضعف من هذه الطاقة لا تستطيع دفع هذا الرسم أبدًا، مهما كثر عددها. ارفع منزلق «سطوع الضوء I» إلى أقصاه، ولن تُخرج صفيحة المعدن إلكترونًا واحدًا. -ارفع منزلق «تردد f» حتى تحمل كل فوتونة طاقة كافية أخيرًا، فتبدأ الإلكترونات بالمغادرة في اللحظة نفسها التي تتخطى فيها ذلك الخط. وأي طاقة يحملها الفوتون زيادة عن الرسم تتحول مباشرة إلى سرعة الإلكترون، فدفع «تردد f» أبعد يجعل الإلكترونات المتحررة أسرع بوضوح. +ارفع منزلق «تردد الضوء f» حتى يحمل كل فوتون طاقة كافية، فتبدأ الإلكترونات بالخروج لحظة تجاوزك ذلك الحد. وأي طاقة يحملها الفوتون زيادة على رسم العبور تتحول مباشرة إلى سرعة للإلكترون. فإذا رفعت «تردد الضوء f» أكثر صارت الإلكترونات المتحررة أسرع بوضوح. ## Formal تنص معادلة أينشتاين الكهروضوئية على أن طاقة الفوتون $hf$ تنقسم إلى قسمين، هما دالة الشغل $\phi$ وما تبقى من طاقة حركية للإلكترون. الصيغة هي $hf = \phi + E_k$، وبالتالي $E_k = hf - \phi$. -ولأن كل فوتون يعمل وحده، لا يغادر أي إلكترون ما لم يتحقق $hf \geq \phi$. فحزمة من فوتونات ضعيفة كثيرة لا تساوي أبدًا فوتونة واحدة قوية. +ولأن كل فوتون يعمل وحده، لا يغادر أي إلكترون ما لم يتحقق $hf \geq \phi$. فحزمة من فوتونات ضعيفة كثيرة لا تساوي أبدًا فوتونًا واحدًا قويًا. ## Advanced @@ -50,17 +50,20 @@ charts: [] ## Derivation -1. لا يغادر الإلكترون المعدن إلا إذا زوّدته فوتونة واحدة بطاقة لا تقل عن دالة الشغل φ. +1. لا يغادر الإلكترون المعدن إلا إذا زوّده فوتون واحد بطاقة لا تقل عن دالة الشغل φ. 2. ما تبقى من طاقة يتحول إلى طاقة حركية للإلكترون المتحرر. -3. يغيّر السطوع فقط عدد الفوتونات الواصلة كل ثانية، لا طاقة كل فوتونة منها أبدًا. +3. يغيّر السطوع فقط عدد الفوتونات الواصلة كل ثانية، ولا يغيّر طاقة أي فوتون منها. ## Real world ### أجهزة الرؤية الليلية + لا تطلق الكاثودة الضوئية إلكترونات إلا فوق تردد حرج مختار، وهذا يتيح للجهاز انتقاء أطوال الموجات التي يضخّمها. ### تصميم الخلايا الشمسية + يختار المهندسون مواد شبه موصلة فجوتها الطاقية منخفضة بما يكفي، فتحرر حاملات الشحنة بضوء الشمس العادي لا بفوق البنفسجي فقط. ### كواشف الدخان + تستخدم بعض كواشف الدخان حساسًا كهروضوئيًا. يبعثر الدخان حزمة ضوء نحو الكاشف، فيطلق تدفق الإلكترونات الناتج الإنذار. diff --git a/content/lessons/quantum/photoelectric-effect/en.md b/content/lessons/quantum/photoelectric-effect/en.md index b806a315..13ae3988 100644 --- a/content/lessons/quantum/photoelectric-effect/en.md +++ b/content/lessons/quantum/photoelectric-effect/en.md @@ -17,27 +17,27 @@ charts: [] ## Try it -1. Start with «frequency f» low. No electrons leave the metal, no matter how far you raise «brightness I». -2. Raise «frequency f» slowly. At one exact point electrons suddenly start flying off — the threshold frequency. -3. Push «frequency f» well past that point and watch the ejected electrons leave faster, carrying away the extra energy. +1. Start with «light frequency f» at 5 and «work function φ» at 2.3 eV. «energy of one photon» reads 2.07 eV, less than the 2.3 eV needed, so no electrons leave the metal, even if you raise «brightness I» to 10. +2. Raise «light frequency f» slowly. At 5.6 the photon energy reaches 2.32 eV and electrons suddenly start flying off: this is the threshold frequency. +3. Push «light frequency f» up to 10. The photon energy is now 4.14 eV, «energy left for the electron» reads 1.84 eV, and the ejected electrons leave faster, carrying away the extra energy. ## Real-life examples -1. **Sodium under visible light.** Sodium's work function is low enough that ordinary visible light near 6.0×10¹⁴ Hz already knocks electrons free. -2. **Zinc under ultraviolet light.** Zinc holds onto its electrons much harder; only ultraviolet light near 1.2×10¹⁵ Hz has enough energy per photon. -3. **Cesium under dim red light.** Cesium's work function is so low that even dim red light near 5×10¹⁴ Hz ejects electrons, just slower. +1. **Sodium under visible light.** Sodium's work function (2.3 eV) is low enough that ordinary visible light near 6.0×10¹⁴ Hz, 2.48 eV per photon, already knocks electrons free with 0.18 eV to spare. +2. **Zinc under ultraviolet light.** Zinc holds onto its electrons much harder (4.3 eV); only ultraviolet light near 1.2×10¹⁵ Hz, 4.96 eV per photon, has enough energy. +3. **Cesium under dim orange light.** Cesium's work function is so low (1.9 eV) that even dim orange light near 5×10¹⁴ Hz, 2.07 eV per photon, ejects electrons: fewer of them, because the light is dim, but they do leave. ## Test yourself -1. Bring the light right up to the threshold, where electrons just barely start to leave. -2. Prove brightness alone cannot help: turn brightness to maximum while keeping the frequency below threshold. +1. Bring the light right up to the threshold: the photon energy within 0.1 eV of the work function. +2. Prove brightness alone cannot help: raise brightness to 8 or more while keeping the frequency below threshold. 3. Give the ejected electrons about 2 eV of kinetic energy. ## Intuition Sodium's work function is about 2.3 eV, a fixed toll every electron must pay to escape the metal. Photons below that energy can never pay it, no matter how many arrive together — push the «brightness I» slider to its maximum and the metal plate still releases nothing. -Raise the «frequency f» slider until each photon finally carries enough energy, and electrons start leaving the instant you cross that line. Anything a photon carries beyond the toll turns straight into the electron's speed, so pushing «frequency f» further makes the ejected electrons visibly faster. +Raise the «light frequency f» slider until each photon finally carries enough energy, and electrons start leaving the instant you cross that line. Anything a photon carries beyond the toll turns straight into the electron's speed, so pushing «light frequency f» further makes the ejected electrons visibly faster. ## Formal @@ -58,10 +58,13 @@ This single equation, verified precisely by Robert Millikan around 1916, was imp ## Real world ### Night-vision devices + A photocathode releases electrons only above a chosen threshold frequency, which lets the device select which wavelengths of light it amplifies. ### Solar cell design + Engineers choose semiconductor materials whose energy gap is low enough that ordinary sunlight, not just ultraviolet light, can free charge carriers. ### Smoke detectors + Some ionization-free smoke detectors use a photoelectric sensor: smoke scatters a light beam into a detector, and the resulting electron flow trips the alarm. diff --git a/content/lessons/quantum/photoelectric-effect/lesson.yaml b/content/lessons/quantum/photoelectric-effect/lesson.yaml index d5e358b4..ebe0ebbf 100644 --- a/content/lessons/quantum/photoelectric-effect/lesson.yaml +++ b/content/lessons/quantum/photoelectric-effect/lesson.yaml @@ -19,7 +19,7 @@ parameters: max: 15 step: 0.1 value: 5 - unit: "×10¹⁴ Hz" + unit: '×10¹⁴ Hz' phi: min: 1 max: 5 diff --git a/content/lessons/quantum/photons-and-plancks-constant/ar.md b/content/lessons/quantum/photons-and-plancks-constant/ar.md index 03566269..8a9015ef 100644 --- a/content/lessons/quantum/photons-and-plancks-constant/ar.md +++ b/content/lessons/quantum/photons-and-plancks-constant/ar.md @@ -15,37 +15,37 @@ charts: [] ## Try it -1. حرّك منزلق «تردد f» لأعلى ولأسفل. راقب طاقة الفوتون وهي ترتفع، بينما يتحول لون الضوء من الأحمر إلى البنفسجي فما بعده. -2. ارفع منزلق «سطوع I» بدل ذلك. لا تتغير طاقة الفوتون. فالسطوع يضيف فوتونات أكثر فقط، لا فوتونات أقوى. -3. ادفع منزلق «تردد f» إلى أعلى قيمة له. اقرأ طاقة الفوتون بوحدة إلكترون-فولت (eV). +1. حرّك منزلق «تردد الضوء f» من 4 إلى 7.5. ترتفع «طاقة الفوتون الواحد» من 1.65 eV إلى 3.1 eV، ويتغير لون الضوء من الأحمر إلى البنفسجي. +2. ارفع الآن منزلق «سطوع الضوء I» من 5 إلى 10. لا تتغير طاقة الفوتون. فالسطوع يزيد عدد الفوتونات فقط، ولا يجعلها أقوى. +3. ارفع منزلق «تردد الضوء f» إلى أعلى قيمة له، وهي 15. تصبح «طاقة الفوتون الواحد» 6.2 eV، في عمق نطاق الأشعة فوق البنفسجية. ## Real-life examples -1. **مؤشر ليزر أحمر.** عند تردد نحو 4.7×10¹⁴ Hz تحمل كل فوتونة حمراء نحو 1.9 eV. -2. **ضوء LED أزرق.** عند تردد نحو 6.5×10¹⁴ Hz تحمل كل فوتونة زرقاء نحو 2.7 eV، أكثر من الحمراء بوضوح. -3. **مصباح فوق بنفسجي للتعقيم.** عند تردد نحو 1.0×10¹⁵ Hz تحمل كل فوتونة فوق بنفسجية نحو 4.1 eV. هذه الطاقة كافية لإتلاف الحمض النووي، ولهذا تعقّم هذه المصابيح. +1. **مؤشر ليزر أحمر.** عند تردد نحو 4.7×10¹⁴ Hz يحمل كل فوتون أحمر نحو 1.9 eV. +2. **ضوء LED أزرق.** عند تردد نحو 6.5×10¹⁴ Hz يحمل كل فوتون أزرق نحو 2.7 eV، أي أكثر من الأحمر بوضوح. +3. **مصباح فوق بنفسجي للتعقيم.** عند تردد نحو 1.18×10¹⁵ Hz يحمل كل فوتون فوق بنفسجي نحو 4.9 eV. هذه الطاقة كافية لإتلاف الحمض النووي، ولهذا تعقّم هذه المصابيح. ## Test yourself -1. جِد التردد الذي يعطي طاقة فوتون نحو 2 eV. -2. ادفع طاقة الفوتون فوق 3 eV. -3. بلغ طاقة فوتون نحو 4.5 eV، في نطاق فوق البنفسجي. +1. ابحث عن التردد الذي يجعل طاقة الفوتون نحو 2 eV. +2. ارفع طاقة الفوتون إلى أكثر من 3 eV. +3. أوصل طاقة الفوتون إلى نحو 4.5 eV، في نطاق الأشعة فوق البنفسجية. ## Intuition -وجّه مؤشر ليزر أحمر ومصباح LED أزرق نحو الحائط نفسه. كلاهما يطلق أعدادًا هائلة من حزم ضوء صغيرة تسمى الفوتونات. لكن الفوتونة الزرقاء الواحدة تحمل طاقة أكبر دائمًا من الفوتونة الحمراء الواحدة. حرّك المنزلق المكتوب عليه «تردد f». الحرف $f$ يعني فقط عدد موجات الضوء الواصلة كل ثانية. راقب رقم الطاقة فوق المنزلق وهو يرتفع خطوة بخطوة مع ارتفاعه. +وجّه مؤشر ليزر أحمر ومصباح LED أزرق نحو الحائط نفسه. كلاهما يطلق أعدادًا هائلة من حزم ضوء صغيرة تسمى الفوتونات. لكن الفوتون الأزرق الواحد يحمل دائمًا طاقة أكبر من الفوتون الأحمر الواحد. حرّك المنزلق المكتوب عليه «تردد الضوء f». الحرف $f$ يعني فقط عدد موجات الضوء الواصلة كل ثانية. راقب قراءة «طاقة الفوتون الواحد» وهي ترتفع مع التردد خطوة بخطوة. -كل حزمة فوتون واحد، ولا يمكن تقسيم الفوتون إلى شيء أصغر. حزمة حمراء فيها مليار فوتون خافت لا تساوي أبدًا فوتونة زرقاء واحدة قوية. لهذا لا يغيّر رفع منزلق «سطوع I» رقم الطاقة أبدًا. السطوع يضيف فوتونات أكثر فقط، لا فوتونات أكبر. +كل حزمة فوتون واحد، ولا يمكن تقسيم الفوتون إلى شيء أصغر. شعاع أحمر فيه مليار فوتون ضعيف لا يساوي أبدًا فوتونًا أزرق واحدًا قويًا. لهذا لا يغيّر رفع منزلق «سطوع الضوء I» رقم الطاقة أبدًا. السطوع يزيد عدد الفوتونات فقط، ولا يجعلها أكبر. ## Formal -يربط ثابت بلانك $h$ تردد الفوتون $f$ بطاقته مباشرة عبر المعادلة $E = hf$. وهو من أصغر الثوابت في الفيزياء، وقيمته $h = 6.626\times10^{-34}$ J·s. لهذا تختفي حبيبية الضوء في الحياة اليومية. +يربط ثابت بلانك $h$ تردد الفوتون $f$ بطاقته مباشرة عبر المعادلة $E = hf$. وهو من أصغر الثوابت في الفيزياء، وقيمته $h = 6.626\times10^{-34}$ J·s. لهذا لا نلاحظ في حياتنا اليومية أن الضوء مكوّن من حزم منفصلة. ولأن $h$ صغير جدًا، تُقاس طاقة الفوتون الواحد عادة بإلكترون-فولت لا بالجول. إلكترون-فولت واحد (eV) هو الطاقة التي يكتسبها إلكترون عند عبوره فرق جهد قدره فولت واحد. ## Advanced -قدّم بلانك المعادلة $E = hf$ سنة 1900. لم تكن وصفًا لحقيقة الضوء، بل حيلة رياضية لحل «كارثة فوق البنفسجي». كانت الفيزياء الكلاسيكية تتنبأ بأن جسمًا ساخنًا يشعّ طاقة لا نهائية عند الترددات العالية. لكن تكميم الطاقات المسموحة لمذبذبات جدران الجسم أزال هذا التناقض، وطابق الطيف المقيس تمامًا. +قدّم بلانك المعادلة $E = hf$ سنة 1900. لم تكن وصفًا لحقيقة الضوء، بل حيلة رياضية لحل «الكارثة فوق البنفسجية». كانت الفيزياء الكلاسيكية تتنبأ بأن جسمًا ساخنًا يشعّ طاقة لا نهائية عند الترددات العالية. لكن تكميم الطاقات المسموحة لمذبذبات جدران الجسم أزال هذا التناقض، وطابق الطيف المقيس تمامًا. ## Derivation @@ -56,10 +56,13 @@ charts: [] ## Real world ### الألواح الشمسية + لا تستجيب الخلية الشمسية إلا للفوتونات القوية بما يكفي لتحرير إلكترون. لهذا يمر بعض ضوء الشمس دون أن يُستفاد منه. ### الكاميرات الرقمية + يعدّ كل بكسل الفوتونات واحدًا واحدًا. حساس الكاميرا في الأساس شبكة من عدّادات الفوتونات الصغيرة. ### إنترنت الألياف الضوئية + تحمل فوتونات الأشعة تحت الحمراء البيانات كنبضات ضوء عبر ألياف زجاجية تعبر المحيطات. كل فوتون منها حزمة طاقة صغيرة وثابتة. diff --git a/content/lessons/quantum/photons-and-plancks-constant/en.md b/content/lessons/quantum/photons-and-plancks-constant/en.md index d0aee39d..0808cbcb 100644 --- a/content/lessons/quantum/photons-and-plancks-constant/en.md +++ b/content/lessons/quantum/photons-and-plancks-constant/en.md @@ -16,15 +16,15 @@ charts: [] ## Try it -1. Drag the slider «frequency f» up and down and watch the photon energy climb as the light's colour shifts from red toward violet and beyond. -2. Raise «brightness I» instead. Nothing happens to the photon energy — brightness only adds more photons, never stronger ones. -3. Push «frequency f» to its highest value and read off the photon energy in electron-volts. +1. Drag the slider «light frequency f» from 4 up to 7.5 and watch «energy of one photon» climb from 1.65 eV to 3.1 eV as the light's colour shifts from red to violet. +2. Raise «brightness I» from 5 to 10 instead. Nothing happens to the photon energy: brightness only adds more photons, never stronger ones. +3. Push «light frequency f» to its highest value, 15. «energy of one photon» reads 6.2 eV, deep in the ultraviolet. ## Real-life examples 1. **Red laser pointer.** At about 4.7×10¹⁴ Hz, each red photon carries around 1.9 eV. 2. **Blue LED light.** At about 6.5×10¹⁴ Hz, each blue photon carries around 2.7 eV, noticeably more than red. -3. **Ultraviolet germicidal lamp.** At about 1.0×10¹⁵ Hz, each UV photon carries around 4.1 eV — enough to damage DNA, which is why these lamps disinfect. +3. **Ultraviolet germicidal lamp.** At about 1.18×10¹⁵ Hz, each UV photon carries around 4.9 eV — enough to damage DNA, which is why these lamps disinfect. ## Test yourself @@ -34,7 +34,7 @@ charts: [] ## Intuition -Point a red laser pointer and a blue LED at the same wall. Both fire huge numbers of tiny light packets called photons, yet a single blue photon always lands with more energy than a single red one. Drag the slider labelled «frequency f» — the letter $f$ just means how many light waves arrive each second — and watch the energy number above it rise in exact step with it. +Point a red laser pointer and a blue LED at the same wall. Both fire huge numbers of tiny light packets called photons, yet a single blue photon always lands with more energy than a single red one. Drag the slider labelled «light frequency f» — the letter $f$ just means how many light waves arrive each second — and watch the «energy of one photon» reading rise in exact step with it. Each packet is one photon, and no photon can be split into anything smaller. A red beam made of a billion dim photons never adds up to one strong blue photon, which is why raising the «brightness I» slider leaves the energy number untouched: brightness only adds more photons, never bigger ones. @@ -57,10 +57,13 @@ Planck introduced $E = hf$ in 1900 not as a claim about light itself but as a tr ## Real world ### Solar panels + A solar cell only responds to photons energetic enough to free an electron, which is why some sunlight passes through unused. ### Digital cameras + Each pixel counts photons one at a time; a camera sensor is, at heart, a grid of tiny photon counters. ### Fibre-optic internet + Infrared photons, each carrying a small, fixed packet of energy, carry data as pulses of light through glass fibres across oceans. diff --git a/content/lessons/quantum/photons-and-plancks-constant/lesson.yaml b/content/lessons/quantum/photons-and-plancks-constant/lesson.yaml index e7cf3c61..a730922d 100644 --- a/content/lessons/quantum/photons-and-plancks-constant/lesson.yaml +++ b/content/lessons/quantum/photons-and-plancks-constant/lesson.yaml @@ -20,7 +20,7 @@ parameters: max: 15 step: 0.1 value: 6 - unit: "×10¹⁴ Hz" + unit: '×10¹⁴ Hz' phi: min: 1 max: 5 @@ -49,7 +49,7 @@ presets: - f: 6.5 phi: 2.3 I: 6 - - f: 10 + - f: 11.8 phi: 2.3 I: 4 challenges: diff --git a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/ar.md b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/ar.md index a27898b4..311a33e9 100644 --- a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/ar.md +++ b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/ar.md @@ -13,27 +13,27 @@ charts: [] ## Try it -1. اضبط «مرحلة الدارة» على 0، بوابة X. كل قياس أدناه يعود بالنتيجة 1 دائمًا، قلب مؤكد بلا استثناء. -2. اضبط «مرحلة الدارة» على 1، بوابة H. تنقسم القياسات الآن تقريبًا مناصفة، مزيج حقيقي بنسبة 50/50. -3. اضبط «مرحلة الدارة» على 2، أي H ثم CNOT على كيوبتين، وارفع «عدد مرات القياس» نحو 1000. يتفق الكيوبتان دائمًا. تظهر النتيجة 00 أو 11 فقط، ولا يظهر 01 ولا 10 أبدًا. +1. اضبط «مرحلة الدارة» على 0، أي بوابة X، واضغط زر تشغيل 100 قياس. تظهر في «النتائج حتى الآن» القراءة 0: 0 و 1: 100، فكل قياس يعطي 1. هذا قلب مؤكد بلا استثناء. +2. اضبط «مرحلة الدارة» على 1، أي بوابة H، وشغّل 100 قياس مرة أخرى. تنقسم النتائج الآن إلى نصفين تقريبًا، نحو 50 لكل منهما: مزيج حقيقي بنسبة 50/50. +3. اضبط «مرحلة الدارة» على 2، أي H ثم CNOT على كيوبتين، وارفع «عدد مرات القياس» إلى 1000 ثم شغّلها. يتفق الكيوبتان دائمًا: نحو 500 لكل من 00 و 11، ويبقى عدد 01 و 10 صفرًا. ## Real-life examples 1. **بوابة X، كمفتاح إنارة.** عند مرحلة الدارة 0 تكون النتيجة مؤكدة تمامًا، لا تختلف عن بوابة NOT الكلاسيكية العادية. -2. **بوابة H، قذف عملة مدمج.** عند مرحلة الدارة 1 تحوّل بوابة واحدة صفرًا مؤكدًا إلى عملة نزيهة بنسبة 50/50، بلا أي عشوائية خارجية مضافة. -3. **H ثم CNOT، آلة تشابك صغيرة.** عند مرحلة الدارة 2 تربط بوابتان مسمّاتان كيوبتين معًا بحيث يتفق قياساهما دائمًا، مبنيتان هنا من قطع تستطيع تسميتها. +2. **بوابة H، قطعة نقد داخل الدارة.** عند مرحلة الدارة 1 تحوّل بوابة واحدة صفرًا مؤكدًا إلى رمية قطعة نقد عادلة بنسبة 50/50، دون أي عشوائية تأتي من الخارج. +3. **H ثم CNOT، آلة تشابك صغيرة.** عند مرحلة الدارة 2 تربط بوابتان تعرف اسميهما، H و CNOT، كيوبتين معًا فيتفق قياساهما دائمًا. ## Test yourself -1. ابنِ دارة القلب المؤكد. -2. ابنِ دارة قذف العملة وشغّل 500 قياس على الأقل لترى انقسام 50/50 يستقر. -3. ابنِ دارة التشابك ذات الكيوبتين. +1. ابنِ دارة القلب المؤكد (بوابة X). +2. ابنِ دارة رمي قطعة النقد (بوابة H)، واجعل «عدد مرات القياس» 500 على الأقل لترى النتائج تستقر عند 50/50. +3. ابنِ دارة التشابك ذات الكيوبتين (H ثم CNOT). ## Intuition كل حاسوب كمي، مثل كل حاسوب كلاسيكي، مبنيّ من مجموعة صغيرة من القطع الأساسية تسمى البوابات. بوابة X هي الأسهل. تبدّل 0 و1، تمامًا كقلب مفتاح إنارة أو بوابة NOT داخل شريحة حاسوب كلاسيكي، ولا تعطي أي مفاجآت أبدًا. ابدأ من 0 وطبّق X، فتقيس 1 في كل مرة بلا استثناء. -بوابة هادامار H تفعل ما لا يستطيعه مفتاح كلاسيكي أبدًا. حين تُطبَّق على صفر محدد، لا تقرر سرًّا 0 أو 1 وتخفي عنك الاختيار. بل تنتج مزيجًا حقيقيًا من الاثنين معًا، فيعطي القياس بعدها 0 أو 1 باحتمال متساوٍ، وهي الفكرة نفسها التي رأيتها في كيوبت درس قطة شرودنغر. طبّق H على كيوبت واحد ثم بوابة CNOT، التي تقلب كيوبتًا ثانيًا فقط حين يقيس الأول 1. يصبح الكيوبتان مترابطين، ويتفق قياساهما دائمًا، وهذا هو الزوج المتشابك نفسه من درس التشابك الكمي، إلا أنك الآن تستطيع الإشارة إلى البوابتين المسمّاتين اللتين بنتاه. +بوابة هادامار H تفعل ما لا يستطيعه مفتاح كلاسيكي أبدًا. حين تُطبَّق على صفر محدد، لا تقرر سرًّا 0 أو 1 وتخفي عنك الاختيار. بل تنتج مزيجًا حقيقيًا من الاثنين معًا، فيعطي القياس بعدها 0 أو 1 باحتمال متساوٍ، وهي الفكرة نفسها التي رأيتها في كيوبت درس قطة شرودنغر. طبّق H على كيوبت واحد ثم بوابة CNOT، وهي تقلب كيوبتًا ثانيًا فقط حين تكون قيمة الأول 1. يصبح الكيوبتان مترابطين، ويتفق قياساهما دائمًا. هذا هو الزوج المتشابك نفسه من درس التشابك الكمي، لكنك الآن تعرف البوابتين اللتين صنعتاه باسميهما. ## Formal @@ -43,24 +43,28 @@ charts: [] ## Advanced -تنتمي X وH وCNOT إلى مجموعة صغيرة من البوابات. حين تُوصَل هذه البوابات في سلاسل طويلة بما يكفي، تستطيع أن تبني أي عملية حسابية كمية على الإطلاق. تربط معالجات آي بي إم وغوغل الكمية مئات من هذه البوابات معًا في دارات فعلية، وتضيف دارات تصحيح أخطاء، لأن كل بوابة فعلية غير كاملة، وتتراكم الأخطاء الصغيرة خلال عملية حسابية طويلة لولا ذلك. +تنتمي X وH وCNOT إلى مجموعة صغيرة من البوابات. حين تُوصَل هذه البوابات في سلاسل طويلة بما يكفي، تستطيع أن تبني أي عملية حسابية كمية على الإطلاق. تربط معالجات آي بي إم وغوغل الكمية مئات من هذه البوابات معًا في دارات فعلية، وتضيف دارات تصحيح أخطاء، لأن كل بوابة فعلية غير كاملة، ولولا التصحيح لتراكمت الأخطاء الصغيرة خلال العملية الحسابية الطويلة. ## Derivation 1. بوابة X تبديل مؤكد، بلا أي عشوائية في أي مكان منها. -2. بوابة H تحوّل مدخلًا مؤكدًا إلى مزيج حقيقي بنسبة 50/50، لا جوابًا محسومًا سرًّا لكنه مخفي. +2. بوابة H تحوّل مدخلًا مؤكدًا إلى مزيج حقيقي بنسبة 50/50، وليس جوابًا محسومًا من قبل ومخفيًّا عنك. 3. بوابة CNOT المطبَّقة بعد H على كيوبت ثانٍ تربط الاثنين معًا، فيعطي قياسهما نتيجتين متطابقتين دائمًا. ## Real world ### معالجات كمية حقيقية -تُوصَل شرائح آي بي إم وغوغل الكمية فعليًّا من بوابات كهذه، مطبَّقة على كيوبتات فائقة التوصيل حقيقية محفوظة قرب الصفر المطلق. + +تُبنى شرائح آي بي إم وغوغل الكمية من بوابات كهذه، تعمل على كيوبتات حقيقية فائقة التوصيل تُحفظ عند حرارة قريبة من الصفر المطلق. ### خوارزميات كمية + تُكتب خوارزميات كمية شهيرة، كخوارزمية شور لتحليل الأعداد الكبيرة، على الورق كتسلسل محدد من بوابات مثل X وH وCNOT. ### تصحيح الأخطاء الكمي -بما أن الكيوبت الفعلي الواحد هش، تنشر الحواسيب الكمية الحقيقية كيوبتًا «منطقيًّا» واحدًا عبر كيوبتات فعلية كثيرة، موصولة ببوابات مثل CNOT لرصد الأخطاء وتصحيحها. + +بما أن الكيوبت الفعلي الواحد هش، توزّع الحواسيب الكمية الحقيقية كيوبتًا «منطقيًّا» واحدًا على كيوبتات فعلية كثيرة، موصولة ببوابات مثل CNOT لرصد الأخطاء وتصحيحها. ### تعلّم برمجة حاسوب كمي + تتيح أدوات مجانية مثل Qiskit من آي بي إم لأي شخص أن يبني دارة كهذه بالضبط، بوابة بعد بوابة، ويشغّلها على شريحة كمية حقيقية عبر الإنترنت. diff --git a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/en.md b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/en.md index 7de3021d..cf04c166 100644 --- a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/en.md +++ b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/en.md @@ -15,9 +15,9 @@ charts: [] ## Try it -1. Set «circuit stage» to 0, the X gate. Every measurement below comes back 1, always — a plain, certain flip. -2. Set «circuit stage» to 1, the H gate. Now measurements split roughly half and half, a genuine 50/50 mix. -3. Set «circuit stage» to 2, H then CNOT on two qubits, and raise «number of measurements» toward 1000. Both qubits always agree — 00 or 11, never 01 or 10. +1. Set «circuit stage» to 0, the X gate, and press «run 100 measurements». «results so far» shows 0: 0 and 1: 100 — every measurement comes back 1, a plain, certain flip. +2. Set «circuit stage» to 1, the H gate, and run 100 measurements again. Now the counts split roughly half and half, close to 50 each: a genuine 50/50 mix. +3. Set «circuit stage» to 2, H then CNOT on two qubits, raise «number of measurements» to 1000 and run them. Both qubits always agree: about 500 each of 00 and 11, and 01 and 10 stay at 0. ## Real-life examples @@ -27,9 +27,9 @@ charts: [] ## Test yourself -1. Build the plain flip circuit. -2. Build the coin-flip circuit and run at least 500 measurements to see the 50/50 split settle down. -3. Build the two-qubit entangling circuit. +1. Build the plain flip circuit (the X gate). +2. Build the coin-flip circuit (the H gate) and set «number of measurements» to at least 500 to see the 50/50 split settle down. +3. Build the two-qubit entangling circuit (H then CNOT). ## Intuition @@ -56,13 +56,17 @@ X, H and CNOT belong to a small set of gates that, wired together in long enough ## Real world ### Real quantum processors + IBM's and Google's quantum chips are physically wired from gates like these, applied to real superconducting qubits held near absolute zero. ### Quantum algorithms + Famous quantum algorithms, like Shor's for factoring large numbers, are written on paper as a specific sequence of gates just like X, H and CNOT. ### Quantum error correction + Because a single physical qubit is fragile, real quantum computers spread one "logical" qubit across many physical ones, wired together with gates like CNOT to catch and fix errors. ### Learning to program a quantum computer + Free tools such as IBM's Qiskit let anyone build exactly this kind of circuit, gate by gate, and run it on a real quantum chip over the internet. diff --git a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/lesson.yaml b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/lesson.yaml index d21033e2..f9f3fe28 100644 --- a/content/lessons/quantum/quantum-gates-and-a-tiny-computer/lesson.yaml +++ b/content/lessons/quantum/quantum-gates-and-a-tiny-computer/lesson.yaml @@ -19,7 +19,7 @@ parameters: min: 0 max: 2 step: 1 - value: 0 + value: 1 shots: min: 1 max: 1000 diff --git a/content/lessons/quantum/quantum-tunnelling/ar.md b/content/lessons/quantum/quantum-tunnelling/ar.md index 31e85930..3e055dae 100644 --- a/content/lessons/quantum/quantum-tunnelling/ar.md +++ b/content/lessons/quantum/quantum-tunnelling/ar.md @@ -17,51 +17,54 @@ charts: [] ## Try it -1. راقب الموجة على الشاشة تتقلّص عند عبورها الحاجز المظلل في المنتصف، ثم تظهر من جديد أصغر خلفه. -2. ضيّق «عرض الحاجز w». تنجو موجة أكبر من العبور، وترتفع قراءة الجانب الآخر. -3. ارفع «ارتفاع الحاجز V» بدلًا منها. تتقلّص الموجة الناجية بسرعة، حتى مع العرض الضيق نفسه. +1. راقب الموجة على الشاشة تضعف وهي تعبر الحاجز المظلل في المنتصف، ثم تظهر خلفه أصغر مما كانت. عند V = 2 و w = 0.1 تكون قراءة «ينفذ عبره» 9.1 %. +2. اسحب «عرض الحاجز w» إلى 0.05. يعبر جزء أكبر من الموجة، وترتفع قراءة «ينفذ عبره» إلى 30.1 %. +3. ارفع الآن «ارتفاع الحاجز ÷ الطاقة V» إلى 4. تضعف الموجة العابرة من جديد وتنزل القراءة إلى 12.5 %، مع أن العرض ما زال ضيقًا. ## Real-life examples -1. **طبقة عازلة في ذاكرة الفلاش.** تنفذ الإلكترونات عبر طبقة عازلة رقيقة لتخزين بِت أو محوه، وهكذا تحتفظ ذاكرة USB ببياناتها دون طاقة موصولة. +1. **طبقة عازلة في ذاكرة الفلاش.** تنفذ الإلكترونات عبر طبقة عازلة رقيقة لتخزين بِت أو محوه، وهكذا تحتفظ ذاكرة USB ببياناتها وهي غير موصولة بالكهرباء. 2. **رأس مجهر النفق الماسح.** حرّك الرأس جزءًا من نانومتر فقط عن السطح فيتغيّر تيار النفق تغييرًا هائلًا، وهكذا يصوّر المجهر ذرات مفردة. 3. **الاندماج داخل قلب الشمس.** ينفذ بروتونان عبر التنافر الكهربائي بينهما مرات أكثر بكثير مما تسمح به طاقتهما وحدها، وهذا جزء من سبب توهّج الشمس. ## Test yourself -1. اجعل الحاجز ضيقًا جدًا، بـ«عرض الحاجز w» عند 0.05 أو أقل. -2. اجعل الحاجز مرتفعًا وضيقًا معًا. اضبط «ارتفاع الحاجز V» عند 3 أو أعلى، واترك «عرض الحاجز w» عند 0.1 أو أقل. -3. اخفض الحاجز قريبًا من طاقة الجسيم نفسه، بـ«ارتفاع الحاجز V» عند 0.6 أو أقل. +1. اجعل الحاجز ضيقًا جدًا: اضبط «عرض الحاجز w» على 0.05 أو أقل. +2. اجعل الحاجز مرتفعًا وضيقًا معًا. اضبط «ارتفاع الحاجز ÷ الطاقة V» على 3 أو أكثر، واترك «عرض الحاجز w» عند 0.1 أو أقل. +3. اخفض الحاجز إلى أقل من طاقة الجسيم نفسه: اضبط «ارتفاع الحاجز ÷ الطاقة V» على 0.6 أو أقل. لا شيء يمنع الجسيم الآن، فتصبح قراءة «ينفذ عبره» 100 %. ## Intuition ادفع كرة نحو تل أعلى من أن تسمح سرعتها بتسلّقه، وستعود متدحرجة دائمًا في الفيزياء الكلاسيكية. لن تظهر أبدًا على الجانب الآخر. أما موجة الإلكترون فلا تتوقف عند سفح الحاجز. تتقلّص بشدة أثناء عبوره، لكن جزءًا منها يتسرّب دائمًا إلى الجانب الآخر، صغيرًا لكنه لا يساوي الصفر أبدًا. -ضيّق «عرض الحاجز w» على الشاشة وراقب موجة الجانب الآخر تكبر، لأن حاجزًا أقل يتقلّص عبره. ارفع «ارتفاع الحاجز V» بدلًا منها وراقبها تتقلّص أسرع بكثير مما يوحي به العرض وحده، لأن ارتفاع الحاجز يدخل الصيغة داخل جذر تربيعي، ثم داخل أس مرة أخرى. +ضيّق «عرض الحاجز w» على الشاشة وراقب الموجة خلف الحاجز تكبر، لأن المسافة التي تضعف خلالها صارت أقصر. ثم ارفع «ارتفاع الحاجز ÷ الطاقة V» وراقبها تضعف أيضًا، لكن بدرجة ألطف من أثر زيادة العرض، لأن ارتفاع الحاجز يدخل الصيغة تحت جذر تربيعي قبل أن يصل إلى الأس. ## Formal داخل حاجز أعلى من طاقة الجسيم نفسه، تتلاشى دالة الموجة بالصيغة $\psi \propto e^{-\kappa x}$، بمعدل تلاشٍ $\kappa = \dfrac{\sqrt{2m(V_0-E)}}{\hbar}$ يحدده ارتفاع الحاجز $V_0$ وطاقة الجسيم $E$ وكتلته $m$. -وعبر حاجز عرضه $w$، احتمال النفوذ تقريبًا هو $T \approx e^{-2\kappa w}$، فمضاعفة العرض تجعل فرصة العبور أصغر بتربيعها. +وعبر حاجز عرضه $w$، احتمال النفوذ تقريبًا هو $T \approx e^{-2\kappa w}$، فإذا ضاعفنا العرض صارت فرصة العبور مربع قيمتها السابقة، أي أصغر بكثير. ## Advanced -ولأن $T$ يتناقص أسّيًا مع $\kappa$ ومع $w$ معًا، فإن النفق الكمي حساس بشكل استثنائي للمسافة. وهذا أساس مجهر النفق الماسح. تغيير المسافة بين الرأس والسطح بأقل من عُشر نانومتر يغيّر التيار المقيس بمعامل عشرة، فيمنح دقة على مستوى الذرة انطلاقًا من تيار كهربائي عادي. +ولأن $T$ يتناقص أسّيًا مع $\kappa$ ومع $w$ معًا، فإن النفق الكمي حساس بشكل استثنائي للمسافة. وهذا أساس مجهر النفق الماسح. تغيير المسافة بين الرأس والسطح بأقل من عُشر نانومتر يغيّر التيار المقيس عشرة أضعاف، فيمنح دقة على مستوى الذرة انطلاقًا من تيار كهربائي عادي. ## Derivation 1. يقيس هذا الثابت سرعة تلاشي دالة الموجة داخل حاجز أعلى من طاقة الجسيم نفسه. -2. داخل ذلك الحاجز يتلاشى سعة الموجة أسّيًا بدلًا من أن تتذبذب. +2. داخل ذلك الحاجز تتلاشى سعة الموجة أسّيًا بدلًا من أن تتذبذب. 3. فرصة ظهور الجسيم خلف الحاجز تتناقص أسّيًا مع عرض الحاجز. ## Real world ### ذاكرة الفلاش والأقراص SSD + يخزّن قرص الفلاش كل بِت بحبس إلكترونات في خليته أو إزالتها منها، بعد أن تعبر إليها بالنفق خلال طبقة أكسيد رقيقة. ### الاندماج النووي في النجوم + تندمج البروتونات في قلب الشمس بمعدل يعتمد اعتمادًا حاسمًا على النفق عبر تنافرها الكهربائي المتبادل، ولولا ذلك ما توهّجت النجوم كما تفعل. ### الاضمحلال الإشعاعي ألفا -يهرب جسيم ألفا المحبوس داخل نواة ثقيلة بالنفوذ عبر القوة النووية التي تحبسه، ويحدد سمك ذلك الحاجز تقريبًا كل معدل اضمحلال العنصر. + +يهرب جسيم ألفا المحبوس داخل نواة ثقيلة بالنفوذ عبر حاجز الطاقة الذي يحبسه، ويكاد سمك ذلك الحاجز وحده يحدد معدل اضمحلال العنصر. diff --git a/content/lessons/quantum/quantum-tunnelling/en.md b/content/lessons/quantum/quantum-tunnelling/en.md index 525bc83c..e94d8a11 100644 --- a/content/lessons/quantum/quantum-tunnelling/en.md +++ b/content/lessons/quantum/quantum-tunnelling/en.md @@ -18,9 +18,9 @@ charts: [] ## Try it -1. Watch the wave on screen shrink as it crosses the shaded barrier in the middle, then reappear smaller but still present on the far side. -2. Drag «barrier width w» narrower. More wave survives the crossing, and the readout on the far side climbs. -3. Drag «barrier height V» higher instead. The surviving wave shrinks fast, even for the same narrow width. +1. Watch the wave on screen shrink as it crosses the shaded barrier in the middle, then reappear smaller but still present on the far side. With V = 2 and w = 0.1, «gets through» reads 9.1 %. +2. Drag «barrier width w» down to 0.05. More wave survives the crossing, and «gets through» climbs to 30.1 %. +3. Now drag «barrier height ÷ energy V» up to 4. The surviving wave shrinks again, to 12.5 %, even for the same narrow width. ## Real-life examples @@ -31,14 +31,14 @@ charts: [] ## Test yourself 1. Make the barrier very thin, with «barrier width w» at 0.05 or below. -2. Make the barrier both tall and thin at once: «barrier height V» at 3 or above while «barrier width w» stays at 0.1 or below. -3. Lower the barrier close to the particle's own energy, with «barrier height V» at 0.6 or below. +2. Make the barrier both tall and thin at once: «barrier height ÷ energy V» at 3 or above while «barrier width w» stays at 0.1 or below. +3. Lower the barrier below the particle's own energy, with «barrier height ÷ energy V» at 0.6 or below. Nothing blocks the particle now, so «gets through» reads 100 %. ## Intuition Roll a ball at a hill too tall for its speed to climb, and classically it always rolls back down; it can never appear on the other side. An electron's wave, though, does not stop dead at the foot of a barrier: it shrinks sharply while crossing it, but a little of it always leaks out the far side, small yet never exactly zero. -Drag «barrier width w» narrower on screen and watch the far-side wave grow, since there is less barrier for it to shrink across. Drag «barrier height V» higher instead and watch it shrink far faster than width alone would predict, because the barrier's height enters the formula inside a square root, and then again inside an exponential. +Drag «barrier width w» narrower on screen and watch the far-side wave grow, since there is less barrier for it to shrink across. Drag «barrier height ÷ energy V» higher instead and watch it shrink too, though more gently than widening the barrier does, because the barrier's height enters the formula under a square root before it reaches the exponential. ## Formal @@ -59,10 +59,13 @@ Because $T$ falls off exponentially with both $\kappa$ and $w$, tunnelling is ex ## Real world ### Flash memory and SSDs + Every bit in a flash drive is stored by trapping or removing electrons that reached their cell by tunnelling through a thin oxide layer. ### Nuclear fusion in stars + Protons in the Sun's core fuse at a rate that depends critically on tunnelling through their mutual electric repulsion, without which stars could not shine as they do. ### Radioactive alpha decay -An alpha particle trapped inside a heavy nucleus escapes by tunnelling through the nuclear force holding it in, and the decay rate of an element is set almost entirely by how thick that barrier is. + +An alpha particle trapped inside a heavy nucleus escapes by tunnelling through the energy barrier that holds it in, and the decay rate of an element is set almost entirely by how thick that barrier is. diff --git a/content/lessons/quantum/schrodinger-equation-particle-in-a-box/ar.md b/content/lessons/quantum/schrodinger-equation-particle-in-a-box/ar.md index 21338831..88b4a32f 100644 --- a/content/lessons/quantum/schrodinger-equation-particle-in-a-box/ar.md +++ b/content/lessons/quantum/schrodinger-equation-particle-in-a-box/ar.md @@ -17,26 +17,26 @@ charts: [] ## Try it 1. راقب شكل الموجة المرسوم بين جداري الصندوق على الشاشة. يبدأ وينتهي عند الصفر عند كلا الجدارين، تمامًا كوتر غيتار مثبّت من طرفيه. -2. ارفع منزلق «المستوى الطاقي n» من 1 إلى 2. يظهر انبعاج إضافي في الموجة، وتقفز قراءة الطاقة إلى الأعلى. -3. تابع رفع «المستوى الطاقي n» وراقب الموجة تحشد انبعاجات أكثر، وطاقتها تتسارع في الصعود. +2. ارفع منزلق «المستوى الطاقي n» من 1 إلى 2. يظهر قوس إضافي في الموجة، وتقفز قراءة «الطاقة» من 1 × E₁ إلى 4 × E₁. +3. واصل رفع «المستوى الطاقي n» إلى 3 ثم 6، وراقب الأقواس تزداد في الموجة والطاقة ترتفع أسرع فأسرع: 9 × E₁ ثم 36 × E₁. ## Real-life examples -1. **الحالة الأدنى لإلكترون داخل نقطة كمية.** عند المستوى 1 تكون موجة الإلكترون انبعاجًا ناعمًا واحدًا، أدنى طاقة ممكنة له. -2. **الحالة المثارة الأولى.** عند المستوى 2 تكتسب الموجة انبعاجًا ثانيًا وطاقة أعلى، الدرجة التالية على السلّم. -3. **بكسل تلفاز بنقاط كمية مضبوط على لون مختلف.** يختار المصنّعون حجم النقطة بحيث تخرج قفزة طاقية معيّنة، ومعها لون ضوء معيّن. +1. **الحالة الأدنى لإلكترون داخل نقطة كمية.** عند المستوى 1 تكون موجة الإلكترون قوسًا واحدًا أملس، وهذه أدنى طاقة ممكنة له. +2. **الحالة المثارة الأولى.** عند المستوى 2 يظهر في الموجة قوس ثانٍ وتصبح الطاقة أربعة أضعاف، وهذه الدرجة التالية على السلّم. +3. **بكسل تلفاز بنقاط كمية مضبوط على لون مختلف.** عند المستوى 5 يكون في الموجة خمسة أقواس، وتكون الطاقة 25 ضعف طاقة الحالة الأدنى. يختار المصنّعون حجم النقطة بحيث تخرج قفزة طاقية معيّنة، ومعها لون ضوء معيّن. ## Test yourself -1. بلغ المستوى الطاقي الذي تكون فيه قراءة الطاقة تسعة أمثال طاقة الحالة الأدنى. -2. ادفع المستوى إلى 4 أو أعلى. -3. بلغ المستوى الطاقي الذي تكون فيه قراءة الطاقة ستة عشر ضعف طاقة الحالة الأدنى. +1. اختر المستوى الذي تكون فيه قراءة الطاقة 9 أضعاف طاقة الحالة الأدنى. +2. ارفع المستوى إلى 4 أو أعلى. +3. اختر المستوى الذي تكون فيه قراءة الطاقة 16 ضعف طاقة الحالة الأدنى. ## Intuition -ثبّت وتر غيتار من طرفيه وانقره. لن يناسبه إلا عدد صحيح من الانبعاجات بين الطرفين الثابتين، لا واحد ونصف أبدًا. احبس إلكترونًا بين جدارين بدل وتر بين مسمارين. تنطبق القاعدة نفسها على موجته. لا يُسمح إلا بأشكال تبدأ وتنتهي عند الصفر تمامًا عند كلا الجدارين. +ثبّت وتر غيتار من طرفيه وانقره. لن يتشكل عليه إلا عدد صحيح من الأقواس بين الطرفين الثابتين، ولن ترى قوسًا ونصفًا أبدًا. احبس إلكترونًا بين جدارين بدل وتر بين مسمارين. تنطبق القاعدة نفسها على موجته. لا يُسمح إلا بأشكال تبدأ وتنتهي عند الصفر تمامًا عند كلا الجدارين. -ارفع منزلق «المستوى الطاقي n» وراقب الموجة على الشاشة تكتسب انبعاجًا آخر في كل مرة. ولأن كل انبعاج إضافي يكلّف طاقة أكبر باطراد، لا يكون المستوى 2 ضعف طاقة المستوى 1 فحسب. بل تصعد الطاقة مع مربع رقم المستوى، فتتباعد المستويات العليا عن بعضها أكثر بكثير من المستويات الدنيا. +ارفع منزلق «المستوى الطاقي n» وراقب الموجة على الشاشة يزيد فيها قوس في كل مرة. وكل قوس إضافي يحتاج طاقة أكبر من الذي قبله، فلا تكون طاقة المستوى 2 ضعف طاقة المستوى 1 فحسب. بل ترتفع الطاقة مع مربع رقم المستوى، فتتباعد المستويات العليا عن بعضها أكثر بكثير من المستويات الدنيا. ## Formal @@ -50,17 +50,20 @@ charts: [] ## Derivation -1. إعادة ترتيب معادلة شرودنغر تُظهر أن انحناء الموجة يحدده طاقة الجسيم وكتلته. +1. إعادة ترتيب معادلة شرودنغر تُظهر أن انحناء الموجة تحدده طاقة الجسيم وكتلته. 2. يجب أن تتلاشى الموجة عند كلا جداري الصندوق، تمامًا كوتر غيتار مثبّت من طرفيه. 3. لا يناسب هذا الشرط إلا أشكال بعدد صحيح من أنصاف الأطوال الموجية، فلا يُسمح إلا بطاقات معينة، مرقّمة بـ n. ## Real world ### شاشات النقاط الكمية + يحدد حجم النقطة الكمية اللونَ الذي تبعثه، لأنه يضبط الفجوة الطاقية بين مستويات الإلكترون المحبوس فيها. وهذا يتيح للمصنّعين ضبط بكسلات حمراء وخضراء وزرقاء من المادة نفسها. ### الليزر شبه الموصل + تشغل الإلكترونات المحبوسة في طبقة رقيقة شبه موصلة مستويات طاقية شبيهة بصندوق، وتبعث الضوء حين تهبط من مستوى إلى مستوى أدنى منه. ### فهم الذرات + جسيم في صندوق هو أبسط نموذج للحبس. والفكرة نفسها، حين تُصاغ بصيغتها الموجية في ثلاثة أبعاد، تفسّر لماذا لا تبعث الذرات الضوء إلا بألوان حادة معينة. diff --git a/content/lessons/quantum/schrodinger-equation-particle-in-a-box/en.md b/content/lessons/quantum/schrodinger-equation-particle-in-a-box/en.md index 0144a2b7..b87f181b 100644 --- a/content/lessons/quantum/schrodinger-equation-particle-in-a-box/en.md +++ b/content/lessons/quantum/schrodinger-equation-particle-in-a-box/en.md @@ -18,14 +18,14 @@ charts: [] ## Try it 1. Look at the wave shape drawn between the two walls of the box on screen: it starts and ends at zero at both walls, like a guitar string pinned at both ends. -2. Raise the slider «energy level n» from 1 to 2. An extra hump appears in the wave, and the energy readout jumps up. -3. Keep raising «energy level n» and watch the wave pack in more humps while the energy climbs faster and faster. +2. Raise the slider «energy level n» from 1 to 2. An extra hump appears in the wave, and the «energy» readout jumps from 1 × E₁ to 4 × E₁. +3. Keep raising «energy level n» to 3 and then 6, and watch the wave pack in more humps while the energy climbs faster and faster: 9 × E₁, then 36 × E₁. ## Real-life examples 1. **Ground state of an electron in a quantum dot.** At level 1 the electron's wave is one smooth hump, its lowest possible energy. -2. **First excited state.** At level 2 the wave gains a second hump and a higher energy, the next rung up the ladder. -3. **A quantum-dot TV pixel tuned to a different colour.** Manufacturers pick the dot's size so a chosen energy jump, and so a chosen colour of light, comes out. +2. **First excited state.** At level 2 the wave gains a second hump and four times the energy, the next rung up the ladder. +3. **A quantum-dot TV pixel tuned to a different colour.** At level 5 the wave has five humps and 25 times the ground-state energy. Manufacturers pick the dot's size so a chosen energy jump, and so a chosen colour of light, comes out. ## Test yourself @@ -58,10 +58,13 @@ Erwin Schrödinger published this equation in 1926 as the wave-mechanics counter ## Real world ### Quantum-dot displays + The colour a quantum dot emits is set by its size, which fixes the energy gap between its trapped-electron levels, letting manufacturers tune red, green and blue pixels from the same material. ### Semiconductor lasers + Electrons confined in a thin semiconductor layer occupy box-like energy levels, and light is emitted when they drop from one level to a lower one. ### Understanding atoms + The particle-in-a-box is the simplest model of confinement; the same wave-fitting idea, made three-dimensional, explains why atoms only ever emit light at certain sharp colours. diff --git a/content/lessons/quantum/schrodingers-cat-and-qubits/ar.md b/content/lessons/quantum/schrodingers-cat-and-qubits/ar.md index 20b07792..aba8faf3 100644 --- a/content/lessons/quantum/schrodingers-cat-and-qubits/ar.md +++ b/content/lessons/quantum/schrodingers-cat-and-qubits/ar.md @@ -13,27 +13,27 @@ charts: [] ## Try it -1. اضبط «زاوية الكيوبت θ» على 0°. تعود كل عمليات القياس أدناه بالنتيجة نفسها، مرة بعد مرة. -2. اضبط «زاوية الكيوبت θ» على 90°. تنقسم القياسات الآن مناصفة تقريبًا، مهما رفعت «عدد مرات القياس». -3. ارفع «عدد مرات القياس» نحو 1000 وراقب الانقسام يستقر على نسبة ثابتة يمكن التنبؤ بها. +1. اضبط «زاوية الكيوبت θ» على 0° واضغط زر فتح 100 صندوق. تصبح قراءة P(|0⟩) تساوي 100 %، وتظهر في «النتائج حتى الآن» القراءة 100 : 0، أي النتيجة نفسها مرة بعد مرة. +2. اضبط «زاوية الكيوبت θ» على 90°. تصبح قراءة P(|0⟩) تساوي 50 %. افتح 100 صندوق مرة أخرى: تنقسم النتائج الآن إلى نصفين تقريبًا. +3. ارفع «عدد مرات القياس» إلى 1000 واضغط زر فتح 1000 صندوق. تستقر «نسبة |0⟩» قريبًا من 50 %. ## Real-life examples -1. **كيوبت عادل كقذف عملة.** عند θ = 90° تستقر النتائج قريبًا من 50/50، كقذف عملة نزيهة. -2. **كيوبت منحاز بشدة، يعطي 0 تقريبًا دائمًا.** عند θ = 30° تهيمن النتيجة 0، لكن النتيجة 1 تظهر أحيانًا. -3. **قياسات كثيرة متكررة لرؤية استقرار النسبة.** حين نُشغّل 1000 قياس دفعة واحدة، تظهر النسبة أوضح بكثير مما تظهر بقياسات قليلة فقط. +1. **كيوبت عادل كقطعة نقد.** عند θ = 90° تستقر النتائج قريبًا من 50/50، كرمي قطعة نقد عادلة. +2. **كيوبت منحاز بشدة، يعطي 0 في أغلب المرات.** عند θ = 30° تظهر النتيجة 0 في 93.3 % من المرات، لكن النتيجة 1 تظهر أحيانًا. +3. **قياسات كثيرة متكررة لرؤية استقرار النسبة.** عند θ = 60° تكون فرصة النتيجة 0 هي 75 %. وحين نشغّل 1000 قياس دفعة واحدة تظهر هذه النسبة أوضح بكثير مما تظهر بقياسات قليلة. ## Test yourself 1. اجعل الكيوبت يستقر بالضبط عند انقسام 50/50. -2. ادفع فرصة النتيجة 0 فوق 90%. -3. شغّل 500 قياس على الأقل دفعة واحدة. +2. ارفع فرصة النتيجة 0 إلى أكثر من 90%. +3. اجعل «عدد مرات القياس» 500 على الأقل لتشغّلها دفعة واحدة. ## Intuition تخيّل إروين شرودنغر مرة قطة مغلقة داخل صندوق مع جهاز له فرصة متساوية لإطلاق سم، مرتبط بذرة مشعة واحدة لم تضمحل بعد ولم تبقَ سليمة أيضًا. إنها ببساطة غير محسومة بعد. قصد بهذا مزحة تكشف كم تبدو قواعد الكم غريبة عند تطبيقها على شيء عادي كقطة، لا تجربة حقيقية ينبغي لأحد تجربتها. فطالما بقي الصندوق مغلقًا، تعامل ميكانيكا الكم القطة على أنها ليست حية بوضوح ولا ميتة بوضوح، بل مزيج حقيقي من الاثنين معًا. ولا يجبر أحد النتيجتين على أن تصبح حقيقية سوى فتح الصندوق. وفي رسم هذا الدرس تمثّل قطة نائمة تلك النتيجة الثانية غير المحسومة. -الكيوبت هو النسخة الأهدأ اليومية من الفكرة نفسها. ليس 0 أو 1 سرًا قبل أن تنظر إليه، بل هو مزيج حقيقي من الاثنين معًا. حرّك «زاوية الكيوبت θ» على الشاشة فأنت تضبط بالضبط كيف يُرجَّح هذا المزيج. وتشغيل «عدد مرات القياس» مرات كثيرة وعدّ النتائج هو الطريقة الوحيدة لمعرفة هذا الترجيح، لأن القياس الواحد يعطي دائمًا جوابًا واحدًا بسيطًا. +الكيوبت صورة أبسط وأهدأ من الفكرة نفسها. قبل أن تنظر إليه ليس 0 في الخفاء ولا 1 في الخفاء، بل هو مزيج حقيقي من الاثنين معًا. حين تحرّك «زاوية الكيوبت θ» على الشاشة فأنت تحدد نصيب كل نتيجة في هذا المزيج. وتكرار القياس مرات كثيرة، بحسب «عدد مرات القياس»، ثم عدّ النتائج هو الطريقة الوحيدة لمعرفة هذا النصيب، لأن القياس الواحد يعطي دائمًا جوابًا واحدًا فقط. ## Formal @@ -48,16 +48,19 @@ charts: [] ## Derivation 1. يستطيع الكيوبت أن يكون مزيجًا حقيقيًا من النتيجتين الأساسيتين معًا، لا واحدة منهما فقط. -2. قياسه يهدم ذلك المزيج، وفرصة كل نتيجة يحددها كيف كان المزيج مرجَّحًا. -3. فرصتا النتيجتين تجمعان دائمًا إلى اليقين التام، لأن القياس يعطي دائمًا جوابًا واحدًا بالضبط. +2. قياسه يهدم ذلك المزيج، وفرصة كل نتيجة يحددها نصيبها في المزيج. +3. مجموع فرصتي النتيجتين يساوي 100 % دائمًا، لأن القياس يعطي دائمًا جوابًا واحدًا بالضبط. ## Real world ### الحوسبة الكمية + تستخدم الشركات التي تبني حواسيب كمية التراكب عبر كيوبتات كثيرة لحل مسائل معينة، كتحليل أعداد كبيرة، بسرعة أكبر بكثير من أي حاسوب عادي. ### التشفير الكمي + يستغل توزيع المفتاح الكمي حقيقة أن قياس الكيوبت يُغيّره، فأي متنصت يحاول اعتراض مفتاح سري يترك أثرًا يمكن كشفه. ### توليد الأرقام العشوائية + لأن نتيجة الكيوبت غير مؤكدة حقًا قبل القياس، تستطيع الأجهزة الكمية توليد أرقام عشوائية حقيقية، خلافًا للحواسيب العادية التي لا تنتج إلا عشوائية مزيّفة. diff --git a/content/lessons/quantum/schrodingers-cat-and-qubits/en.md b/content/lessons/quantum/schrodingers-cat-and-qubits/en.md index c5518d66..f8a385dd 100644 --- a/content/lessons/quantum/schrodingers-cat-and-qubits/en.md +++ b/content/lessons/quantum/schrodingers-cat-and-qubits/en.md @@ -14,21 +14,21 @@ charts: [] ## Try it -1. Set «qubit angle θ» to 0°. Every single measurement below comes back the same outcome, again and again. -2. Set «qubit angle θ» to 90°. Now the measurements split roughly half and half, however many «number of measurements» you run. -3. Raise «number of measurements» toward 1000 and watch the split settle down to a steady, predictable ratio. +1. Set «qubit angle θ» to 0° and press «open 100 boxes». P(|0⟩) reads 100 %, and «results so far» shows 100 : 0 — the same outcome again and again. +2. Set «qubit angle θ» to 90°. P(|0⟩) reads 50 %. Open 100 boxes again: now the results split roughly half and half. +3. Raise «number of measurements» to 1000 and press «open 1000 boxes». «share of |0⟩» settles close to a steady 50 %. ## Real-life examples 1. **A fair coin-flip qubit.** At θ = 90° the outcomes land close to 50/50, like an honest coin toss. -2. **A heavily loaded qubit, almost always 0.** At θ = 30° outcome 0 dominates, though outcome 1 still shows up sometimes. -3. **Many repeated measurements to see the statistics settle.** Running 1000 measurements at once shows the ratio far more clearly than running just a few. +2. **A heavily loaded qubit, almost always 0.** At θ = 30° outcome 0 comes up 93.3 % of the time, though outcome 1 still shows up sometimes. +3. **Many repeated measurements to see the statistics settle.** At θ = 60° the chance of outcome 0 is 75 %; running 1000 measurements at once shows that ratio far more clearly than running just a few. ## Test yourself 1. Land the qubit exactly on a 50/50 split. 2. Push the chance of outcome 0 above 90%. -3. Run at least 500 measurements in one go. +3. Set «number of measurements» to at least 500, to run them in one go. ## Intuition @@ -55,10 +55,13 @@ Real quantum computers store information in physical qubits — trapped ions, su ## Real world ### Quantum computing + Companies building quantum computers use superposition across many qubits to attack certain problems, like breaking down large numbers, far faster than any ordinary computer. ### Quantum cryptography + Quantum key distribution uses the fact that measuring a qubit disturbs it, so any eavesdropper trying to intercept a secret key leaves a detectable trace. ### Random number generation + Because a qubit's outcome is genuinely unpredictable until measured, quantum devices can generate truly random numbers, unlike ordinary computers, which only ever fake randomness. diff --git a/content/lessons/quantum/schrodingers-cat-and-qubits/lesson.yaml b/content/lessons/quantum/schrodingers-cat-and-qubits/lesson.yaml index 90a7a67b..13095763 100644 --- a/content/lessons/quantum/schrodingers-cat-and-qubits/lesson.yaml +++ b/content/lessons/quantum/schrodingers-cat-and-qubits/lesson.yaml @@ -19,8 +19,8 @@ parameters: min: 0 max: 180 step: 1 - value: 90 - unit: "°" + value: 120 + unit: '°' shots: min: 1 max: 1000 diff --git a/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/ar.md b/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/ar.md index b24e139e..e68e0367 100644 --- a/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/ar.md +++ b/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/ar.md @@ -14,31 +14,31 @@ charts: [] ## Try it -1. اضبط «تدرج المجال المغناطيسي G» على قيمة منخفضة و«سرعة الذرة الخارجة من الفرن v» على قيمة عالية. تقترب النقطتان على الشاشة من بعضهما. -2. ارفع «تدرج المجال المغناطيسي G» نحو أقصاه. تبتعد النقطتان أكثر، ويبقى عددهما اثنتين فقط، بلا أي أثر بينهما. -3. اخفض «سرعة الذرة الخارجة من الفرن v» نحو 400 m/s. تقضي الذرات الأبطأ وقتًا أطول داخل المغناطيس، فيزداد التباعد أكثر. +1. اضبط «تدرج المجال المغناطيسي G» على 2 T/cm و«سرعة الذرة الخارجة من الفرن v» على 900 m/s. تتقارب النقطتان على الشاشة، وتكون قراءة «المسافة بين النقطتين» 0.053 mm. +2. ارفع «تدرج المجال المغناطيسي G» إلى أقصاه، 12 T/cm. تتباعد النقطتان إلى 0.316 mm، ويبقى عددهما اثنتين فقط، بلا أي أثر بينهما. +3. اخفض «سرعة الذرة الخارجة من الفرن v» إلى 400 m/s. تقضي الذرات الأبطأ وقتًا أطول داخل المغناطيس، فيزداد التباعد إلى نحو 1.6 mm. ## Real-life examples -1. **مغناطيس ضعيف وحزمة سريعة.** عند G = 4 T/cm وv = 800 m/s تفصل بين النقطتين مسافة صغيرة لا تتجاوز جزءًا من المليمتر. -2. **مغناطيس قوي وحزمة بطيئة، قريب من تجربة عام 1922 الأصلية.** عند G = 10 T/cm وv = 500 m/s يتسع الفرق ليقترب من مليمتر واحد، قريبًا مما قاسه شترن وغرلاخ فعلًا. -3. **مغناطيس ضعيف جدًا.** عند G = 2 T/cm وv = 900 m/s تكاد النقطتان تتلامسان، لكن نظرة متمعنة تُظهر نقطتين دائمًا، لا بقعة واحدة ممتدة. +1. **مغناطيس ضعيف وحزمة سريعة.** عند G = 4 T/cm و v = 800 m/s تفصل بين النقطتين مسافة صغيرة، 0.133 mm فقط. +2. **مغناطيس قوي وحزمة بطيئة، بتدرج قريب من تجربة عام 1922 الأصلية.** عند G = 10 T/cm و v = 500 m/s تتسع المسافة إلى 0.852 mm، أي قرابة مليمتر واحد. +3. **مغناطيس ضعيف جدًا.** عند G = 2 T/cm و v = 900 m/s تكون المسافة 0.053 mm فقط وتكاد النقطتان تتلامسان، لكن نظرة متمعنة تُظهر نقطتين دائمًا، لا بقعة واحدة ممتدة. ## Test yourself 1. اجعل المسافة بين النقطتين نحو نصف مليمتر. -2. استخدم مغناطيسًا قويًا (10 T/cm على الأقل) مع ذرات بطيئة (500 m/s كحد أقصى) للحصول على أوسع تباعد. -3. قرّب النقطتين قدر ما تسمح هذه المنظومة، إلى نحو 0.05 mm. +2. استخدم مغناطيسًا قويًا (10 T/cm على الأقل) مع ذرات بطيئة (500 m/s على الأكثر) لتحصل على تباعد واسع. +3. قرّب النقطتين إلى أقصى ما يسمح به هذا الجهاز، أي إلى نحو 0.05 mm. ## Intuition -سخّن أوتو شترن وفالتر غرلاخ فلز الفضة عام 1922 حتى تبخّرت منه ذرات، وأرسلا حزمة رفيعة منها عبر أنبوب مفرّغ من الهواء بين قطبي مغناطيس مدبَّبَي الشكل قبل أن تصطدم بشاشة زجاجية. توقّع الفيزياء الكلاسيكي أن يتصرف الإلكترون الخارجي لكل ذرة كمغناطيس صغير يشير في اتجاه عشوائي، فيدفع المغناطيس كل ذرة بمقدار مختلف ويرسم على الشاشة بقعة واحدة ممتدة، تتسع كلما رفعت «تدرج المجال المغناطيسي G». +سخّن أوتو شترن وفالتر غرلاخ فلز الفضة عام 1922 حتى تبخّرت منه ذرات، وأرسلا حزمة رفيعة منها عبر أنبوب مفرّغ من الهواء بين قطبي مغناطيس مدبَّبَي الشكل قبل أن تصطدم بشاشة زجاجية. توقّعت الفيزياء الكلاسيكية أن يتصرف الإلكترون الخارجي لكل ذرة كمغناطيس صغير يشير في اتجاه عشوائي، فيدفع المغناطيس كل ذرة بمقدار مختلف ويرسم على الشاشة بقعة واحدة ممتدة، تتسع كلما رفعت «تدرج المجال المغناطيسي G». لم يحدث هذا. تُظهر الشاشة دائمًا نقطتين حادّتين فقط، واحدة فوق الخط الأوسط وأخرى تحته، لا بقعة واحدة ولا نقطة ثالثة بينهما. يتبيّن أن اللف المغزلي، ذلك المغناطيس الصغير المدمج في كل إلكترون، يشير إما نحو الجانب القوي من المجال تمامًا أو بعيدًا عنه تمامًا، على أي محور تقيسه، ولا شيء بينهما. تحريك «تدرج المجال المغناطيسي G» و«سرعة الذرة الخارجة من الفرن v» يقرّب النقطتين أو يبعدهما، لكنه لا يحوّلهما أبدًا إلى بقعة ممتدة. ## Formal -يحمل إلكترون ذرة الفضة الخارجي لفًّا مغزليًّا مقداره $\hbar/2$، فيعطي القياس على محور المغناطيس قيمة $+\hbar/2$ أو $-\hbar/2$ فقط، فتُدفع الذرة بمقدار ثابت واحد في كل مرة لا بمدى من المقادير. هذا الدفع الثابت، مع الوقت الذي تقضيه كل ذرة داخل المجال، يعطي فرقًا بين النقطتين على الشاشة مقداره $s = \dfrac{21300\,G}{v^2}$ بالمليمتر، بعد أن يُدمَج طول المغناطيس وكتلة الذرة في ذلك الثابت الواحد. +يحمل إلكترون ذرة الفضة الخارجي لفًّا مغزليًّا مقداره $\hbar/2$، فيعطي القياس على محور المغناطيس قيمة $+\hbar/2$ أو $-\hbar/2$ فقط، فتُدفع الذرة بمقدار ثابت واحد في كل مرة لا بمقادير متفاوتة. هذا الدفع الثابت، مع الوقت الذي تقضيه كل ذرة داخل المجال، يعطي فرقًا بين النقطتين على الشاشة مقداره $s = \dfrac{21300\,G}{v^2}$ بالمليمتر، بعد أن يُدمَج طول المغناطيس وكتلة الذرة في ذلك الثابت الواحد. بما أن $s$ يعتمد على $G$ و $v$ بهذه الطريقة فقط، فإن $s \propto G$ يكبر مع مغناطيس أقوى، بينما $s \propto 1/v^2$ يصغر بسرعة مع ذرات أسرع، ويبقى عدد النقاط ثابتًا عند اثنتين مهما ضبطت أيًّا من المنزلقين. @@ -55,13 +55,17 @@ charts: [] ## Real world ### أجهزة التصوير الطبي -تكتشف أجهزة الرنين المغناطيسي الإشارة المغناطيسية الضئيلة لأنوية الهيدروجين في الجسم، امتدادًا مباشرًا للف المغزلي الذي عزله شترن وغرلاخ أول مرة عام 1922. + +تكتشف أجهزة الرنين المغناطيسي الإشارة المغناطيسية الضئيلة لأنوية الهيدروجين في الجسم، وهذا امتداد مباشر للف المغزلي الذي عزله شترن وغرلاخ أول مرة عام 1922. ### تقنية الإلكترونيات المغزلية وأقراص التخزين + تقرأ أقراص التخزين الصلبة الحديثة البيانات باستشعار اتجاه لف الإلكترونات في طبقة مغناطيسية رقيقة، فتخزّن قدرًا أكبر في المساحة نفسها مما تستطيعه ذاكرة إلكترونية بحتة. ### الحواسيب الكمية + تخزّن حواسيب كمية كثيرة الكيوبت في لف أيون واحد محبوس أو إلكترون واحد، مستخدمة الخاصية ذات النتيجتين التي كشفتها هذه التجربة أول مرة. ### قياس أسّس علمًا جديدًا -قبل عام 1922 افترض الفيزيائيون أن مغناطيسات الذرات يمكن أن تشير إلى أي اتجاه. أظهرت هذه التجربة الواحدة أن الطبيعة لا تسمح إلا باتجاهات محددة معدودة، وهو اكتشاف شكّل بقية ميكانيكا الكم. + +قبل عام 1922 افترض الفيزيائيون أن مغناطيسات الذرات يمكن أن تشير إلى أي اتجاه. أظهرت هذه التجربة الواحدة أن الطبيعة لا تسمح إلا باتجاهات محددة معدودة، وهو اكتشاف أثّر في كل ما جاء بعده في ميكانيكا الكم. diff --git a/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/en.md b/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/en.md index b6e31fd5..6334151a 100644 --- a/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/en.md +++ b/content/lessons/quantum/spin-and-the-stern-gerlach-experiment/en.md @@ -16,15 +16,15 @@ charts: [] ## Try it -1. Set «magnet field gradient G» low and «atom speed v» high. The two spots on the screen sit close together. -2. Raise «magnet field gradient G» toward its maximum. The two spots pull further apart — but there are still only two of them, never a smear in between. -3. Lower «atom speed v» toward 400 m/s. Slower atoms spend longer crossing the magnet, so the split grows even wider. +1. Set «magnet field gradient G» to 2 T/cm and «atom speed leaving the oven v» to 900 m/s. The two spots on the screen sit close together: «separation between the spots» reads 0.053 mm. +2. Raise «magnet field gradient G» to its maximum, 12 T/cm. The two spots pull apart to 0.316 mm — but there are still only two of them, never a smear in between. +3. Lower «atom speed leaving the oven v» to 400 m/s. Slower atoms spend longer crossing the magnet, so the split grows even wider, to about 1.6 mm. ## Real-life examples -1. **A weak magnet, a fast beam.** At G = 4 T/cm and v = 800 m/s the two spots sit only a fraction of a millimetre apart. -2. **A strong magnet, a slow beam — close to the original 1922 apparatus.** At G = 10 T/cm and v = 500 m/s the split widens to close to a millimetre, near what Stern and Gerlach actually measured. -3. **A very weak magnet.** At G = 2 T/cm and v = 900 m/s the two spots nearly touch, yet a careful look still shows two, never a single smudge. +1. **A weak magnet, a fast beam.** At G = 4 T/cm and v = 800 m/s the two spots sit only 0.133 mm apart. +2. **A strong magnet, a slow beam — a gradient close to the original 1922 apparatus.** At G = 10 T/cm and v = 500 m/s the split widens to 0.852 mm, close to a millimetre. +3. **A very weak magnet.** At G = 2 T/cm and v = 900 m/s the two spots are only 0.053 mm apart and nearly touch, yet a careful look still shows two, never a single smudge. ## Test yourself @@ -36,7 +36,7 @@ charts: [] In 1922, Otto Stern and Walther Gerlach heated silver metal in an oven until atoms boiled off, sent them down a vacuum tube, and pushed the thin beam between the pointed and grooved poles of a magnet before it hit a glass screen. Classical physics expected the outer electron of each atom to act like a tiny bar magnet pointing in some random direction, so a magnet with a stronger field on one side should push different atoms up or down by different amounts and paint one smeared blob on the screen, wide where the field is weak and wider still where you raise «magnet field gradient G». -That is not what showed up. The screen always shows exactly two sharp spots, one above the centre line and one below, never a single blob and never a third spot in between. Every silver atom's spin, the tiny built-in magnet every electron carries, turns out to point either fully toward the strong side of the field or fully away from it along whatever direction the magnet checks — nothing in between. Dragging «magnet field gradient G» and «atom speed v» moves the two spots apart or together, but it never turns them into a spread. +That is not what showed up. The screen always shows exactly two sharp spots, one above the centre line and one below, never a single blob and never a third spot in between. Every silver atom's spin, the tiny built-in magnet every electron carries, turns out to point either fully toward the strong side of the field or fully away from it along whatever direction the magnet checks — nothing in between. Dragging «magnet field gradient G» and «atom speed leaving the oven v» moves the two spots apart or together, but it never turns them into a spread. ## Formal @@ -57,13 +57,17 @@ Send the "up" beam alone through a second Stern-Gerlach magnet tilted at an angl ## Real world ### Medical scanners + MRI machines detect the tiny magnetic signal of hydrogen nuclei spinning in the body, a direct descendant of the spin Stern and Gerlach first isolated in 1922. ### Spintronics and hard drives + Modern hard drives read data by sensing the spin direction of electrons in a magnetic film, packing more storage into the same space than a purely electronic memory could. ### Quantum computers + Many quantum computers store a qubit in the spin of a single trapped ion or electron, using exactly the two-outcome property this experiment first revealed. ### A founding measurement + Before 1922, physicists assumed atomic magnets could point any way at all; this one experiment showed that nature only allows a handful of fixed directions, a discovery that shaped the rest of quantum mechanics. diff --git a/content/lessons/quantum/uncertainty-principle/ar.md b/content/lessons/quantum/uncertainty-principle/ar.md index 62f027de..45f46905 100644 --- a/content/lessons/quantum/uncertainty-principle/ar.md +++ b/content/lessons/quantum/uncertainty-principle/ar.md @@ -13,27 +13,27 @@ charts: [] ## Try it -1. راقب النتوء على الشاشة. عرضه يبيّن مدى اتساع موضع الجسيم، والقراءة بجانبه تبيّن اتساع سرعته. -2. ضيّق «اتساع الموضع Δx» فيضيق النتوء. ترتفع قراءة اتساع السرعة. -3. وسّع «اتساع الموضع Δx» بدلًا منها فيتسع النتوء. تهبط قراءة اتساع السرعة. +1. راقب النتوء على الشاشة. عرضه يبيّن مدى اتساع موضع الجسيم، وقراءة «Δp» تبيّن اتساع زخمه، أي اتساع سرعته. عند Δx = 0.08 تكون قراءة Δp هي 6.25. +2. اسحب «اتساع الموضع Δx» إلى 0.04 فيضيق النتوء. تتضاعف قراءة Δp إلى 12.5. +3. اسحب «اتساع الموضع Δx» الآن إلى 0.2 فيتسع النتوء. تنزل قراءة Δp إلى 2.5، وتبقى قراءة «Δx · Δp» عند 0.5 طوال الوقت. ## Real-life examples -1. **فوتون غير محدد الموضع بدقة على مساحة واسعة.** حين يتسع موضع الفوتون كثيرًا، نعرف سرعته بدقة معقولة. -2. **إلكترون محبوس بإحكام داخل ذرة.** حين يُحصر في مساحة صغيرة كهذه، تصبح سرعته غير مؤكدة إلى حد بعيد. -3. **حبة غبار محددة الموضع بدقة معقولة.** يوجد عدم اليقين نظريًا حتى في الحجم المألوف، لكنه أصغر بكثير من أن يُلاحظ أبدًا. +1. **فوتون غير محدد الموضع بدقة على مساحة واسعة.** حين يتسع موضع الفوتون كثيرًا، Δx = 0.25، نعرف زخمه بدقة معقولة: Δp يساوي 2 فقط. +2. **إلكترون محبوس بإحكام داخل ذرة.** حين يُحصر في مساحة صغيرة كهذه، Δx = 0.03، تصبح سرعته غير مؤكدة إلى حد بعيد: يقفز Δp إلى 16.67. +3. **حبة غبار محددة الموضع بدقة معقولة.** هنا Δx = 0.1 و Δp = 5. يوجد عدم اليقين نظريًا حتى في الحجم المألوف، لكنه أصغر بكثير من أن يُلاحظ أبدًا. ## Test yourself -1. اضبط قراءة اتساع السرعة عند نحو 5. -2. ضيّق النتوء حتى ترتفع قراءة اتساع السرعة فوق 15. -3. وسّع النتوء حتى تهبط قراءة اتساع السرعة إلى نحو 1.7، أقصى اتساع يسمح به هذا المنزلق. +1. اجعل قراءة «Δp» نحو 5. +2. ضيّق النتوء حتى ترتفع قراءة «Δp» إلى أكثر من 15. +3. وسّع النتوء حتى تنزل قراءة «Δp» إلى نحو 1.7، وهذا أقصى اتساع يسمح به المنزلق. ## Intuition -اضغط رزمة موجية حتى تصبح رمحًا واحدًا حادًا، وسيكون لها موضع نظيف محدد جدًا. لكن بناء رمح بهذه الحدة يتطلب جمع موجات بأطوال موجية كثيرة مختلفة، فتصبح سرعتها شبه مستحيلة التحديد. وزّع الكمية الموجية نفسها على مساحة واسعة بدل ذلك، وستستقر قريبًا من طول موجي نظيف واحد، فتعطي سرعة محددة جيدًا لكن موضعًا غامضًا تمامًا. +اضغط رزمة موجية حتى تصبح قمة واحدة حادة، فيصير موضعها واضحًا ومحددًا جدًا. لكن بناء قمة بهذه الحدة يتطلب جمع موجات بأطوال موجية كثيرة مختلفة، فيكاد تحديد سرعتها يصبح مستحيلًا. وإذا وزّعت الموجة نفسها على مساحة واسعة، اقتربت من طول موجي واحد واضح، فتكون سرعتها محددة جيدًا لكن موضعها غامض تمامًا. -ضيّق «اتساع الموضع Δx» على الشاشة وراقب النتوء يتقلّص بينما ترتفع قراءة اتساع السرعة بجانبه. وسّعه وراقب العكس يحدث. هذه المقايضة ليست عيبًا في أداة القياس. فالموجة ببساطة لا يمكن أن يكون لها موضع نظيف واحد وسرعة نظيفة واحدة في آنٍ معًا. +ضيّق «اتساع الموضع Δx» على الشاشة وراقب النتوء يضيق بينما ترتفع قراءة «Δp». وسّعه وراقب العكس يحدث. هذه المقايضة ليست عيبًا في أداة القياس. فالموجة لا يمكن أن يكون لها موضع واحد محدد وسرعة واحدة محددة في الوقت نفسه. ## Formal @@ -54,10 +54,13 @@ charts: [] ## Real world ### دقة المجهر الإلكتروني + حين نحصر حزمة إلكترونات بإحكام كافٍ لتصوير تفاصيل صغيرة، يتسع زخمها حتمًا، فيضع ذلك حدًا أساسيًا للدقة الممكن بلوغها. ### عرض خط الليزر + يجب أن تحتوي نبضة ليزر قصيرة جدًا زمنيًا على مدى واسع من الترددات يقابلها، وهو الوجه الزمني-الطاقي لهذا المبدأ نفسه. ### طاقة النقطة الصفرية -حتى عند درجة الصفر المطلق لا يستطيع جسيم محبوس أن يسكن تمامًا في قاع حبسه، لأن ذلك يثبّت موضعه وزخمه معًا. وهذا الاهتزاز المتبقي يسمى طاقة النقطة الصفرية. + +حتى عند درجة الصفر المطلق لا يستطيع جسيم محبوس أن يسكن تمامًا في قاع المصيدة التي تحبسه، لأن ذلك يثبّت موضعه وزخمه معًا. وهذا الاهتزاز المتبقي يسمى طاقة النقطة الصفرية. diff --git a/content/lessons/quantum/uncertainty-principle/en.md b/content/lessons/quantum/uncertainty-principle/en.md index 974838fa..252f5936 100644 --- a/content/lessons/quantum/uncertainty-principle/en.md +++ b/content/lessons/quantum/uncertainty-principle/en.md @@ -14,27 +14,27 @@ charts: [] ## Try it -1. Look at the bump on screen: its width shows how spread out the particle's position is, and the readout beside it shows the spread in its speed. -2. Drag «position spread Δx» narrower, squeezing the bump. The speed-spread readout climbs. -3. Drag «position spread Δx» wider instead, spreading the bump out. The speed-spread readout falls. +1. Look at the bump on screen: its width shows how spread out the particle's position is, and the «Δp» readout shows the spread in its momentum, which is the spread in its speed. With Δx = 0.08, Δp reads 6.25. +2. Drag «position spread Δx» down to 0.04, squeezing the bump. Δp doubles to 12.5. +3. Drag «position spread Δx» up to 0.2 instead, spreading the bump out. Δp falls to 2.5, and «Δx · Δp» stays at 0.5 the whole time. ## Real-life examples -1. **A photon loosely located over a wide region.** With a wide position spread, its speed is known fairly precisely. -2. **An electron confined tightly inside an atom.** Squeezed into such a small space, its speed becomes wildly uncertain. -3. **A dust grain, localized fairly precisely.** At an everyday size the uncertainty is there in principle but far too small to ever notice. +1. **A photon loosely located over a wide region.** With a wide position spread, Δx = 0.25, its momentum is known fairly precisely: Δp is only 2. +2. **An electron confined tightly inside an atom.** Squeezed into such a small space, Δx = 0.03, its speed becomes wildly uncertain: Δp jumps to 16.67. +3. **A dust grain, localized fairly precisely.** Here Δx = 0.1 and Δp = 5. At an everyday size the uncertainty is there in principle but far too small to ever notice. ## Test yourself -1. Set the speed-spread readout to about 5. -2. Squeeze the bump until the speed-spread readout climbs above 15. -3. Widen the bump until the speed-spread readout drops to about 1.7, as wide as this slider allows. +1. Set the «Δp» readout to about 5. +2. Squeeze the bump until the «Δp» readout climbs above 15. +3. Widen the bump until the «Δp» readout drops to about 1.7, as wide as this slider allows. ## Intuition Squeeze a wave packet into a single, sharp spike and it has a clean, well-defined position — but to build a spike that sharp you must add together waves of many different wavelengths, so its speed becomes almost impossible to pin down. Spread the same amount of wave out over a wide region instead, and it settles into something close to one clean wavelength, giving a well-defined speed but a hopelessly vague position. -Drag «position spread Δx» narrower on screen and watch the bump shrink while the speed-spread readout beside it climbs; drag it wider and watch the opposite happen. The trade is not a flaw of the measuring instrument — the wave simply cannot have both a single sharp position and a single sharp speed at once. +Drag «position spread Δx» narrower on screen and watch the bump shrink while the «Δp» readout climbs; drag it wider and watch the opposite happen. The trade is not a flaw of the measuring instrument — the wave simply cannot have both a single sharp position and a single sharp speed at once. ## Formal @@ -55,10 +55,13 @@ Werner Heisenberg derived this limit in 1927 from the mathematics of Fourier ana ## Real world ### Electron microscopy resolution + Confining an electron beam tightly enough to image small features unavoidably spreads its momentum, setting a fundamental limit on achievable resolution. ### Laser linewidth + A laser pulse made extremely short in time must contain a correspondingly wide spread of frequencies, the time-energy cousin of the same principle. ### Zero-point energy + Even at absolute zero temperature, a trapped particle cannot sit perfectly still at the bottom of its trap, since that would fix both its position and momentum at once; this leftover jiggle is called zero-point energy. diff --git a/content/lessons/relativity/adding-velocities/ar.md b/content/lessons/relativity/adding-velocities/ar.md index ab70cb7a..19bdfb98 100644 --- a/content/lessons/relativity/adding-velocities/ar.md +++ b/content/lessons/relativity/adding-velocities/ar.md @@ -9,15 +9,15 @@ parameters: ## Try it -1. راقب العلامات الثلاث تتسابق على المسار: الذهبية هي الضوء نفسه، والعلامة المتقطّعة هي المجموع الساذج u + v، والعلامة المصمتة هي السرعة الحقيقية w كما تُقاس من الأرض. -2. عند u = 0.8، v = 0.8، لاحظ أن العلامة المتقطّعة تحتاج إلى سرعة أكبر من الضوء، أي u + v = 1.6، بينما تبقى العلامة المصمتة لـw خلفها بأمان، عند نحو 0.976c. +1. راقب العلامات الثلاث تتسابق على المسار: الذهبية هي الضوء نفسه، والعلامة المتقطّعة هي المجموع الساذج u + v، والعلامة المصمتة هي السرعة الحقيقية w كما تُقاس من الأرض. في البداية u = 0.5 وv = 0.5: يقرأ المجموع الساذج 1 c، أما w فتقرأ 0.8 c فقط. +2. اضبط u = 0.8 وv = 0.8. لاحظ أن العلامة المتقطّعة تحتاج إلى سرعة أكبر من الضوء، أي u + v = 1.6، بينما تبقى العلامة المصمتة لـw خلفها بأمان، عند نحو 0.976c. 3. ادفع المنزلقين إلى 0.99. يقفز المجموع الساذج إلى 1.98، متجاوزًا سرعة الضوء بكثير، لكن w تقترب فقط أكثر من سرعة الضوء نفسها، لتبلغ نحو 0.99995c ولا تتجاوزها أبدًا. ## Real-life examples 1. **مسبار يُطلق بسرعة 0.8c من سفينة تتحرك أصلًا بسرعة 0.8c.** يقترح الجمع الساذج 1.6c، أما السرعة الحقيقية من الأرض فهي w = 0.976c، وهي أقل من الحد بأمان. 2. **سفينتان تقترب كل منهما من سرعة الضوء، عند u = v = 0.99.** يقترح الجمع الساذج 1.98c، أما السرعة المجمّعة الحقيقية فهي w = 0.99995c، أقرب إلى سرعة الضوء لكنها لا تتجاوزها أبدًا. -3. **جسمان سريعان بمقاييس معتادة، u = v = 0.5.** حتى عند نصف سرعة الضوء لكل منهما، تظهر النسبية أثرها فورًا: يعطي الجمع الساذج 1.0c بالضبط، أي سرعة الضوء نفسها، لكن الجواب الحقيقي w = 0.8c، أقل منها بأمان. +3. **جسمان كلٌّ منهما بنصف سرعة الضوء، u = v = 0.5.** حتى عند نصف سرعة الضوء لكل منهما، تظهر النسبية أثرها فورًا: يعطي الجمع الساذج 1.0c بالضبط، أي سرعة الضوء نفسها، لكن الجواب الحقيقي w = 0.8c، أقل منها بأمان. ## Test yourself @@ -29,7 +29,7 @@ parameters: في السرعات المعتادة، يعمل جمع السرعات بالطريقة العادية، u + v، بدقة عالية جدًا لدرجة أن أحدًا لا يلاحظ أنها مجرد تقريب. سيارة تسير بسرعة 30 م/ث فوق قطار يسير بسرعة 30 م/ث تتحرك فعلًا بسرعة 60 م/ث بالنسبة لمن على الأرض، لأن كلتا السرعتين نسبة ضئيلة جدًا من سرعة الضوء، وحدّ التصحيح أدناه لا يكاد يُذكر. -يكبر حدّ التصحيح هذا بسرعة بمجرد أن تصبح u وv نفسيهما نسبة كبيرة من c، ويعمل دائمًا على منع السرعة المجمّعة w من بلوغ سرعة الضوء، ناهيك عن تجاوزها، مهما اقتربت u وv كلٌّ على حدة من c. تتصرّف سرعة الضوء كجدار لا يمكن لأي جسم له كتلة اختراقه بمجرد جمع دفعات أصغر منه كافية. +يكبر حدّ التصحيح هذا بسرعة بمجرد أن تصبح u وv نفسيهما نسبة كبيرة من c، ويعمل دائمًا على منع السرعة المجمّعة w من بلوغ سرعة الضوء، ناهيك عن تجاوزها، مهما اقتربت u وv كلٌّ على حدة من c. تتصرّف سرعة الضوء كجدار لا يمكن لأي جسم له كتلة اختراقه مهما جمعنا له من دفعات صغيرة. ## Formal @@ -39,24 +39,28 @@ parameters: ## Advanced -نهايتان تتحققان من هذه الصيغة مقابل ما هو معروف مسبقًا. عندما $u, v \to c$، تصبح $w \to c$ أيضًا، فجمع سرعتين قريبتين من سرعة الضوء يعطي سرعة الضوء نفسها، لا أكثر، وهذا متسق مع أن سرعة الضوء واحدة لكل مراقب. وللسرعات المعتادة الصغيرة $u, v$، يكون المقام $1 + uv/c^2$ قريبًا جدًا من 1 بحيث $w \approx u + v$، فيستعيد الجمع العادي دقّته تمامًا حيثما بدا يعمل دائمًا. +حالتان طرفيتان تؤكدان أن هذه الصيغة توافق ما نعرفه من قبل. عندما $u, v \to c$، تصبح $w \to c$ أيضًا، فجمع سرعتين قريبتين من سرعة الضوء يعطي سرعة الضوء نفسها، لا أكثر، وهذا متسق مع أن سرعة الضوء واحدة لكل مراقب. وللسرعات المعتادة الصغيرة $u, v$، يكون المقام $1 + uv/c^2$ قريبًا جدًا من 1 بحيث $w \approx u + v$، فنعود إلى الجمع العادي في المجال الذي نجح فيه دائمًا. ## Derivation -1. الحدس المعتاد للسرعات البطيئة يتنبّأ بجمع بسيط، $w_{\text{naive}} = u + v$، وهو ينهار بشدّة بمجرد أن تصبح $u$ و$v$ نسبة كبيرة من $c$. +1. الحدس المعتاد للسرعات البطيئة يتنبّأ بجمع بسيط، $w_{\text{naive}} = u + v$، وهو يفشل تمامًا بمجرد أن تصبح $u$ و$v$ نسبة كبيرة من $c$. 2. تطبيق تحويل لورنتز على سرعة مقيسة في إطار السفينة، ثم تحويلها إلى إطار الأرض، يعطي بدلًا من ذلك الصيغة النسبوية الصحيحة: $w = \dfrac{u+v}{1+uv/c^2}$. 3. ولأن المقام يكبر دائمًا بمقدار كافٍ للتعويض بالضبط، فإن $w < c$ لأي $u < c$ و$v < c$. يمكن الاقتراب من سرعة الضوء لكن لا يمكن بلوغها بهذه الطريقة أبدًا. ## Real world ### تصادمات مسرّعات الجسيمات + حزمتا جسيمات تصطدمان وجهًا لوجه، وكل منهما تتحرك أصلًا بسرعة 0.999999c في المختبر، لا تقتربان من بعضهما بسرعة تقارب ضعف سرعة الضوء في إطار أيّ منهما. هذه الصيغة بالذات هي ما يستخدمه الفيزيائيون لحساب سرعتهما النسبية الحقيقية. ### لماذا لا يمكن دفع أي جسم متجاوزًا سرعة الضوء + مهما تلقّى جسم عددًا من الدفعات النسبوية المتتالية، كل واحدة تضيف سرعة في إطاره الحالي، فإن تسلسل هذه الصيغة معًا يبقي الناتج دائمًا أقل من $c$. لا توجد سلسلة منتهية من الإضافات تبلغه أبدًا. ### أثر المصباح الأمامي في الفيزياء الفلكية + نفّاثات المادة المنطلقة من الثقوب السوداء بسرعات نسبوية تجمع حركتها الخاصة مع حركة الجسيمات بداخلها باستخدام هذه الصيغة بالذات، وهذا جزء من سبب أن مثل هذه النفّاثات قد تبدو أشدّ سطوعًا في الاتجاه الأمامي منها في الخلفي. ### GPS والإلكترونيات اليومية + يجمع المهندسون سرعات نسبية صغيرة، كحركة قمر صناعي مضافة إلى دوران الأرض تحته، باستخدام تقريب u + v العادي دون تردّد، لأن التصحيح النسبوي عند هذه السرعات أصغر بمراتب عديدة من أي شيء يمكن لجهاز استقبال GPS رصده. diff --git a/content/lessons/relativity/adding-velocities/en.md b/content/lessons/relativity/adding-velocities/en.md index 2482d015..08cf1efd 100644 --- a/content/lessons/relativity/adding-velocities/en.md +++ b/content/lessons/relativity/adding-velocities/en.md @@ -11,15 +11,15 @@ parameters: ## Try it -1. Watch the three markers race along the track: gold is light itself, the dashed marker is the naive sum u + v, and the solid marker is the actual ground-frame speed w. -2. At u = 0.8, v = 0.8, notice the dashed marker would need to run faster than light — u + v = 1.6 — while the solid marker for w stays safely behind it, at about 0.976c. +1. Watch the three markers race along the track: gold is light itself, the dashed marker is the naive sum u + v, and the solid marker is the actual ground-frame speed w. At the start, u = 0.5 and v = 0.5: the naive sum reads 1 c, but w reads only 0.8 c. +2. Set u = 0.8 and v = 0.8. Notice the dashed marker would need to run faster than light — u + v = 1.6 — while the solid marker for w stays safely behind it, at about 0.976c. 3. Push both sliders to 0.99. The naive sum jumps to 1.98, wildly past light speed, but w only creeps closer to light speed itself, reaching about 0.99995c and no further. ## Real-life examples 1. **A probe launched at 0.8c from a ship already moving at 0.8c.** Naive addition suggests 1.6c; the real ground-frame speed is w = 0.976c, comfortably under the limit. 2. **Two ships each approaching light speed, at u = v = 0.99.** Naive addition suggests 1.98c; the true combined speed is w = 0.99995c, closer to light speed but never past it. -3. **Two everyday-fast objects, u = v = 0.5.** Even at half light speed each, relativity already bites: naive addition gives 1.0c exactly at light speed, but the true answer is w = 0.8c, safely below it. +3. **Two objects at half light speed each, u = v = 0.5.** Even at half light speed each, relativity already bites: naive addition gives 1.0c exactly at light speed, but the true answer is w = 0.8c, safely below it. ## Test yourself @@ -52,13 +52,17 @@ Two limits check this formula against what is already known: as $u, v \to c$, $w ## Real world ### Particle accelerator collisions + Two particle beams collided head-on, each already moving at 0.999999c in the lab, do not approach each other at nearly twice light speed in either beam's own frame — this exact formula is what physicists use to compute their true relative speed. ### Why nothing can be pushed past light speed + No matter how many successive relativistic pushes an object receives, each one adding some velocity in its own current frame, chaining this formula together always keeps the result under $c$ — there is no finite sequence of additions that ever reaches it. ### The headlight effect in astrophysics + Jets of matter blasted from black holes at relativistic speeds combine their own motion with the motion of particles inside them using exactly this formula, which is part of why such jets can appear to beam light forward far more intensely than backward. ### GPS and everyday electronics + Engineers combining small relative velocities, like a satellite's motion plus the spin of the Earth beneath it, use the everyday $u + v$ approximation without a second thought, because at those speeds the relativistic correction is many orders of magnitude smaller than anything a GPS receiver could detect. diff --git a/content/lessons/relativity/adding-velocities/lesson.yaml b/content/lessons/relativity/adding-velocities/lesson.yaml index c5fa3c23..7a09bfc9 100644 --- a/content/lessons/relativity/adding-velocities/lesson.yaml +++ b/content/lessons/relativity/adding-velocities/lesson.yaml @@ -20,12 +20,12 @@ parameters: min: 0 max: 0.99 step: 0.001 - value: 0.8 + value: 0.5 v: min: 0 max: 0.99 step: 0.001 - value: 0.8 + value: 0.5 variables: [] derivation: - w_{\text{naive}} = u + v \quad \text{(what everyday, slow-speed addition would predict)} diff --git a/content/lessons/relativity/black-holes/ar.md b/content/lessons/relativity/black-holes/ar.md index a861423f..75393296 100644 --- a/content/lessons/relativity/black-holes/ar.md +++ b/content/lessons/relativity/black-holes/ar.md @@ -8,27 +8,27 @@ parameters: ## Try it -1. راقب الخط الأزرق يرتفع كلما رفعت x، كتلة الثقب الأسود بأضعاف كتلة شمسنا. تُظهر النقطة البرتقالية نصف قطر أفق الحدث بالكيلومترات، وهو نقطة اللاعودة. -2. اجعل x يساوي 1، أي كتلة شمسية واحدة. تستقر النقطة تحت 3 km، وهذا الحجم تقريبًا ما تحتاجه شمسنا لتنكمش إلى ثقب أسود. -3. ادفع x إلى 20. يتجاوز الأفق 55 km، أي بحجم مدينة كبيرة تقريبًا. +1. ارفع x، كتلة الثقب الأسود بأضعاف كتلة شمسنا، من 1 إلى 2. تصعد النقطة البرتقالية على الخط الأزرق وتتضاعف f(x) من 2.95 إلى 5.9. هذه القيمة هي نصف قطر أفق الحدث بالكيلومترات، وهو الحد الذي لا عودة بعده. +2. أعد x إلى 1، أي كتلة شمسية واحدة. تقرأ f(x) القيمة 2.95: على شمسنا أن تنكمش إلى كرة نصف قطرها نحو 3 km لتصير ثقبًا أسود. +3. ادفع x إلى 20. تقرأ f(x) القيمة 59: صار نصف قطر الأفق 59 km، أي بحجم مدينة كبيرة تقريبًا. ## Real-life examples -1. **الشمس كثقب أسود.** لو انضغطت شمسنا (x = 1) إلى هذا الحجم لامتد أفق حدثها نحو 3 km. -2. **ثقب أسود نجمي نموذجي.** كثير من الثقوب السوداء التي يرصدها الفلكيون تتكون من انهيار نجوم عند x = 10 تقريبًا، بأفق نحو 30 km. -3. **ثقب أسود نجمي كبير.** عند أعلى المنزلق، x = 20، كبر الأفق إلى ما يقارب 60 km. +1. **الشمس كثقب أسود.** لو انضغطت شمسنا (x = 1) إلى هذا الحجم لكان نصف قطر أفق حدثها نحو 3 km. +2. **ثقب أسود نجمي نموذجي.** كثير من الثقوب السوداء التي يرصدها الفلكيون تتكون من انهيار نجوم عند x = 10 تقريبًا، ونصف قطر أفقها نحو 30 km. +3. **ثقب أسود نجمي كبير.** عند أعلى المنزلق، x = 20، يقارب نصف قطر الأفق 60 km. ## Test yourself 1. اجعل الكتلة 10 كتل شمسية. -2. جد الكتلة التي يبلغ أفقها نحو 50 km. -3. ادفع الأفق فوق 55 km. +2. جد الكتلة التي يبلغ نصف قطر أفقها نحو 50 km. +3. اجعل نصف قطر الأفق أكبر من 55 km. ## Intuition ارفع المنزلق x، وهو الكتلة بأضعاف كتلة شمسنا، وراقب الخط الأزرق يرتفع والنقطة البرتقالية تصعد معه. تحدد هذه النقطة نصف قطر أفق الحدث: كرة حول الكتلة تكون الجاذبية فيها قوية جدًا بحيث لا يقدر حتى الضوء المتحرك بأقصى سرعته على الإفلات منها. -كتلة أكبر مضغوطة بالطريقة نفسها تعني دائمًا أفقًا أكبر، فمضاعفة x تضاعف تقريبًا حجم الأفق. وما يجعل الثقب الأسود متطرفًا ليس عادة كتلته، بل مدى ضغط هذه الكتلة. تملك الشمس كتلة كافية بالفعل، لكنها ببساطة ليست صغيرة بعد بما يكفي لتملك أفق حدث خاصًا بها. +كتلة أكبر مضغوطة بالطريقة نفسها تعني دائمًا أفقًا أكبر، فمضاعفة x تضاعف تقريبًا حجم الأفق. وما يميّز الثقب الأسود ليس كتلته في العادة، بل شدة انضغاط هذه الكتلة. تملك الشمس كتلة كافية بالفعل، لكنها ببساطة ليست صغيرة بعد بما يكفي لتملك أفق حدث خاصًا بها. ## Formal @@ -38,7 +38,7 @@ parameters: ## Advanced -لا يوجد شيء مادي فعليًا عند نصف القطر $r_s$، فهو حد رياضي، أفق الحدث، لا سطح حقيقي. وتتنبأ النسبية العامة بأن الكتلة نفسها تنهار أكثر، إلى نقطة تشبه الفرادة تتوقف عندها معادلات النظرية عن إعطاء معنى. +لا يوجد شيء مادي فعليًا عند نصف القطر $r_s$، فهو حد رياضي، أفق الحدث، لا سطح حقيقي. وتتنبأ النسبية العامة بأن الكتلة نفسها تنهار أكثر، إلى نقطة واحدة تسمى «المتفرّدة»، وعندها تتوقف معادلات النظرية عن العمل. ## Derivation @@ -49,13 +49,17 @@ parameters: ## Real world ### تلسكوب أفق الحدث، 2019 + جمع الفلكيون تلسكوبات راديوية من أنحاء الكوكب كله ليلتقطوا أول صورة مباشرة لظل ثقب أسود، في مجرة M87، مؤكدين الحجم الذي تنبأت به معادلات أينشتاين. ### الأرض كثقب أسود -لو انضغطت كتلة الأرض كلها في ثقب أسود لبلغ أفق حدثها نحو 9 مليمترات فقط، أصغر من حبة عنب. + +لو انضغطت كتلة الأرض كلها في ثقب أسود لبلغ نصف قطر أفق حدثها نحو 9 مليمترات فقط، أي بحجم حبة عنب تقريبًا. ### انهيار النجوم + حين ينفد وقود نجم ضخم، قد ينهار قلبه انهيارًا تامًا. بعد نقطة معينة لا يقدر شيء، ولا حتى ضوء النجم نفسه، على إيقاف الانضغاط، فيتكون ثقب أسود نجمي. ### القوس A* (Sagittarius A*) + في مركز مجرتنا يقبع ثقب أسود كتلته نحو 4 ملايين شمس، أبعد بكثير من مدى هذا المنزلق. ومع ذلك يبقى أفقه صغيرًا مقارنة بمدارات النجوم الواسعة الدائرة حوله. diff --git a/content/lessons/relativity/black-holes/en.md b/content/lessons/relativity/black-holes/en.md index 35b7efdc..295e8ceb 100644 --- a/content/lessons/relativity/black-holes/en.md +++ b/content/lessons/relativity/black-holes/en.md @@ -9,21 +9,21 @@ parameters: ## Try it -1. Watch the blue line rise as you raise x, the black hole's mass in multiples of our Sun. The orange dot shows the radius, in kilometres, of the event horizon — the point of no return. -2. Set x to 1, one solar mass. The dot lands under 3 km: our Sun would need to shrink to about that size to become a black hole. -3. Push x to 20. The horizon grows past 55 km, roughly the size of a large city. +1. Raise x, the black hole's mass in multiples of our Sun, from 1 to 2. The orange dot climbs the blue line and f(x) doubles from 2.95 to 5.9: it is the radius, in kilometres, of the event horizon — the point of no return. +2. Set x back to 1, one solar mass. f(x) reads 2.95: our Sun would need to shrink to a ball about 3 km in radius to become a black hole. +3. Push x to 20. f(x) reads 59: the horizon's radius is now 59 km, roughly the size of a large city. ## Real-life examples -1. **The Sun as a black hole.** If our Sun (x = 1) were compressed this small, its event horizon would stretch about 3 km across. -2. **A typical stellar black hole.** Many black holes astronomers detect form from collapsed stars around x = 10, with a horizon roughly 30 km across. -3. **A large stellar-mass black hole.** At the top of the slider, x = 20, the horizon has grown to nearly 60 km. +1. **The Sun as a black hole.** If our Sun (x = 1) were compressed this small, its event horizon would have a radius of about 3 km. +2. **A typical stellar black hole.** Many black holes astronomers detect form from collapsed stars around x = 10, with a horizon radius of roughly 30 km. +3. **A large stellar-mass black hole.** At the top of the slider, x = 20, the horizon radius has grown to nearly 60 km. ## Test yourself 1. Set the mass to 10 solar masses. -2. Find the mass whose horizon is about 50 km across. -3. Push the horizon past 55 km. +2. Find the mass whose horizon radius is about 50 km. +3. Push the horizon radius past 55 km. ## Intuition @@ -50,13 +50,17 @@ Nothing physical actually sits at radius $r_s$ — it is a mathematical boundary ## Real world ### The Event Horizon Telescope, 2019 + Astronomers combined radio telescopes across the whole planet to capture the first direct image of a black hole's silhouette, in the galaxy M87, confirming the size Einstein's equations predicted. ### Earth as a black hole -If Earth's entire mass were squeezed into a black hole, its event horizon would be barely 9 millimetres across, smaller than a grape. + +If Earth's entire mass were squeezed into a black hole, its event horizon would have a radius of barely 9 millimetres, about the size of a grape. ### Stellar collapse + When a massive star runs out of fuel, its core can collapse so completely that nothing, not even the star's own light, can stop the crush past a certain point, forming a stellar-mass black hole. ### Sagittarius A* + At the centre of our own galaxy sits a black hole with a mass of about 4 million Suns, far beyond this slider's range, yet its horizon is still tiny compared with the vast orbits of stars swirling around it. diff --git a/content/lessons/relativity/galileo-falling-objects/ar.md b/content/lessons/relativity/galileo-falling-objects/ar.md index 44167574..3e8934bb 100644 --- a/content/lessons/relativity/galileo-falling-objects/ar.md +++ b/content/lessons/relativity/galileo-falling-objects/ar.md @@ -9,13 +9,13 @@ parameters: ## Try it -1. راقب الكرة الزرقاء والريشة تسقطان من الارتفاع h. مع تشغيل الهواء تنزل الريشة ببطء بينما تسقط الكرة بسرعة. -2. اجعل air صفرًا، أي فراغ. الآن تصل الكرة والريشة إلى الأرض في اللحظة نفسها مهما اختلف وزنهما. -3. ارفع h إلى 100 m وأعد air إلى 1. مع طول مسافة السقوط تكبر الفجوة بين الكرة والريشة أكثر. +1. راقب الكرة الزرقاء والريشة تسقطان من الارتفاع h. عند h = 20 m ومع تشغيل الهواء تصل الكرة بعد 2.05 s، أما الريشة فتبقى تنزل ببطء 33.38 s. +2. اجعل air صفرًا، أي فراغ. الآن تصل الكرة والريشة إلى الأرض في اللحظة نفسها، بعد 2.02 s، مهما اختلف وزنهما. +3. ارفع h إلى 100 m وأعد air إلى 1. تصل الكرة بعد 4.81 s والريشة بعد 166.71 s: كلما طالت مسافة السقوط كبر الفرق بينهما أكثر. ## Real-life examples -1. **كرة وريشة على الأرض.** يدفع الهواء الريشة إلى الوراء، فتصل الكرة إلى الأرض قبل الريشة بوقت واضح في سقوط بارتفاع 2 m. +1. **كرة وريشة على الأرض.** يقاوم الهواء سقوط الريشة، فتصل الكرة إلى الأرض قبل الريشة بوقت واضح في سقوط بارتفاع 2 m. 2. **القمر، 1971.** أسقط قائد أبولو 15 مطرقة وريشة صقر من الارتفاع نفسه تقريبًا في سماء القمر الخالية من الهواء. وصلتا التراب في اللحظة نفسها، دليل مباشر على أن الجاذبية لا تفرّق بين الكتل. 3. **سقوط مئة متر عبر الهواء.** خلال 100 m من غلاف الأرض الجوي يملك الهواء وقتًا أطول ليعمل، فتتأخر الريشة كثيرًا عن الكرة. @@ -50,13 +50,17 @@ parameters: ## Real world ### أبولو 15، 1971 + أسقط القائد ديفيد سكوت مطرقة جيولوجية وريشة صقر أمام كاميرات البث المباشر. القمر بلا هواء يبطئ الريشة، فوصلتا الأرض في اللحظة نفسها كما تتنبأ الجاذبية وحدها. ### القفز بالمظلات + يسقط القافز المنبسط في الهواء أبطأ بكثير من القافز الغائص برأسه أولًا. السطح الأكبر يمسك بهواء أكثر، وهو الأثر نفسه الذي يفصل الكرة عن الريشة في هذا الدرس. ### تجارب أنبوب الفراغ + تُسقط فصول الفيزياء عملة معدنية وريشة داخل أنبوب مُفرّغ من الهواء، فيشاهد الطلاب وصولهما معًا، وهي إعادة لتجربة القمر على الأرض. ### لماذا لا يعني الأثقل أسرع + ظن أرسطو أن الأجسام الثقيلة تسقط أسرع، وإسقاط ريشة يبدو موافقًا لذلك. لكن هذا خداع من مقاومة الهواء لا من الجاذبية نفسها، التي تجذب كل كتلة بالقوة نفسها. diff --git a/content/lessons/relativity/galileo-falling-objects/en.md b/content/lessons/relativity/galileo-falling-objects/en.md index ead0853b..d1ead946 100644 --- a/content/lessons/relativity/galileo-falling-objects/en.md +++ b/content/lessons/relativity/galileo-falling-objects/en.md @@ -10,9 +10,9 @@ parameters: ## Try it -1. Watch the blue ball and the feather drop from height h. With air on, the feather drifts down slowly while the ball falls fast. -2. Switch air to 0 — vacuum. Now the ball and the feather land at exactly the same moment, however heavy or light they are. -3. Raise h to 100 m and switch air back to 1. Over the longer fall, the gap between the ball and the feather grows even wider. +1. Watch the blue ball and the feather drop from height h. At h = 20 m with air on, the ball lands after 2.05 s but the feather drifts down for 33.38 s. +2. Switch air to 0 — vacuum. Now the ball and the feather land at exactly the same moment, after 2.02 s, however heavy or light they are. +3. Raise h to 100 m and switch air back to 1. The ball lands after 4.81 s and the feather after 166.71 s: over the longer fall, the gap between them grows even wider. ## Real-life examples @@ -51,13 +51,17 @@ In air, drag grows with the square of speed, so each object settles into its own ## Real world ### Apollo 15, 1971 + Commander David Scott dropped a geological hammer and a falcon feather on live television; with no lunar air to slow the feather, both hit the ground at the same instant, exactly as gravity alone predicts. ### Skydiving + A skydiver spread out flat falls far slower than one diving head-first, because a bigger surface catches more air — the same effect that separates the ball from the feather on this page. ### Vacuum-tube demonstrations + Physics classrooms drop a coin and a feather inside a tube with the air pumped out, so students watch them land together and reproduce the Moon experiment on Earth. ### Why heavier does not mean faster + Aristotle believed heavy objects fall faster, and dropping a feather seems to agree — but that is air resistance fooling us, not gravity itself, which pulls every mass equally hard. diff --git a/content/lessons/relativity/gps-and-time/ar.md b/content/lessons/relativity/gps-and-time/ar.md index e0e1ab30..0a4c48d3 100644 --- a/content/lessons/relativity/gps-and-time/ar.md +++ b/content/lessons/relativity/gps-and-time/ar.md @@ -8,9 +8,9 @@ parameters: ## Try it -1. راقب الخط الأزرق. ينخفض تحت الصفر قرب الأرض ثم يرتفع. تُظهر النقطة البرتقالية كم ميكروثانية تكسبها الساعة أو تخسرها كل يوم عند الارتفاع x. -2. اسحب x نحو 0. تهبط النقطة تحت الصفر، فالساعة هنا تخسر وقتًا مقارنة بساعة بعيدة عن الأرض. -3. ارفع x إلى 20.2، ارتفاع أقمار GPS الحقيقي. تستقر النقطة عند نحو 38+ ميكروثانية في اليوم، فرق صغير لكنه كافٍ ليزيح تحديد الموقع كيلومترات لو تُرك بلا تصحيح. +1. راقب الخط الأزرق. ينخفض تحت الصفر قرب الأرض ثم يرتفع. تُظهر النقطة البرتقالية كم ميكروثانية تكسبها الساعة أو تخسرها كل يوم عند الارتفاع x. عند الارتفاع الابتدائي x = 10 تقرأ نحو +25. +2. اسحب x إلى 0. تهبط f(x) إلى نحو −30: القمر الذي يدور على هذا الارتفاع المنخفض يطير بسرعة كبيرة، فتخسر ساعته 30 ميكروثانية في اليوم مقارنة بساعة على الأرض. +3. ارفع x إلى 20.2، ارتفاع أقمار GPS الحقيقي. تستقر النقطة عند نحو +38 ميكروثانية في اليوم، فرق صغير لكنه كافٍ ليزيح تحديد الموقع كيلومترات لو تُرك بلا تصحيح. ## Real-life examples @@ -26,9 +26,9 @@ parameters: ## Intuition -انظر إلى الخط الأزرق على الرسم. عند x = 0، أي عند سطح الأرض تمامًا، ينخفض الخط تحت المحور الأفقي، ثم يرتفع إلى الجهة الموجبة كلما رفعت x. تحدد النقطة البرتقالية كم ميكروثانية تكسبها أو تخسرها ساعة عند الارتفاع الذي اخترته، مقارنة بساعة بعيدة عن أي كوكب. +انظر إلى الخط الأزرق على الرسم. عند x = 0، أي عند سطح الأرض تمامًا، ينخفض الخط تحت المحور الأفقي، ثم يرتفع إلى الجهة الموجبة كلما رفعت x. تحدد النقطة البرتقالية كم ميكروثانية تكسبها أو تخسرها ساعة عند الارتفاع الذي اخترته، مقارنة بساعة ثابتة على سطح الأرض. -يتنافس هنا أمران. الارتفاع بعيدًا عن كتلة الأرض يعني جاذبية أضعف، والجاذبية الأضعف تجعل الساعة تسير أسرع، وهذا ما يرفع الخط كلما كبرت x. لكن القمر الصناعي هناك يتحرك أيضًا بسرعة كبيرة ليبقى في مداره، والسرعة نفسها تُبطئ الساعة، فتسحب الخط عائدًا نحو الصفر. عند الارتفاع الكافي تفوز الجاذبية، ولهذا ينتهي الخط موجبًا عند ارتفاع GPS. +يتنافس هنا أمران. الارتفاع بعيدًا عن كتلة الأرض يعني جاذبية أضعف، والجاذبية الأضعف تجعل الساعة تسير أسرع، وهذا ما يرفع الخط كلما كبرت x. لكن القمر الصناعي هناك يتحرك أيضًا بسرعة كبيرة ليبقى في مداره، والسرعة نفسها تُبطئ الساعة، فتسحب الخط إلى الأسفل. عند الارتفاع الكافي تفوز الجاذبية، ولهذا ينتهي الخط موجبًا عند ارتفاع GPS. ## Formal @@ -42,20 +42,24 @@ parameters: ## Derivation -1. الساعة الأبعد عن كتلة الأرض تجلس في بئر جاذبية أقل عمقًا فتدق أسرع من ساعة على الأرض، بمقدار $\dfrac{\Delta t_1}{t} = \dfrac{GM}{c^2}\left(\dfrac{1}{r_1}-\dfrac{1}{r_2}\right)$. +1. الساعة الأبعد عن كتلة الأرض تقع حيث الجاذبية أضعف فتدق أسرع من ساعة على الأرض، بمقدار $\dfrac{\Delta t_1}{t} = \dfrac{GM}{c^2}\left(\dfrac{1}{r_1}-\dfrac{1}{r_2}\right)$. 2. الساعة المتحركة بسرعة مدارية $v$ تدق أبطأ من ساعة ثابتة، بمقدار $\dfrac{\Delta t_2}{t} = -\dfrac{v^2}{2c^2}$. 3. جمع الأثرين يعطي الانحراف الصافي المرسوم هنا، $\dfrac{\Delta t}{t} = \dfrac{GM}{c^2}\left(\dfrac{1}{r_1}-\dfrac{1}{r_2}\right) - \dfrac{v^2}{2c^2}$، موجب فوق ارتفاع التقاطع وسالب تحته. ## Real world ### تحديد المواقع عبر GPS + لو تجاهل المهندسون النسبية لانحرفت ساعات GPS نحو 38 ميكروثانية في اليوم. رقم صغير، لكن ضربه في سرعة الضوء يزيح المواقع المحسوبة نحو 10 km كل يوم. ### التصحيح المدمج في كل قمر صناعي + تحمل أقمار GPS ساعات مضبوطة عمدًا لتدق أبطأ قليلًا قبل الإطلاق، حتى إذا سرّعتها النسبية في المدار تطابقت مع ساعات الأرض تمامًا. ### محطة الفضاء الدولية + يدور رواد محطة الفضاء منخفضين وبسرعة تكفي لتغلب سرعتهم على أثر الجاذبية. بعد ستة أشهر في الفضاء يعودون أصغر سنًا ببضع ميلي ثانية مما لو بقوا على الأرض. ### اختبار النسبية العامة على الأرض + صارت الساعات الذرية دقيقة بما يكفي لرصد فرق ارتفاع بضعة سنتيمترات فقط، ما مكّن الفيزيائيين من تأكيد تنبؤ أينشتاين مباشرة في المختبر، لا في المدار فقط. diff --git a/content/lessons/relativity/gps-and-time/en.md b/content/lessons/relativity/gps-and-time/en.md index 94ff2ca6..7f0958a5 100644 --- a/content/lessons/relativity/gps-and-time/en.md +++ b/content/lessons/relativity/gps-and-time/en.md @@ -10,8 +10,8 @@ parameters: ## Try it -1. Watch the blue curve. It dips below zero near the ground, then rises — the orange dot shows how many microseconds a clock gains (or loses) each day at altitude x. -2. Drag x down toward 0. The dot drops below zero: down here a clock actually loses time compared with one far from Earth. +1. Watch the blue curve. It dips below zero near the ground, then rises — the orange dot shows how many microseconds a clock gains (or loses) each day at altitude x. At the starting altitude, x = 10, it reads about +25. +2. Drag x down to 0. f(x) falls to about −30: a satellite skimming this low must fly so fast that its clock loses 30 microseconds a day compared with a clock on the ground. 3. Raise x to 20.2, the real GPS altitude. The dot settles near +38 microseconds a day — tiny, but enough to shift a position fix by kilometres if it went uncorrected. ## Real-life examples @@ -28,9 +28,9 @@ parameters: ## Intuition -Look at the blue curve on the graph: near x = 0, right at Earth's surface, it dips below the horizontal axis, then climbs into positive territory as you slide x higher. The orange dot marks exactly how many microseconds a clock at your chosen altitude gains or loses every day, compared with a clock resting far from any planet. +Look at the blue curve on the graph: near x = 0, right at Earth's surface, it dips below the horizontal axis, then climbs into positive territory as you slide x higher. The orange dot marks exactly how many microseconds a clock at your chosen altitude gains or loses every day, compared with a clock resting on the ground. -Two things are competing here. Being high up, farther from Earth's mass, means weaker gravity, and weaker gravity lets a clock run faster, which pulls the curve upward as x grows. But a satellite up there also moves fast to stay in orbit, and speed itself slows a clock down, pulling the curve back toward zero. High enough, gravity wins — which is why the curve ends up positive at GPS altitude. +Two things are competing here. Being high up, farther from Earth's mass, means weaker gravity, and weaker gravity lets a clock run faster, which pulls the curve upward as x grows. But a satellite up there also moves fast to stay in orbit, and speed itself slows a clock down, pulling the curve back down. High enough, gravity wins — which is why the curve ends up positive at GPS altitude. ## Formal @@ -51,13 +51,17 @@ The crossover altitude, where the two effects exactly cancel, sits at about 3,20 ## Real world ### GPS positioning + If engineers ignored relativity, GPS clocks would drift by about 38 microseconds a day — tiny, until you multiply by the speed of light and find it would shift computed positions by roughly 10 km every single day. ### The correction built into every satellite + GPS satellites carry clocks deliberately tuned to tick slightly slow before launch, so that once relativity speeds them up in orbit, they match ground clocks exactly. ### The International Space Station + Astronauts on the ISS orbit low and fast enough that velocity time dilation wins over the gravitational effect, so after six months in space they come home a few milliseconds younger than if they had stayed on Earth. ### Testing general relativity on the ground + Atomic clocks are now precise enough to detect a difference of just a few centimetres in height, letting physicists confirm Einstein's prediction directly in the lab, not only in orbit. diff --git a/content/lessons/relativity/gps-and-time/lesson.yaml b/content/lessons/relativity/gps-and-time/lesson.yaml index a65f4b14..9fb52629 100644 --- a/content/lessons/relativity/gps-and-time/lesson.yaml +++ b/content/lessons/relativity/gps-and-time/lesson.yaml @@ -30,7 +30,7 @@ parameters: min: 0 max: 40 step: 0.1 - value: 20.2 + value: 10 unit: Mm variables: [] derivation: diff --git a/content/lessons/relativity/gravitational-waves/ar.md b/content/lessons/relativity/gravitational-waves/ar.md index 05a4c9c7..b1417e51 100644 --- a/content/lessons/relativity/gravitational-waves/ar.md +++ b/content/lessons/relativity/gravitational-waves/ar.md @@ -10,9 +10,9 @@ parameters: ## Try it -1. راقب الموجة الزرقاء. قرب x = 0 تتذبذب ببطء وهدوء. اسحب x نحو 1 فتكبر سرعتها وارتفاعها معًا. -2. ارفع f0. تبدأ الموجة بالتذبذب أسرع منذ البداية، كأنها نغمة ابتدائية أعلى. -3. ادفع x قريبًا من 1، لحظة الاندماج. تصبح تأرجحات الموجة عالية وسريعة، وهي «التشيرب» الذي يرصده الفلكيون. +1. انظر إلى الموجة الزرقاء من اليسار إلى اليمين. قرب x = 0 تموجاتها واسعة ومنخفضة، وكلما اقتربنا من x = 1 ضاقت وارتفعت معًا. اسحب x من 0.5 إلى 0.9 لتنتقل النقطة البرتقالية على الموجة إلى هذا الجزء المزدحم. +2. ارفع f0 من 4 إلى 8. يتضاعف عدد التموجات في الصورة نفسها: تبدأ الموجة بالتذبذب أسرع منذ البداية، كأنها نغمة ابتدائية أعلى. +3. ادفع x إلى 0.95، قبيل الاندماج. تقف النقطة الآن حيث تأرجحات الموجة عالية وسريعة. هذه هي «الزقزقة» (chirp) التي يرصدها الفلكيون. ## Real-life examples @@ -24,40 +24,44 @@ parameters: 1. ادفع x قريبًا من الاندماج، إلى 0.95. 2. اجعل التردد الابتدائي f0 عند أقصاه، 10. -3. اجعل غلاف الموجة، أي أعلى ارتفاعها، يتجاوز 1.5. +3. حرّك x إلى حيث يتجاوز غلاف الموجة، أي ارتفاع تأرجحاتها، القيمة 1.5، وهذا يحدث بعد x = 0.86 تقريبًا. ## Intuition -راقب الموجة الزرقاء وأنت تسحب x من 0 نحو 1. قرب البداية تتموج ببطء وتبقى قريبة من الخط الأوسط. كلما اقترب x من 1 تموجت أسرع وكبرت تأرجحاتها، تمامًا كوتر كمان يُشد أكثر فأكثر. +تتبّع الموجة الزرقاء بالنقطة البرتقالية وأنت تسحب x من 0 نحو 1. قرب البداية تتموج ببطء وتبقى قريبة من الخط الأوسط. كلما اقترب x من 1 تموجت أسرع وكبرت تأرجحاتها، تمامًا كوتر كمان يُشد أكثر فأكثر. -يُسمى هذا الصعود في النغمة والصوت معًا تشيرب. يحدث لأن كتلتين تدوران حول بعضهما تفقدان طاقة على شكل موجات جاذبية، فتقتربان أكثر فأكثر. هذا يسرّع مدارهما ويقوّي الموجات التي ترسلانها، حتى لحظة اندماجهما. +يُسمى هذا الصعود في النغمة والصوت معًا زقزقة (chirp)، كصوت عصفور يعلو ويتسارع. يحدث لأن كتلتين تدوران حول بعضهما تفقدان طاقة على شكل موجات جاذبية، فتقتربان أكثر فأكثر. هذا يسرّع مدارهما ويقوّي الموجات التي ترسلانها، حتى لحظة اندماجهما. ## Formal حين تدور كتلتان مقتربتين، يرتفع تردد مدارهما، وبالتالي تردد موجة الجاذبية، وفق $f(t) = f_0\left(1-\dfrac{t}{t_c}\right)^{-3/8}$، حيث $t_c$ لحظة الاندماج و$f_0$ التردد عند بداية الإشارة. -يكبر سعة الموجة، أو إجهادها، مع التردد تقريبًا وفق $h \propto (t_c-t)^{-1/4}$، فتصبح الإشارة أسرع وأعلى صوتًا معًا كلما اقتربت من الاندماج، والكميتان مرسومتان معًا في الخط أعلاه. +تكبر سعة الموجة، ويسميها العلماء الانفعال (strain)، مع التردد تقريبًا وفق $h \propto (t_c-t)^{-1/4}$، فتصبح الإشارة أسرع وأعلى صوتًا معًا كلما اقتربت من الاندماج، والكميتان مرسومتان معًا في الخط أعلاه. ## Advanced -تتباعد كل من $f$ و$h$ رياضيًا إلى ما لا نهاية، $f, h \to \infty$ عند $t \to t_c$. لكن هذا التقريب يصح فقط ما دامت الكتلتان متباعدتين بما يكفي. وحين تقتربان بما يكفي للاندماج فعليًا، تتولى معادلات النسبية العامة الكاملة، المحلولة عدديًا، الأمر. +تكبر كل من $f$ و$h$ رياضيًا بلا حد، $f, h \to \infty$ عند $t \to t_c$. لكن هذا التقريب يصح فقط ما دامت الكتلتان متباعدتين بما يكفي. وحين تقتربان بما يكفي للاندماج فعليًا، تتولى معادلات النسبية العامة الكاملة، المحلولة عدديًا، الأمر. ## Derivation 1. تحمل موجات الجاذبية طاقة بعيدًا عن الزوج الدائر، فتتقلص المسافة بينهما ويرتفع تردد المدار، $f \propto (t_c-t)^{-3/8}$. 2. مع ارتفاع التردد تكبر سعة الموجة أيضًا، $h \propto (t_c-t)^{-1/4}$، فتنتج إشارة أسرع وأعلى صوتًا معًا. -3. تتباعد الكميتان رياضيًا إلى ما لا نهاية، $f, h \to \infty$ عند $t \to t_c$، لحظة الاندماج، وهي «التشيرب» الحاد الصاعد الذي بُنيت الكاشفات لرصده. +3. تكبر الكميتان رياضيًا بلا حد، $f, h \to \infty$ عند $t \to t_c$، لحظة الاندماج، وهي «الزقزقة» الحادة الصاعدة التي بُنيت الكاشفات لرصدها. ## Real world ### مرصد LIGO، 2015 -رصد مرصد موجات الجاذبية بالتداخل الليزري أول اكتشاف مباشر لموجات الجاذبية، تشيرب من اندماج ثقبين أسودين قبل أكثر من مليار سنة، مؤكدًا تنبؤًا عمره مئة عام لأينشتاين. + +سجّل مرصد LIGO أول رصد مباشر لموجات الجاذبية، زقزقة من اندماج ثقبين أسودين قبل أكثر من مليار سنة، مؤكدًا تنبؤًا عمره مئة عام لأينشتاين. ### ذراعان طولهما أربعة كيلومترات + يُطلق LIGO ضوء ليزر عبر نفقين طول كل منهما 4 km. تمدد موجة الجاذبية المارة ذراعًا وتضغط الأخرى بمسافة أصغر من بروتون واحد، ومع ذلك يقدر الجهاز على قياسها. ### الاستماع لا النظر -خلافًا للتلسكوب، يستطيع كاشف موجات الجاذبية أن «يستمع». نحوّل الإشارة مباشرة إلى صوت، فيسمع العلماء تشيرب ثقبين أسودين يقتربان فعليًا. + +خلافًا للتلسكوب، يستطيع كاشف موجات الجاذبية أن «يستمع». نحوّل الإشارة مباشرة إلى صوت، فيسمع العلماء زقزقة ثقبين أسودين يقتربان فعليًا. ### الفلك متعدد الرسل -حين اندمج نجمان نيوترونيان عام 2017، رصد LIGO تشيرب موجة الجاذبية بينما التقطت تلسكوبات حول العالم ضوء الحدث نفسه. درس الفلكيون حدثًا كونيًا واحدًا عبر إشارتين مختلفتين تمامًا في الوقت نفسه. + +حين اندمج نجمان نيوترونيان عام 2017، رصد LIGO زقزقة موجة الجاذبية بينما التقطت تلسكوبات حول العالم ضوء الحدث نفسه. درس الفلكيون حدثًا كونيًا واحدًا عبر إشارتين مختلفتين تمامًا في الوقت نفسه. diff --git a/content/lessons/relativity/gravitational-waves/en.md b/content/lessons/relativity/gravitational-waves/en.md index 16fc90b7..f60cfd12 100644 --- a/content/lessons/relativity/gravitational-waves/en.md +++ b/content/lessons/relativity/gravitational-waves/en.md @@ -10,9 +10,9 @@ parameters: ## Try it -1. Watch the blue wave. Near x = 0 it oscillates slowly and quietly; drag x toward 1 and both its speed and its height grow. -2. Raise f0. The wave starts out oscillating faster right from the beginning, like a higher starting note. -3. Push x close to 1, the moment of merger. The wave's swings become tall and rapid — the "chirp" astronomers listen for. +1. Look at the blue wave from left to right. Near x = 0 its wiggles are wide and low; toward x = 1 they get both tighter and taller. Drag x from 0.5 to 0.9 to slide the orange dot along the wave into that crowded part. +2. Raise f0 from 4 to 8. Twice as many wiggles now fit in the same picture: the wave starts out oscillating faster right from the beginning, like a higher starting note. +3. Push x to 0.95, just before the merger. The dot now sits where the wave's swings are tall and rapid — the "chirp" astronomers listen for. ## Real-life examples @@ -24,11 +24,11 @@ parameters: 1. Push x close to the merger, to 0.95. 2. Set the starting frequency f0 to its maximum, 10. -3. Make the wave's envelope, its height, climb above 1.5. +3. Move x to where the wave's envelope, the height of its swings, is above 1.5 — anywhere past about x = 0.86. ## Intuition -Watch the blue wave as you drag x from 0 toward 1. Near the start it wiggles slowly and stays close to the middle line; the closer x gets to 1, the faster it wiggles and the taller its swings become, like a violin string being squeezed tighter and tighter. +Follow the blue wave with the orange dot as you drag x from 0 toward 1. Near the start it wiggles slowly and stays close to the middle line; the closer x gets to 1, the faster it wiggles and the taller its swings become, like a violin string being squeezed tighter and tighter. That rising pitch and rising loudness together are called a chirp, and they happen because two orbiting masses lose energy as gravitational waves, spiralling closer and closer together, which speeds up their orbit and strengthens the waves they send out, right up until the instant they merge. @@ -51,13 +51,17 @@ Both $f$ and $h$ formally diverge, $f, h \to \infty$ as $t \to t_c$, but this po ## Real world ### LIGO, 2015 + The Laser Interferometer Gravitational-Wave Observatory made the first direct detection of gravitational waves, a chirp from two black holes merging over a billion years ago, confirming a hundred-year-old prediction of Einstein's. ### Arms four kilometres long + LIGO's detectors bounce laser light down two 4 km tunnels; a passing gravitational wave stretches one arm and squeezes the other by a distance smaller than a proton, yet the instrument can still measure it. ### Listening, not looking + Unlike a telescope, a gravitational-wave detector "listens": the signal can be converted directly into sound, and scientists can literally hear the chirp of two black holes spiralling together. ### Multi-messenger astronomy + When two neutron stars merged in 2017, LIGO detected the gravitational-wave chirp while telescopes around the world caught the light from the same event, letting astronomers study one cosmic event through two completely different signals at once. diff --git a/content/lessons/relativity/gravity-as-curved-spacetime/ar.md b/content/lessons/relativity/gravity-as-curved-spacetime/ar.md index 272cb1b0..e90f4325 100644 --- a/content/lessons/relativity/gravity-as-curved-spacetime/ar.md +++ b/content/lessons/relativity/gravity-as-curved-spacetime/ar.md @@ -10,7 +10,7 @@ parameters: ## Try it 1. راقب الخط الأزرق وهو ينخفض قرب المنتصف. هذا عمق الانبعاج الذي يحدثه نجم كتلته M في الغشاء، وتحدد النقطة البرتقالية هذا العمق عند المسافة x التي تختارها. -2. ارفع M. يزداد الانبعاج عمقًا وتهبط النقطة البرتقالية أكثر، تمامًا كما تغوص كرة بولينغ أثقل في نطّاطة مشدودة. +2. أبقِ x = 5 وارفع M من 5 إلى 10. يزداد الانبعاج عمقًا وتهبط f(x) من −0.98 إلى −1.96، تمامًا كما تغوص كرة بولينغ أثقل في نطّاطة مشدودة. 3. انتقل إلى العرض ثلاثي الأبعاد واسحب x إلى الخارج. يتّسع مدار الكوكب ويدور أبطأ، وهي العلاقة نفسها التي يُظهرها الرسم ثنائي الأبعاد. ## Real-life examples @@ -33,13 +33,13 @@ parameters: ## Formal -يمكن كتابة جاذبية نيوتن بوصفها طاقة كامنة لكل وحدة كتلة، $\Phi(r) = -\dfrac{GM}{r}$، حيث $r$ المسافة من المركز و$G$ ثابت الجاذبية. وكلما صغرت قيمة $\Phi$ (أي صارت أكثر سلبية) كان الانبعاج في الغشاء أعمق. +يمكن كتابة جاذبية نيوتن بوصفها طاقة كامنة لكل وحدة كتلة، $\Phi(r) = -\dfrac{GM}{r}$، حيث $r$ المسافة من المركز و$G$ ثابت الجاذبية. وكلما صغرت قيمة $\Phi$ (أي نزلت أبعد تحت الصفر) كان الانبعاج في الغشاء أعمق. -الخط المرسوم، $y = -M/\sqrt{x^2+0.9}$، يقوم مقام $\Phi(r)$. فهو يستخدم مقامًا ملطَّفًا يبقي الانبعاج منتهيًا عند $x = 0$ بدل أن يقفز إلى ما لا نهاية، وهذا يجعل الرسم ممكنًا دون أن يفقد شكل الخط الحقيقي. +الخط المرسوم، $y = -M/\sqrt{x^2+0.9}$، يقوم مقام $\Phi(r)$. فهو يستخدم مقامًا معدَّلًا قليلًا يبقي الانبعاج منتهيًا عند $x = 0$ بدل أن يقفز إلى ما لا نهاية، وهذا يجعل الرسم ممكنًا دون أن يفقد شكل الخط الحقيقي. ## Advanced -في النسبية العامة الكاملة ينهار تشبيه الغشاء. الزمكان الحقيقي رباعي الأبعاد، منحنٍ في الفضاء والزمن معًا، وانحناء الزمن، لا انبعاج الفضاء المرسوم هنا، هو ما يحدد أساسًا كم تشعر الأجسام البطيئة بقوة الجاذبية. +في النسبية العامة الكاملة لا يعود تشبيه الغشاء كافيًا. الزمكان الحقيقي رباعي الأبعاد، منحنٍ في الفضاء والزمن معًا، وانحناء الزمن، لا انبعاج الفضاء المرسوم هنا، هو ما يحدد أساسًا كم تشعر الأجسام البطيئة بقوة الجاذبية. ## Derivation @@ -50,13 +50,17 @@ parameters: ## Real world ### المدارات كتدحرج لا كجذب + تبقى الكواكب في مداراتها كما تدور كرة زجاجية داخل وعاء. تعوّج الجاذبية الفضاء الذي تتحرك فيه الكواكب، ولا تمد يدها لتسحبها. ### عدسات الجاذبية -يتبع الضوء المار قرب نجم ضخم انحناء الفضاء حوله، وينحني مساره بما يكفي ليرى الفلكيون مجرات مختبئة خلف مجرات أخرى تمامًا. + +يتبع الضوء المار قرب مجرة ضخمة انحناء الفضاء حوله، وينحني مساره بما يكفي ليرى الفلكيون مجرات مختبئة خلف مجرات أخرى تمامًا. ### أقمار تحديد المواقع (GPS) + لأن عمق الانبعاج يتغير مع الارتفاع، تدق ساعات الأقمار الصناعية بمعدل مختلف اختلافًا طفيفًا عن ساعات الأرض، وهو أثر يصححه المهندسون كل يوم. ### حدود تشبيه الغشاء + يُظهر تشبيه الغشاء المطاطي انحناء الفضاء فقط، وكأن الجاذبية تسحب الغشاء «إلى الأسفل». لكن الزمكان الحقيقي لا يملك بُعدًا إضافيًا كهذا. وجزء كبير من أثر الجاذبية يأتي من انحناء الزمن نفسه، وهو ما لا يقدر الغشاء على إظهاره إطلاقًا. diff --git a/content/lessons/relativity/gravity-as-curved-spacetime/en.md b/content/lessons/relativity/gravity-as-curved-spacetime/en.md index 76a1e6e2..294420d0 100644 --- a/content/lessons/relativity/gravity-as-curved-spacetime/en.md +++ b/content/lessons/relativity/gravity-as-curved-spacetime/en.md @@ -11,7 +11,7 @@ parameters: ## Try it 1. Watch the blue curve dip downward near the middle — it is the depth of the dent a star of mass M makes in the sheet, and the orange dot marks that depth at your chosen distance x. -2. Raise M. The dip deepens and the orange dot drops further down, the way a heavier bowling ball sinks deeper into a trampoline. +2. Keep x = 5 and raise M from 5 to 10. The dip deepens and f(x) drops from −0.98 to −1.96, the way a heavier bowling ball sinks deeper into a trampoline. 3. Switch to the 3D view and drag x outward. The planet's orbit widens and it circles more slowly, the same relationship the 2D curve is showing you. ## Real-life examples @@ -51,13 +51,17 @@ In full general relativity the sheet analogy breaks down: real spacetime is four ## Real world ### Orbits as rolling, not pulling + Planets stay in orbit the same way a marble circles the inside of a bowl — gravity curves the space they move through rather than reaching out and tugging on them. ### Gravitational lensing -Light passing near a massive star follows the curved space around it, bending its path enough that astronomers can see galaxies hidden directly behind other galaxies. + +Light passing near a massive galaxy follows the curved space around it, bending its path enough that astronomers can see galaxies hidden directly behind other galaxies. ### GPS satellites + Because the depth of the dip changes with height, satellite clocks tick at a very slightly different rate from clocks on the ground, an effect engineers must correct for every day. ### The limits of the rubber sheet + The rubber-sheet picture only shows space bending, drawn as if gravity pulled the sheet "downward" — but real spacetime has no such extra direction, and much of gravity's effect actually comes from the curving of time, which the sheet cannot show at all. diff --git a/content/lessons/relativity/length-contraction/ar.md b/content/lessons/relativity/length-contraction/ar.md index 6b143b40..dd2ea19c 100644 --- a/content/lessons/relativity/length-contraction/ar.md +++ b/content/lessons/relativity/length-contraction/ar.md @@ -10,14 +10,14 @@ parameters: ## Try it 1. انظر إلى القضيبين المرسومين فوق بعضهما. الخط الشاحب هو طول القضيب عند السكون L0، والقضيب المصمت هو الطول L الذي يقيسه راصد على الرصيف فعليًا وهو يمرّ بسرعة v. -2. ارفع v من 0.6 نحو 0.9. راقب القضيب المصمت يتقلّص بوضوح داخل الخط الشاحب، رغم أن L0 لم يتغيّر أبدًا. -3. ادفع v إلى 0.99. يتقلّص القضيب المصمت إلى جزء صغير من L0. عند هذه السرعة يُقاس قضيب طوله 5 أمتار بالكاد 0.7 متر على الرصيف. +2. ارفع v من 0.6 إلى 0.9. يتقلّص القضيب المصمت من L = 8 m إلى L = 4.36 m، أما الخط الشاحب فيبقى عند L0 = 10 m. +3. ادفع v إلى 0.99. تقرأ γ القيمة 7.089 ويتقلّص القضيب المصمت إلى L = 1.41 m. عند هذه السرعة يقيس الرصيف القضيب ذا الأمتار العشرة بنحو سُبع طوله فقط. ## Real-life examples 1. **شاحنة توصيل طولها 10 أمتار عند v = 0.6.** γ = 1.25، فيقيسها الرصيف بطول L0/γ = 8 أمتار، أقصر بمترين كاملين مما يقيسه السائق نفسه. -2. **عربة قطار طولها 20 مترًا عند v = 0.9.** γ = 2.29، فيراها الرصيف قد تقلّصت إلى أقل من 8.7 أمتار، أي أقل من نصف طولها عند السكون، رغم أن كل راكب بداخلها لا يزال يقيس العربة بطولها الكامل 20 مترًا. -3. **قضيب طوله 5 أمتار عند v = 0.99**، قرب نهاية المنزلق. γ = 7.09، فيتقلّص الطول المقيس على الرصيف إلى نحو 0.7 متر، أقصر من عرض سيارة عادية لو كان القضيب بحجمها. +2. **عربة قطار طولها 20 مترًا عند v = 0.9.** γ = 2.29، فيراها الرصيف قد تقلّصت إلى نحو 8.7 أمتار، أي أقل من نصف طولها عند السكون، رغم أن كل راكب بداخلها لا يزال يقيس العربة بطولها الكامل 20 مترًا. +3. **قضيب طوله 5 أمتار عند v = 0.99**، قرب نهاية المنزلق. γ = 7.09، فيتقلّص الطول المقيس على الرصيف إلى نحو 0.7 متر، أقصر من عرض سيارة عادية. ## Test yourself @@ -50,13 +50,17 @@ parameters: ## Real world ### ميونات الأشعة الكونية، من منظور الميون نفسه + راصد يركب مع ميون سريع لا يرى عمره الزمني قد تمدّد إطلاقًا. بل يرى، من منظوره هو، أن سُمك الغلاف الجوي الذي يجب أن يعبره قد انكمش. وهذا بالضبط سبب وصول الميون إلى الأرض. تمدّد الزمن وانكماش الطول فيزياء واحدة، موصوفة من مقعدين مختلفين. ### مسرّعات الجسيمات -حزمة بروتونات نسبوية في CERN، تتحرك بسرعة v > 0.999999c، تقيسها أجهزة المختبر قرصًا مسطحًا بشكل مذهل على طول اتجاه حركتها، رغم أن كل بروتون بداخلها كرة عادية في إطاره الخاص. + +حزمة بروتونات نسبوية في CERN، تتحرك بسرعة v > 0.999999c، تقيسها أجهزة المختبر قرصًا رقيقًا جدًا مضغوطًا في اتجاه حركتها، رغم أن كل بروتون بداخلها كرة عادية في إطاره الخاص. ### لماذا لن تلاحظه أبدًا في حياتك اليومية + سيارة على طريق سريع تتحرك بسرعة 30 م/ث لديها v/c يساوي نحو جزء من عشرة ملايين، فانكماش طولها أصغر من عرض ذرّة واحدة. أثر حقيقي، لكن يستحيل قياسه بأي مسطرة عادية. ### المجالان الكهربائي والمغناطيسي + انكماش المجال الكهربائي حول شحنة متحركة سريعًا جزء من سبب أن سلكًا يحمل تيارًا، وهو متعادل كهربائيًا في المختبر، يُنشئ قوة مغناطيسية حقيقية على شحنة متحركة قريبة منه. أثر نسبوي بحت مختبئ داخل الكهرومغناطيسية العادية. diff --git a/content/lessons/relativity/length-contraction/en.md b/content/lessons/relativity/length-contraction/en.md index 9a28f0f1..097a82b7 100644 --- a/content/lessons/relativity/length-contraction/en.md +++ b/content/lessons/relativity/length-contraction/en.md @@ -13,14 +13,14 @@ parameters: ## Try it 1. Look at the two rods stacked on screen: the pale outline is the rod's rest length L0, the solid bar is the length L a platform observer actually measures as it flies past at speed v. -2. Raise v from 0.6 toward 0.9. Watch the solid bar visibly shrink inside the pale outline, even though L0 never changed. -3. Push v to 0.99. The solid bar collapses to a small fraction of L0 — at this speed, a 5 m rod measures barely 0.7 m long to the platform. +2. Raise v from 0.6 to 0.9. The solid bar shrinks from L = 8 m to L = 4.36 m, while the pale outline stays at L0 = 10 m. +3. Push v to 0.99. γ reads 7.089 and the solid bar collapses to L = 1.41 m — at this speed, the 10 m rod measures barely a seventh of its rest length to the platform. ## Real-life examples 1. **A 10 m delivery van at v = 0.6.** γ = 1.25, so the platform measures it at L0/γ = 8 m long — two full metres shorter than the driver would ever measure it. -2. **A 20 m train carriage at v = 0.9.** γ = 2.29, so the platform sees it shrunk to under 8.7 m, less than half its rest length, though every passenger inside still measures the carriage at the full 20 m. -3. **A 5 m rod at v = 0.99**, close to the edge of the slider. γ = 7.09, and the platform's measured length collapses to about 0.7 m — shorter than the rod's own width would be if it were a car. +2. **A 20 m train carriage at v = 0.9.** γ = 2.29, so the platform sees it shrunk to about 8.7 m, less than half its rest length, though every passenger inside still measures the carriage at the full 20 m. +3. **A 5 m rod at v = 0.99**, close to the edge of the slider. γ = 7.09, and the platform's measured length collapses to about 0.7 m — shorter than a car is wide. ## Test yourself @@ -53,13 +53,17 @@ Length contraction only ever applies along the direction of motion — a rod's w ## Real world ### Cosmic-ray muons again, seen from the muon's side + An observer riding along with a fast muon does not see its lifetime stretched at all — instead, from the muon's own point of view, the thickness of Earth's atmosphere it has to cross is length-contracted, which is exactly why the muon still reaches the ground: time dilation and length contraction are the same physics, described from two different seats. ### Particle accelerators + A relativistic proton bunch at CERN, moving at v > 0.999999c, is measured by lab instruments as a startlingly thin, pancake-flattened disc along its direction of travel, even though every proton inside it is an ordinary sphere in its own rest frame. ### Why you would never notice it in daily life + A car on a motorway moving at 30 m/s has v/c of about one ten-millionth, so its length contraction is smaller than the width of an atom — real, but utterly unmeasurable with any everyday ruler. ### Electric and magnetic fields + Length contraction of the electric field around a fast-moving charge is part of why a current-carrying wire, which is electrically neutral in the lab, creates a genuine magnetic force on a moving charge nearby — a purely relativistic effect hiding inside ordinary electromagnetism. diff --git a/content/lessons/relativity/mass-energy-equivalence/ar.md b/content/lessons/relativity/mass-energy-equivalence/ar.md index db0add04..6527b659 100644 --- a/content/lessons/relativity/mass-energy-equivalence/ar.md +++ b/content/lessons/relativity/mass-energy-equivalence/ar.md @@ -1,7 +1,7 @@ --- title: كم طاقة تختبئ في غرام من الكتلة summary: >- - غرام واحد من الكتلة، لو تحوّل كله إلى طاقة، يشغّل بلدة صغيرة يومًا كاملًا. + غرام واحد من الكتلة، لو تحوّل كله إلى طاقة، يكفي مدينة من مليون نسمة يومًا كاملًا. parameters: x: الكتلة المحوَّلة x (g) --- @@ -9,7 +9,7 @@ parameters: ## Try it 1. راقب الخط الأزرق يرتفع كلما رفعت x، الكتلة المحوَّلة بالغرامات. تُظهر النقطة البرتقالية الطاقة المنطلقة بملايين الكيلوواط ساعة. -2. اجعل x غرامًا واحدًا. تستقر النقطة عند 25. غرام واحد من الكتلة، إذا تحوّل كاملًا، يطلق 25 مليون kWh، أكثر مما تستهلكه مدينة صغيرة في يوم. +2. اجعل x غرامًا واحدًا. تستقر النقطة عند 25. غرام واحد من الكتلة، إذا تحوّل كاملًا، يطلق 25 مليون kWh، نحو ما تستهلكه مدينة من مليون نسمة في يوم. 3. ادفع x إلى 10 غرامات. تصعد النقطة إلى 250 مليون kWh، طاقة هائلة من كتلة تحملها في ملعقة. ## Real-life examples @@ -49,13 +49,17 @@ parameters: ## Real world ### الشمس -كل ثانية تحوّل الشمس نحو 4 ملايين طن من كتلتها إلى الطاقة التي تصل الأرض ضوءًا. تحويل بهذا الحجم يحتاج خط هذا الرسم أن يمتد أبعد من مدى منزلقه بكثير ليُظهره. + +كل ثانية تحوّل الشمس نحو 4 ملايين طن من كتلتها إلى الطاقة التي تشعّها ضوءًا. تحويل بهذا الحجم يحتاج خط هذا الرسم أن يمتد أبعد من مدى منزلقه بكثير ليُظهره. ### محطات الطاقة النووية + يولّد المفاعل النووي كميات هائلة من الكهرباء من كمية صغيرة نسبيًا من الوقود، لأن انشطار أنوية اليورانيوم يحوّل جزءًا يمكن قياسه من كتلتها مباشرة إلى طاقة. ### فيزياء الجسيمات + حين يلتقي جسيم مع مضاده تتحوّل كتلتاهما بالكامل إلى طاقة في وميض واحد، أنظف مثال واقعي على $E = mc^2$ في العمل. ### لماذا لا يضاهي الوقود الكيميائي -حرق غرام من البنزين يطلق نحو 0.00005 مليون kWh فقط، أقل بنحو نصف مليون مرة من تحويل كتلة الغرام نفسه مباشرة، لأن التفاعلات الكيميائية بالكاد تمسّ الكتلة. + +حرق غرام من البنزين يطلق نحو 0.013 kWh فقط، أقل بنحو ملياري مرة من تحويل كتلة الغرام نفسه مباشرة، لأن التفاعلات الكيميائية بالكاد تمسّ الكتلة. diff --git a/content/lessons/relativity/mass-energy-equivalence/en.md b/content/lessons/relativity/mass-energy-equivalence/en.md index d05216c4..6d5a3b1f 100644 --- a/content/lessons/relativity/mass-energy-equivalence/en.md +++ b/content/lessons/relativity/mass-energy-equivalence/en.md @@ -2,7 +2,8 @@ title: How much energy hides in a gram of mass summary: >- A tiny amount of mass, fully converted, releases an enormous amount of - energy — enough from one gram to power a small town for a day. + energy — enough from one gram to power a city of a million people for a + day. parameters: x: mass converted x (g) --- @@ -10,7 +11,7 @@ parameters: ## Try it 1. Watch the blue line rise as you raise x, the mass converted, in grams. The orange dot shows the energy released, in millions of kilowatt-hours. -2. Set x to 1 gram. The dot lands at 25: one gram of mass, fully converted, releases 25 million kWh, more than a small city uses in a day. +2. Set x to 1 gram. The dot lands at 25: one gram of mass, fully converted, releases 25 million kWh, about what a city of a million people uses in a day. 3. Push x to 10 grams. The dot climbs to 250 million kWh, a huge amount of energy from a mass you could hold on a spoon. ## Real-life examples @@ -50,13 +51,17 @@ Almost no everyday process converts mass to energy directly; chemical reactions ## Real world ### The Sun -Every second, the Sun converts about 4 million tonnes of its own mass into the energy that reaches Earth as sunlight, a conversion this graph's line would need to stretch far beyond its slider to show. + +Every second, the Sun converts about 4 million tonnes of its own mass into the energy it shines out as sunlight, a conversion this graph's line would need to stretch far beyond its slider to show. ### Nuclear power plants + A nuclear reactor generates enormous amounts of electricity from a relatively small amount of fuel, because splitting uranium nuclei converts a measurable sliver of their mass directly into energy. ### Particle physics + When particles and their antiparticles meet, their entire mass converts to energy in one burst, the cleanest real-world example of $E = mc^2$ in action. ### Why chemical fuels can't compete -Burning a gram of gasoline releases only about 0.00005 million kWh, roughly half a million times less than converting that same gram's mass directly, because chemical reactions barely touch the mass at all. + +Burning a gram of gasoline releases only about 0.013 kWh, roughly two billion times less than converting that same gram's mass directly, because chemical reactions barely touch the mass at all. diff --git a/content/lessons/relativity/special-relativity-time-dilation/ar.md b/content/lessons/relativity/special-relativity-time-dilation/ar.md index 90aa50dc..40853d72 100644 --- a/content/lessons/relativity/special-relativity-time-dilation/ar.md +++ b/content/lessons/relativity/special-relativity-time-dilation/ar.md @@ -9,12 +9,12 @@ parameters: ## Try it 1. اترك v/c عند 0.5 وراقب الساعتين: كلا الفوتونين يطير بالسرعة نفسها، لكن فوتون السفينة مضطر لمطاردة مرآتيه المنزلقتين على مسار قطري، فيتخلف عدّاد دقاته عن عدّادك منذ الآن. -2. اسحب السفينة (أو المنزلق x) إلى 0.9: يتمدد القطر، وتتجاوز gamma 2.3، وترى ساعة السفينة تدق أقل من نصف دقاتك وضوحًا. +2. اسحب السفينة (أو المنزلق x) إلى 0.9: يتمدد القطر، وتبلغ gamma نحو 2.29، وترى بوضوح أن ساعة السفينة تدق أقل من نصف دقاتك. 3. ادفع x إلى 0.99 بالكامل وانظر إلى المثلث في الأسفل: صار القطر سبعة أمثال المسافة بين المرآتين — الهندسة وحدها تجبر ساعة السفينة على دقة واحدة مقابل سبع من دقاتك. ## Real-life examples -1. **أسرع مركبة صنعها الإنسان.** عند نحو 0.00064c يكون تمدد الزمن صغيرًا جدًا بحيث لا يُلاحظ. تقترب gamma من 1 تمامًا. +1. **أسرع مركبة صنعها الإنسان.** عند نحو 0.00064c يكون تمدد الزمن صغيرًا جدًا بحيث لا يُلاحظ. تكاد gamma تساوي 1 تمامًا. 2. **حزمة جسيمات في مُسرّع.** عند نصف سرعة الضوء تصل gamma بالفعل إلى نحو 1.15، أثر حقيقي يقيسه الفيزيائيون كل يوم. 3. **ميونات الأشعة الكونية الواصلة إلى الأرض.** تتولد في الغلاف الجوي العلوي بسرعة نحو 0.98c، ويطيل تمدد الزمن عمرها في نظرنا بما يكفي ليصل كثير منها إلى سطح الأرض. @@ -49,13 +49,17 @@ parameters: ## Real world ### ميونات الأشعة الكونية -تتحلل الميونات المتولدة في الغلاف الجوي العلوي خلال أجزاء من مليون من الثانية، وهذا أبطأ من أن يصلها الوقت لبلوغ الأرض في الحالة العادية. لكن عند 0.98c يمدّد تمدد الزمن عمرها بما يكفي ليصل عدد هائل منها إلى الكاشفات عند سطح البحر. + +تتحلل الميونات المتولدة في الغلاف الجوي العلوي خلال أجزاء من مليون من الثانية، وهذا زمن أقصر من أن يكفيها لبلوغ الأرض لولا تمدد الزمن. لكن عند 0.98c يمدّد تمدد الزمن عمرها بما يكفي ليصل عدد هائل منها إلى الكاشفات عند سطح البحر. ### أقمار GPS + سرعتها المدارية جزء ضئيل من سرعة الضوء، لكنها كافية لتجبر المهندسين على إدراج تمدد الزمن النسبوي الخاص في كل حساب لموقعها، إلى جانب أثر الجاذبية المعاكس. ### مسرّعات الجسيمات + تصل الحزم في منشآت مثل CERN إلى سرعات تتجاوز فيها gamma الألف، فيشاهد الفيزيائيون جسيمات غير مستقرة تعيش آلاف المرات أطول مما لو كانت ساكنة. ### لماذا يكبر رواد الفضاء أبطأ بقليل + يتحرك رواد محطة الفضاء الدولية بسرعة كافية بحيث يعودون، بعد أشهر في المدار، أصغر سنًا ببضع ميلي ثانية ممن بقوا على الأرض. هذا مثال حقيقي مقيس لهذا الأثر. diff --git a/content/lessons/relativity/special-relativity-time-dilation/en.md b/content/lessons/relativity/special-relativity-time-dilation/en.md index 9c39e40f..fce5c732 100644 --- a/content/lessons/relativity/special-relativity-time-dilation/en.md +++ b/content/lessons/relativity/special-relativity-time-dilation/en.md @@ -11,7 +11,7 @@ parameters: ## Try it 1. Leave v/c at 0.5 and watch the two clocks: both photons fly at the same speed, but the ship's photon must chase its sliding mirrors along a diagonal, and its tick counter already falls behind yours. -2. Drag the ship (or the slider x) up to 0.9: the diagonal stretches, gamma passes 2.3, and the ship's clock visibly ticks less than half as often as yours. +2. Drag the ship (or the slider x) up to 0.9: the diagonal stretches, gamma reaches about 2.29, and the ship's clock visibly ticks less than half as often as yours. 3. Push x all the way to 0.99 and look at the triangle below: the diagonal is now seven times the mirror gap — the geometry alone forces the ship's clock to tick once for your seven. ## Real-life examples @@ -51,13 +51,17 @@ As $v \to c$, $\gamma \to \infty$, which is one reason nothing with mass can eve ## Real world ### Muons from cosmic rays + Muons created in the upper atmosphere decay in millionths of a second, far too fast to reach the ground at everyday speeds — but at 0.98c, time dilation stretches their lifetime enough that huge numbers of them reach detectors at sea level. ### GPS satellites + Though their orbital speed is a tiny fraction of light speed, GPS satellites move fast enough that engineers must include special-relativistic time dilation, alongside the opposite gravitational effect, in every position calculation. ### Particle accelerators + Beams at facilities like CERN reach speeds where gamma exceeds a thousand, letting physicists watch unstable particles survive thousands of times longer than they would at rest. ### Why astronauts age very slightly slower + Astronauts on the International Space Station move fast enough that, after months in orbit, they return a few milliseconds younger than people who stayed on Earth — a real, measured example of this effect. diff --git a/content/lessons/relativity/the-equivalence-principle/ar.md b/content/lessons/relativity/the-equivalence-principle/ar.md index a02ca154..3de67f24 100644 --- a/content/lessons/relativity/the-equivalence-principle/ar.md +++ b/content/lessons/relativity/the-equivalence-principle/ar.md @@ -9,27 +9,27 @@ parameters: ## Try it -1. راقب الكرة، المرمية جانبيًا بسرعة u، وهي تسقط داخل المصعد المتسارع. عند a = 9.81 م/ث²، جاذبية الأرض نفسها، تنحني نحو الأسفل وتصطدم بالأرضية قبل أن تبلغ الجدار البعيد، على مسافة 2.4 متر. -2. اخفض a إلى 1.62 م/ث²، جاذبية القمر. الرمية نفسها تنخفض بالكاد قبل أن تبلغ الجدار البعيد. جاذبية أضعف تُحني المسار أقل بكثير. -3. انظر إلى المنحنى الصغير الآخر المرسوم لشعاع الضوء العابر للحجرة نفسها. ينحني بالفيزياء نفسها، لكن بمقدار تُظهره القراءة كجزء من عرض بروتون، حقيقي لكن أصغر بكثير من أن يُرسم بمقياس واحد. +1. راقب الكرة، المرمية جانبيًا بسرعة u، وهي تسقط داخل المصعد المتسارع. عند a = 9.81 م/ث²، جاذبية الأرض نفسها، تنحني نحو الأسفل وتصطدم بالأرضية بعد 1.53 متر، قبل أن تبلغ الجدار البعيد الذي يبعد 2.4 متر. +2. اخفض a إلى 1.6 م/ث²، وهي قريبة من جاذبية القمر. تتغيّر القراءة إلى «تعبر الحجرة»: الرمية نفسها تبلغ الآن الجدار البعيد بعد أن تنخفض نحو 0.74 متر فقط. جاذبية أضعف تُحني المسار أقل بكثير. +3. أعد a إلى 9.8 م/ث² وانظر إلى المنحنى الصغير الآخر المرسوم لشعاع الضوء العابر للحجرة نفسها. ينحني للسبب نفسه، لكن قراءة «سقوط الضوء» تُظهر كم هو صغير: 3.14e-16 m، أي جزء من عرض بروتون. انحناء حقيقي، لكنه أصغر بكثير من أن يُرسم بمقياسه الحقيقي. ## Real-life examples -1. **مصعد يتسارع بالضبط 9.81 م/ث².** كرة تُرمى بسرعة 2.5 م/ث تسقط على الأرضية بعد أن تقطع نحو 1.75 مترًا فقط من الحجرة البالغ عرضها 2.4 متر. لا يمكن تمييزها عن رمي كرة في غرفة عادية على الأرض. +1. **مصعد يتسارع بالضبط 9.81 م/ث².** كرة تُرمى بسرعة 2.5 م/ث تسقط على الأرضية بعد أن تقطع نحو 1.53 متر فقط من الحجرة البالغ عرضها 2.4 متر. لا يمكن تمييزها عن رمي كرة في غرفة عادية على الأرض. 2. **مصعد يتسارع بمقدار 1.62 م/ث²**، جاذبية سطح القمر نفسها. الرمية نفسها بسرعة 2.5 م/ث تنخفض بالكاد 0.75 متر خلال العبور الكامل، القوس الهادئ نفسه الذي ترسمه رمية رائد فضاء واقف على القمر. -3. **تسارع قوي 20 م/ث² مع رمية بطيئة 1 م/ث.** تسقط الكرة على الأرضية بعد أن تتحرك جانبيًا نحو 0.5 متر فقط. سقوط حادّ وسريع بشكل درامي، كرمي كرة على كوكب جاذبيته ضعف جاذبية الأرض. +3. **تسارع قوي 20 م/ث² مع رمية بطيئة 1 م/ث.** تسقط الكرة على الأرضية بعد أن تتحرك جانبيًا نحو 0.43 متر فقط. سقوط حادّ وسريع جدًا، كرمي كرة على كوكب جاذبيته ضعف جاذبية الأرض. ## Test yourself -1. اضبط a على جاذبية الأرض نفسها، 9.81 م/ث². -2. اضبط a على جاذبية القمر، 1.62 م/ث². +1. اضبط a على جاذبية المريخ، 3.7 م/ث². +2. اضبط a على جاذبية القمر تقريبًا، 1.6 م/ث². 3. ادفع سرعة رمي الكرة u إلى أقصاها، 5 م/ث. ## Intuition تخيّل نفسك تطفو داخل مصعد بلا نوافذ، بعيدًا عن أي كوكب، بينما صاروخ تحته يسرّعه للأعلى عبر الفضاء الفارغ. ارمِ كرة جانبيًا، ومن داخل المصعد، ستنحني نحو الأسفل وتهبط على الأرضية. ليس هذا لأن شيئًا جذبها للأسفل، بل لأن الأرضية نفسها استمرت في التسارع للأعلى لتلتقي بها. لا توجد تجربة يمكنك إجراؤها داخل ذلك المصعد المغلق تميّز هذه القصة عن مجرد الوقوف ساكنًا في مجال جاذبية بالشدّة نفسها. هذا هو مبدأ التكافؤ عند أينشتاين. -ولأن مسار الكرة يعتمد فقط على المدة التي تقضيها في الهواء، ينطبق المنحنى نفسه بالضبط على شعاع ضوء يعبر الحجرة نفسها. يسقط الضوء أيضًا أثناء عبوره، متّبعًا $y = \tfrac{1}{2}at^2$ تمامًا كالكرة. الفرق الوحيد هو الزمن. يعبر الضوء في أجزاء من مليار من الثانية بدلًا من جزء من ثانية للكرة، فيكون سقوطه أصغر بمليارات المرات، أصغر بكثير من أن يُرى، لكنه حقيقي تمامًا. +ولأن مسار الكرة يعتمد فقط على المدة التي تقضيها في الهواء، ينطبق المنحنى نفسه بالضبط على شعاع ضوء يعبر الحجرة نفسها. يسقط الضوء أيضًا أثناء عبوره، متّبعًا $y = \tfrac{1}{2}at^2$ تمامًا كالكرة. الفرق الوحيد هو الزمن. يعبر الضوء في أجزاء من مليار من الثانية بدلًا من جزء من ثانية للكرة، فيكون سقوطه أصغر بملايين المليارات من المرات، أصغر بكثير من أن يُرى، لكنه حقيقي تمامًا. ## Formal @@ -50,13 +50,17 @@ parameters: ## Real world ### بعثة كسوف الشمس عام 1919 + صوّر آرثر إدنغتون نجومًا قرب حافة الشمس أثناء كسوف كلّي، فوجد أن ضوءها انحنى بزاوية تقارب تمامًا ما تنبّأت به نظرية أينشتاين المبنية على مبدأ التكافؤ. أول تأكيد مباشر على أن الجاذبية تحني الضوء فعلًا، لا المادة وحدها. -### التعديس الثقالي -تحني عناقيد المجرّات الضخمة ضوء مجرّات أبعد منها بكثير، لدرجة تشويه صورها بل ومضاعفتها أحيانًا. نسخة كبيرة الحجم وواضحة درامية للانحناء نفسه الذي يعرضه هذا المصعد بمقياس أصغر من أن يُرى. +### عدسات الجاذبية + +تحني عناقيد المجرّات الضخمة ضوء مجرّات أبعد منها بكثير، لدرجة تشويه صورها بل ومضاعفتها أحيانًا. نسخة كبيرة وواضحة جدًا من الانحناء نفسه الذي يعرضه هذا المصعد بمقياس أصغر من أن يُرى. ### لماذا يشعر روّاد الفضاء «بانعدام الوزن» في المدار + روّاد الفضاء المدارون حول الأرض في سقوط حرّ طوال الوقت، يتسارعون باستمرار نحو الكوكب. مبدأ التكافؤ يفسّر لماذا يشعرون بذلك تمامًا كالطفو في فضاء خالٍ من الجاذبية لا كالسقوط، لأن مصعدًا في سقوط حرّ ومصعدًا خاليًا من الجاذبية لا يمكن تمييزهما محليًا. ### إطلاق الصواريخ + يشعر روّاد الفضاء وهم مضغوطون في مقاعدهم أثناء إطلاق صاروخ قوي بقوة لا تختلف عن جاذبية إضافية، وهذا بالضبط سبب وصف تسارع الإطلاق عادة بلغة يومية بـ«قوة g». الـg نفسها التي للجاذبية العادية، بحكم مبدأ التكافؤ. diff --git a/content/lessons/relativity/the-equivalence-principle/en.md b/content/lessons/relativity/the-equivalence-principle/en.md index 7d452457..1206e9cd 100644 --- a/content/lessons/relativity/the-equivalence-principle/en.md +++ b/content/lessons/relativity/the-equivalence-principle/en.md @@ -11,27 +11,27 @@ parameters: ## Try it -1. Watch the ball, tossed sideways at speed u, fall inside the accelerating elevator. At a = 9.81 m/s², Earth's own gravity, it curves down and hits the floor before it ever reaches the far wall, 2.4 m away. -2. Drop a to 1.62 m/s², the Moon's gravity. The same toss now barely dips before reaching the far wall — weaker "gravity" curves the path far less. -3. Look at the tiny second curve traced for the light beam crossing the same cabin. It bends by the same physics, but by an amount labelled in the readout as a fraction of a proton's width — real, but far too small to draw to scale. +1. Watch the ball, tossed sideways at speed u, fall inside the accelerating elevator. At a = 9.81 m/s², Earth's own gravity, it curves down and hits the floor 1.53 m across, before it ever reaches the far wall, 2.4 m away. +2. Drop a to 1.6 m/s², close to the Moon's gravity. The readout changes to «crosses the cabin»: the same toss now reaches the far wall after dipping only about 0.74 m — weaker "gravity" curves the path far less. +3. Set a back to 9.8 m/s² and look at the tiny second curve traced for the light beam crossing the same cabin. It bends by the same physics, but the «light's fall» readout shows how little: 3.14e-16 m, a fraction of a proton's width — real, but far too small to draw to scale. ## Real-life examples -1. **An elevator accelerating at exactly 9.81 m/s².** A ball tossed at 2.5 m/s falls to the floor after crossing only about 1.75 m of the 2.4 m cabin — indistinguishable from tossing a ball in an ordinary room on Earth. +1. **An elevator accelerating at exactly 9.81 m/s².** A ball tossed at 2.5 m/s falls to the floor after crossing only about 1.53 m of the 2.4 m cabin — indistinguishable from tossing a ball in an ordinary room on Earth. 2. **An elevator accelerating at 1.62 m/s²**, the Moon's own surface gravity. The same 2.5 m/s toss barely sags by 0.75 m over the full crossing, the same gentle arc an astronaut's toss would trace while standing on the Moon. -3. **A strong 20 m/s² acceleration with a slow 1 m/s toss.** The ball drops to the floor after moving only about 0.5 m sideways — a dramatically steep, fast fall, like tossing a ball on a planet with gravity twice Earth's. +3. **A strong 20 m/s² acceleration with a slow 1 m/s toss.** The ball drops to the floor after moving only about 0.43 m sideways — a dramatically steep, fast fall, like tossing a ball on a planet with gravity twice Earth's. ## Test yourself -1. Set a to Earth's own gravity, 9.81 m/s². -2. Set a to the Moon's gravity, 1.62 m/s². +1. Set a to the gravity of Mars, 3.7 m/s². +2. Set a to about the Moon's gravity, 1.6 m/s². 3. Push the ball's toss speed u to its maximum, 5 m/s. ## Intuition Imagine floating in a windowless elevator, far from any planet, while a rocket underneath accelerates it upward through empty space. Toss a ball sideways and, from inside the elevator, it curves down and lands on the floor — not because anything pulled it down, but because the floor itself kept accelerating up to meet it. There is no experiment you could run inside that sealed elevator to tell that story apart from simply standing still in a gravitational field of the same strength: this is Einstein's equivalence principle. -Since the ball's path only depends on how long it is in the air, the very same curve applies to a beam of light crossing the same cabin — light also "falls" while it crosses, following $y = \tfrac{1}{2}at^2$ just like the ball. The only difference is time: light crosses in a few nanoseconds instead of the ball's fraction of a second, so its fall is billions of times smaller, far too small to see, but exactly as real. +Since the ball's path only depends on how long it is in the air, the very same curve applies to a beam of light crossing the same cabin — light also "falls" while it crosses, following $y = \tfrac{1}{2}at^2$ just like the ball. The only difference is time: light crosses in a few nanoseconds instead of the ball's fraction of a second, so its fall is millions of billions of times smaller, far too small to see, but exactly as real. ## Formal @@ -52,13 +52,17 @@ Because $c$ is so much larger than any everyday speed $u$, the light beam's cros ## Real world ### The 1919 solar eclipse expedition + Arthur Eddington photographed stars near the Sun's edge during a total eclipse and found their light bent by almost exactly the angle Einstein's equivalence-based theory predicted — the first direct confirmation that gravity really does bend light, not just matter. ### Gravitational lensing + Massive galaxy clusters bend the light of galaxies far behind them enough to distort and even multiply their images, a large-scale, dramatically visible version of the same bending this elevator shows on too small a scale to see. ### Why astronauts feel "weightless" in orbit + Astronauts orbiting Earth are in free fall the whole time, constantly accelerating toward the planet; the equivalence principle explains why that feels exactly like floating in gravity-free space rather than like falling, since a freely falling elevator and a gravity-free one are, locally, indistinguishable. ### Rocket launches + Astronauts pressed back into their seats during a powerful rocket launch feel a force indistinguishable from extra gravity, which is exactly why launch acceleration is often described in everyday language as "g-force" — the same g as ordinary gravity, by the equivalence principle. diff --git a/content/lessons/relativity/the-equivalence-principle/lesson.yaml b/content/lessons/relativity/the-equivalence-principle/lesson.yaml index 7bf83418..9dea8eef 100644 --- a/content/lessons/relativity/the-equivalence-principle/lesson.yaml +++ b/content/lessons/relativity/the-equivalence-principle/lesson.yaml @@ -46,8 +46,8 @@ presets: u: 1 challenges: - check: a - target: 9.81 - tol: 0.05 + target: 3.7 + tol: 0.1 - check: a target: 1.62 tol: 0.1 diff --git a/content/lessons/relativity/the-speed-of-light-is-constant/ar.md b/content/lessons/relativity/the-speed-of-light-is-constant/ar.md index 4fdefb1c..df1f9348 100644 --- a/content/lessons/relativity/the-speed-of-light-is-constant/ar.md +++ b/content/lessons/relativity/the-speed-of-light-is-constant/ar.md @@ -9,15 +9,15 @@ parameters: ## Try it -1. راقب ساعة الضوء داخل القطار: ومضة ضوء ترتدّ بين مرآة في الأرضية ومرآة في السقف. عند v = 0.3 لا يتحرك القطار كثيرًا أثناء الارتداد الواحد، فيبدو المسار القطري كما يراه من على الرصيف شبه رأسي. +1. راقب ساعة الضوء داخل القطار: ومضة ضوء ترتدّ بين مرآة في الأرضية ومرآة في السقف. عند v = 0.3 لا يتحرك القطار كثيرًا أثناء الارتداد الواحد، فيبدو المسار القطري كما يُرى من الرصيف شبه رأسي. تُظهر القراءات γ = 1.048 و Δt₀ = 10.01 ns و Δt = 10.49 ns. 2. ارفع v نحو 0.7 ثم 0.9. يتحرك القطار مسافة أكبر جانبيًا أثناء كل ارتداد، فترسم الومضة نفسها خطًا قطريًا أطول بكثير وأكثر انبساطًا. ومع ذلك تبقى قراءة سرعتها على طول هذا القطر ثابتة عند 299,792,458 م/ث دون أن تتحرك أبدًا. -3. تابع قراءتي الساعتين: Δt₀ هو ما تقيسه ساعة راكب داخل القطار للارتداد الواحد، وΔt هو ما تقيسه ساعة على الرصيف للارتداد نفسه. لاحظ كيف تتقدّم Δt على Δt₀ كلما ارتفعت v، مع أن الضوء نفسه لم يزدد سرعة أبدًا. +3. تابع قراءتي الساعتين: Δt₀ هو ما تقيسه ساعة راكب داخل القطار للارتداد الواحد، وΔt هو ما تقيسه ساعة على الرصيف للارتداد نفسه. عند v = 0.9 تبقى Δt₀ عند 10.01 ns، أما Δt فتكبر إلى 22.96 ns، مع أن الضوء نفسه لم يزدد سرعة أبدًا. ## Real-life examples 1. **مسبار باركر الشمسي**، أسرع جسم صنعه الإنسان على الإطلاق، بلغ نحو 192 كم/ث، أي v = 0.00064 هنا. مسار ساعته القطري يتمدّد بمقدار ضئيل جدًا، وγ تساوي 1.0000002، قريبة جدًا من 1 بحيث لا يمكن تمييز رسمها عن قطار ساكن. -2. **شعاع بنصف سرعة الضوء**، v = 0.5. هنا التمدّد حقيقي وواضح: γ = 1.15، فتقرأ ساعة الرصيف زمنًا أطول ملحوظًا من ساعة الراكب للارتداد نفسه بالضبط. -3. **شعاع عند v = 0.866**، أي نحو تسعة أعشار سرعة الضوء تقريبًا. وصلت γ إلى قرابة 2 بالضبط: تسجّل ساعة الرصيف للارتداد زمنًا يقارب ضعف ما تسجّله ساعة الراكب، والسبب هندسي بحت، لأن سرعة الضوء نفسها لم تستطع أن تتغيّر. +2. **قطار بنصف سرعة الضوء**، v = 0.5. هنا التمدّد حقيقي وواضح: γ = 1.15، فتقرأ ساعة الرصيف زمنًا أطول بوضوح من ساعة الراكب للارتداد نفسه بالضبط. +3. **قطار عند v = 0.866**، أي نحو 87% من سرعة الضوء. وصلت γ إلى قرابة 2 بالضبط: تسجّل ساعة الرصيف للارتداد زمنًا يقارب ضعف ما تسجّله ساعة الراكب، والسبب هندسي بحت، لأن سرعة الضوء نفسها لم تستطع أن تتغيّر. ## Test yourself @@ -50,13 +50,17 @@ parameters: ## Real world ### مقياس تداخل مايكلسون ومورلي + بتقسيم شعاع ضوء وإرسال نصفيه على ذراعين متعامدتين ثم إعادة دمجهما، توقّع مايكلسون ومورلي أن تُحدث حركة الأرض المدارية، نحو 30 كم/ث، فارقًا يمكن رصده في توقيت الضوء. لم يحدث ذلك أبدًا، في أي اتجاه أو أي فصل من السنة. دليل مباشر على عدم وجود «رياح أثير» خفية، وعلى أن سرعة الضوء واحدة لكل مراقب، وهو بالضبط الافتراض الذي تعتمد عليه ساعة الضوء هذه. ### أقمار GPS -تحمل كل قمر GPS ساعة ذرية يجب تصحيح تمددها بهذه العلاقة بالضبط، لأنه يدور بسرعة نحو 3.9 كم/ث نسبةً إلى الأرض. ولو تجاهل المهندسون هذا الأثر لتراكم خطأ في تحديد المواقع بمقدار كيلومترات كل يوم. + +يحمل كل قمر GPS ساعة ذرية يجب تصحيح تمددها بهذه العلاقة بالضبط، لأنه يدور بسرعة نحو 3.9 كم/ث نسبةً إلى الأرض. ولو تجاهل المهندسون هذا الأثر لتراكم خطأ في تحديد المواقع بمقدار كيلومترات كل يوم. ### مسرّعات الجسيمات + تُدفع حزم البروتونات في مسرّع CERN إلى سرعات v > 0.999999c، ويعتمد كل حساب لعمر الجسيمات غير المستقرة المرافقة لها على صحة هذه العلاقة Δt = γΔt₀ بدقة متناهية. وهي تصح في كل مرة تُختبر فيها. ### لماذا لا يمكن لأي جسم أن يبلغ سرعة الضوء نفسها + كلما اقتربت v من c في هذه الصورة، استمر المسار القطري في التمدد لكن سرعته لا يمكن أن تتغيّر أبدًا لأن c ثابتة، فيحتاج ارتداد الراكب الواحد إلى حصة أكبر فأكبر من زمن الرصيف. هذا أحد أسباب استحالة دفع أي جسم له كتلة إلى بلوغ v = c بالكامل. diff --git a/content/lessons/relativity/the-speed-of-light-is-constant/en.md b/content/lessons/relativity/the-speed-of-light-is-constant/en.md index 56f33457..bbfdadcd 100644 --- a/content/lessons/relativity/the-speed-of-light-is-constant/en.md +++ b/content/lessons/relativity/the-speed-of-light-is-constant/en.md @@ -11,15 +11,15 @@ parameters: ## Try it -1. Watch the light clock inside the train: a flash of light bounces between a floor mirror and a ceiling mirror. At v = 0.3 the train barely moves during one bounce, so the diagonal path drawn from the platform looks almost straight up and down. +1. Watch the light clock inside the train: a flash of light bounces between a floor mirror and a ceiling mirror. At v = 0.3 the train barely moves during one bounce, so the diagonal path drawn from the platform looks almost straight up and down. The readouts show γ = 1.048, Δt₀ = 10.01 ns and Δt = 10.49 ns. 2. Raise v toward 0.7 and 0.9. The train slides further sideways during each bounce, so the same flash now traces a much longer, shallower diagonal — yet the readout for its speed along that diagonal never moves off 299,792,458 m/s. -3. Check the two clock readouts: Δt₀ is what a passenger's watch would time for one bounce, Δt is what a platform clock times for the same bounce. Watch Δt pull ahead of Δt₀ as v climbs, even though the light itself never sped up. +3. Check the two clock readouts: Δt₀ is what a passenger's watch would time for one bounce, Δt is what a platform clock times for the same bounce. At v = 0.9, Δt₀ still reads 10.01 ns but Δt has grown to 22.96 ns, even though the light itself never sped up. ## Real-life examples 1. **The Parker Solar Probe**, the fastest object humans have ever built, reached about 192 km/s — v = 0.00064 here. Its light clock's diagonal path is stretched only a hair; γ is 1.0000002, too close to 1 to draw any differently from a stationary train. -2. **A beam at half light speed**, v = 0.5. Now the stretching is real: γ = 1.15, so the platform clock already reads noticeably more than a passenger's watch for the very same bounce. -3. **A beam at v = 0.866**, roughly nine-tenths of light speed. γ has reached almost exactly 2: the platform times the bounce at almost double the passenger's own count, purely from geometry, because the light's speed itself could not budge. +2. **A train at half light speed**, v = 0.5. Now the stretching is real: γ = 1.15, so the platform clock already reads noticeably more than a passenger's watch for the very same bounce. +3. **A train at v = 0.866**, about 87% of light speed. γ has reached almost exactly 2: the platform times the bounce at almost double the passenger's own count, purely from geometry, because the light's speed itself could not budge. ## Test yourself @@ -52,13 +52,17 @@ This is exactly the logic behind the 1887 Michelson–Morley experiment: it trie ## Real world ### Michelson and Morley's interferometer + Splitting a beam and sending its two halves down perpendicular arms, then recombining them, Michelson and Morley expected Earth's 30 km/s orbital motion to shift the light's timing detectably. It never did, in any direction, at any season — direct evidence that there is no hidden "ether wind" and that light's speed is the same for every observer, which is exactly the assumption this light clock relies on. ### GPS satellites + Every GPS satellite carries an atomic clock whose ticks must be corrected for exactly this stretching, because it orbits at about 3.9 km/s relative to the ground; engineers who ignored it would see position errors grow by kilometres per day. ### Particle accelerators + Beams of protons at CERN are pushed to v > 0.999999c, and every calculation of how long their unstable companions survive depends on exactly this Δt = γΔt₀ relationship holding to extraordinary precision — which it does, every time it is tested. ### Why nothing can ever reach light speed itself + As v climbs toward c in this picture, the diagonal path keeps stretching but the speed along it never can, since c is fixed; the passenger's whole bounce would need to take an ever-larger slice of the platform's time, which is one reason nothing with mass can ever be pushed all the way to v = c. diff --git a/content/lessons/relativity/the-twin-paradox/ar.md b/content/lessons/relativity/the-twin-paradox/ar.md index c2f049a0..ef64c412 100644 --- a/content/lessons/relativity/the-twin-paradox/ar.md +++ b/content/lessons/relativity/the-twin-paradox/ar.md @@ -11,13 +11,13 @@ parameters: 1. انظر إلى مخطط الزمكان. خط عالم الأرض يمتدّ مستقيمًا في المنتصف، وخط عالم المركبة يذهب إلى النجم ويعود، وينحني بحدة عند نقطة الدوران. 2. عُدّ العلامات على طول كل خط. علامات الأرض متباعدة بانتظام، واحدة لكل سنة. أما علامات المركبة فمتباعدة أكثر في هذه الصورة، لأن كل سنة من سنوات المركبة نفسها تغطي وقتًا أطول من زمن الأرض. -3. اسحب v إلى أعلى. يميل خط المركبة أكثر نحو خط الضوء المتقطّع بزاوية 45°، وتتباعد علاماتها أكثر، وتكبر فجوة العمر المطبوعة أسفل الصورة. +3. ارفع v من 0.8 إلى 0.9. يميل خط المركبة أكثر نحو خط الضوء المتقطّع بزاوية 45°، وتتباعد علاماتها أكثر، وتكبر قراءة «فرق العمر» من 4.24 إلى 5.32 سنة. ## Real-life examples 1. **رحلة ذهاب وعودة إلى بروكسيما القنطور**، D = 4.24 سنة ضوئية، بسرعة v = 0.9. تعدّ الأرض T = 9.4 سنوات، بينما تعدّ ساعة المسافر نفسها τ = 4.1 سنوات فقط. يعود المسافر أصغر سنًا بـ5.3 سنوات من توأمه الذي بقي في مكانه. -2. **رحلة ذهاب وعودة إلى الشعرى اليمانية**، D = 8.6 سنة ضوئية، بسرعة أهدأ v = 0.5. تعدّ الأرض زمنًا طويلًا T = 34.4 سنة، ومع ذلك يكبر المسافر عمرًا أقل، τ = 29.8 سنة، فجوة قدرها 4.6 سنوات حتى عند نصف سرعة الضوء فقط. -3. **قفزة قصيرة ومتطرفة**، D = سنة ضوئية واحدة بسرعة v = 0.99. تعدّ الأرض T = 2.0 سنة، بينما تعدّ ساعة المسافر نفسها τ = 0.29 سنة فقط، أي نحو 104 أيام، للرحلة نفسها ذهابًا وإيابًا. +2. **رحلة ذهاب وعودة إلى الشعرى اليمانية**، D = 8.6 سنة ضوئية، بسرعة أهدأ v = 0.5. تعدّ الأرض زمنًا طويلًا T = 34.4 سنة، ومع ذلك يكبر المسافر أقل، τ = 29.8 سنة، فجوة قدرها 4.6 سنوات حتى عند نصف سرعة الضوء فقط. +3. **قفزة قصيرة ومتطرفة**، D = سنة ضوئية واحدة بسرعة v = 0.99. تعدّ الأرض T = 2.02 سنة، بينما تعدّ ساعة المسافر نفسها τ = 0.28 سنة فقط، أي نحو 104 أيام، للرحلة نفسها ذهابًا وإيابًا. ## Test yourself @@ -29,7 +29,7 @@ parameters: يتفق التوأمان على أن المركبة تقطع مسافة D ذهابًا وD إيابًا، لكنهما لا يتفقان على المدة التي تستغرقها هذه الرحلة على ساعة المركبة نفسها. الأرض، التي لا تتسارع أبدًا، تعدّ ببساطة T = 2D/v سنة تمرّ بمعدّل ثابت. أما ساعة المسافر، المتحركة بسرعة v طوال الرحلة، فتدق أبطأ بالعامل المألوف γ، فلا تعدّ سوى τ = T/γ سنة للرحلة ذهابًا وإيابًا نفسها بالضبط: سنوات أقل، على الساعة نفسها، للرحلة نفسها تمامًا. -المفارقة الظاهرة هي أن الحركة نسبية، فلماذا لا يرى المسافر هو من يكبر توأمه على الأرض عمرًا أقل؟ الجواب هو نقطة الدوران. يبقى توأم الأرض في إطار قصوري واحد غير منقطع طوال الوقت، بينما يضطرّ المسافر إلى التباطؤ والتوقف ثم التسارع مجددًا نحو الوطن، فيخرج للحظة عن الحركة القصورية تمامًا. هذا الحدث اللامتماثل الوحيد هو ما يكسر التناظر بين التوأمين ويحدّد، دون لبس، من كبر فعلًا عمرًا أقل. +المفارقة الظاهرة هي أن الحركة نسبية، فلماذا لا يكون توأم الأرض هو الأصغر في نظر المسافر؟ الجواب هو نقطة الدوران. يبقى توأم الأرض في إطار قصوري واحد غير منقطع طوال الوقت، بينما يضطرّ المسافر إلى التباطؤ والتوقف ثم التسارع مجددًا نحو الأرض، فيخرج للحظة عن الحركة القصورية تمامًا. هذا الحدث، الذي يمرّ به المسافر وحده، هو ما يكسر التناظر بين التوأمين ويحدّد، دون لبس، من كبر فعلًا عمرًا أقل. ## Formal @@ -39,7 +39,7 @@ parameters: ## Advanced -الحساب الكامل لما يراه كل توأم فعليًا عبر تلسكوب أثناء الرحلة، لا فقط ما تقرأه ساعتاهما في النهاية، يستخدم تأثير دوبلر النسبوي. يرى المسافر ساعة الأرض تبدو أبطأ في الذهاب وأسرع في العودة، ولا يتساوى الأثران حول نقطة الدوران بالتساوي، بل يتحلّلان إلى فجوة العمر النهائية نفسها التي تحسبها هذه الصفحة من خطّي العالم. +الحساب الكامل لما يراه كل توأم فعليًا عبر تلسكوب أثناء الرحلة، لا فقط ما تقرأه ساعتاهما في النهاية، يستخدم تأثير دوبلر النسبوي. يرى المسافر ساعة الأرض تبدو أبطأ في الذهاب وأسرع في العودة، والأثران لا يلغي أحدهما الآخر عند نقطة الدوران، بل ينتج عنهما معًا فرق العمر النهائي نفسه الذي تحسبه هذه الصفحة من خطّي العالم. ## Derivation @@ -50,13 +50,17 @@ parameters: ## Real world ### أقمار GPS، على مقياس أهدأ بكثير + قمر GPS، بشكل مصغّر، هو توأم يستمر بالتحرك بالنسبة للأرض. حركته المدارية وحدها تجعل ساعته على متنه تدق أبطأ قليلًا من ساعة على الأرض، وهو الأثر نفسه الذي تعرضه هذه الصفحة بسرعة ومسافة مبالَغ فيهما كثيرًا. ### لماذا لم يقم أي رائد فضاء بهذا بعد + حتى أسرع رحلة فضائية بشرية، بعثات أبولو بسرعة نحو 11 كم/ث، تعطي v/c نحو 0.00004 فقط، نسبة أصغر بكثير من أن تُنتج فجوة عمر يمكن قياسها على مقياس زمني بشري. الأثر حقيقي لكنه يحتاج سرعات لا يبلغها أي صاروخ حالي. ### تحلّل الميونات، مفارقة التوأم على ساعة دون ذرّية + ميون يتسارع ويدور في مجال مغناطيسي ثم يعود إلى نقطة انطلاقه يقيس على «ساعة تحلّله» الخاصة زمنًا أقل من ميون لم يدُر أبدًا. نسخة مخبرية من هذا اللاتماثل نفسه، مؤكَّدة بدقة عالية. ### مقترحات السفر بين النجوم -مقترحات جادّة للوصول إلى أقرب النجوم، مثل مفاهيم الأشرعة الليزرية التي تستهدف عشرات بالمئة من سرعة الضوء، تُدرَس جزئيًا بسبب هذا الأثر بالذات: مسبار أو طاقم يتحرك بسرعة كافية سيختبر زمنًا منقضيًا أقل بشكل ملموس مما يختبره مركز التحكّم على الأرض. + +مقترحات جادّة للوصول إلى أقرب النجوم، مثل مفاهيم الأشرعة الليزرية التي تستهدف عشرات بالمئة من سرعة الضوء، تُدرَس جزئيًا بسبب هذا الأثر بالذات: مسبار أو طاقم يتحرك بسرعة كافية سيمرّ عليه زمن أقل بوضوح مما يمرّ على مركز التحكّم على الأرض. diff --git a/content/lessons/relativity/the-twin-paradox/en.md b/content/lessons/relativity/the-twin-paradox/en.md index 4255be03..c91fde20 100644 --- a/content/lessons/relativity/the-twin-paradox/en.md +++ b/content/lessons/relativity/the-twin-paradox/en.md @@ -14,13 +14,13 @@ parameters: 1. Look at the spacetime diagram: Earth's worldline runs straight up the middle, and the ship's worldline goes out to the star and back, bending sharply at the turnaround. 2. Count the tick marks along each worldline. Earth's ticks are evenly spaced, one per year; the ship's ticks are spaced further apart in this picture, because each of the ship's own years covers more of Earth's time. -3. Drag v higher. The ship's line tilts closer to the dashed 45° light line, its ticks spread even further apart, and the age gap printed at the bottom grows. +3. Raise v from 0.8 to 0.9. The ship's line tilts closer to the dashed 45° light line, its ticks spread even further apart, and the «age difference» readout grows from 4.24 to 5.32 years. ## Real-life examples 1. **A round trip to Proxima Centauri**, D = 4.24 light-years, at v = 0.9. Earth counts T = 9.4 years; the traveler's own clock counts only τ = 4.1 years — the traveler comes home 5.3 years younger than a twin who stayed behind. 2. **A round trip to Sirius**, D = 8.6 light-years, at a gentler v = 0.5. Earth counts a long T = 34.4 years; the traveler still ages less, τ = 29.8 years, a 4.6-year gap even at only half light speed. -3. **A short, extreme hop**, D = 1 light-year at v = 0.99. Earth counts T = 2.0 years; the traveler's own clock counts only τ = 0.29 years, about 104 days, for the same round trip. +3. **A short, extreme hop**, D = 1 light-year at v = 0.99. Earth counts T = 2.02 years; the traveler's own clock counts only τ = 0.28 years, about 104 days, for the same round trip. ## Test yourself @@ -42,7 +42,7 @@ The traveler's own clock measures proper time instead, always shorter by the Lor ## Advanced -A full accounting of what each twin actually *sees* through a telescope during the trip, not just what their clocks read at the end, uses the relativistic Doppler effect: the traveler sees Earth's clock appear to run slow on the way out and fast on the way back, and the two effects do not cancel evenly around the turnaround — they resolve into exactly the same final age gap this page computes from the two worldlines. +A full accounting of what each twin actually _sees_ through a telescope during the trip, not just what their clocks read at the end, uses the relativistic Doppler effect: the traveler sees Earth's clock appear to run slow on the way out and fast on the way back, and the two effects do not cancel evenly around the turnaround — they resolve into exactly the same final age gap this page computes from the two worldlines. ## Derivation @@ -53,13 +53,17 @@ A full accounting of what each twin actually *sees* through a telescope during t ## Real world ### GPS satellites, on a much gentler scale + A GPS satellite is, in miniature, a twin that keeps moving relative to the ground: its orbital motion alone would make its onboard clock run slightly slow compared to a ground clock, the same effect this page shows at wildly exaggerated speed and distance. ### Why no astronaut has done this yet + Even the fastest human spaceflight, the Apollo missions at roughly 11 km/s, gives v/c of about 0.00004 — far too small a fraction of light speed to produce a measurable age gap on a human timescale; the effect is real but needs speeds no current rocket can reach. ### Muon decay, the twin paradox on a subatomic clock + A muon that accelerates, turns around in a magnetic field, and returns to its starting point measures less of its own decay-clock time than a muon that never turned at all, a laboratory-scale version of exactly this asymmetry, confirmed to high precision. ### Interstellar travel proposals + Serious proposals for reaching nearby stars, like laser-sail concepts aiming for tens of percent of light speed, are studied partly because of this very effect: a probe or crew moving fast enough would experience meaningfully less elapsed time than mission control back on Earth. 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/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. 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. 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/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 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/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/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. 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. 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. 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. 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. 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/lessons/thermodynamics/entropy-and-heat-engines/ar.md b/content/lessons/thermodynamics/entropy-and-heat-engines/ar.md index fce79f1d..09e06450 100644 --- a/content/lessons/thermodynamics/entropy-and-heat-engines/ar.md +++ b/content/lessons/thermodynamics/entropy-and-heat-engines/ar.md @@ -1,16 +1,15 @@ --- -title: الإنتروبيا وحدود المحركات الحرارية -summary: >- - محرك السيارة يحوّل ثلث حرارة الوقود فقط إلى حركة. هنا ترى الحد الذي لا يتجاوزه أي محرك. +title: الإنتروبيا وحدّ كفاءة المحركات +summary: 'لا يستطيع أي محرك أن يحوّل كل الحرارة إلى حركة. هنا تحسب أكبر نسبة ممكنة وتعرف ما الذي يحددها.' parameters: - Tc: المستودع البارد Tc - x: المستودع الساخن Th + Tc: 'Tc — درجة حرارة الجانب البارد' + x: 'x — درجة حرارة الجانب الساخن Th' variables: - - درجة الحرارة المطلقة للمستودعين الساخن والبارد - - الكفاءة، نسبة الحرارة الداخلة التي تتحول إلى شغل مفيد - - الإنتروبيا، وتقريبًا عدد الترتيبات المجهرية المتكافئة الممكنة للطاقة + - 'درجتا حرارة الجانب الساخن والجانب البارد، بالكلفن' + - 'الكفاءة: الشغل الناتج مقسومًا على الحرارة التي أخذها المحرك' + - 'الإنتروبيا: كمية تزداد بمقدار Q/T حين تدخل حرارة Q إلى جسم درجة حرارته T' charts: - - title: الكفاءة عند عدة درجات حرارة للمستودع البارد + - title: حدّ الكفاءة عند ثلاث درجات حرارة للجانب البارد xLabel: Th (K) yLabel: η series: @@ -21,54 +20,58 @@ charts: ## Try it -1. اسحب نقطة المستودع الساخن x إلى اليمين. راقب الكفاءة ترتفع لكنها تنحني تحت الخط عند 1. -2. ارفع منزلق «المستودع البارد Tc». راقب المنحنى كله ينخفض. -3. اقرأ قيمة الكفاءة حيث يستقر المنحنى. لا يستطيع أي محرك بين هاتين الدرجتين تجاوزها. +1. اجعل Tc = 300 K وx = 500 K. يقرأ المنحنى η = 0.40. معنى ذلك أن 40% من الحرارة على الأكثر تصير شغلًا، و60% على الأقل تذهب إلى الجانب البارد. +2. ثبّت Tc = 300 K وانقل x إلى 900 K. يرتفع الحد إلى نحو 0.67. صار أعلى، لكنه ما زال أقل من 1. +3. ثبّت x = 900 K وارفع Tc إلى 350 K. ينخفض الحد إلى نحو 0.61، لأن الجانب البارد صار أقرب في درجة حرارته إلى الساخن. ## Real-life examples -1. **محطة طاقة تعمل بالفحم.** بخار قرب 800 K يُشغّل التوربينات ويُصرّف حرارته إلى مياه نهر قرب 300 K، فيضع ذلك سقف كارنو عند نحو 63%، وتقل المحطات الحقيقية عن هذا السقف بكثير. -2. **محرك سيارة.** غازات احتراق قرب 650 K تُصرَّف إلى هواء قرب 320 K، فيحدّد ذلك أقصى كفاءة نظرية عند نحو 51%، وتحقق المحركات الحقيقية جزءًا صغيرًا فقط من ذلك بسبب الاحتكاك والفقد. -3. **محطة حرارة أرضية منخفضة الحرارة.** بمصدر متواضع عند 450 K وجانب بارد عند 290 K، ينخفض سقف كارنو إلى نحو 36%، ولهذا تكون محطات الطاقة الحرارية الأرضية أقل كفاءة من محطات الفحم أو الغاز. +1. **محطة كهرباء تعمل بالبخار.** عند Tc = 300 K وx = 800 K يكون الحد 0.625. المحطة الحقيقية تحوّل أقل من ذلك بسبب الاحتكاك وتسرب الحرارة. +2. **محطة تعمل بحرارة الشمس.** عند Tc = 320 K وx = 650 K يكون الحد نحو 0.51. في اليوم الحار ترتفع Tc فينخفض الحد. +3. **محطة تعمل بحرارة باطن الأرض.** عند Tc = 290 K وx = 450 K يكون الحد نحو 0.36. المصدر هنا أقل سخونة، فالحد أقل. ## Test yourself -1. اجعل كفاءة كارنو تساوي 50% بالضبط. -2. ادفع الكفاءة فوق 60% مع إبقاء المستودع البارد واقعيًا (Tc لا يقل عن 280 K). -3. باستخدام أدنى درجة حرارة ممكنة للمستودع البارد (250 K)، بلغ كفاءة 55% على الأقل. +1. اجعل حدّ الكفاءة يساوي 0.50. +2. ارفع الحد فوق 0.60 مع إبقاء Tc عند 280 K أو أكثر. +3. اجعل Tc = 250 K وارفع الحد إلى 0.55 أو أكثر. ## Intuition -يحوّل محرك سيارة نموذجي نحو 30% فقط من الحرارة الناتجة عن احتراق الوقود إلى حركة، ويهرب الباقي كعادم ساخن ومعدن دافئ، ولا يستطيع أي إتقان هندسي دفع محرك حراري إلى 100%، حتى من حيث المبدأ. يُظهر الرسم على الشاشة هذا الحد مباشرة. اسحب نقطة المستودع الساخن، ويُرمز لها بـ $x$ بوحدة كلفن (جرّب 800، وهو قريب من بخار محطة طاقة). راقب منحنى الكفاءة يرتفع لكنه ينحني بوضوح، ويبقى دائمًا دون الخط الأفقي عند 1. +محرك السيارة يحرق الوقود فتنتج حرارة. جزء من هذه الحرارة يحرّك السيارة، والباقي يخرج من العادم ساخنًا. هل يمكن صنع محرك لا يضيّع شيئًا؟ لا. خذ محركًا يأخذ 1000 J من بخار درجة حرارته 600 K، والهواء حوله عند 300 K. القاعدة أن الحرارة التي يرميها إلى الهواء لا تقل عن 300/600 من الحرارة التي أخذها، أي النصف. إذن يرمي 500 J على الأقل، ويحوّل 500 J على الأكثر إلى شغل. نسمي نسبة الشغل إلى الحرارة المأخوذة الكفاءة. أكبر كفاءة ممكنة هنا 0.50، وتسمى كفاءة كارنو. -مهما رفعت درجة حرارة المصدر، يفرض قانون الفيزياء تدفق جزء من الحرارة دون استفادة إلى الجانب البارد. ارفع منزلق «المستودع البارد Tc» بدلًا من ذلك، من 300 إلى 340 كلفن مثلًا، قريبًا من نهر يُستخدم للتبريد، فينخفض المنحنى كله. فارق أصغر بين الساخن والبارد يعني شغلًا متاحًا أقل لكل وحدة حرارة محروقة. تعتمد المحركات في جوهرها على هذا الفارق، لا على أي من الدرجتين وحدها. +على الرسم، الموضع الأفقي هو درجة حرارة الجانب الساخن x بالكلفن، والارتفاع هو حدّ الكفاءة. يرتفع المنحنى كلما زادت x، بسرعة في البداية ثم ببطء. من 400 K إلى 500 K يرتفع الحد من 0.25 إلى 0.40. ومن 800 K إلى 900 K يرتفع من نحو 0.63 إلى 0.67 فقط. ولا يصل المنحنى إلى 1 أبدًا. إذا رفعت Tc انخفض المنحنى كله. المهم هو نسبة الدرجتين: 300 K مع 600 K تعطي الحد نفسه الذي تعطيه 250 K مع 500 K. المخطط يقارن ثلاث قيم لـTc. والعرض الثلاثي الأبعاد يوضح حرارة تخرج من الجانب الساخن وتنقسم إلى شغل وحرارة مرمية. ## Formal -يمنع القانون الثاني أي محرك يعمل بين مستودعين من تجاوز كفاءة كارنو $\eta_{\text{Carnot}} = 1 - T_c/T_h$، ولا تتحقق هذه الكفاءة إلا في دورة عكوسة. +يأخذ المحرك في كل دورة حرارة $Q_h$ من جانب ساخن درجة حرارته $T_h$. يبذل شغلًا $W$، ويرمي حرارة $Q_c$ إلى جانب بارد درجة حرارته $T_c$. الطاقة لا تضيع، فيكون $W=Q_h-Q_c$. والكفاءة هي $\eta=W/Q_h$. تقاس الدرجتان بالكلفن، ويجب أن يكون $T_h>T_c>0$. -بصورة معادلة، لا تستطيع أي عملية أن تنقص الإنتروبيا الكلية لنظام معزول، إذ يتحقق $\Delta S_{\text{total}} \ge 0$، ولا تتحقق المساواة إلا في العمليات العكوسة. تولّد المحركات الحقيقية دائمًا بعض الإنتروبيا، فتبقى دون حد كارنو. +يأتي الحد من كمية اسمها الإنتروبيا، ورمزها S. حين تدخل حرارة Q إلى جسم درجة حرارته T تزداد إنتروبيا الجسم بمقدار Q/T، وحين تخرج منه تنقص بالمقدار نفسه. التغير الكلي في دورة واحدة هو $\Delta S_{\text{total}}=Q_c/T_c-Q_h/T_h$. والقانون الثاني يقول إن الإنتروبيا الكلية لا تنقص: $\Delta S_{\text{total}}\ge 0$. ينتج من ذلك $Q_c/Q_h\ge T_c/T_h$. وبالتعويض في الكفاءة نحصل على $\eta\le\eta_{\text{Carnot}}=1-T_c/T_h$. لا يبلغ الحدَّ إلا محرك مثالي بلا احتكاك ولا تسرب حرارة، ويسمى محركًا عكوسًا. ## Advanced -يمكن فهم الإنتروبيا إحصائيًا بأنها $S = k_B\ln\Omega$، حيث $\Omega$ عدد الترتيبات المجهرية المتوافقة مع الحالة الكبروية المُلاحَظة. وعندها يصبح القانون الثاني مجرد قول إن الأنظمة المعزولة تتطور نحو تشكيلاتها الأكثر احتمالًا بفارق كبير، أي ذات $\Omega$ الأكبر، وهذا سبب تدفق الحرارة تلقائيًا من الساخن إلى البارد لا العكس. +ميل المنحنى هو $T_c/T_h^2$. يصغر الميل كلما كبرت $T_h$، ولهذا يتسطح المنحنى. خفض $T_c$ درجة واحدة يرفع الحد بمقدار $1/T_h$، وهذا أكثر مما يفعله رفع $T_h$ درجة واحدة. يفترض النموذج أن درجتي حرارة الجانبين ثابتتان. في المحرك الحقيقي يبرد الغاز المحترق وهو يعطي حرارته، فلا تكفي درجة حرارة واحدة لوصفه. وللإنتروبيا معنى آخر: $S=k_B\ln\Omega$، حيث $\Omega$ عدد الطرق التي تترتب بها الجزيئات. يشرح درس القانون الثاني هذا المعنى. ## Derivation -1. الكفاءة هي الشغل المفيد الخارج مقسومًا على الحرارة المسحوبة من المستودع الساخن. -2. في الدورة العكوسة، أي دورة كارنو، تتناسب الحرارة المتبادلة مع درجة حرارة المستودع. -3. عوّض في المعادلة، فتحصل على أقصى كفاءة يستطيع أي محرك بلوغها بين $T_h$ و$T_c$. +1. الكفاءة هي الشغل مقسومًا على الحرارة المأخوذة من الجانب الساخن. والشغل يساوي الحرارة المأخوذة ناقص الحرارة المرمية. +2. المحرك المثالي لا يزيد الإنتروبيا الكلية. لذلك تكون نسبة الحرارتين مساوية لنسبة درجتي الحرارة. +3. نعوّض بهذه النسبة. المحرك الحقيقي يرمي حرارة أكثر، فكفاءته أقل. ## Real world -### محطات توليد الطاقة -تُبنى توربينات البخار لتعمل عند أعلى Th ممكن عمليًا وأدنى Tc ممكن عمليًا، وذلك تحديدًا لدفع الكفاءة نحو حد كارنو. +### محطات الكهرباء + +تستخدم المحطات أسخن بخار تتحمله معادنها، وتبرّده بأبرد ماء أو هواء متاح. كلا الأمرين يرفع الحد. ### محركات السيارات -تحقق محركات الاحتراق الحقيقية كفاءة أقل بكثير من 40%. فالاحتكاك وفقد الحرارة وعدم الانعكاسية كلها تضيف إنتروبيا تتجاوز حد كارنو الأدنى. -### الثلاجات والمضخات الحرارية -تُشغَّل الدورة نفسها بالعكس، فتنقل الحرارة من البارد إلى الساخن باستخدام شغل خارجي. تظل محكومة بالنسبة Tc/Th نفسها، لكنها تُسمّى الآن معامل أداء. +يحوّل محرك السيارة أقل من نصف طاقة الوقود إلى حركة. الباقي يخرج حرارة من العادم ومن جسم المحرك. + +### الثلاجات والمكيفات + +الثلاجة محرك يعمل بالعكس: تستخدم الشغل لتنقل الحرارة من البارد إلى الساخن. ودرجتا الحرارة تحددان أفضل أداء لها أيضًا. + +### الحركة الدائمة -### لماذا تفشل الحركة الدائمة -تدّعي بعض الآلات طاقة مجانية، أي تحويل 100% من الحرارة إلى شغل عند أي فارق حرارة محدود. هذا يخالف القانون الثاني، ولهذا فشل كل جهاز من هذا النوع عبر التاريخ. +لا يمكن صنع آلة تحوّل كل الحرارة إلى شغل دون أن ترمي شيئًا منها إلى جانب بارد. القانون الثاني يمنع ذلك. diff --git a/content/lessons/thermodynamics/entropy-and-heat-engines/en.md b/content/lessons/thermodynamics/entropy-and-heat-engines/en.md index 0ed2130c..53ba143b 100644 --- a/content/lessons/thermodynamics/entropy-and-heat-engines/en.md +++ b/content/lessons/thermodynamics/entropy-and-heat-engines/en.md @@ -1,20 +1,15 @@ --- -title: Entropy and the limits of heat engines -summary: >- - A car engine turns only about a third of its fuel's heat into motion; the - rest is wasted as exhaust heat no matter how well the engine is built, and - this lesson shows the hard limit no engine can beat. +title: Entropy and the limit on heat engines +summary: 'Find the largest fraction of heat that an engine can turn into work between a hot and a cold temperature, and see why that fraction stays below 1.' parameters: - Tc: cold reservoir Tc - x: hot reservoir Th + Tc: 'Tc — cold reservoir temperature' + x: 'x — hot reservoir temperature Th' variables: - - absolute temperature of the hot and cold reservoirs - - efficiency — the fraction of heat input converted into useful work - - >- - entropy — roughly, the number of equivalent microscopic ways energy can be - arranged + - 'absolute temperatures of the hot and cold reservoirs, in kelvin' + - 'efficiency: work output divided by heat taken from the hot reservoir' + - 'entropy: a quantity that rises by Q/T when heat Q enters a body at absolute temperature T' charts: - - title: Efficiency for several cold-reservoir temperatures + - title: Efficiency limit for several cold-reservoir temperatures xLabel: Th (K) yLabel: η series: @@ -25,54 +20,58 @@ charts: ## Try it -1. Drag the hot-reservoir point x to the right. Watch the efficiency climb but bend under the line at 1. -2. Raise the slider "cold reservoir Tc". Watch the whole curve drop. -3. Read the efficiency value where the curve sits — no engine between these two temperatures can beat it. +1. Set Tc = 300 K and x = 500 K. The curve reads η = 0.40: at most 40% of the heat taken in can become work, and at least 60% passes to the cold reservoir. +2. Keep Tc = 300 K and move x to 900 K. The limit rises to about 0.67. It is higher, but still below 1. +3. Keep x = 900 K and raise Tc to 350 K. The limit falls to about 0.61, because the cold temperature is now a larger fraction of the hot one. ## Real-life examples -1. **A coal power plant.** Steam near 800 K driving turbines that reject heat to river water around 300 K sets a Carnot ceiling of about 63% — real plants fall well short of even that. -2. **A car engine.** Combustion gases near 650 K, exhausting into air around 320 K, cap the theoretical efficiency at about 51% — real engines manage only a fraction of that due to friction and losses. -3. **A low-temperature geothermal plant.** With a modest source at 450 K and a cold side at 290 K, the Carnot ceiling drops to about 36%, which is why geothermal plants are less efficient than coal or gas plants. +1. **A steam power plant.** With Tc = 300 K and x = 800 K, the limit is 0.625. A real plant between these temperatures converts less, because friction and heat flow across temperature differences are not reversible. +2. **A solar-thermal plant.** With Tc = 320 K and x = 650 K, the limit is about 0.51. Air cooling on a hot day raises Tc and lowers the limit. +3. **A low-temperature geothermal plant.** With Tc = 290 K and x = 450 K, the limit is about 0.36. A cooler heat source gives a lower limit even with a cool surrounding. ## Test yourself -1. Get the Carnot efficiency to exactly 50%. -2. Push the efficiency above 60% while keeping a realistic cold reservoir (Tc at least 280 K). -3. Using the lowest possible cold-reservoir temperature (250 K), reach an efficiency of at least 55%. +1. Make the efficiency limit equal to 0.50. +2. Raise the limit above 0.60 while keeping Tc at 280 K or higher. +3. Set Tc = 250 K and reach a limit of at least 0.55. ## Intuition -A typical car engine converts only around 30% of the heat released by burning fuel into motion — the rest escapes as hot exhaust and warm metal, and no amount of clever engineering can push a heat engine to 100%, even in principle. The picture on screen shows this limit directly: drag the hot-reservoir point, labelled $x$ in kelvin (try 800, like hot steam in a power plant), and watch the efficiency curve climb but visibly bend over, always staying under the horizontal line at 1. +A heat engine takes heat from something hot, turns part of it into work, and passes the rest to something cooler. Suppose an engine takes 1000 J from steam at 600 K, and its surroundings are at 300 K. Can all 1000 J become work? No. The heat passed to the cold side must be at least the fraction 300/600 of the heat taken in, so at least 500 J leaves as heat and at most 500 J becomes work. The fraction of the heat input that becomes work is called the efficiency. Its largest possible value between two temperatures is the Carnot efficiency, here 0.50. -No matter how hot you make the source, some heat is required by the laws of physics to flow, unused, to the cold side. Raise the slider "cold reservoir Tc" instead — say from 300 to 340 kelvin, close to a river used for cooling — and the whole curve drops: a smaller gap between hot and cold means less available work for every unit of heat burned. Engines are fundamentally about that gap, not about either temperature alone. +On the graph, the horizontal position is the hot temperature x in kelvin and the height is the efficiency limit. The curve rises as x grows, quickly at first and then slowly: going from 400 K to 500 K lifts the limit from 0.25 to 0.40, while going from 800 K to 900 K lifts it only from about 0.63 to 0.67. It never reaches 1, because the cold temperature is never zero. Raising Tc lowers the whole curve. Only the ratio of the two absolute temperatures matters: 300 K and 600 K give the same limit as 250 K and 500 K. The chart compares three values of Tc. The 3D view is a schematic of heat leaving the hot reservoir and dividing into work and rejected heat. ## Formal -The second law forbids any engine operating between two reservoirs from exceeding the Carnot efficiency $\eta_{\text{Carnot}} = 1 - T_c/T_h$, achieved only by a reversible cycle. +An engine working in a cycle takes heat $Q_h$ from a reservoir at absolute temperature $T_h$, does net work $W$, and rejects heat $Q_c$ to a reservoir at $T_c$. Energy conservation over one cycle gives $W=Q_h-Q_c$, and the efficiency is $\eta=W/Q_h$. Both temperatures are in kelvin, with $T_h>T_c>0$. -Equivalently, no process can decrease the total entropy of an isolated system: $\Delta S_{\text{total}} \ge 0$, with equality only for reversible processes — real engines always generate some entropy and so fall short of the Carnot bound. +The limit comes from entropy, written S. When heat Q enters a reservoir at absolute temperature T, the reservoir's entropy rises by Q/T; when heat leaves, it falls by the same rule. The engine returns to its starting state after each cycle, so the total change is $\Delta S_{\text{total}}=Q_c/T_c-Q_h/T_h$. The second law requires $\Delta S_{\text{total}}\ge 0$, which gives $Q_c/Q_h\ge T_c/T_h$ and therefore $\eta\le\eta_{\text{Carnot}}=1-T_c/T_h$. Equality holds only for a reversible cycle, one that creates no entropy. ## Advanced -Entropy can be understood statistically as $S = k_B\ln\Omega$, where $\Omega$ is the number of microscopic arrangements consistent with the observed macroscopic state; the second law is then simply the statement that isolated systems evolve toward their overwhelmingly more probable, higher-$\Omega$ configurations, which is why heat spontaneously flows from hot to cold and not the reverse. +The curve's slope with respect to the hot temperature is $T_c/T_h^2$, which shrinks as $T_h$ grows; this is the flattening seen on the graph. Lowering $T_c$ by 1 K changes the limit by $1/T_h$, more than raising $T_h$ by 1 K does. The model assumes two reservoirs whose temperatures stay fixed. Burning gas cools as it gives up heat, so a real engine is not described by one hot temperature. Statistically, entropy is $S=k_B\ln\Omega$, where $\Omega$ counts the microscopic arrangements that match the observed state; the lesson on the second law develops that view. ## Derivation -1. Efficiency is useful work out divided by heat drawn from the hot reservoir. -2. For a reversible (Carnot) cycle, heat exchanged is proportional to reservoir temperature. -3. Substitute; this is the maximum efficiency any engine can achieve between $T_h$ and $T_c$. +1. Efficiency compares the net work with the heat taken from the hot reservoir. Over a complete cycle, the work equals the heat taken in minus the heat rejected. +2. A reversible cycle leaves total entropy unchanged, so the two heats are in the same ratio as the two absolute temperatures. +3. Substitute that ratio. Any irreversible step rejects more heat than this, so a real engine has a lower efficiency. ## Real world ### Power plants -Steam turbines are built to run at the highest practical Th and lowest practical Tc precisely to push efficiency toward the Carnot limit. + +Steam plants use the hottest steam their materials tolerate and the coolest available water or air, because both changes raise the limit. ### Car engines -Real combustion engines achieve well under 40% efficiency — friction, heat loss, and irreversibility all add entropy beyond the Carnot minimum. + +Petrol and diesel engines convert well under half of the fuel's energy into work. Friction, heat lost through the cylinder walls and hot exhaust all keep them below the reversible limit. ### Refrigerators and heat pumps -Running the same cycle in reverse moves heat from cold to hot using work — bounded by the same Tc/Th ratio, now expressed as a coefficient of performance. + +Run in reverse, the cycle uses work to move heat from cold to hot. The same two temperatures set the best possible performance. ### Why perpetual motion fails -A “free energy” machine claiming 100% conversion of heat to work at any finite temperature gap violates the second law, which is why every such device in history has failed. + +A machine that turned heat from a single reservoir completely into work, cycle after cycle, would lower total entropy. The second law rules it out. diff --git a/content/lessons/thermodynamics/entropy-and-heat-engines/lesson.yaml b/content/lessons/thermodynamics/entropy-and-heat-engines/lesson.yaml index 5b67ea69..97ad70c5 100644 --- a/content/lessons/thermodynamics/entropy-and-heat-engines/lesson.yaml +++ b/content/lessons/thermodynamics/entropy-and-heat-engines/lesson.yaml @@ -35,7 +35,7 @@ parameters: min: 400 max: 900 step: 5 - value: 600 + value: 500 unit: K variables: - T_h, T_c @@ -43,7 +43,7 @@ variables: - S derivation: - \eta = \frac{W}{Q_h} = \frac{Q_h - Q_c}{Q_h} - - "\\text{reversible cycle: } \\frac{Q_c}{Q_h} = \\frac{T_c}{T_h}" + - "\\frac{Q_c}{T_c} = \\frac{Q_h}{T_h} \\;\\Rightarrow\\; \\frac{Q_c}{Q_h} = \\frac{T_c}{T_h}" - \eta_{\text{Carnot}} = 1 - \frac{Q_c}{Q_h} = 1 - \frac{T_c}{T_h} charts: - domain: diff --git a/content/lessons/thermodynamics/first-law-thermodynamics/ar.md b/content/lessons/thermodynamics/first-law-thermodynamics/ar.md index cbc3e6e9..f01f11fe 100644 --- a/content/lessons/thermodynamics/first-law-thermodynamics/ar.md +++ b/content/lessons/thermodynamics/first-law-thermodynamics/ar.md @@ -1,69 +1,64 @@ --- title: 'القانون الأول: الطاقة والحرارة والشغل' -summary: >- - مضخة الدراجة تسخن وأنت تضغط الهواء، والهواء الصاعد يبرد وهو يتمدد. قاعدة واحدة تفسر الاثنين. +summary: 'الطاقة لا تختفي ولا تظهر من لا شيء. هنا تحسب ما يدخل الغاز من حرارة وما يخرج منه من شغل.' parameters: - 'n': كمية الغاز n - T: درجة الحرارة T - a: الحجم الابتدائي V₁ - b: الحجم النهائي V₂ + n: 'n — كمية الغاز' + T: 'T — درجة الحرارة، وتبقى ثابتة' + a: 'a — الحجم في البداية V₁' + b: 'b — الحجم في النهاية V₂' variables: - - الطاقة الداخلية للغاز - - الحرارة المضافة إلى الغاز (موجبة) أو المسحوبة منه (سالبة) - - الشغل الذي يبذله الغاز أثناء تمدده، وهو المساحة المظلَّلة تحت المنحنى P(V) - - ضغط الغاز وحجمه ودرجة حرارته المطلقة + - 'الطاقة الداخلية للغاز' + - 'الحرارة الداخلة إلى الغاز؛ سالبة إذا خرجت منه' + - 'الشغل الذي يبذله الغاز؛ سالب إذا بُذل عليه' + - 'الضغط والحجم ودرجة الحرارة بالكلفن' --- ## Try it -1. اسحب العلامتين a وb على محور الحجم. راقب المنطقة المظلَّلة بينهما. إنها الشغل الذي يبذله الغاز. -2. ارفع منزلق «درجة الحرارة T». راقب المنحنى كله يرتفع، فتغطي الفترة المظلَّلة نفسها مساحة أكبر. -3. وسّع الفجوة بين a وb. راقب المساحة المظلَّلة، والشغل المبذول، يكبران. +1. اجعل n = 1 mol وT = 300 K وa = 1 L وb = 5 L. المساحة تحت المنحنى هي الشغل الذي يبذله الغاز، وتساوي نحو 4014 J. +2. ثبّت n وa وb وارفع T إلى 400 K. يزداد الشغل بالنسبة نفسها، إلى نحو 5352 J. كل قيمة لـT تعطي منحنى جديدًا. +3. اجعل a = 5 L وb = 1 L. الغاز الآن ينضغط، فيصبح الشغل سالبًا: المحيط هو الذي يبذل شغلًا على الغاز. وعند a = b يكون الشغل صفرًا. ## Real-life examples -1. **شوط قدرة في محرك سيارة.** غاز احتراق ساخن (n = 1 mol، T = 500 K) يتمدد من 1 إلى 5 لترات فيدفع المكبس إلى الخارج، مؤديًا الشغل الذي يُدير عمود المرفق. -2. **أداة هواء مضغوط تُحرِّر الهواء.** هواء (n = 0.5 mol، T = 300 K) يتمدد من 2 إلى 8 لترات وهو يغادر الخزان، فيبذل شغلًا ميكانيكيًا على ما يُحرّكه، ويبرد قليلًا أثناء ذلك. -3. **بالون طقس يرتفع عبر هواء رقيق.** كتلة هواء (n = 2 mol، T = 250 K) تتمدد من 3 إلى 9 لترات مع انخفاض الضغط عند الارتفاع، فتبذل شغلًا ضد الهواء المحيط وتبرد وهي تصعد. +1. **تمدد عند درجة حرارة أعلى.** عند n = 1 mol وT = 500 K، يتمدد الغاز من 1 إلى 5 L ويبذل شغلًا W ≈ 6690 J. لتبقى درجة حرارته ثابتة يجب أن يدخله المقدار نفسه من الحرارة. +2. **كمية غاز أصغر.** عند n = 0.5 mol وT = 300 K، يتمدد الغاز من 2 إلى 8 L ويبذل شغلًا W ≈ 1729 J. +3. **تمدد إلى ثلاثة أمثال الحجم.** عند n = 2 mol وT = 250 K، يتمدد الغاز من 3 إلى 9 L ويبذل شغلًا W ≈ 4567 J. هذه أمثلة مبسطة، وليست وصفًا كاملًا لما يحدث في محرك. ## Test yourself -1. اجعل الشغل الذي يبذله الغاز يساوي 2000 J بالضبط. -2. ضاعف الحجم بالضبط (b = 2a) مع إبقاء الشغل فوق 1500 J. -3. أظهر الانضغاط. اجعل b أصغر من a بحيث ينخفض الشغل الذي يبذله الغاز إلى −1500 J أو أقل. +1. احصل على شغل موجب قريب من 2000 J. +2. اجعل b = 2a والشغل أكبر من 1500 J. +3. اضغط الغاز حتى يكون الشغل −1500 J أو أقل. ## Intuition -انفخ إطار دراجة بسرعة، فيسخن جسم المضخة بوضوح. يبذل ضغط الهواء عليه شغلًا، ويتحول هذا الشغل إلى طاقة داخلية إضافية تشعر بها كحرارة. في الرسم، اسحب $a$ و$b$، وهما العلامتان على محور الحجم، لتحديد حجمي بداية تمدد الغاز ونهايته. المنطقة الزرقاء المظلَّلة تحت المنحنى بينهما هي الشغل الذي يبذله الغاز وهو يدفع إلى الخارج. جرّب الانتقال من $a=1$ إلى $b=5$ لترات وراقب الشريط يتسع. +تخيل غازًا محبوسًا في أسطوانة لها مكبس. طاقة هذا الغاز تشبه رصيدًا في حساب. الحرارة التي تدخل الغاز إيداع يزيد الرصيد. وحين يدفع الغاز المكبس يبذل شغلًا، وهذا سحب ينقص الرصيد. إذا دخل الغاز 100 J من الحرارة وبذل 100 J من الشغل بقي رصيده كما كان. وإذا بذل 100 J من الشغل ولم تدخله أي حرارة نقصت طاقته 100 J، فيبرد. نسمي رصيد الغاز من الطاقة الطاقة الداخلية. والقانون الأول يقول إن هذا الحساب يتوازن دائمًا: لا تضيع طاقة ولا تأتي من لا شيء. -وسّع ذلك الشريط المظلَّل أكثر، أو ابدأه عند نقطة أعلى على المنحنى، فترى مباشرة لماذا يعني التمدد الأكبر، أو البدء بضغط أعلى، شغلًا أكبر دائمًا. تمامًا كما تمثل المساحة تحت منحنى السرعة مقابل الزمن المسافة المقطوعة. ارفع الآن منزلق «درجة الحرارة T» مع تثبيت $a$ و$b$، فيرتفع المنحنى كله، وتغطي الفترة المظلَّلة نفسها مساحة أكبر. يدفع الغاز الأسخن بقوة أكبر عند كل حجم، فيبذل التمدد نفسه شغلًا أكبر الآن. وهذه هي الصورة وراء فكرة «تسخين الغاز يجعله يبذل شغلًا أكبر»، وهي الفكرة الجوهرية داخل كل محرك حراري. +المثال المعروض يُبقي درجة حرارة الغاز ثابتة. عندها لا تتغير طاقته الداخلية، فكل شغل يبذله الغاز وهو يتمدد تعوّضه حرارة تدخل إليه. على الرسم، المحور الأفقي هو الحجم باللتر، والمحور الرأسي هو الضغط بالكيلوباسكال. ينخفض المنحنى لأن ضغط الغاز يقل كلما تمدد. والمساحة تحت المنحنى بين a وb هي الشغل. تكون موجبة إذا تمدد الغاز من a إلى b، وسالبة إذا انضغط. المكبس في العرض الثلاثي الأبعاد يكرر الحركة من a إلى b للتوضيح، وليس محركًا يدور من تلقاء نفسه. ## Formal -ينص القانون الأول على أن $\Delta U = Q - W$، إذ تتغير الطاقة الداخلية بمقدار الحرارة الداخلة مطروحًا منها الشغل الخارج. +القانون الأول هو $\Delta U=Q-W$. Q موجبة إذا دخلت الحرارة إلى الغاز، وW موجب إذا بذل الغاز شغلًا على ما حوله. الشغل الذي يبذله الغاز وهو يغيّر حجمه هو $W=\int_{V_1}^{V_2}P_{ext}\,dV$. إذا تغيّر الحجم ببطء شديد كان الضغط الخارجي مساويًا لضغط الغاز P، فنستخدم P في الحساب. -بالنسبة لغاز يتمدد في ظروف شبه ثابتة، يكون الشغل $W = \int_{V_1}^{V_2} P\,dV$، وهو المساحة الموجَّهة تحت منحنى P–V بين الحجمين. +عند ثبات n وT يكون ضغط الغاز $P=nRT/V$. فينتج $W=nRT\ln(V_2/V_1)$. ودرجة حرارة الغاز المثالي لم تتغير، فطاقته الداخلية لم تتغير: $\Delta U=0$. إذن $Q=W$. إذا كان الضغط بالكيلوباسكال والحجم باللتر خرجت المساحة بالجول، لأن $1\ \mathrm{kPa\cdot L}=1\ \mathrm J$. وإذا كانت b أصغر من a كان الشغل سالبًا. ## Advanced -بالنسبة لغاز مثالي محفوظ عند درجة حرارة ثابتة، تعتمد $U$ على $T$ فقط. لذلك يكون $\Delta U = 0$ في التمدد متساوي الحرارة، وبالتالي $Q = W = nRT\ln(V_2/V_1)$. أي أن كل الحرارة الممتصة تتحول مباشرة إلى شغل، دون أي تغيّر في الطاقة الداخلية. وهذه حالة خاصة ستتناقض لاحقًا بشدة مع العمليات الأديباتية ودورة كارنو المستخدمة في المحركات الحقيقية. +الحرارة والشغل يعتمدان على الطريق الذي يسلكه الغاز بين الحالتين. أما التغير في الطاقة الداخلية فيعتمد على حالتي البداية والنهاية فقط. لو ضغطت الغاز بسرعة في أسطوانة معزولة لما خرجت منه حرارة، فترتفع درجة حرارته، وهذه عملية تختلف عن المعروضة هنا. عند قيم كبيرة لـn أو T قد يخرج المنحنى من أعلى الرسم، لكن الشغل المحسوب يبقى صحيحًا. والتمدد وحده ليس محركًا؛ المحرك يحتاج إلى دورة كاملة تعيد الغاز إلى حالته الأولى. ## Derivation -1. قانون الغاز المثالي، أُعيدت صياغته ليعطي الضغط كدالة في الحجم عند ثبات $n, T$. -2. كامل منحنى P–V، فدرجة الحرارة ثابتة وتخرج من داخل التكامل. -3. في الغاز المثالي متساوي الحرارة تبقى الطاقة الداخلية بلا تغيّر، فتتحول كل الحرارة الممتصة إلى شغل. +1. نكتب ضغط الغاز المثالي بدلالة حجمه، مع ثبات الكمية ودرجة الحرارة. +2. نجمع الشغل على كل تغير صغير في الحجم من البداية إلى النهاية، وهذا هو التكامل. الكميات الثابتة تخرج منه. +3. نحسب لوغاريتم نسبة الحجمين. ولأن درجة الحرارة ثابتة لم تتغير الطاقة الداخلية، فالحرارة الداخلة تساوي الشغل. ## Real world -### محركات السيارات -كل شوط للمكبس هو تمدد P–V. والمساحة المحصورة داخل الدورة الكاملة على مخطط P–V هي الشغل الصافي لكل دورة. +### ضغط الغازات وتمددها -### أدوات الهواء المضغوط -يبذل الهواء المضغوط عند تحريره شغلًا ميكانيكيًا أثناء تمدده، ويبرد في هذه العملية تمامًا كما يتنبأ القانون الأول. +يسخن منفاخ الدراجة حين تضغط الهواء فيه بسرعة: الشغل الذي تبذله يدك صار طاقة داخلية في الهواء. -### الطقس -تتمدد كتل الهواء الصاعدة وتبرد وهي تبذل شغلًا ضد الضغط المحيط الأقل، وهو الشغل نفسه P–V لكن على مقياس كوكبي. +### المحركات -### الثلاجات -تضغط الثلاجة سائل التبريد فيُبذل عليه شغل، ثم تتركه يتمدد فيبذل هو شغلًا. بهذا تنقل الحرارة عكس اتجاهها الطبيعي بشغل مصدره خارجي. +في المحرك يتمدد الغاز الساخن ويدفع المكبس، ثم يُضغط من جديد. المساحة المحصورة داخل الدورة على رسم الضغط والحجم هي الشغل الصافي. diff --git a/content/lessons/thermodynamics/first-law-thermodynamics/en.md b/content/lessons/thermodynamics/first-law-thermodynamics/en.md index 42781345..68473527 100644 --- a/content/lessons/thermodynamics/first-law-thermodynamics/en.md +++ b/content/lessons/thermodynamics/first-law-thermodynamics/en.md @@ -1,72 +1,64 @@ --- title: 'The first law: energy, heat, and work' -summary: >- - A bicycle pump gets warm as you compress air inside it, and rising air high - in the atmosphere cools as it expands — both are the same rule: energy put - in as heat, minus energy that leaves as work, is exactly what changes an - object's internal energy. +summary: 'Account for heat, work and internal energy, using a constant-temperature ideal-gas process as a worked example.' parameters: - 'n': amount of gas n - T: temperature T - a: initial volume V₁ - b: final volume V₂ + n: 'n — amount of ideal gas' + T: 'T — temperature held fixed along the path' + a: 'a — initial volume V₁' + b: 'b — final volume V₂' variables: - - internal energy of the gas - - heat added to the gas (positive) or removed (negative) - - 'work done by the gas as it expands, the shaded area under P(V)' - - 'pressure, volume, and absolute temperature of the gas' + - 'internal energy of the gas' + - 'heat transferred into the gas, with sign' + - 'work done by the gas, with sign' + - 'pressure, volume and absolute temperature' --- ## Try it -1. Drag markers a and b along the volume axis. Watch the shaded region between them — that is the work the gas does. -2. Raise the slider "temperature T". Watch the whole curve lift, so the same shaded strip covers more area. -3. Widen the gap between a and b. Watch the shaded area, and the work done, grow. +1. Set n = 1 mol, T = 300 K, a = 1 L and b = 5 L. The signed area gives about 4014 J of work done by the gas. +2. Keep n, a and b fixed and raise T to 400 K. Work rises in the same ratio, to about 5352 J. Each selected curve is a separate constant-temperature process. +3. Set a = 5 L and b = 1 L. The signed work becomes negative: the surroundings do work on the gas during compression. At a = b, work is zero. ## Real-life examples -1. **A car engine's power stroke.** Hot combustion gas (n = 1 mol, T = 500 K) expanding from 1 to 5 litres pushes the piston outward, doing the work that turns the crankshaft. -2. **A compressed-air tool releasing air.** Air (n = 0.5 mol, T = 300 K) expanding from 2 to 8 litres as it leaves the tank does mechanical work on whatever it is driving, cooling slightly as it goes. -3. **A weather balloon rising through thin air.** A parcel of air (n = 2 mol, T = 250 K) expanding from 3 to 9 litres as pressure drops with altitude does work pushing against the surrounding air, cooling as it climbs. +1. **Warmer isothermal expansion.** At n = 1 mol and T = 500 K, expansion from 1 to 5 L gives W ≈ 6690 J. Maintaining temperature requires the same amount of heat input. +2. **A smaller amount of gas.** At n = 0.5 mol and T = 300 K, expansion from 2 to 8 L gives W ≈ 1729 J. Temperature stays fixed in this example. +3. **A threefold expansion.** At n = 2 mol and T = 250 K, expansion from 3 to 9 L gives W ≈ 4567 J. These are ideal isothermal paths, not complete models of an engine stroke or rising air parcel. ## Test yourself -1. Get the work done by the gas to exactly 2000 J. -2. Exactly double the volume (b = 2a) while keeping the work above 1500 J. -3. Show compression: set b smaller than a so the work done by the gas drops to −1500 J or below. +1. Obtain positive work near 2000 J. +2. Set b = 2a and make work greater than 1500 J. +3. Compress the gas so work done by it is −1500 J or less. ## Intuition -Pump up a bicycle tire quickly and the pump barrel gets noticeably warm — squeezing the air does work on it, and that work becomes extra internal energy you can feel as heat. On screen, drag $a$ and $b$, the two markers on the volume axis, to set the start and end volume of a gas expanding the other way around. The shaded blue region under the curve between them is the work the gas does as it pushes outward — try moving from $a=1$ to $b=5$ litres and watch the strip widen. +Choose the gas as the system. Heat entering adds energy; work done by the gas transfers energy out. Internal energy changes by the difference. If the gas does 100 J of work while receiving 100 J of heat, its internal energy stays unchanged. If heat transfer is zero, doing positive work instead reduces internal energy. -Widen that shaded strip further, or start it at a higher point on the curve, and you can see directly why expanding more, or starting at higher pressure, always means more work done — exactly the way the area under a speed-vs-time graph gives you distance travelled. Now raise the slider "temperature T" with $a$ and $b$ fixed: the whole curve lifts upward, so the same shaded interval covers more area. Hotter gas pushes harder at every volume, so the same expansion now does more work — this is the picture behind "heating a gas lets it do more work", the core idea inside every heat engine. +The displayed example deliberately holds an ideal gas at constant temperature. Its internal energy therefore stays fixed, and heat must replace the energy transferred out as work during expansion. On the graph, horizontal position is volume in litres and vertical position is pressure in kilopascals. The signed integral records the direction from a to b. The 3D piston repeats a schematic sweep; its labels describe the selected a-to-b process, not a self-running engine cycle. ## Formal -The first law states $\Delta U = Q - W$: internal energy changes by whatever heat comes in minus whatever work goes out. +For a closed system with negligible changes in overall kinetic and potential energy, $\Delta U=Q-W$. Q is positive into the system, and W is positive when the system does work on its surroundings. Boundary work is $W=\int_{V_1}^{V_2}P_{ext}\,dV$; for a mechanically reversible, quasistatic path, use the gas pressure P in that integral. -For a gas expanding at (quasi-)constant conditions, work is $W = \int_{V_1}^{V_2} P\,dV$ — the signed area under the P–V curve between the two volumes. +Here $P=nRT/V$ at fixed n and T, so $W=nRT\ln(V_2/V_1)$. An ideal gas has $\Delta U=0$ on this isothermal path, giving $Q=W$. With pressure in kPa and volume in litres, area is in joules because $1\ \mathrm{kPa\cdot L}=1\ \mathrm J$. Use the signed-area readout when the bounds are reversed. ## Advanced -For an ideal gas held at constant temperature, $U$ depends on $T$ alone, so an isothermal expansion has $\Delta U = 0$ and therefore $Q = W = nRT\ln(V_2/V_1)$ — all the heat absorbed is converted directly into work, with no change in internal energy, a special case that will later contrast sharply with the adiabatic and Carnot-cycle processes used in real engines. +Heat and work depend on the path, while internal-energy change depends on the end states. A fast insulated compression is different from this isothermal process and can raise temperature. The pressure curve can extend above the plotting window at high n or T; clipping the drawing does not change the integral. An isothermal expansion can convert absorbed heat to work, but it is not a complete cycle returning the gas to its initial state. ## Derivation -1. Ideal gas law, rearranged to give pressure as a function of volume at fixed $n, T$. -2. Integrate the P–V curve — temperature is constant so it comes outside the integral. -3. Isothermal ideal gas: internal energy is unchanged, so all absorbed heat becomes work. +1. Rearrange the ideal-gas equation to express pressure in terms of volume, with amount and temperature fixed. +2. Integrate pressure over the selected volume interval; the constant factors stay outside the integral. +3. Evaluate the logarithmic volume ratio. Constant ideal-gas temperature means no internal-energy change, so heat equals work with the stated sign convention. ## Real world -### Car engines -Each piston stroke is a P–V expansion; the enclosed area of the whole cycle on a P–V diagram is the net work per cycle. +### Compression and expansion -### Compressed air tools -Releasing compressed air does mechanical work as it expands, cooling in the process exactly as the first law predicts. +The first law keeps track of energy in many gas processes. To calculate a particular path, also specify heat transfer and how pressure changes with volume. -### Weather -Rising air parcels expand and cool as they do work pushing against lower surrounding pressure — the same P–V work at planetary scale. +### Engine cycles -### Refrigerators -A refrigerant is compressed (work done on it) and later expands (work done by it), moving heat against its natural direction using externally supplied work. +The signed area enclosed by a quasistatic pressure–volume cycle gives net boundary work. One expansion curve alone does not describe the complete cycle. diff --git a/content/lessons/thermodynamics/gas-laws/ar.md b/content/lessons/thermodynamics/gas-laws/ar.md index 8d9d9f3c..057a5d5c 100644 --- a/content/lessons/thermodynamics/gas-laws/ar.md +++ b/content/lessons/thermodynamics/gas-laws/ar.md @@ -1,70 +1,64 @@ --- title: 'قوانين الغازات' -summary: >- - اضغط الهواء فيصعب الدفع، وبرّد البالون فينكمش. ثلاث قواعد تربط ضغط الغاز وحجمه وحرارته. +summary: 'اضغط الغاز أو سخّنه وراقب ضغطه. غيّر شيئًا واحدًا كل مرة لترى أثره وحده.' parameters: - V: الحجم V - T: درجة الحرارة المطلقة T - n: كمية الغاز n + V: 'V — الحجم باللتر' + T: 'T — درجة الحرارة بالكلفن' + n: 'n — كمية الغاز' variables: - - الضغط - - الحجم - - كمية الغاز، بالمول - - ثابت الغازات العام، 8.314 J/(mol·K) - - درجة الحرارة المطلقة + - 'الضغط، بالكيلوباسكال' + - 'الحجم، باللتر' + - 'كمية الغاز بالمول' + - 'ثابت الغازات، 8.314 kPa·L/(mol·K)' + - 'درجة الحرارة بالكلفن' --- ## Try it -1. أبقِ منزلق «درجة الحرارة T» ثابتًا، واسحب «الحجم V» للأسفل. راقب قراءة الضغط ترتفع مع انضغاط الغاز. هذا قانون بويل. -2. أبقِ «الحجم V» ثابتًا، واسحب «درجة الحرارة T» للأعلى. راقب الضغط يرتفع أيضًا دون أن يتحرك شيء. هذا قانون غاي-لوساك. -3. اسحب «درجة الحرارة T» و«الحجم V» للأعلى معًا، واضبطهما حتى تتوقف قراءة الضغط عن التغيّر. هذا المسار الثابت الضغط هو قانون شارل. +1. اجعل n = 1 mol وT = 300 K وV = 10 L. الضغط نحو 249 kPa. اخفض V إلى 5 L، أي النصف، ولا تغيّر n وT. يتضاعف الضغط. +2. أعد V إلى 10 L وارفع T من 300 إلى 400 K. يرتفع الضغط من نحو 249 إلى 333 kPa. زادت درجة الحرارة بمقدار الثلث، فزاد الضغط بمقدار الثلث. +3. جرّب n = 1 وT = 250 K وV = 10 L، ثم n = 1 وT = 300 K وV = 12 L. الضغط في الحالتين نحو 208 kPa. زادت درجة الحرارة والحجم بالنسبة نفسها، فلم يتغير الضغط. ## Real-life examples -1. **مضخة دراجة.** اضغط 1 مول من هواء الغرفة من 10 لتر إلى 3 لتر، فتصعب المضخة عليك بوضوح. عند درجة حرارة ثابتة يرتفع الضغط مع تقلص الحجم. هذا قانون بويل. -2. **بالون هيليوم في سيارة باردة.** يبرد نصف مول من الغاز من 293 K إلى 250 K داخل بالون شبه ثابت، فيتقلص نحو 8 لتر. يشغل الغاز الأبرد حيزًا أصغر عند الضغط نفسه تقريبًا. هذا قانون شارل. -3. **علبة مغلقة قرب نار.** يسخن وعاء صلب مغلق سعته 10 لتر من درجة حرارة الغرفة إلى 380 K. يرتفع ضغطه الداخلي بحدّة رغم أن حجمه لا يتغير إطلاقًا. هذا قانون غاي-لوساك، وهو سبب تحذير علب الأيروسول من الحرارة. +1. **غاز مضغوط في حجم صغير.** عند n = 1 mol وT = 293 K وV = 3 L يكون الضغط نحو 812 kPa. في الواقع يسخن الغاز حين تضغطه بسرعة، كما في منفاخ الدراجة، وهنا نفترض أن درجة حرارته بقيت ثابتة. +2. **غاز بارد.** عند n = 0.5 mol وT = 250 K وV = 8 L يكون الضغط نحو 130 kPa. +3. **غاز ساخن في وعاء لا يتغير حجمه.** عند n = 1 mol وT = 380 K وV = 10 L يكون الضغط نحو 316 kPa. قارنه بنحو 244 kPa عند 293 K للكمية والحجم نفسيهما. ## Test yourself -1. اجعل الضغط نحو 300 كيلو باسكال. -2. أظهر قانون بويل: أبقِ درجة الحرارة قرب 293 K، واضغط الحجم دون 5 لتر. -3. أظهر قانون شارل: برّد الغاز دون 230 K، وقلّص الحجم دون 10 لتر. +1. جِد حالة ضغطها قريب من 300 kPa. +2. اجعل T بين 278 K و308 K، واجعل V أقل من 5 L. +3. اجعل T أقل من 230 K وV أقل من 10 L. ## Intuition -اضغط الكمية نفسها من الغاز في حيز أصغر عند درجة الحرارة نفسها، فتصطدم جزيئاته بالجدران أكثر، ويرتفع الضغط. هذا قانون بويل، وهو سبب صعوبة دفع مضخة الدراجة كلما تقدمت في شوطها. أبقِ «درجة الحرارة T» ثابتة في الرسم، واسحب «الحجم V» للأسفل. راقب قراءة الضغط ترتفع بالطريقة نفسها. +سُدّ فتحة منفاخ دراجة بإصبعك ثم اضغط المكبس. كلما صغر الحيز صار الضغط على إصبعك أقوى. السبب أن جزيئات الغاز تتحرك دون توقف وتصطدم بالجدران، ومجموع هذه الاصطدامات هو الضغط. إذا صغّرت الحيز اصطدمت الجزيئات بالجدران مرات أكثر، فيرتفع الضغط. وإذا سخّنت الغاز تحركت جزيئاته أسرع واصطدمت بقوة أكبر، فيرتفع الضغط أيضًا. وإذا زدت كمية الغاز زاد عدد الجزيئات المصطدمة. لذلك غيّر شيئًا واحدًا كل مرة؛ فإذا غيّرت شيئين معًا فقد يلغي أحدهما أثر الآخر. -أبقِ الآن «الحجم V» ثابتًا وارفع «درجة الحرارة T». يرتفع الضغط أيضًا، لأن الجزيئات الأسخن تصطدم بالجدران الثابتة بقوة أكبر وبتكرار أعلى. هذا قانون غاي-لوساك، وهو سبب وجوب عدم رمي علبة مغلقة في نار أبدًا. ارفع أخيرًا «درجة الحرارة T» و«الحجم V» معًا، وراقب قراءة الضغط تبقى ثابتة. هذا قانون شارل. يتمدد الغاز ليفسح مجالًا لحرارته الإضافية، بينما يبقى الضغط ثابتًا عند الضغط الجوي العادي مثلًا. القوانين الثلاثة كلها في الحقيقة قانون واحد، PV = nRT، مقسَّم بتثبيت متغير مختلف في كل مرة. +في الرسم، المكبس يحدد الحجم V، ومقياس الحرارة يحدد T، والمنزلق n يحدد كمية الغاز. يرتفع عمود الضغط كلما زاد الضغط. إذا بلغ العمود أعلى حد له توقف عن الارتفاع، لكن الرقم المكتوب يبقى صحيحًا. يعرض الرسم الحالة التي اخترتها مباشرة، ولا يعرض ما يحدث للغاز أثناء تحرك المكبس. والصندوق الثلاثي الأبعاد يوضح حركة الجزيئات فقط. ## Formal -يربط قانون الغاز المثالي $PV = nRT$ بين الضغط والحجم وكمية الغاز ودرجة الحرارة المطلقة، عبر ثابت واحد هو $R$. +قانون الغاز المثالي هو $PV=nRT$. P الضغط، وV الحجم، وn كمية الغاز بالمول، وT درجة الحرارة بالكلفن. إذا كان الحجم باللتر والضغط بالكيلوباسكال استخدمنا $R=8.314\ \mathrm{kPa\cdot L/(mol\cdot K)}$. وهذا هو العدد نفسه المستخدم مع الجول، لأن $1\ \mathrm{kPa\cdot L}=1\ \mathrm J$. -قانون بويل ($P \propto 1/V$ عند ثبات $n, T$)، وقانون شارل ($V \propto T$ عند ثبات $n, P$)، وقانون غاي-لوساك ($P \propto T$ عند ثبات $n, V$)، كل منها هو $PV = nRT$ نفسه مع تثبيت متغير واحد. +لنثبّت كمية الغاز n. إذا ثبتت T كان $P\propto1/V$: نصف الحجم يعطي ضعف الضغط. وإذا ثبت V كان $P\propto T$. وإذا ثبت P كان $V\propto T$. وبين أي حالتين للكمية نفسها من الغاز: $P_1V_1/T_1=P_2V_2/T_2$. يجب أن تكون درجة الحرارة بالكلفن في كل هذه العلاقات، لا بالدرجة المئوية. ## Advanced -بما أن القوانين الثلاثة تنبع من المعادلة نفسها، فلا بد أن تتسق معًا. يعطي دمج قانوني بويل وغاي-لوساك، لكمية ثابتة من الغاز تنتقل بين أي حالتين، الصيغة $P_1V_1/T_1 = P_2V_2/T_2$. هذا هو قانون الغاز المدمج، وتُحل به مسائل حقيقية يتغير فيها الضغط والحجم ودرجة الحرارة كلها معًا. +يفترض الغاز المثالي أن الجزيئات نقاط لا حجم لها، وأنها لا تتجاذب. الغازات الحقيقية تقترب من هذا في الظروف العادية، وتبتعد عنه إذا ضُغطت بشدة أو بُرّدت حتى أوشكت أن تصير سائلًا. والضغط هنا هو الضغط الكلي. أما مقياس ضغط الإطارات فيقرأ ما يزيد على ضغط الهواء الخارجي فقط. ## Derivation -1. ينطبق قانون الغاز المثالي PV = nRT على كمية ثابتة من الغاز. -2. ثبّت درجة الحرارة وأعد الترتيب فتحصل على P ∝ 1/V، وهو قانون بويل. -3. ثبّت الحجم بدلًا من ذلك فتحصل على P ∝ T، قانون غاي-لوساك. وثبّت الضغط فتحصل على V ∝ T، قانون شارل. +1. نبدأ من قانون الغاز المثالي، ونحدد ما الذي سيبقى ثابتًا. +2. إذا ثبتت الكمية ودرجة الحرارة، قلّ الضغط كلما زاد الحجم. +3. إذا ثبتت الكمية والحجم، زاد الضغط مع درجة الحرارة. وإذا ثبتت الكمية والضغط، زاد الحجم مع درجة الحرارة. ## Real world -### علب الأيروسول -تخبرك ملصقات التحذير بعدم تسخين علبة أيروسول أو ثقبها أبدًا. فحسب قانون غاي-لوساك، يبني حجم ثابت مغلق من الغاز ضغطًا خطيرًا وهو يسخن. +### إطار السيارة -### الغوص -تتبع رئتا الغواص قانون بويل بالعكس أثناء الصعود. يتمدد الغاز الذي ضغطته المياه في العمق كلما انخفض الضغط قرب السطح. لهذا يُدرَّب الغواصون على الزفير المستمر أثناء الصعود. +بعد قيادة طويلة يسخن الهواء داخل الإطار. حجم الإطار يكاد لا يتغير، فيرتفع الضغط. -### مناطيد الطقس -يتمدد بالون أُطلق عند سطح الأرض تمددًا هائلًا وهو يرتفع إلى هواء أرقّ وأقل ضغطًا. يتبع هذا قانون بويل، حتى ينفجر البالون في النهاية على ارتفاع عالٍ. +### البالون -### إطارات السيارات -تفترض توصيات ضغط الإطارات إطارًا «باردًا»، لأن القيادة تُسخّن الهواء المحبوس. وحسب قانون غاي-لوساك يرفع الهواء الساخن قراءة الضغط، رغم أنه لم يُضَف هواء أصلًا. - +إذا وضعت بالونًا منفوخًا في مكان بارد صغر حجمه. ضغط الهواء حوله ثابت تقريبًا، فيقل الحجم مع درجة الحرارة. diff --git a/content/lessons/thermodynamics/gas-laws/en.md b/content/lessons/thermodynamics/gas-laws/en.md index 11df322f..9a1bd99c 100644 --- a/content/lessons/thermodynamics/gas-laws/en.md +++ b/content/lessons/thermodynamics/gas-laws/en.md @@ -1,73 +1,64 @@ --- title: The gas laws, one at a time -summary: >- - A bike pump gets stiff to push as the air inside squeezes into a - smaller space, and a helium balloon left in a car overnight in winter - comes out noticeably saggy by morning — Boyle, Charles and Gay-Lussac - each found one slice of the same rule connecting a gas's pressure, - volume and temperature. +summary: 'Change one gas variable while holding the others fixed, and connect pressure, volume, amount and kelvin temperature.' parameters: - V: volume V - T: absolute temperature T - n: amount of gas n + V: 'V — volume in litres' + T: 'T — absolute temperature' + n: 'n — amount of gas' variables: - - pressure - - volume - - amount of gas, in moles - - universal gas constant, 8.314 J/(mol·K) - - absolute temperature + - 'absolute pressure, displayed in kPa' + - 'volume, controlled in litres' + - 'amount of gas in moles' + - 'gas constant, 8.314 kPa·L/(mol·K)' + - 'absolute temperature in kelvin' --- ## Try it -1. Hold the slider "temperature T" fixed and drag "volume V" down. Watch the pressure readout climb as the gas is squeezed — Boyle's law. -2. Hold "volume V" fixed and drag "temperature T" up. Watch pressure climb too, without anything moving — Gay-Lussac's law. -3. Drag "temperature T" and "volume V" up together, adjusting until the pressure readout stops changing. That constant-pressure path is Charles's law. +1. Set n = 1 mol, T = 300 K and V = 10 L. Pressure is about 249 kPa. Halve V to 5 L while keeping n and T fixed: pressure doubles. +2. Restore V = 10 L and raise T from 300 to 400 K. Pressure rises from about 249 to 333 kPa, in the same ratio as absolute temperature. +3. To keep pressure constant, compare n = 1, T = 250 K, V = 10 L with n = 1, T = 300 K, V = 12 L. Both give about 208 kPa because T/V is unchanged. ## Real-life examples -1. **A bike pump.** Squeezing 1 mol of room-temperature air from 10 L down to 3 L makes the pump noticeably harder to push, because at constant temperature, pressure rises as volume shrinks — Boyle's law. -2. **A helium balloon left in a cold car.** Half a mole of gas cooling from 293 K to 250 K in a fixed-ish balloon shrinks toward 8 L, since colder gas takes up less room at roughly the same pressure — Charles's law. -3. **A sealed can near a fire.** A rigid, sealed 10 L container of gas heating from room temperature to 380 K sees its internal pressure rise sharply even though the volume cannot change at all — Gay-Lussac's law, and exactly why aerosol cans warn against heat. +1. **A compressed model gas.** At n = 1 mol, T = 293 K and V = 3 L, pressure is about 812 kPa. Keeping temperature fixed during compression requires energy exchange; a fast pump stroke need not do that. +2. **A colder state.** At n = 0.5 mol, T = 250 K and V = 8 L, pressure is about 130 kPa. This is one state, not by itself evidence of a constant-pressure cooling process. +3. **A hotter fixed-volume state.** At n = 1 mol, T = 380 K and V = 10 L, pressure is about 316 kPa. Compare it with 244 kPa at 293 K for the same n and V. ## Test yourself -1. Get the pressure to about 300 kPa. -2. Demonstrate Boyle's law: keep the temperature near 293 K and compress the volume below 5 L. -3. Demonstrate Charles's law: cool the gas below 230 K and shrink the volume below 10 L. +1. Find a state with pressure near 300 kPa. +2. Keep T within 15 K of 293 K and set V below 5 L. +3. Set T below 230 K and V below 10 L. This check specifies a cold, small-volume state; it does not check constant pressure along a path. ## Intuition -Squeeze the same amount of gas into a smaller space at the same temperature and its molecules hit the walls more often, so the pressure rises — that is Boyle's law, and it is why a bike pump gets stiffer to push the further down its stroke you go. On screen, hold "temperature T" fixed and drag "volume V" down, and watch the pressure readout climb the same way. +Gas pressure comes from momentum transferred to the walls. With the same amount and temperature, reducing the space raises the pressure. With the same amount and volume, increasing temperature raises it too. Keeping track of what stays fixed is essential: otherwise a second change can offset the first. -Now hold "volume V" fixed instead and raise "temperature T": the pressure still climbs, because hotter molecules slam into the fixed walls harder and more often — Gay-Lussac's law, the reason a sealed can must never be thrown in a fire. Finally, raise both "temperature T" and "volume V" together while watching the pressure readout hold steady: that is Charles's law, a gas expanding to make room for its own extra heat while pressure stays fixed at, say, ordinary atmospheric pressure. All three are really one law, PV = nRT, sliced along a different fixed variable each time. +The controls choose an equilibrium state, rather than calculating how quickly a piston reaches it. Volume can change independently of temperature, and n changes the amount of gas. The pressure bar saturates at its display limit; the numerical readout still gives the calculated value. The animated 3D box illustrates molecular motion and is not a detailed simulation of compression heating. ## Formal -The ideal gas law $PV = nRT$ links pressure, volume, amount of gas and absolute temperature through a single constant $R$. +The ideal-gas equation is $PV=nRT$. Here P is absolute pressure, n is amount in moles and T is temperature in kelvin. With V in litres, use $R=8.314\ \mathrm{kPa\cdot L/(mol\cdot K)}$ to obtain P in kilopascals. This is the same numerical R as in joules because $1\ \mathrm{kPa\cdot L}=1\ \mathrm J$. -Boyle's law ($P \propto 1/V$ at constant $n, T$), Charles's law ($V \propto T$ at constant $n, P$), and Gay-Lussac's law ($P \propto T$ at constant $n, V$) are each just $PV = nRT$ with one variable held fixed. +For fixed n: constant T gives $P\propto1/V$; constant V gives $P\propto T$; constant P gives $V\propto T$. Between two states of the same amount of ideal gas, $P_1V_1/T_1=P_2V_2/T_2$. These temperature ratios require kelvin, not Celsius. ## Advanced -Because all three laws come from the same equation, they must be mutually consistent: combining Boyle's and Gay-Lussac's laws for a fixed amount of gas moving between any two states gives $P_1V_1/T_1 = P_2V_2/T_2$, the combined gas law used to solve real problems where pressure, volume and temperature all change together. +An ideal gas neglects finite molecular volume and intermolecular forces apart from collisions. Real gases depart from the model, particularly near condensation and at high density. The pressure here is absolute; a gauge relative to atmospheric pressure would show the difference between this pressure and the surrounding atmospheric pressure. ## Derivation -1. The ideal gas law PV = nRT applies to a fixed amount of gas. -2. Holding temperature fixed and rearranging gives P ∝ 1/V, Boyle's law. -3. Holding volume fixed instead gives P ∝ T, Gay-Lussac's law; holding pressure fixed gives V ∝ T, Charles's law. +1. Start with the ideal-gas equation and specify which variables remain fixed. +2. At fixed amount and temperature, pressure is inversely proportional to volume. +3. At fixed amount and volume, pressure is proportional to temperature; at fixed amount and pressure, volume is proportional to temperature. ## Real world -### Aerosol cans -Warning labels tell you never to heat or puncture an aerosol can because Gay-Lussac's law means a fixed, sealed volume of gas can build dangerous pressure as it warms. +### A gas in a rigid vessel -### Scuba diving -A diver's lungs follow Boyle's law in reverse on the way up: gas that was compressed by water pressure at depth expands as pressure drops near the surface, which is why divers are trained to exhale continuously while ascending. +For a fixed amount that remains gaseous, temperature changes alter pressure. The ideal-gas law provides an approximation for its equilibrium states. -### Weather balloons -A balloon released at ground level expands enormously as it rises into thinner, lower-pressure air, following Boyle's law until it eventually bursts at high altitude. +### A flexible gas container -### Car tyres -Tyre pressure recommendations assume a "cold" tyre because driving heats the trapped air, and Gay-Lussac's law means that heated air raises the pressure reading even though no air was added. +If external conditions keep pressure nearly constant, volume changes approximately in proportion to kelvin temperature for a fixed amount of ideal gas. diff --git a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/ar.md b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/ar.md index 74177f14..99f253e4 100644 --- a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/ar.md +++ b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/ar.md @@ -1,74 +1,68 @@ --- title: ثلاث طرق تنتقل بها الحرارة -summary: >- - ملعقة في شاي ساخن، وهواء فوق المدفأة، وشمس عبر الفراغ. ثلاث طرق فقط تنتقل بها الحرارة. +summary: 'تنتقل الحرارة بثلاث طرق: التوصيل والحمل والإشعاع. هنا تقارن بينها وترى ما الذي يغيّر كل واحدة.' parameters: - dT: فرق درجة الحرارة ΔT - k: التوصيل الحراري للمادة k - Tsurf: درجة الحرارة المطلقة للسطح الساخن T + dT: 'ΔT — فرق درجة الحرارة في التوصيل والحمل' + k: 'k — موصلية المادة للحرارة' + Tsurf: 'T — درجة حرارة السطح المشع بالكلفن' variables: - - الحرارة المنتقلة بالتوصيل والحمل والإشعاع - - التوصيل الحراري للمادة - - المساحة التي تعبرها الحرارة - - فرق درجة الحرارة الدافع للانتقال - - سماكة المادة الموصِّلة - - معامل انتقال الحرارة بالحمل - - الانبعاثية (الباعثية) للسطح المُشِع - - ثابت ستيفان-بولتزمان، 5.67×10⁻⁸ W/(m²·K⁴) - - درجة الحرارة المطلقة للسطح المُشِع + - 'الطاقة المنتقلة؛ وقسمتها على الزمن تعطي القدرة بالواط' + - 'الموصلية الحرارية للمادة' + - 'المساحة التي تنتقل الحرارة عبرها' + - 'فرق درجة الحرارة بين الطرفين، أو بين السطح والهواء' + - 'طول المسافة التي تقطعها الحرارة في التوصيل' + - 'معامل انتقال الحرارة بالحمل' + - 'الانبعاثية: عدد بين 0 و1 يبيّن جودة السطح في إصدار الإشعاع' + - 'ثابت ستيفان–بولتزمان' + - 'درجة حرارة السطح بالكلفن' --- ## Try it -1. ارفع منزلق «فرق درجة الحرارة ΔT». راقب الحرارة تسري في الملعقة، والهواء يرتفع فوق المدفأة، وضوء الشمس يشتد، كلها معًا. -2. ارفع منزلق «التوصيل الحراري k» نحو قيمة النحاس. لاحظ أن جبهة الحرارة في الملعقة وحدها تتسارع، فالحمل والإشعاع لا يهتمان بمادة الملعقة. -3. ارفع منزلق «درجة حرارة السطح الساخن T» نحو 800 K. راقب القدرة المُشَعّة ترتفع أسرع بكثير مما يوحي به ΔT وحده. +1. اجعل ΔT = 40°C وk = 15 وT = 350 K. تقرأ نحو 0.10 W للتوصيل، و240 W للحمل، و38 W للإشعاع. كل لوحة مثال مستقل له مساحته الخاصة، فلا تقارن الأرقام الثلاثة كأنها لجسم واحد. +2. ضاعف ΔT إلى 80°C. يتضاعف التوصيل والحمل. تبقى قراءة الإشعاع كما هي لأنك لم تغيّر درجة حرارة السطح. +3. أعد ΔT إلى 40°C وضاعف T من 350 إلى 700 K. تزداد قدرة الإشعاع 16 مرة، إلى نحو 613 W. أما k فتغيّر لوحة التوصيل وحدها. ## Real-life examples -1. **ملعقة فولاذية في شاي ساخن.** تزحف الحرارة في يد الملعقة بالتماس المباشر، جزيء يصدم جزيئًا. الفارق بين الشاي والهواء ΔT = 70°C، وتوصيل الفولاذ k = 15 W/(m·K). هذا هو التوصيل. -2. **مدفأة تُدفئ غرفة.** لا يأتي معظم الدفء من لمس المدفأة، بل من هواء يسخن عندها ويرتفع حاملًا الدفء حول الغرفة. هذا هو الحمل. الفارق بين المدفأة والهواء ΔT = 40°C، لكن الخشب القريب موصل ضعيف (k = 0.2 W/(m·K)). -3. **عنصر موقد محمر.** يشتد التوصيل إلى قدر نحاسي (k = 400 W/(m·K)) فوقه، والإشعاع من العنصر المتوهج، معًا. عند Tsurf = 800 K وفارق ΔT = 60°C تشعر بالحرارة قبل أن تلمس أي شيء. +1. **مقبض معدني.** عند ΔT = 70°C وk = 15 W/(m·K)، ينقل قضيب طوله 0.15 m ومساحة مقطعه 25 mm² قدرة 0.175 W بالتوصيل. +2. **مادة ضعيفة التوصيل.** عند ΔT = 40°C وk = 0.2 W/(m·K) تنخفض قدرة التوصيل إلى نحو 0.00133 W. يبقى الحمل عند 240 W، والإشعاع عند 350 K نحو 38 W. +3. **معدن جيد التوصيل وسطح شديد السخونة.** عند ΔT = 60°C وk = 400 وT = 800 K تكون القراءات 4 W و360 W ونحو 1045 W. هذه ثلاثة أمثلة منفصلة، وليست حسابًا لجسم واحد. ## Test yourself -1. اجعل معدل التوصيل على طول الملعقة نحو 1 واط. -2. اجعل القدرة المُشَعّة من السطح الساخن نحو 500 واط. -3. اضبط مشهدًا ساخنًا جدًا وموصلًا جدًا: اجعل ΔT فوق 60°C والتوصيل الحراري فوق 200 W/(m·K). +1. اجعل قدرة التوصيل نحو 1 W. +2. اجعل قدرة الإشعاع نحو 500 W. +3. اجعل ΔT أكبر من 60°C وk أكبر من 200 W/(m·K). ## Intuition -تنتقل الحرارة دائمًا من الساخن إلى البارد، وأمامها ثلاث طرق فقط. المس ملعقة معدنية في مشروب ساخن، فتسخن يدها رغم أن يدك لم تلمس السائل. هذا هو التوصيل. تنتقل الطاقة جزيئًا فجزيئًا عبر مادة صلبة، بسرعة في المعادن وببطء في الخشب أو الصوف أو الهواء. اسحب منزلق «التوصيل الحراري k» نحو قيمة النحاس، وراقب الجزء الساخن من الملعقة يندفع أسرع بكثير مما يفعل مع الخشب. +ضع ملعقة معدنية في كوب شاي ساخن. بعد قليل يسخن مقبضها مع أنه لم يلمس الشاي. انتقلت الحرارة داخل المعدن من طرف إلى طرف، والملعقة نفسها لم تتحرك. هذا هو التوصيل. الطريقة الثانية هي الحمل: الهواء فوق المدفأة يسخن فيرتفع، ويحمل الحرارة معه إلى أعلى الغرفة. في الحمل يتحرك السائل أو الغاز نفسه وينقل الحرارة. والمروحة أيضًا تصنع حملًا حين تدفع الهواء. -ضع يدك فوق مدفأة، لا بجانبها، فتشعر بهواء ساخن يرتفع. هذا هو الحمل. يحمل سائل متحرك، هواء أو ماء، الحرارة فعليًا. يصبح الجزء المسخَّن أقل كثافة فيطفو للأعلى، ويهبط السائل الأبرد ليحل محله. ارفع منزلق «فرق درجة الحرارة ΔT»، فتطول أسهم الهواء الصاعد فوق لوحة المدفأة، لأن فارقًا أكبر يدفع دورانًا أسرع. اخرج أخيرًا في يوم مشمس، واشعر بدفء على جلدك دون هواء أو تماس. هذا هو الإشعاع. يحمل الضوء نفسه الطاقة عبر الفراغ. وهكذا يُدفئك عنصر موقد متوهج، أو الشمس على بعد 150 مليون كيلومتر بلا وسيط بينكما. +الطريقة الثالثة هي الإشعاع. تصلك حرارة الشمس مع أن بينك وبينها فضاء فارغ. كل سطح دافئ يصدر إشعاعًا، ويستقبل أيضًا إشعاعًا مما حوله. الرقم المعروض هو ما يصدره السطح فقط، وليس صافي ما يفقده. في الرسم ثلاث لوحات، لكل طريقة لوحة. الألوان والأسهم للتوضيح، وليست قياسًا لحرارة ملعقة أو لحركة الهواء في غرفة حقيقية. ## Formal -يتبع التوصيل قانون فورييه، $Q_{cond}/t = kA\Delta T/d$. يحدد معدل انتقال الحرارة عبر مادة صلبة توصيلُ المادة $k$، والمساحة $A$ التي تعبرها الحرارة، وفرق درجة الحرارة $\Delta T$، وسماكة المادة $d$. +قدرة التوصيل عبر قضيب منتظم هي $\dot Q_{cond}=kA\Delta T/d$. تستخدم اللوحة مساحة مقطع $A=2.5\times10^{-5}\ \mathrm{m^2}$ وطولًا $d=0.15\ \mathrm{m}$. وقدرة الحمل هي $\dot Q_{conv}=hA\Delta T$. وتستخدم لوحته المعامل $h=5\ \mathrm{W/(m^2\cdot K)}$ والمساحة $A=1.2\ \mathrm{m^2}$. فرق درجة الحرارة له القيمة نفسها بالكلفن وبالدرجة المئوية. -ويوصف الحمل بقانون نيوتن للتبريد، $Q_{conv}/t = hA\Delta T$، ويوصف الإشعاع بقانون ستيفان-بولتزمان، $Q_{rad}/t = \varepsilon\sigma AT^4$. ترتفع القدرة المُشعة مع *القوة الرابعة* لدرجة الحرارة المطلقة، ولهذا يشع سطح أسخن بقليل فقط قدرًا أكبر بكثير. +القدرة التي يصدرها السطح بالإشعاع هي $P_{emit}=\varepsilon\sigma AT^4$. تستخدم اللوحة الانبعاثية $\varepsilon=0.9$ والمساحة $A=0.05\ \mathrm{m^2}$. وثابت ستيفان–بولتزمان هو $\sigma=5.67\times10^{-8}\ \mathrm{W/(m^2\cdot K^4)}$. يجب أن تكون T بالكلفن. وإذا كان السطح محاطًا بمحيط واسع درجة حرارته Tₛ، فصافي ما يفقده هو $P_{net}=\varepsilon\sigma A(T^4-T_s^4)$. ## Advanced -تتناسب القدرة المُشعة مع $T^4$، فمضاعفة درجة حرارة السطح المطلقة تضاعف قدرته المُشعة ست عشرة مرة، لا مرتين. لا يشارك التوصيل ولا الحمل هذه الخاصية، فكلاهما يتناسب خطيًا مع $\Delta T$. ولهذا يهيمن الفقد الإشعاعي على الأجسام شديدة الحرارة، كعنصر الموقد أو النجم، حتى لو أمكن لتماس أو سائل محيط أن يحمل الحرارة أيضًا. +المعامل h ليس خاصية ثابتة للمادة. قيمته تعتمد على سرعة حركة الهواء أو السائل قرب السطح. وقد تتغير الموصلية والانبعاثية أيضًا مع درجة الحرارة. لذلك تصح المقارنات البسيطة هنا ما دامت هذه القيم ثابتة. ولا يكون الإشعاع دائمًا أكبر الطرق الثلاث في الأجسام الساخنة؛ فالمساحة وما يحيط بالجسم وحركة الهواء كلها تؤثر. ## Derivation -1. التوصيل: تزحف الحرارة عبر مادة صلبة بمعدل يحدده توصيل المادة ومساحة العبور وفرق درجة الحرارة، وينقص كلما زادت سماكة المادة. -2. الحمل: يحمل سائل متحرك الحرارة بمعدل يحدده معامل انتقال يجمع كل تفاصيل جريان السائل. -3. الإشعاع: يُشع كل سطح دافئ قدرة يحددها مساحته والقوة الرابعة لدرجة حرارته المطلقة، دون حاجة إلى سائل أو تماس. +1. في التوصيل نضرب الموصلية في المساحة وفي فرق درجة الحرارة، ثم نقسم على طول المسافة. +2. في الحمل نضرب معامل الحمل في المساحة وفي فرق درجة الحرارة بين السطح والهواء. +3. في الإشعاع نضرب الانبعاثية في ثابت ستيفان–بولتزمان وفي المساحة وفي درجة الحرارة بالكلفن مرفوعة إلى القوة الرابعة. ## Real world -### مقابض أواني الطبخ -تُصنع مقابض المقالي والقدور من الخشب أو البلاستيك، وكلاهما موصل ضعيف. لهذا لا تزحف الحرارة من جسم المعدن إلى يدك بالتوصيل. +### الترمس -### النوافذ مزدوجة الزجاج -تحبس طبقة رقيقة من الهواء بين لوحي الزجاج، والهواء موصل ضعيف فيمنع التوصيل. وتكبح الفجوة المغلقة أيضًا تيارات الحمل التي كانت ستحمل الحرارة مباشرة عبرها. +بين جداري الترمس فراغ يكاد يخلو من الهواء، فيضعف التوصيل والحمل. تبقى الحرارة تتسرب ببطء بالإشعاع وعبر الغطاء. -### الترمس -يوقف الفراغ بين جداري الترمس التوصيل والحمل تمامًا، لأن كليهما يحتاج مادة تحمل الحرارة. يبقى فقط إشعاع بطيء عبر الفجوة، ولهذا يُبقي الترمس المشروبات ساخنة ساعات طويلة. +### تدفئة غرفة -### مدافئ التدفئة المركزية -رغم اسمها، تنقل «المدافئ» المنزلية معظم حرارتها بالحمل. تُدفئ الهواء الملامس لها، ويحمل ذلك الهواء الدفء حول الغرفة. - +تدفئ المدفأة الغرفة بالحمل والإشعاع معًا. نصيب كل طريقة يختلف من مدفأة إلى أخرى. diff --git a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/en.md b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/en.md index d6bce2a6..8ff2c107 100644 --- a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/en.md +++ b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/en.md @@ -1,76 +1,68 @@ --- title: Three ways heat moves -summary: >- - A metal spoon left in hot tea gets warm at the handle without touching - the tea, air above a radiator rises even though nothing pushes it, and - sunlight warms your face across 150 million kilometres of empty space — - conduction, convection and radiation, the only three ways heat can travel. +summary: 'Compare conduction through material, convection involving moving fluid, and radiation emitted by a surface.' parameters: - dT: temperature difference ΔT - k: thermal conductivity of the material k - Tsurf: hot surface's absolute temperature T + dT: 'ΔT — temperature difference for conduction and convection' + k: 'k — conductivity of the conducting path' + Tsurf: 'T — absolute temperature of the emitting surface' variables: - - heat transferred by conduction, convection, and radiation - - thermal conductivity of the material - - the area heat crosses - - temperature difference driving the flow - - thickness of the conducting material - - convective heat transfer coefficient - - emissivity of the radiating surface - - the Stefan–Boltzmann constant, 5.67×10⁻⁸ W/(m²·K⁴) - - absolute temperature of the radiating surface + - 'energy transferred by each mechanism; dividing by time gives power' + - 'thermal conductivity' + - 'area used by the relevant panel' + - 'temperature difference across the path or between surface and fluid' + - 'length of the conduction path' + - 'convective transfer coefficient' + - 'emissivity, between zero and one' + - 'Stefan–Boltzmann constant' + - 'absolute surface temperature in kelvin' --- ## Try it -1. Raise the slider "temperature difference ΔT". Watch the heat spreading along the spoon, the rising air above the radiator, and the radiating sun all intensify together. -2. Raise the slider "thermal conductivity k" toward copper's value. Watch only the spoon's heat front race ahead — convection and radiation do not care what the spoon is made of. -3. Raise the slider "hot surface temperature T" toward 800 K. Watch the radiated power climb far faster than ΔT alone would suggest. +1. Set ΔT = 40°C, k = 15 and T = 350 K. Read about 0.10 W of conduction, 240 W of convection and 38 W of emitted radiation. The panels use different areas and assumptions, so they are separate examples. +2. Double ΔT to 80°C. Conduction and convection double. The radiation reading stays unchanged because its surface-temperature control has not changed. +3. Restore ΔT = 40°C and double T from 350 to 700 K. Emitted radiation rises by a factor of 16, to about 613 W. Changing k affects only the conduction panel. ## Real-life examples -1. **A steel spoon left in hot tea.** With ΔT = 70°C between the tea and the air, and steel's conductivity (k = 15 W/(m·K)), heat creeps up the handle by direct contact — conduction, molecule bumping molecule. -2. **A radiator warming a room.** With ΔT = 40°C between the radiator and the room air, but a poor conductor like wood nearby (k = 0.2 W/(m·K)), almost none of the useful warming comes from touching the radiator — it comes from convection, air heated at the radiator rising and carrying warmth around the room. -3. **A red-hot stove element.** At Tsurf = 800 K with a large ΔT = 60°C and a copper pan (k = 400 W/(m·K)) on top, both conduction into the pan and radiation off the glowing element are intense — you can feel the heat before you even touch anything. +1. **A conducting handle model.** At ΔT = 70°C and k = 15 W/(m·K), a 0.15 m path with cross-section 25 mm² transfers 0.175 W in the steady one-dimensional model. +2. **A poorly conducting path.** At ΔT = 40°C and k = 0.2 W/(m·K), conduction is about 0.00133 W. The separate convection example still gives 240 W, and radiation at 350 K remains about 38 W. +3. **Higher conductivity and surface temperature.** At ΔT = 60°C, k = 400 and T = 800 K, the three readings are 4 W, 360 W and about 1045 W. They are not an energy balance for one object. ## Test yourself -1. Get the conduction rate along the spoon to about 1 W. -2. Get the radiated power from the hot surface to about 500 W. -3. Set up a very hot, very conductive scene: ΔT above 60°C with a conductivity above 200 W/(m·K). +1. Make the conduction rate approximately 1 W. +2. Make emitted radiative power approximately 500 W. +3. Set ΔT above 60°C and k above 200 W/(m·K). ## Intuition -Heat always moves from hot to cold, but it has exactly three routes for getting there. Touch a metal spoon left in a hot drink and the handle warms even though your hand never touched the liquid — that is conduction, energy passed molecule to molecule through a solid, fastest through metals and slowest through wood, wool or air. On screen, drag the slider "thermal conductivity k" toward copper's value and watch the heated stretch of the spoon race outward much faster than it does for wood. +A spoon's handle can warm even though the liquid touches only its other end. Energy passes through the material without the whole spoon moving: this is conduction. In convection, fluid motion transports energy. For example, buoyancy can make warmer, less dense air rise through cooler surroundings. Fans and pumps can also drive convection; it does not require natural rising motion. -Hold your hand above a radiator, not beside it, and you feel warm air rising — that is convection, heat carried physically by a moving fluid, air or water, as the warmed part becomes less dense and floats upward while cooler fluid sinks in to replace it. Raise the slider "temperature difference ΔT" and the rising-air arrows above the radiator panel lengthen, because a bigger temperature gap drives faster circulation. Finally, step outside on a sunny day and feel warmth on your skin with no air or contact involved at all — that is radiation, energy carried by light itself across empty space, which is also how a glowing stove element or the Sun, 150 million kilometres away with no medium in between, can still warm you. +Radiation carries energy through electromagnetic waves and can cross a vacuum. A surface emits radiation and also absorbs radiation from its surroundings. The displayed radiation value is emission alone, not net heat loss. The pictures illustrate three mechanisms with separate fixed geometries. Their colours and arrows are cues, not a simulation of a spoon's temperature over time or a calculated room airflow. ## Formal -Conduction follows Fourier's law, $Q_{cond}/t = kA\Delta T/d$: the rate of heat flow through a solid is set by the material's conductivity $k$, the area $A$ it crosses, the temperature difference $\Delta T$, and the thickness $d$ it must cross. +Steady one-dimensional conduction through a uniform path is $\dot Q_{cond}=kA\Delta T/d$. This panel uses $A=2.5\times10^{-5}\ \mathrm{m^2}$ and $d=0.15\ \mathrm{m}$. Convection is modelled as $\dot Q_{conv}=hA\Delta T$, with $h=5\ \mathrm{W/(m^2\cdot K)}$ and $A=1.2\ \mathrm{m^2}$. A temperature difference has the same numerical value in kelvin and degrees Celsius. -Convection is described by Newton's law of cooling, $Q_{conv}/t = hA\Delta T$, and radiation by the Stefan–Boltzmann law, $Q_{rad}/t = \varepsilon\sigma AT^4$ — power rising with the *fourth power* of absolute temperature, which is why a surface only slightly hotter can radiate dramatically more. +Emitted radiation is $P_{emit}=\varepsilon\sigma AT^4$, with $\varepsilon=0.9$, $A=0.05\ \mathrm{m^2}$ and $\sigma=5.67\times10^{-8}\ \mathrm{W/(m^2\cdot K^4)}$. T must be in kelvin. For a grey surface exchanging radiation with large surroundings at temperature Tₛ under the usual full-view approximation, net loss is $P_{net}=\varepsilon\sigma A(T^4-T_s^4)$. ## Advanced -Because radiated power scales as $T^4$, doubling a surface's absolute temperature multiplies its radiated power by sixteen, not two — a subtlety that conduction and convection, both linear in $\Delta T$, do not share, and the reason extremely hot objects (a stove element, a star) are dominated by radiative heat loss even when touching or surrounding fluid could also carry heat away. +The constant h summarizes fluid flow and thermal boundary-layer behavior; it can change with conditions. Conductivity and emissivity can also depend on temperature. Thus the simple proportional comparisons here hold with those coefficients fixed. Radiation does not automatically dominate every hot object's energy transfer: area, surroundings, contact and flow matter too. ## Derivation -1. Conduction: heat creeps through a solid at a rate set by the material's conductivity, the crossing area and temperature difference, and inversely by how thick the material is. -2. Convection: a moving fluid carries heat at a rate set by a transfer coefficient that bundles up all the details of how the fluid flows. -3. Radiation: every warm surface radiates power set by its area and the fourth power of its absolute temperature, with no fluid or contact required at all. +1. For steady conduction, multiply conductivity by area and temperature gradient; for a uniform path the gradient magnitude is temperature difference divided by length. +2. For the convection estimate, multiply the surface-to-fluid temperature difference by area and the transfer coefficient. +3. For emitted thermal radiation, multiply emissivity, the Stefan–Boltzmann constant, surface area and the fourth power of absolute temperature. ## Real world -### Cookware handles -Pan and pot handles are made of wood or plastic, both poor conductors, specifically so heat from the metal body cannot creep into your hand by conduction. +### Insulated containers -### Double-glazed windows -A thin layer of trapped air between two panes blocks conduction (air conducts poorly) while the sealed gap also suppresses convection currents that would otherwise carry heat straight through. +Reducing gas in a gap reduces conduction and convection through that gap. Radiation and conduction through supports can still transfer energy. -### Thermos flasks -A vacuum between a thermos's two walls stops conduction and convection completely, since both need matter to carry heat, leaving only slow radiation across the gap — that vacuum is why a thermos keeps drinks hot for hours. +### Heating a room -### Central heating radiators -Despite the name, household "radiators" transfer most of their heat by convection, warming the air that touches them and letting that air carry the warmth around the room. +A heater can transfer energy by convection and radiation at the same time. Their shares depend on the heater and room; its name alone does not determine them. diff --git a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/lesson.yaml b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/lesson.yaml index 90e6555e..d466cf2b 100644 --- a/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/lesson.yaml +++ b/content/lessons/thermodynamics/heat-transfer-conduction-convection-radiation/lesson.yaml @@ -48,9 +48,9 @@ variables: - \sigma - T derivation: - - '\text{Conduction (Fourier''s law): heat creeps through a solid at a rate proportional to } k, A, \Delta T \text{ and inversely to thickness } d.' - - '\text{Convection (Newton''s law of cooling): a moving fluid carries heat at a rate proportional to } h, A \text{ and } \Delta T, \text{ with } h \text{ absorbing the flow details.}' - - '\text{Radiation (Stefan-Boltzmann law): every warm surface radiates power proportional to its area and the fourth power of its absolute temperature } T.' + - \dot Q_{cond} = kA\frac{\Delta T}{d} + - \dot Q_{conv} = hA\Delta T + - P_{emit} = \varepsilon\sigma AT^4 charts: [] primary: dT presets: diff --git a/content/lessons/thermodynamics/phase-changes-and-latent-heat/ar.md b/content/lessons/thermodynamics/phase-changes-and-latent-heat/ar.md index 3465b625..b1f81aec 100644 --- a/content/lessons/thermodynamics/phase-changes-and-latent-heat/ar.md +++ b/content/lessons/thermodynamics/phase-changes-and-latent-heat/ar.md @@ -1,69 +1,63 @@ --- title: تغيّرات الحالة والحرارة الكامنة -summary: >- - حرارة الثلج لا تتحرك وهو ينصهر. الطاقة تذهب إلى تغيير الحالة، لا إلى رفع الحرارة. +summary: 'سخّن قطعة جليد حتى تصير ماءً ثم بخارًا. سترى أن درجة الحرارة تتوقف عن الارتفاع أثناء الانصهار والغليان.' parameters: - Q: الحرارة المضافة Q - m: الكتلة التي تُسخَّن m + Q: 'Q — مجموع الطاقة المضافة إلى جليد يبدأ عند −20°C' + m: 'm — كتلة الجليد' variables: - - الحرارة المضافة، بدءًا من جليد عند −20°C - - الكتلة التي تُسخَّن - - السعة الحرارية النوعية - - التغيّر في درجة الحرارة - - الحرارة الكامنة للانصهار أو الغليان + - 'مجموع الطاقة المضافة' + - 'كتلة العينة' + - 'الحرارة النوعية: الطاقة اللازمة لتسخين 1 kg درجة واحدة' + - 'التغير في درجة الحرارة' + - 'الحرارة الكامنة: الطاقة اللازمة لصهر 1 kg أو تبخيره' --- ## Try it -1. ارفع منزلق «الحرارة المضافة Q» من الصفر. راقب الجليد يتقلص، ثم مستوى الماء يرتفع، ثم يظهر بخار. -2. راقب مقياس درجة الحرارة وهو يعبر نقطة الانصهار. لاحظ أنه يثبت عند 0°C رغم استمرار ارتفاع Q. -3. ارفع منزلق «الكتلة m». راقب كل مرحلة تحتاج حرارة أكثر بكثير لتكتمل، بالكمية نفسها من الجليد. +1. اجعل m = 0.1 kg وQ = 0. تبدأ العينة جليدًا عند −20°C. ارفع Q: يصل الجليد إلى 0°C عند 4200 J. بعدها ينصهر وتبقى درجة حرارته 0°C حتى 37,600 J. +2. اجعل Q = 20,000 J. جزء من الجليد انصهر وجزء لم ينصهر بعد. ارفع Q فوق 37,600 J ليبدأ الماء يسخن. +3. ثبّت Q وزد m. الطاقة نفسها تتوزع الآن على كتلة أكبر، فتتراجع العينة إلى مرحلة سابقة. وبعد أن يتبخر الماء كله يتوقف النموذج، فلا يحسب درجة حرارة البخار. ## Real-life examples -1. **مكعب ثلج ينصهر في مشروب.** يستغرق تسخين 0.1 كجم من الجليد وإذابته نحو 20 كيلوجول. في معظم هذا الوقت لا تتحرك درجة حرارة الجليد إطلاقًا. يبقى عند 0°C ويتقلص باطراد، بينما تكسر الحرارة المضافة بنيته البلورية. -2. **غلاية تسخن الماء نحو الغليان.** بعد أن ينصهر 0.1 كجم من الجليد تمامًا، توصل نحو 79 كيلوجول من الحرارة الماء إلى قرب 100°C. ترتفع الدرجة الآن باطراد بدل أن تثبت، لأن هذه المرحلة تسخين عادي لا يغيّر الحالة. -3. **غلاية تغلي حتى الجفاف تقريبًا.** بعد توصيل نحو 305 كيلوجول إلى 0.1 كجم، يكون معظم الماء قد تحوّل إلى بخار. بقيت درجة الحرارة عند 100°C بالضبط فترة طويلة، بينما اختفت كميات هائلة من الطاقة في البخار بدل أن ترفع القراءة. +1. **جليد انصهر نصفه تقريبًا.** لكتلة 0.1 kg عند Q = 20 kJ، ترفع 4.2 kJ الجليد إلى 0°C. وتصهر 15.8 kJ الباقية نحو 47.3% منه. +2. **ماء يوشك أن يغلي.** لكتلة 0.1 kg عند Q = 79 kJ، تبلغ درجة الحرارة نحو 98.9°C. يبدأ الغليان عند 79.46 kJ. +3. **ماء تبخر كله تقريبًا.** لكتلة 0.1 kg عند Q = 305 kJ، يكون نحو 99.97% من الماء قد تبخر. يكتمل التبخر عند 305.06 kJ. ## Test yourself -1. اجعل كل الجليد ينصهر دون أن يبدأ الماء بالغليان. -2. اجعل الكتلة كلها تتبخر إلى بخار. -3. أبقِ درجة الحرارة عند مستوى الغليان الثابت 100°C. +1. اصهر الجليد كله، وأبقِ الماء دون درجة الغليان. +2. أضف طاقة تزيد على ما يلزم لتبخير الماء كله. +3. أوقف العينة في مرحلة الغليان، حيث يوجد ماء وبخار معًا عند 100°C. ## Intuition -ضع مكعب ثلج على المنضدة، وراقب مقياس حرارة مضغوطًا عليه. ترتفع درجة الحرارة من برودة الفريزر، ثم تتوقف فجأة عن الارتفاع. تثبت تمامًا عند 0°C مدة طويلة، رغم أن الثلج يتقلص أمام عينيك طوال الوقت. ارفع منزلق «الحرارة المضافة Q» من الصفر، وراقب الأمر نفسه في الرسم. تتقلص كتلة الثلج في القدر باطراد، بينما يبقى مقياس درجة الحرارة متجمدًا عند 0°C. يكسر كل جول يدخل الآن البنية البلورية للثلج، بدل أن يُسخّن أي شيء. +ضع مكعبات جليد من الفريزر في قدر على النار، وضع فيه مقياس حرارة. يسخن الجليد أولًا من −20°C حتى 0°C. ثم يحدث شيء غريب: النار ما زالت مشتعلة، لكن المقياس يقف عند 0°C. الطاقة الآن تصهر الجليد ولا ترفع درجة حرارته. بعد أن تنصهر آخر قطعة يعود المقياس إلى الارتفاع، حتى يبلغ الماء 100°C. وهناك يقف مرة ثانية، لأن الطاقة تحوّل الماء إلى بخار. نسمي الطاقة التي تغيّر حالة المادة دون أن تغيّر درجة حرارتها الحرارة الكامنة. -بعد أن يختفي الثلج، تعيد الحرارة الإضافية رفع درجة الحرارة من جديد. هذا تسخين عادي، يرتفع باطراد، حتى 100°C. هناك تثبت درجة الحرارة مرة ثانية بينما يتبخر الماء إلى بخار. لهذا بالضبط يحرق البخار أسوأ من الماء المغلي عند الدرجة نفسها 100°C. يحتاج تحويل الماء إلى بخار كمية هائلة من الحرارة الكامنة المخفية، نحو 2260 جول لكل غرام. ويُطلق البخار كل تلك الطاقة فور ملامسته جلدك وتكثفه، فوق الحرارة العادية التي يوصلها رذاذ ماء عند 100°C وحده. +في الرسم، يبيّن ارتفاع الجليد والماء كم بقي من كل منهما، ولا يبيّن حجمهما الحقيقي. يفترض النموذج ماءً نقيًّا عند الضغط الجوي العادي، وأن الطاقة كلها تدخل العينة ولا يضيع منها شيء. اللوحة الجانبية تقارن غرامًا من البخار بغرام من الماء، وكلاهما عند 100°C، حين يبردان إلى 80°C. البخار يتكثف أولًا فيطلق حرارته الكامنة، ولذلك يعطي طاقة أكثر بكثير. لهذا تكون حروق البخار أشد من حروق الماء المغلي. ## Formal -ما دامت المادة في حالة واحدة، ترفع الحرارة المضافة درجة حرارتها: $Q = mc\Delta T$، حيث $c$ السعة الحرارية النوعية لتلك الحالة، ولكل حالة، الجليد والماء السائل والبخار، سعة خاصة بها. +ما دامت المادة في حالة واحدة، فالطاقة اللازمة لتسخينها هي $Q_{stage}=mc\Delta T$. وأثناء الانصهار أو الغليان، الطاقة اللازمة لتحويل الكتلة كلها هي $Q_{stage}=mL$. وإذا تحوّل جزء z من الكتلة فقط فالطاقة هي $Q_{stage}=zmL$. -أثناء تغيّر الحالة تثبت درجة الحرارة، بينما تُمتص الحرارة أو تُطلق: $Q = mL$، حيث $L$ الحرارة الكامنة للانصهار أو الغليان (التبخر). وهذه هي الطاقة وراء كل مستوى ثابت على المنحنى. +يستخدم النموذج للجليد $c_{ice}=2100\ \mathrm{J/(kg\cdot K)}$. وللماء $c_{water}=4186\ \mathrm{J/(kg\cdot K)}$. والحرارة الكامنة للانصهار $L_f=334000\ \mathrm{J/kg}$. وللتبخر $L_v=2256000\ \mathrm{J/kg}$. المنزلق Q هو مجموع الطاقة منذ البداية، فنطرح منه طاقة المراحل التي انتهت لنعرف أين وصلنا. ينصهر الماء عند $0^\circ\mathrm C$ ويغلي عند $100^\circ\mathrm C$ عند الضغط الجوي العادي فقط. ## Advanced -الحرارة الكامنة هي الطاقة اللازمة لفصل الجزيئات ضد قوى التجاذب التي تربطها. يكسر الانصهار بعض الروابط الهيدروجينية ليحوّل الجليد إلى ماء سائل، ويكسر التبخر معظمها تقريبًا ليحوّل الماء السائل إلى بخار طليق الحركة. لهذا يحتاج التبخر (2256 kJ/kg) طاقة أكبر بنحو سبع مرات من الانصهار (334 kJ/kg)، للكتلة نفسها بالضبط من الماء. +أين تذهب الطاقة أثناء الانصهار والغليان؟ تذهب إلى إبعاد الجزيئات بعضها عن بعض ضد قوى التجاذب بينها. جزيئات الماء نفسها لا تتفكك إلى هيدروجين وأكسجين. وفي التبخر يذهب جزء من الطاقة أيضًا إلى دفع الهواء المحيط، لأن البخار يشغل حجمًا أكبر كثيرًا. بعد أن يتبخر الماء كله يمكن أن يسخن البخار فوق 100°C، لكن هذا النموذج ينتهي قبل ذلك. ## Derivation -1. ما دامت المادة في حالة واحدة، ترفع الحرارة المضافة درجة حرارتها وفق Q = mcΔT. -2. أثناء تغيّر الحالة، يذهب كل جول من الحرارة المضافة إلى L لكل وحدة كتلة، فتصبح Q = mL بينما تثبت درجة الحرارة. -3. اربط المراحل: جليد يسخن ← ينصهر ← ماء يسخن ← يغلي، فتحصل على المنحنى الكامل بأربع مراحل، اثنتان صاعدتان واثنتان ثابتتان. +1. ما دامت العينة في حالة واحدة، نضرب الكتلة في الحرارة النوعية وفي التغير في درجة الحرارة. +2. عند الانصهار أو الغليان، نضرب الكتلة في الحرارة الكامنة المناسبة. +3. نجمع طاقات المراحل الأربع: تسخين الجليد، ثم صهره، ثم تسخين الماء، ثم تبخيره. ## Real world -### الطبخ -لا يصبح قِدر ماء يغلي بشدة أسخن من 100°C أبدًا عند مستوى سطح البحر. رفع الموقد يجعله يغلي أسرع فقط، لأن الحرارة الإضافية تُغذي الحرارة الكامنة للتبخر وحدها. +### الانصهار والتجمد -### أكياس الثلج -يمتص كيس ثلج عند 0°C حرارة أكبر بكثير أثناء انصهاره، مما تمتصه الكتلة نفسها من الماء البارد أثناء تسخينه فقط. لهذا بالضبط يبرّد الثلج أكثر فاعلية بكثير من الماء المثلج وحده. +الطاقة التي يأخذها الجليد لينصهر يعيدها الماء حين يتجمد. المقدار واحد والاتجاه معاكس. -### حروق البخار -يكون حرق البخار أسوأ من رذاذ ماء مغلي عند الدرجة نفسها 100°C، لأن على البخار أن يُطلق أولًا حرارته الكامنة للتبخر، نحو 2260 جول لكل غرام، قبل أن يبدأ بالبرودة أصلًا. +### درجة الغليان -### التعرّق -يُبرّد العرق الجلد بالتبخر، فيسحب حرارته الكامنة للتبخر مباشرة من الجسم. لهذا يشعرك نسيم خفيف على جلد مبلل ببرودة أكبر بكثير مما توحي به درجة حرارة الهواء وحدها. - +يغلي الماء عند 100°C عند مستوى سطح البحر. على قمة جبل عالٍ يقل ضغط الهواء فيغلي الماء عند درجة أقل. diff --git a/content/lessons/thermodynamics/phase-changes-and-latent-heat/en.md b/content/lessons/thermodynamics/phase-changes-and-latent-heat/en.md index 98d75b10..bb78693b 100644 --- a/content/lessons/thermodynamics/phase-changes-and-latent-heat/en.md +++ b/content/lessons/thermodynamics/phase-changes-and-latent-heat/en.md @@ -1,72 +1,63 @@ --- title: Phase changes and latent heat -summary: >- - Leave an ice cube on the counter and its temperature barely moves while - it melts, but a splash of boiling-hot steam on skin burns far worse - than the same splash of boiling water at the very same 100°C — both - come down to latent heat, the energy a substance hides while it - changes state instead of changing temperature. +summary: 'Track energy added to ice: some warms a single phase, while some changes the proportions of ice, water and vapour.' parameters: - Q: heat energy added Q - m: mass being heated m + Q: 'Q — cumulative heat added from −20°C ice' + m: 'm — initial mass' variables: - - heat energy added, starting from ice at −20°C - - mass being heated - - specific heat capacity - - change in temperature - - latent heat of melting or boiling + - 'cumulative energy added' + - 'mass of the sample' + - 'specific heat capacity within a phase' + - 'temperature change within a phase' + - 'specific latent heat for a phase change' --- ## Try it -1. Raise the slider "heat added Q" from zero. Watch the ice shrink, then the water level rise, then steam wisps appear. -2. Watch the temperature readout while Q crosses the melting point. Notice it holds at 0°C even as Q keeps climbing. -3. Raise the slider "mass m". Watch every stage need far more heat to finish for the same amount of ice. +1. Set m = 0.1 kg and Q = 0. The sample starts as ice at −20°C. At Q = 4200 J it reaches 0°C; between 4200 and 37,600 J it melts at that temperature. +2. Set Q = 20,000 J. The sample is partly melted, not fully liquid. Raise Q beyond 37,600 J to begin warming the liquid. +3. Keep Q fixed and increase m. The energy per kilogram decreases, so the sample reaches an earlier stage. After all water has vaporised, further vapour heating is outside this model and no temperature is reported. ## Real-life examples -1. **An ice cube melting in a drink.** Warming and melting 0.1 kg of ice takes about 20 kJ, and for most of that energy the ice's temperature does not move at all — it sits at 0°C, steadily shrinking, while the added heat breaks its crystal structure apart. -2. **A kettle heating water toward boiling.** Once 0.1 kg of ice has fully melted, roughly 79 kJ of total heat has water almost at 100°C, climbing steadily now instead of holding flat, because this stage is ordinary warming, not a phase change. -3. **A kettle boiling nearly dry.** With about 305 kJ delivered to 0.1 kg, almost all of the water has turned to steam — the temperature has sat at exactly 100°C for a long stretch while huge amounts of energy vanished into vapour instead of raising the reading. +1. **Partly melted ice.** For 0.1 kg at Q = 20 kJ, 4.2 kJ warms the ice to 0°C and 15.8 kJ melts about 47.3% of its mass. +2. **Liquid close to boiling.** At Q = 79 kJ for 0.1 kg, the temperature is about 98.9°C. Boiling starts at a cumulative 79.46 kJ. +3. **Almost fully vaporised.** At Q = 305 kJ for 0.1 kg, about 99.97% has vaporised. Completion requires 305.06 kJ in this model. ## Test yourself -1. Get all the ice melted but the water not yet boiling. -2. Boil the mass completely away into steam. -3. Hold the temperature on the 100°C boiling plateau. +1. Melt all the ice and leave the liquid below its boiling point. +2. Add more than the energy needed to vaporise the entire mass. +3. Place the sample inside the boiling interval, while liquid and vapour coexist at 100°C. ## Intuition -Put an ice cube on the counter and watch a thermometer pressed against it: the temperature climbs from freezer-cold, then suddenly stops rising and holds dead flat at 0°C for a surprisingly long time, even though the ice is visibly shrinking the whole time. On screen, raise the slider "heat added Q" from zero and watch the same thing: the pot's ice block shrinks steadily while the temperature readout sits frozen at 0°C, because every joule going in right now is breaking the ice's crystal structure apart rather than warming anything. +Adding energy does not always raise temperature. First it warms the ice. At the melting point, further energy changes the amount of solid and liquid while their equilibrium temperature stays the same. After the last ice melts, additional energy warms the liquid. Boiling produces another interval in which phase proportions change at constant temperature. -Once the ice is gone, more heat finally raises the temperature again — ordinary warming, climbing steadily — until 100°C, where the temperature freezes flat a second time while the water boils away into steam. This is exactly why steam burns worse than boiling water at the very same 100°C: turning water into steam takes a huge amount of hidden latent heat, roughly 2260 J for every gram, and steam releases every bit of that energy back the instant it touches your skin and condenses, on top of the ordinary heat a splash of 100°C water alone would deliver. +The model starts with pure ice at −20°C and assumes approximately atmospheric pressure, uniform temperature and no heat loss to the container or surroundings. Its ice and liquid heights represent mass fractions schematically, not actual volumes. The side comparison shows energy released by one gram cooling from 100°C to 80°C: vapour must also condense, so it releases much more energy than liquid water over that route. ## Formal -While a substance stays in one phase, heat added raises its temperature: $Q = mc\Delta T$, with $c$ the specific heat capacity of that phase (ice, liquid water, or steam each have their own). +Within one phase at constant specific heat capacity c, the stage's added energy is $Q_{stage}=mc\Delta T$. During a fixed-pressure phase change of a pure substance, $Q_{stage}=mL$ for complete conversion. For converted mass fraction z, $Q_{stage}=zmL$. -During a phase change, temperature holds fixed while heat is absorbed or released: $Q = mL$, with $L$ the latent heat of melting (fusion) or boiling (vaporisation), and this is the energy behind every flat stretch on the graph. +The model uses $c_{ice}=2100\ \mathrm{J/(kg\cdot K)}$, $c_{water}=4186\ \mathrm{J/(kg\cdot K)}$, $L_f=334000\ \mathrm{J/kg}$ and $L_v=2256000\ \mathrm{J/kg}$. The Q control is cumulative energy, so subtract completed stages before calculating the current stage. The transition temperatures of $0^\circ\mathrm C$ and $100^\circ\mathrm C$ are assumptions for water near atmospheric pressure. ## Advanced -Latent heat is really the energy needed to pull molecules apart against the attractive forces holding them together — breaking some hydrogen bonds to turn ice into liquid water, and breaking essentially all of them to turn liquid water into freely flying vapour, which is why vaporisation (2256 kJ/kg) takes nearly seven times more energy than melting (334 kJ/kg) for the exact same mass of water. +At constant pressure, latent heat corresponds to an enthalpy change. It involves intermolecular arrangement and interactions, with expansion work especially relevant during vaporisation; it is not energy that disappears or breaks water molecules into hydrogen and oxygen. Once all the liquid has vaporised, further heating need not remain at 100°C. This four-stage model ends there rather than predicting superheated vapour. ## Derivation -1. While the substance stays a single phase, added heat raises its temperature according to Q = mcΔT. -2. During a phase change, every joule of added heat goes into L per unit mass instead, so Q = mL while temperature stays fixed. -3. Chaining warm ice → melt → warm water → boil gives the full curve: four stages, two rising and two flat. +1. While the sample stays in one phase, multiply mass, specific heat capacity and temperature change to find the stage energy. +2. For a complete phase change, multiply mass by the corresponding specific latent heat. +3. Add the energies for warming ice, melting, warming liquid and vaporising to obtain the cumulative energy at each transition. ## Real world -### Cooking -A pot of water boiling hard never gets hotter than 100°C at sea level — turning up the stove just boils it away faster, because the extra heat only feeds the latent heat of vaporisation. +### Melting and freezing -### Ice packs -An ice pack at 0°C absorbs far more heat while melting than the same mass of cold water would while simply warming up, which is exactly why ice cools so much more effectively than iced water alone. +At the same pressure, reversing a phase change reverses the direction of its latent heat transfer. Freezing releases energy that melting absorbs. -### Steam burns -A steam burn is worse than a boiling-water splash at the same 100°C because steam must first release its latent heat of vaporisation, roughly 2260 J per gram, before it can even begin to cool. +### Boiling point -### Sweating -Sweat cools skin by evaporating, pulling its latent heat of vaporisation straight from the body, which is why a light breeze on wet skin feels so much cooler than the air temperature alone would suggest. +Changing pressure changes water's boiling temperature. The 100°C plateau is a stated model condition, not a universal boiling temperature. diff --git a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/ar.md b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/ar.md index bbef6bbb..813252b1 100644 --- a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/ar.md +++ b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/ar.md @@ -1,68 +1,70 @@ --- title: الثلاجات والمضخات الحرارية -summary: >- - الثلاجة لا تصنع البرد، بل تنقل الحرارة من الداخل إلى المطبخ. المضخة الحرارية تفعل العكس. +summary: 'الثلاجة لا تصنع البرودة، بل تنقل الحرارة من داخلها إلى المطبخ. هنا تحسب كم تنقل مقابل كل جول من الكهرباء.' parameters: - Tc: المستودع البارد T_c - Th: المستودع الساخن T_h + Tc: 'T_c — درجة حرارة الجانب البارد' + Th: 'T_h — درجة حرارة الجانب الساخن' variables: - - معامل الأداء، وضع التبريد - - معامل الأداء، وضع التسخين - - درجة الحرارة المطلقة للمستودع البارد - - درجة الحرارة المطلقة للمستودع الساخن + - 'معامل أداء التبريد: الحرارة المسحوبة من الجانب البارد مقابل كل جول من الشغل' + - 'معامل أداء التسخين: الحرارة الواصلة إلى الجانب الساخن مقابل كل جول من الشغل' + - 'درجة حرارة الجانب البارد بالكلفن' + - 'درجة حرارة الجانب الساخن بالكلفن' --- ## Try it -1. ارفع منزلق «المستودع الساخن T_h» بينما يبقى «المستودع البارد T_c» في مكانه. راقب معاملي الأداء كليهما ينخفضان مع اتساع فرق درجة الحرارة. -2. اخفض «المستودع البارد T_c» نحو 250 K. راقب معامل أداء التبريد ينخفض. سحب الحرارة من مكان بارد جدًا أصلًا يتطلب شغلًا أكبر بشكل غير متناسب. -3. ضيّق الفارق بين T_c وT_h قدر ما تسمح المنزلقات. راقب المعاملين كليهما يرتفعان فوق 1 بوضوح. نقل الحرارة «مسافة» قصيرة في درجة الحرارة رخيص. +1. اجعل T_c = 277 K وT_h = 295 K. الفرق 18 K. تعرض القراءتان معامل الأداء (تبريد) = 15.39 ومعامل الأداء (تسخين) = 16.39. الثاني أكبر من الأول بمقدار 1 بالضبط. +2. ثبّت T_c = 277 K وارفع T_h إلى 320 K. صار الفرق 43 K، فتنخفض القيمتان إلى 6.44 و7.44. +3. ثبّت T_h = 320 K واخفض T_c إلى 250 K. صار الفرق 70 K، فتنخفض القيمتان إلى 3.57 و4.57. ## Real-life examples -1. **ثلاجة مطبخ.** الداخلية عند T_c = 277 K (4°C) والمطبخ عند T_h = 295 K (22°C). يعطي فارق 18 درجة معامل أداء جيدًا. تُنقل عدة وحدات من الحرارة خارج الثلاجة مقابل كل وحدة شغل يستخدمها الضاغط. -2. **مضخة حرارية تُدفئ منزلًا في الشتاء.** تسحب الحرارة من هواء خارجي عند T_c = 268 K (−5°C)، وتوصلها داخليًا عند T_h = 293 K (20°C). ومع ذلك يسمح فارق 25 درجة للمضخة بتوصيل طاقة تسخين أكبر بوضوح من الطاقة الكهربائية التي تستهلكها. -3. **مكيّف هواء في يوم حار.** يعمل ملف التبخير البارد عند T_c = 283 K (10°C) لتبريد هواء الغرفة، ويطرح الحرارة خارجًا عند T_h = 308 K (35°C). ويحدد فارق 25 درجة بالضبط مدى شدة عمل الضاغط ليبقي الغرفة باردة. +1. **ثلاجة المطبخ.** داخل الثلاجة T_c = 277 K (4 °C)، والمطبخ T_h = 295 K (22 °C). حد التبريد 15.39. الثلاجة الحقيقية تبلغ جزءًا صغيرًا من هذا الحد. +2. **تدفئة البيت في الشتاء.** الهواء في الخارج T_c = 268 K (−5 °C)، والغرفة T_h = 293 K (20 °C). حد التسخين 11.72. الأجهزة الحقيقية تعطي عادةً من 2 إلى 4 J من الحرارة مقابل كل جول من الكهرباء. +3. **مكيف في يوم حار.** الجزء البارد من المكيف T_c = 283 K (10 °C)، والهواء في الخارج T_h = 308 K (35 °C). حد التبريد 11.32. ## Test yourself -1. اجعل معامل أداء التسخين يساوي 10 بالضبط. -2. اضبط مهمة تبريد صعبة: اجعل معامل أداء التبريد دون 4 بمستودع بارد جدًا تحت 260 K. -3. اضبط الفارق في درجة الحرارة بين المستودعين ليساوي 20 K بالضبط. +1. اجعل معامل أداء التسخين يساوي 10. +2. اجعل معامل أداء التبريد أقل من 4 مع T_c أقل من 260 K. +3. اجعل الفرق T_h − T_c يساوي 20 K. ## Intuition -لا تتدفق الحرارة من البارد إلى الساخن من تلقاء نفسها أبدًا. تُجبرها الثلاجة على ذلك، باستخدام ضاغط يبذل شغلًا ميكانيكيًا على مبرِّد. هذا الشغل المُستعار هو بالضبط سبب توصيل سلك كهرباء الثلاجة بالحائط أصلًا. ارفع «المستودع الساخن T_h» في الرسم، وراقب معاملي الأداء كليهما ينخفضان، لأنه يكلف دفعُ الحرارة عبر فارق درجة حرارة أكبر شغلًا أكبر تناسبيًا للكمية نفسها من الحرارة المنقولة. +ضع يدك خلف الثلاجة تجدها دافئة. من أين تأتي هذه الحرارة؟ من الطعام في الداخل. الحرارة تنتقل وحدها من الدافئ إلى البارد فقط. الثلاجة تفعل العكس: تسحب الحرارة من داخلها البارد، 4 °C، وترميها في المطبخ الأدفأ، 22 °C. هذا لا يحدث وحده، بل يحتاج إلى شغل يبذله محرك كهربائي يسمى الضاغط. لنحسب. استهلك الضاغط 100 J من الكهرباء وسحب 300 J من الحرارة من الداخل. الكميتان تخرجان إلى المطبخ، فيصله 400 J. نسمي الحرارة المنقولة مقابل كل جول من الشغل معامل الأداء، ويُختصر COP. معامل التبريد هنا 300/100 = 3، ومعامل التسخين 400/100 = 4. -تُشغِّل المضخة الحرارية الدورة نفسها بهدف مختلف. بدلًا من الاهتمام بازدياد برودة الجانب البارد، تهتم بازدياد سخونة الجانب الساخن. يسحب الضاغط قليلًا من الحرارة من الهواء الخارجي البارد. ثم يوصل شغله نفسه تلك الحرارة، زائد الشغل، إلى الجانب الدافئ. لهذا يكون معامل أداء التسخين للمضخة الحرارية دائمًا فوق 1، غالبًا 3 أو 4. أما السخان الكهربائي المقاوم العادي فيحوّل طاقته الكهربائية إلى حرارة بمعامل يساوي 1 بالضبط، فيكون الخيار الأسوأ حتمًا كلما كانت المضخة الحرارية متاحة. +المضخة الحرارية هي الجهاز نفسه، لكننا نستخدمه للتدفئة. تسحب الحرارة من الهواء البارد خارج البيت وتضعها في الغرفة. ما يصل إلى الغرفة هو الحرارة المسحوبة ومعها الشغل. لذلك معامل التسخين يساوي دائمًا معامل التبريد زائد 1. أما المدفأة الكهربائية العادية فتحوّل 100 J من الكهرباء إلى 100 J من الحرارة، فمعاملها 1 فقط. وكلما كبر الفرق بين درجتي الحرارة صار نقل الحرارة أصعب، فينخفض المعامل. في الرسم، الصندوق الأيسر هو الجانب البارد، والأيمن هو الجانب الساخن، والدائرة هي الضاغط. الأسهم تبيّن الحرارة Q_c الخارجة من البارد، والشغل W الداخل من الأسفل، والحرارة Q_h الواصلة إلى الساخن. حجم الأسهم ثابت، فاقرأ القيم من الأرقام. الأرقام تعطي أفضل أداء ممكن لجهاز مثالي. والشريطان في الأسفل يقارنان هذا الجهاز بمدفأة كهربائية عادية. ## Formal -معامل أداء التبريد لثلاجة عكوسة هو $COP_{cool} = T_c/(T_h-T_c)$، أي الحرارة المزالة من الجانب البارد لكل وحدة شغل مُزوَّدة. +الطاقة لا تضيع، ففي كل دورة $Q_h=Q_c+W$. هنا $Q_c$ الحرارة المسحوبة من الجانب البارد. و$W$ الشغل الذي يبذله الضاغط. و$Q_h$ الحرارة الواصلة إلى الجانب الساخن. معامل التبريد هو $COP_{cool}=Q_c/W$. ومعامل التسخين هو $COP_{heat}=Q_h/W$. ومن المعادلة الأولى ينتج $COP_{heat}=COP_{cool}+1$ في أي جهاز. -تشغيل الدورة نفسها لتوصيل حرارة بدلًا من ذلك يعطي $COP_{heat} = T_h/(T_h-T_c) = COP_{cool} + 1$. هذا المعامل أعلى دائمًا بوحدة واحدة على الأقل من معامل التبريد، للمستودعين نفسيهما. +القانون الثاني يمنع نقصان الإنتروبيا الكلية، وهذا يعني $Q_h/T_h\ge Q_c/T_c$. تقاس الدرجتان بالكلفن، ويجب أن يكون $T_h>T_c$. ينتج من ذلك حد للتبريد: $COP_{cool}\le T_c/(T_h-T_c)$. وحد للتسخين: $COP_{heat}\le T_h/(T_h-T_c)$. لا يبلغ الحدَّ إلا جهاز مثالي بلا احتكاك ولا تسرب. وكلما اقتربت الدرجتان إحداهما من الأخرى كبر الحدّان، لأن الشغل المطلوب يصبح قليلًا جدًّا. ## Advanced -بما أن $COP_{heat} = COP_{cool}+1$، وكلاهما يتضخم مع $T_h \to T_c$، لا تبلغ دورات التبريد الحقيقية حد كارنو أبدًا. فعدم الانعكاسية في الضواغط والصمامات ومبادلات الحرارة الحقيقية تجعل معاملات الأداء الفعلية تقع دون المثال العكوس الذي تصفه هذه المعادلات. ومع ذلك يبقى المثال العكوس السقف الذي لا تستطيع أي آلة حقيقية تجاوزه. +لماذا لا تبلغ الأجهزة الحقيقية هذا الحد؟ الغاز الذي يدور داخل الثلاجة يجب أن يكون أبرد من داخلها ليسحب منه الحرارة. ويجب أن يكون أسخن من المطبخ ليرمي الحرارة فيه. فالجهاز يعمل فعليًّا على فرق أكبر من الفرق بين الداخل والمطبخ. ويضيع جزء من الشغل أيضًا في احتكاك الضاغط. وحد التسخين هو مقلوب كفاءة كارنو لمحرك يعمل بين درجتي الحرارة نفسيهما. ## Derivation -1. تنقل ثلاجة عكوسة الحرارة Q_c من المستودع البارد باستخدام شغل W. تُحدَّد نسبة Q_c/W بـT_c/(T_h−T_c). -2. تشغيل الدورة نفسها كمضخة حرارية يوصل Q_h = Q_c + W إلى المستودع الساخن، فتصبح Q_h/W = T_h/(T_h−T_c). -3. يتجاوز سخان كهربائي مقاوم عادي الدورة كليًا، ويحوّل الشغل مباشرة إلى حرارة. فيكون معامل أدائه 1 بالضبط، وهو خط الأساس الذي تتفوق عليه كل مضخة حرارية. +1. معامل التبريد هو الحرارة المسحوبة من الجانب البارد مقسومة على الشغل. والشغل يساوي الحرارة الواصلة إلى الساخن ناقص الحرارة المسحوبة من البارد. +2. الجهاز المثالي لا يزيد الإنتروبيا الكلية، فتتناسب كل حرارة مع درجة حرارة جانبها. بالتعويض نحصل على حد التبريد. +3. معامل التسخين يستخدم الحرارة الواصلة إلى الجانب الساخن. وهي تزيد على الحرارة المسحوبة بمقدار الشغل، فيزيد المعامل بمقدار 1. ## Real world -### ثلاجات ومجمِّدات المنازل -كل ثلاجة مطبخ هي مضخة حرارية تعمل في وضع التبريد. تنقل الحرارة من داخليتها المعزولة إلى الغرفة عبر ملفات في ظهرها أو أسفلها. +### الثلاجة والفريزر -### تدفئة المنازل -تُستخدم المضخات الحرارية التي تسحب من الهواء أو الأرض بشكل متزايد لتدفئة المنازل. خلافًا للسخان الكهربائي المقاوم، تستطيع توصيل طاقة تسخين أكبر بعدة مرات من الطاقة الكهربائية التي تستهلكها. +تنقل الثلاجة الحرارة من داخلها إلى المطبخ عبر أنابيب في ظهرها. الفريزر أبرد من الثلاجة، فيحتاج إلى شغل أكثر لينقل المقدار نفسه من الحرارة. -### تكييف الهواء -مكيفات الهواء ثلاجات لغرفة. الدورة نفسها التي تُبقي الطعام باردًا في ثلاجة تُبقي منزلًا باردًا، بضخ الحرارة من الداخل إلى الخارج الأسخن. +### تدفئة البيت -### لماذا تكافح المضخات الحرارية في البرد الشديد -مع انخفاض درجة الحرارة الخارجية كثيرًا دون الداخلية، يجرّ الفارق المتسع بين T_c وT_h معامل أداء المضخة الحرارية نحو 1. لهذا تضيف بعض المضخات الحرارية في المناخات الباردة تسخينًا مقاومًا احتياطيًا لأشد الأيام بردًا. - +المكيف الذي يعمل على وضع التدفئة مضخة حرارية. يعطي حرارة أكثر من الكهرباء التي يستهلكها، والمدفأة الكهربائية العادية لا تستطيع ذلك. + +### التكييف + +ينقل المكيف الحرارة من الغرفة إلى الخارج. كلما اشتد الحر في الخارج استهلك كهرباء أكثر للتبريد نفسه. + +### البرد الشديد + +كلما برد الجو في الخارج كبر الفرق وانخفض معامل التسخين. لذلك تضعف المضخة الحرارية في أبرد الأيام. diff --git a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/en.md b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/en.md index 12db5946..631f019a 100644 --- a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/en.md +++ b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/en.md @@ -1,71 +1,70 @@ --- title: Refrigerators and heat pumps -summary: >- - A refrigerator does not make cold, it moves heat uphill from a cold - box to a warm kitchen, and it takes work to push heat the "wrong" - way — but a heat pump exploits that same uphill trick in reverse, - delivering more heating energy than the electrical energy it - consumes, something a plain electric heater can never do. +summary: 'See how work moves heat from a cold place to a warmer one, and calculate the most heat that each joule of work can move between two temperatures.' parameters: - Tc: cold reservoir T_c - Th: hot reservoir T_h + Tc: 'T_c — cold reservoir temperature' + Th: 'T_h — hot reservoir temperature' variables: - - coefficient of performance, cooling mode - - coefficient of performance, heating mode - - absolute temperature of the cold reservoir - - absolute temperature of the hot reservoir + - 'cooling coefficient of performance: heat removed from the cold side per unit of work' + - 'heating coefficient of performance: heat delivered to the hot side per unit of work' + - 'absolute temperature of the cold reservoir' + - 'absolute temperature of the hot reservoir' --- ## Try it -1. Raise the slider "hot reservoir T_h" while "cold reservoir T_c" stays put. Watch both coefficients of performance fall as the temperature gap widens. -2. Lower "cold reservoir T_c" toward 250 K. Watch the cooling COP drop — pumping heat out of somewhere already very cold takes disproportionately more work. -3. Narrow the gap between T_c and T_h as much as the sliders allow. Watch both coefficients climb well above 1 — moving heat a short "distance" in temperature is cheap. +1. Set T_c = 277 K and T_h = 295 K, a difference of 18 K. The readouts show COP (cooling) = 15.39 and COP (heating) = 16.39. The heating value is exactly 1 larger. +2. Keep T_c = 277 K and raise T_h to 320 K. The difference is now 43 K, and the two values fall to 6.44 and 7.44. +3. Keep T_h = 320 K and lower T_c to 250 K. The difference is 70 K, and the values fall to 3.57 and 4.57. ## Real-life examples -1. **A kitchen fridge.** With the inside at T_c = 277 K (4°C) and the kitchen at T_h = 295 K (22°C), an 18-degree gap gives a healthy coefficient of performance — several units of heat moved out of the fridge for every unit of work the compressor uses. -2. **A heat pump warming a home in winter.** Pulling heat from outside air at T_c = 268 K (−5°C) and delivering it indoors at T_h = 293 K (20°C), a 25-degree gap still lets a heat pump deliver noticeably more heating energy than the electrical energy it consumes. -3. **An air conditioner on a hot day.** Its cold evaporator coil runs at T_c = 283 K (10°C) to chill room air, dumping heat outside at T_h = 308 K (35°C) — a 25-degree gap that determines exactly how hard the compressor has to work to keep a room cool. +1. **A kitchen refrigerator.** With the inside at T_c = 277 K (4 °C) and the kitchen at T_h = 295 K (22 °C), the cooling limit is 15.39. A real refrigerator reaches only a fraction of this. +2. **A heat pump in winter.** With outdoor air at T_c = 268 K (−5 °C) and a room at T_h = 293 K (20 °C), the heating limit is 11.72. Real air-source heat pumps typically deliver 2 to 4 J of heat per joule of electrical work. +3. **An air conditioner on a hot day.** With a cooling coil at T_c = 283 K (10 °C) and outdoor air at T_h = 308 K (35 °C), the cooling limit is 11.32. ## Test yourself -1. Get the heating coefficient of performance to exactly 10. -2. Set up a hard cooling job: get the cooling COP below 4 with a very cold reservoir under 260 K. -3. Set the temperature gap between reservoirs to exactly 20 K. +1. Make the heating coefficient of performance equal to 10. +2. Make the cooling coefficient less than 4 with T_c below 260 K. +3. Make the difference T_h − T_c equal to 20 K. ## Intuition -Heat never flows from cold to hot on its own — a refrigerator forces it to, using a compressor that does mechanical work on a refrigerant, and that borrowed work is exactly why a fridge's power cord is plugged into the wall at all. On screen, raise "hot reservoir T_h" and watch both coefficients of performance drop, because pushing heat across a bigger temperature gap costs proportionally more work for the same amount of heat moved. +Left alone, heat passes from a warmer place to a colder one. A refrigerator must move it the other way, from food at 4 °C to a kitchen at 22 °C, and this requires work from an electrically driven compressor. Follow the energy. Suppose the compressor uses 100 J of work and removes 300 J of heat from the inside. Both amounts end up in the kitchen, so 400 J is released there, which is why the back of a refrigerator is warm. The heat moved per joule of work is called the coefficient of performance, or COP. Here the cooling COP is 300/100 = 3, and the heating COP is 400/100 = 4. -A heat pump runs the identical cycle with a different goal: instead of caring about the cold side getting colder, you care about the hot side getting hotter, and the same compressor work that pulled a little heat from the cold outdoor air now delivers that heat plus the work itself to the warm side. That is why a heat pump's heating coefficient of performance is always above 1 — often 3 or 4 — while a plain electric resistance heater converts its electrical energy to heat one-for-one, a coefficient of exactly 1, making it strictly the worse deal whenever a heat pump is an option. +A heat pump is the same machine used for the other purpose: the cold side is outdoor air and the warm side is the room. The heat delivered includes the work, so the heating COP is always the cooling COP plus 1, and it is greater than 1. An electric resistance heater turns 100 J of electrical work into 100 J of heat, a COP of 1. The two temperatures set an upper limit on the COP, and the limit falls as the temperature difference grows. In the picture, the left box is the cold reservoir, the right box is the hot reservoir and the circle is the compressor. The arrows mark heat Q_c entering from the cold side, work W entering from below, and heat Q_h leaving to the hot side; their drawn sizes do not change. The readouts give the limits for an ideal machine. The two bars compare the heat delivered per joule of work by this ideal heat pump and by a resistance heater. ## Formal -A reversible refrigerator's cooling coefficient of performance is $COP_{cool} = T_c/(T_h-T_c)$: heat removed from the cold side per unit of work supplied. +Over one complete cycle, energy conservation gives $Q_h=Q_c+W$, where $Q_c$ is the heat removed from the cold reservoir, $W$ the work supplied and $Q_h$ the heat delivered to the hot reservoir. The coefficients are $COP_{cool}=Q_c/W$ and $COP_{heat}=Q_h/W$, so $COP_{heat}=COP_{cool}+1$ for any machine. -Running the identical cycle to deliver heat instead gives $COP_{heat} = T_h/(T_h-T_c) = COP_{cool} + 1$, always at least one unit higher than the cooling coefficient for the same two reservoirs. +The second law does not allow total entropy to fall, which requires $Q_h/T_h\ge Q_c/T_c$ with both temperatures in kelvin and $T_h>T_c$. It follows that $COP_{cool}\le T_c/(T_h-T_c)$ and $COP_{heat}\le T_h/(T_h-T_c)$. Equality holds only for a reversible machine. Both limits grow without bound as the temperature difference approaches zero, because then almost no work is needed. ## Advanced -Because $COP_{heat} = COP_{cool}+1$ and both blow up as $T_h \to T_c$, real refrigeration cycles never reach the Carnot limit — irreversibilities in real compressors, valves and heat exchangers mean actual coefficients of performance sit noticeably below the reversible ideal these formulas describe, though the ideal still sets the ceiling no real machine can beat. +Heat flows into the refrigerant only if it is colder than the cold reservoir, and out of it only if it is hotter than the hot reservoir. The cycle therefore works across a larger temperature difference than the one between the reservoirs. Friction in the compressor and the pressure drop through the expansion valve create further entropy. These effects keep real coefficients well below the reversible limit. The heating limit is the reciprocal of the Carnot efficiency of an engine working between the same two temperatures. ## Derivation -1. A reversible refrigerator moves heat Q_c from the cold reservoir using work W, with the ratio Q_c/W fixed by T_c/(T_h−T_c). -2. Running the same cycle as a heat pump delivers Q_h = Q_c + W to the hot reservoir, giving Q_h/W = T_h/(T_h−T_c). -3. A plain resistive heater skips the cycle entirely and turns work straight into heat, giving it a coefficient of performance of exactly 1 — the baseline every heat pump beats. +1. The cooling coefficient compares the heat removed from the cold side with the work supplied. Energy conservation writes the work as the heat delivered minus the heat removed. +2. A reversible machine leaves total entropy unchanged, so each heat is proportional to the absolute temperature of its reservoir. Substituting gives the cooling limit. +3. The heating coefficient uses the heat delivered instead. Because the heat delivered is the heat removed plus the work, it exceeds the cooling coefficient by 1. ## Real world -### Household fridges and freezers -Every kitchen fridge is a heat pump run in cooling mode, moving heat from its insulated interior out into the room through coils on its back or underside. +### Refrigerators and freezers -### Home heating -Air-source and ground-source heat pumps are increasingly used to heat homes because, unlike a resistive electric heater, they can deliver several times more heating energy than the electrical energy they consume. +A refrigerator moves heat from its insulated interior to the room through coils at the back or underneath. A freezer has a colder interior, so each joule of work moves less heat. + +### Heating a home + +A heat pump takes heat from outdoor air or the ground and delivers it indoors. It supplies more heat than the electrical work it uses, which a resistance heater cannot do. ### Air conditioning -Air conditioners are refrigerators for a room: the same cycle that keeps food cold in a fridge keeps a house cool by pumping heat from indoors to the hotter outdoors. -### Why heat pumps struggle in extreme cold -As outdoor temperature drops far below indoor temperature, the widening gap between T_c and T_h drags a heat pump's coefficient of performance down toward 1, which is why some cold-climate heat pumps add backup resistive heating for the coldest days. +An air conditioner moves heat from a room to warmer outdoor air. The hotter the day, the more work each joule of cooling needs. + +### Very cold weather + +As the outdoor temperature falls, the temperature difference grows and the heating coefficient falls. Some systems add resistance heating for the coldest days. diff --git a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/lesson.yaml b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/lesson.yaml index 5784d6e7..6fee14ff 100644 --- a/content/lessons/thermodynamics/refrigerators-and-heat-pumps/lesson.yaml +++ b/content/lessons/thermodynamics/refrigerators-and-heat-pumps/lesson.yaml @@ -28,14 +28,14 @@ parameters: value: 295 unit: K variables: - - coefficient of performance, cooling mode - - coefficient of performance, heating mode - - absolute temperature of the cold reservoir - - absolute temperature of the hot reservoir + - COP_{cool} + - COP_{heat} + - T_c + - T_h derivation: - - \text{A reversible (Carnot) refrigerator moves heat } Q_c \text{ from the cold side using work } W\text{, with } Q_c/W = T_c/(T_h-T_c). - - \text{The same cycle run as a heat pump delivers } Q_h = Q_c+W \text{ to the hot side, with } Q_h/W = T_h/(T_h-T_c). - - \text{A plain resistive heater turns all its work directly into heat, so its "COP" is exactly 1 — always worse than a heat pump.} + - COP_{cool} = \frac{Q_c}{W} = \frac{Q_c}{Q_h - Q_c} + - "\\frac{Q_c}{T_c} = \\frac{Q_h}{T_h} \\;\\Rightarrow\\; COP_{cool} = \\frac{T_c}{T_h - T_c}" + - COP_{heat} = \frac{Q_h}{W} = \frac{T_h}{T_h - T_c} = COP_{cool} + 1 charts: [] primary: Th presets: diff --git a/content/lessons/thermodynamics/specific-heat/ar.md b/content/lessons/thermodynamics/specific-heat/ar.md index ee7bdf0f..06c9c5f1 100644 --- a/content/lessons/thermodynamics/specific-heat/ar.md +++ b/content/lessons/thermodynamics/specific-heat/ar.md @@ -1,68 +1,71 @@ --- title: الحرارة النوعية والحرارة الكامنة -summary: >- - الماء يغلي عند 100 درجة مهما رفعت النار. الحرارة الزائدة تسرّع الغليان ولا ترفع الحرارة. +summary: 'سخّن جليدًا وراقب درجة حرارته. ترتفع أولًا، ثم تقف عند الصفر حتى ينصهر الجليد كله. هنا تعرف السبب.' parameters: - P: قدرة التسخين P - m: كتلة الجليد/الماء m - x: الزمن t + P: 'P — قدرة السخان' + m: 'm — كتلة الجليد، ثم الماء' + x: 'x — الزمن منذ بدء التسخين' variables: - - طاقة الحرارة الموصَّلة - - السعة الحرارية النوعية، الطاقة اللازمة لرفع 1 كجم درجة مئوية واحدة - - الحرارة الكامنة، الطاقة اللازمة لتغيير الحالة دون تغيّر في درجة الحرارة - - الكتلة التي تُسخَّن + - 'الحرارة التي أعطاها السخان، بالجول' + - 'الحرارة النوعية: الطاقة اللازمة لتسخين 1 kg درجة واحدة' + - 'الحرارة الكامنة: الطاقة اللازمة لصهر 1 kg دون تغيّر درجة حرارته' + - 'الكتلة التي نسخّنها' --- ## Try it -1. اسحب نقطة الزمن x إلى الأمام. تابع درجة الحرارة، فهي ترتفع، ثم تثبت، ثم ترتفع من جديد. -2. ارفع منزلق «قدرة التسخين P». تنضغط كل مرحلة، لأن الطاقة الكلية نفسها تصل الآن أسرع. -3. ارفع منزلق «الكتلة m» بدلًا من ذلك. تمتد كل مرحلة، لأن هناك مادة أكثر ينبغي تسخينها. +1. اجعل P = 1000 W وm = 0.5 kg. حرّك x من 0 إلى 21 s. ترتفع درجة الحرارة من −20 °C إلى 0 °C. +2. تابع تحريك x حتى 188 s. تبقى درجة الحرارة عند 0 °C نحو 167 s، والجليد ينصهر. بعدها ترتفع من جديد وتبلغ 100 °C قرب 397 s. +3. ثبّت m = 0.5 kg وارفع P إلى 2000 W. تأخذ كل مرحلة نصف زمنها، فيدوم الانصهار نحو 84 s. ولو ضاعفت m بدل P لتضاعفت كل الأزمنة. ## Real-life examples -1. **غلاية تغلي الماء.** بقدرة عالية (P = 2000 W) لتسخين نصف كيلوغرام من الماء (m = 0.5 kg)، تمر درجة الحرارة بكل مرحلة في أقل من دقيقة بكثير. -2. **نار مخيم تُذيب الثلج ببطء.** بقدرة منخفضة (P = 300 W) لإذابة كيلوغرام من الثلج (m = 1 kg)، يمكن لمرحلة الانصهار الثابتة وحدها أن تستغرق نحو عشرين دقيقة. -3. **ميكروويف يُذيب الثلج.** بقدرة متوسطة (P = 800 W) على 1.5 كجم من الثلج، المستوى الثابت الطويل عند 0°C هو سبب استغراق إذابة الثلج وقتًا أطول بكثير من إعادة تسخين طعام سائل أصلًا. +1. **سخان قوي وكتلة صغيرة.** عند P = 2000 W وm = 0.5 kg يبلغ الجليد 0 °C بعد نحو 10 s. يدوم الانصهار نحو 84 s، ويبلغ الماء 100 °C عند نحو 199 s. +2. **سخان ضعيف وكتلة أكبر.** عند P = 300 W وm = 1 kg يحتاج تسخين الجليد إلى 139 s. ويحتاج الانصهار إلى نحو 1113 s، أي قرابة 19 دقيقة. الرسم ينتهي عند 450 s، فلا يظهر فيه إلا التسخين وبداية الخط الأفقي. +3. **سخان متوسط و1.5 kg من الجليد.** عند P = 800 W وm = 1.5 kg يبلغ الجليد 0 °C عند نحو 78 s. يدوم الانصهار نحو 626 s، فيبقى باقي الرسم خطًّا أفقيًّا عند 0 °C. ## Test yourself -1. اجعل كل الثلج ينصهر والماء يصل إلى الغليان خلال أقل من 200 ثانية إجمالًا. -2. اجعل مستوى الانصهار الثابت (تحوّل الثلج إلى ماء) يستمر قرابة 60 ثانية. -3. سخّن كتلة قدرها 1.5 كجم بحيث تستغرق عملية التسخين والانصهار والغليان كلها أكثر من 300 ثانية. +1. حوّل الجليد من −20 °C إلى ماء عند 100 °C في أقل من 200 s. +2. اجعل الانصهار يدوم قرابة 60 s. +3. اجعل m = 1.5 kg وابلغ 100 °C في أقل من 700 s. ## Intuition -ضع قِدرًا من الثلج على موقد ساخن وراقب مقياس حرارة بداخله. ترتفع درجة الحرارة بثبات في البداية، ثم تثبت فجأة تمامًا عند 0°C رغم استمرار الموقد بإطلاق الحرارة. هذا المستوى الثابت هو انصهار الثلج. في الرسم، اسحب نقطة الزمن، ويُرمز لها بـ $x$ بالثواني، إلى الأمام على طول المنحنى وتابع درجة الحرارة بالطريقة نفسها. ترتفع، ثم تثبت عند 0°C، ثم ترتفع من جديد عبر الماء السائل، ثم تثبت مرة أخرى عند 100°C أثناء الغليان. +أخرج نصف كيلوغرام من الجليد من الفريزر، ودرجة حرارته −20 °C. ضعه على سخان قدرته 1000 W، أي أنه يعطي 1000 J كل ثانية. كل كيلوغرام من الجليد يحتاج إلى نحو 2090 J ليسخن درجة واحدة. نصف كيلوغرام يسخن 20 درجة يحتاج إذن إلى 0.5 × 2090 × 20 = 20 900 J، أي نحو 21 s. ثم يقف مقياس الحرارة عند 0 °C مع أن السخان ما زال يعمل. الطاقة الآن تفكّ الجزيئات من أماكنها الثابتة في الجليد، ولا تجعلها أسرع. صهر كيلوغرام من الجليد يحتاج إلى 334 000 J. فنصف كيلوغرام يحتاج إلى 167 000 J، أي 167 s. هذا 8 أمثال زمن التسخين. نسمي الطاقة التي تسخّن 1 kg درجة واحدة الحرارة النوعية. ونسمي الطاقة التي تصهر 1 kg دون أن تغيّر درجة حرارته الحرارة الكامنة. -كل الطاقة الموصَّلة خلال مستوى ثابت تذهب إلى كسر البنية البلورية للثلج أو تحويل السائل إلى بخار. لا شيء منها يرفع درجة الحرارة، ولهذا لا يصبح الغليان القوي أسخن من 100°C مهما رفعت حرارة الموقد. ارفع منزلق «قدرة التسخين P» فتنضغط كل مرحلة أفقيًا، لأن الطاقة الكلية نفسها تصل الآن أسرع. وارفع منزلق «الكتلة m» بدلًا من ذلك فتمتد كل مرحلة، لأن هناك ببساطة ثلجًا وماءً أكثر ينبغي تسخينهما وإذابتهما. +على الرسم، الموضع الأفقي هو الزمن بالثانية، والارتفاع هو درجة الحرارة. الخط المائل الأول هو تسخين الجليد. الخط الأفقي عند 0 °C هو الانصهار. والخط المائل الثاني هو تسخين الماء. خط الماء أقل ميلًا من خط الجليد، لأن الماء يحتاج إلى نحو 4186 J لكل درجة، أي ضعف ما يحتاجه الجليد. عند 100 °C يعود الخط أفقيًّا لأن الغليان بدأ، والنموذج لا يتابع الغليان إلى نهايته. إذا زدت P قصرت كل المراحل، لأن الطاقة نفسها تصل في وقت أقل. وإذا زدت m طالت كل المراحل. لكن الخطين الأفقيين يبقيان عند 0 °C و100 °C. والعرض الثلاثي الأبعاد يوضح جزيئات تهتز في أماكنها وهي جليد، ثم تتحرك بحرية. ## Formal -ما دام لا يحدث تغيّر في الحالة، فإن $Q = mc\Delta T$. الحرارة الموصَّلة تتناسب مع الكتلة والسعة الحرارية النوعية وارتفاع درجة الحرارة، فترتفع $T$ خطيًا مع الزمن عند ثبات القدرة. +ما دامت المادة لا تنصهر ولا تغلي، فالحرارة Q ترفع درجة حرارتها حسب $Q=mc\Delta T$. m الكتلة بالكيلوغرام، وc الحرارة النوعية بوحدة J/(kg·°C)، و$\Delta T$ التغير في درجة الحرارة. سخان قدرته P يعطي في زمن t حرارة $Q=Pt$. لذلك ترتفع درجة الحرارة بمعدل ثابت يساوي $P/(mc)$. -أثناء تغيّر الحالة، تكون $Q = mL$ مع ثبات درجة الحرارة، وطول المستوى الثابت زمنيًا هو $mL/P$. يتناسب هذا الطول طرديًا مع الكتلة والحرارة الكامنة، وعكسيًا مع القدرة. +أثناء الانصهار تبقى درجة الحرارة ثابتة، والحرارة اللازمة هي $Q=mL$. L الحرارة الكامنة بوحدة J/kg. فيدوم الانصهار زمنًا $t=mL/P$. يستخدم النموذج c = 2090 J/(kg·°C) للجليد، وc = 4186 J/(kg·°C) للماء، وL = 334 000 J/kg للانصهار. ويفترض أن طاقة السخان كلها تدخل العينة، وأن درجة حرارة العينة واحدة في كل أجزائها. ## Advanced -الطاقة الممتصة أثناء الانصهار أو الغليان هي في حقيقتها تغيّر في الإنثالبي عند ضغط ثابت، $\Delta H = mL$، وعلى المستوى الجزيئي تذهب كلها إلى كسر الروابط بين الجزيئات (الروابط الهيدروجينية، بالنسبة للماء) بدلًا من زيادة متوسط الطاقة الحركية. ولهذا بالضبط لا تتحرك درجة الحرارة، وهي مقياس لمتوسط الطاقة الحركية، أثناء المستوى الثابت. +الغليان يحتاج إلى طاقة أكثر كثيرًا من الانصهار: نحو 2 260 000 J لكل كيلوغرام من الماء. تبخير نصف كيلوغرام بسخان قدرته 1000 W يأخذ نحو 1130 s، وهذا أطول من كل المراحل السابقة معًا. ويغلي الماء عند 100 °C عند مستوى سطح البحر فقط؛ على الجبال العالية يغلي عند درجة أقل. أين تذهب الطاقة أثناء الانصهار والغليان؟ تذهب إلى إبعاد الجزيئات بعضها عن بعض ضد قوى التجاذب بينها. سرعة الجزيئات لا تتغير، ودرجة الحرارة تقيس هذه السرعة، ولذلك تبقى ثابتة. ## Derivation -1. الزمن اللازم لتسخين الجليد من −20°C إلى 0°C عند قدرة ثابتة P. -2. الزمن الإضافي الذي يضيفه مستوى الانصهار الثابت، إذ تذهب الطاقة إلى الحرارة الكامنة لا إلى درجة الحرارة. -3. الزمن الإضافي لتسخين الماء السائل حتى الغليان، ويُبنى المنحنى بربط هذه المراحل الثلاث مع المستويات الثابتة. +1. طاقة تسخين الجليد 20 درجة تساوي الكتلة في الحرارة النوعية للجليد في 20. نقسمها على القدرة فنعرف متى يبدأ الانصهار. +2. طاقة الانصهار تساوي الكتلة في الحرارة الكامنة. نقسمها على القدرة ونضيف الزمن، فنعرف متى ينتهي الخط الأفقي. +3. طاقة تسخين الماء 100 درجة تساوي الكتلة في الحرارة النوعية للماء في 100. نضيف زمنها إلى ما سبق. ## Real world ### الطبخ -يبقى الماء يغلي عند 100°C مهما رفعت حرارة الموقد، فالحرارة الإضافية تجعله يغلي أسرع فقط، ولا يصبح أسخن عند مستوى سطح البحر أبدًا. -### أكياس الثلج -يمتص الجليد عند 0°C كمية كبيرة من الحرارة أثناء انصهاره دون أن يسخن، ما يجعله أكثر فاعلية في التبريد من الكتلة نفسها من الماء البارد. +الماء المغلي في قدر مفتوح يبقى قرب 100 °C. إذا رفعت النار تبخر أسرع، لكنه لا يصير أسخن. -### اعتدال المناخ -تمتلك المحيطات سعة حرارية نوعية عالية، فتتغير درجة حرارة المناخ الساحلي ببطء أكبر من المناطق الداخلية عند الكمية نفسها من الطاقة. +### الثلج في العصير + +يأخذ الجليد 334 000 J لكل كيلوغرام لينصهر، قبل أن ترتفع درجة حرارته. لذلك يبرّد العصير أكثر كثيرًا من ماء بارد له الكتلة نفسها. + +### مناخ المدن الساحلية + +الحرارة النوعية للماء عالية، فالبحر يسخن ببطء ويبرد ببطء. لذلك يكون الفرق بين حرارة النهار والليل قرب البحر أصغر منه في الصحراء. ### حروق البخار -يحمل البخار عند 100°C طاقة أكبر بكثير من الماء المغلي عند الدرجة نفسها، بسبب الحرارة الكامنة المتحررة عند تكثفه على الجلد. + +حين يلمس البخار الجلد يتحول إلى ماء ويطلق حرارته الكامنة. لذلك يحرق أشد من ماء مغلي له الكتلة نفسها. diff --git a/content/lessons/thermodynamics/specific-heat/en.md b/content/lessons/thermodynamics/specific-heat/en.md index d7ed83ae..103af3cb 100644 --- a/content/lessons/thermodynamics/specific-heat/en.md +++ b/content/lessons/thermodynamics/specific-heat/en.md @@ -1,71 +1,71 @@ --- title: Specific heat and latent heat -summary: >- - Boiling water for pasta always plateaus at 100°C no matter how high you - turn the stove — extra heat just makes it boil faster, not hotter — and - that flat stretch is where all the added energy goes into changing the - water's state instead of its temperature. +summary: 'Follow ice heated at constant power, and work out why its temperature rises in some stages and stays fixed while it melts.' parameters: - P: heating power P - m: mass of ice/water m - x: time t + P: 'P — heating power' + m: 'm — mass of ice, then water' + x: 'x — time since heating began' variables: - - heat energy delivered - - specific heat capacity — energy to raise 1 kg by 1°C - - latent heat — energy to change phase with no temperature change - - mass being heated + - 'heat supplied, in joules' + - 'specific heat capacity: energy needed to warm 1 kg by 1 °C' + - 'specific latent heat: energy needed to change the state of 1 kg at a fixed temperature' + - 'mass being heated' --- ## Try it -1. Drag the time point x forward. Follow the temperature: it climbs, then holds flat, then climbs again. -2. Raise the slider "heating power P". Every stage compresses — the same total energy now arrives faster. -3. Raise the slider "mass m" instead. Every stage stretches out — there is more material to heat. +1. Set P = 1000 W and m = 0.5 kg. Move x from 0 to 21 s: the temperature rises from −20 °C to 0 °C. +2. Move x on to 188 s. The temperature stays at 0 °C for about 167 s while the ice melts. After that it rises again and reaches 100 °C near 397 s. +3. Keep m = 0.5 kg and raise P to 2000 W. Every stage takes half as long, and melting now lasts about 84 s. Doubling m instead would double every time. ## Real-life examples -1. **A kettle boiling water.** At high power (P = 2000 W) heating half a kilogram of water (m = 0.5 kg), the temperature races through each stage in well under a minute. -2. **A campfire slowly melting snow.** At low power (P = 300 W) melting a kilogram of snow (m = 1 kg), the flat melting stage alone can take nearly twenty minutes. -3. **A microwave defrosting ice.** At moderate power (P = 800 W) on 1.5 kg of ice, the long flat plateau at 0°C is why defrosting takes far longer than reheating already-liquid food. +1. **A strong heater and a small mass.** With P = 2000 W and m = 0.5 kg, the ice reaches 0 °C after about 10 s, melting takes about 84 s, and the water reaches 100 °C at about 199 s. +2. **A weak heater and a larger mass.** With P = 300 W and m = 1 kg, warming the ice takes 139 s and melting needs about 1113 s, nearly 19 minutes. The graph ends at 450 s, so it shows the warming stage and the start of the flat stage. +3. **A medium heater and 1.5 kg of ice.** With P = 800 W and m = 1.5 kg, the ice reaches 0 °C at about 78 s. Melting takes about 626 s, so the rest of the graph is flat at 0 °C. ## Test yourself -1. Get all the ice to melt and the water to reach boiling in under 200 seconds total. -2. Make the melting plateau (ice turning to water) last close to 60 seconds. -3. Heat a mass of 1.5 kg so the whole warming-melting-boiling process takes longer than 300 seconds. +1. Take the ice from −20 °C to water at 100 °C in less than 200 s. +2. Make the melting stage last close to 60 s. +3. Set m = 1.5 kg and reach 100 °C in less than 700 s. ## Intuition -Put a pot of ice on a hot stove and watch a thermometer in it: the temperature climbs steadily at first, then suddenly holds dead flat at 0°C even though the burner keeps blasting heat — that flat stretch is the ice melting. On screen, drag the time point, labelled $x$ in seconds, forward along the curve and follow the temperature the same way: it climbs, flattens at 0°C, climbs again through liquid water, then flattens once more at 100°C for boiling. +Take 0.5 kg of ice from a freezer at −20 °C and heat it with a 1000 W heater, which supplies 1000 J every second. Warming 1 kg of ice by 1 °C takes about 2090 J, so warming 0.5 kg by 20 °C takes 0.5 × 2090 × 20 = 20 900 J, about 21 s. Then the thermometer stops at 0 °C although the heater is still on. The energy now frees the molecules from their fixed places in the ice crystal, and it does not make them move faster. Melting 1 kg of ice takes 334 000 J, so 0.5 kg takes 167 000 J, or 167 s. That is eight times as long as the warming stage. The energy that warms 1 kg by 1 °C is called the specific heat capacity. The energy that changes the state of 1 kg without changing its temperature is called the specific latent heat. -All the energy delivered during a flat stretch goes into breaking the ice's crystal structure or turning liquid into vapour — none of it raises the temperature, which is why a rolling boil never gets hotter than 100°C no matter how high you turn the stove. Raise the slider "heating power P" and every stage compresses sideways, because the same total energy now arrives faster; raise the slider "mass m" instead and every stage stretches out, because there is simply more ice and water to heat and melt. +On the graph, the horizontal position is time in seconds and the height is temperature in °C. The first sloping part is ice warming, the flat part at 0 °C is melting, and the second sloping part is liquid water warming. The water's line is about half as steep as the ice's, because 1 kg of water needs about 4186 J for each degree, twice what ice needs. At 100 °C the line becomes flat again as boiling begins; the model does not follow boiling to its end. A larger P shortens every stage in the same proportion, because the same energy arrives sooner. A larger m lengthens every stage. Neither one changes the temperatures of the flat parts. The 3D view is a schematic of particles that vibrate in place in the solid and move about freely afterwards. ## Formal -While no phase change is occurring, $Q = mc\Delta T$: heat delivered is proportional to mass, specific heat capacity, and temperature rise, so $T$ rises linearly in time for constant power. +While the state does not change, heat Q changes the temperature according to $Q=mc\Delta T$. Here m is the mass in kg, c the specific heat capacity in J/(kg·°C), and $\Delta T$ the change in temperature. A heater of constant power P supplies $Q=Pt$ in time t, so the temperature rises at the steady rate $P/(mc)$. -During a phase change, $Q = mL$ with temperature held fixed: the plateau length in time is $mL/P$, proportional to mass and latent heat, inversely proportional to power. +During a change of state at fixed pressure, $Q=mL$ and the temperature stays fixed; L is the specific latent heat in J/kg. The stage lasts $t=mL/P$. The model uses c = 2090 J/(kg·°C) for ice, c = 4186 J/(kg·°C) for water and L = 334 000 J/kg for melting. It assumes that all the heater's energy enters the sample and that the sample has one temperature throughout. ## Advanced -The energy absorbed during melting or boiling is really a change in enthalpy at constant pressure, $\Delta H = mL$, and at the molecular level it goes entirely into breaking intermolecular bonds (hydrogen bonds, for water) rather than increasing average kinetic energy — which is exactly why temperature, a measure of average kinetic energy, does not move during the plateau. +Boiling needs far more energy than melting: about 2 260 000 J for each kilogram of water at 100 °C. Boiling away 0.5 kg with 1000 W would take about 1130 s, longer than all the earlier stages together. The boiling temperature is 100 °C only at a pressure of 1 atm, and it is lower at high altitude. At constant pressure, the heat absorbed equals the change in enthalpy. During a change of state the energy raises the potential energy of the molecules' attractions, and their average kinetic energy, which temperature measures, stays the same. ## Derivation -1. Time to warm ice from −20°C to 0°C at constant power P. -2. Time added by the melting plateau: energy goes into latent heat, not temperature. -3. Time added heating liquid water up to boiling; the curve is built by chaining these three stages plus the plateaus. +1. Warming the ice by 20 °C needs mass times specific heat of ice times temperature change. Dividing by the power gives the time when melting begins. +2. Melting needs mass times latent heat at a fixed 0 °C, so the flat stage ends that much later. +3. Warming the liquid by 100 °C uses water's larger specific heat. Its time is added to the two earlier stages. ## Real world ### Cooking -Water stays at a rolling 100°C boil no matter how high the stove is turned — extra heat just boils it faster, it never gets hotter at sea level. -### Ice packs -Ice at 0°C absorbs a large amount of heat while melting without warming up, making it far more effective at cooling than the same mass of cold water. +Water boiling in an open pot stays near 100 °C at sea level. A stronger flame boils it away faster and does not make it hotter. -### Climate moderation -Oceans have a high specific heat capacity, so coastal climates change temperature more slowly than inland regions for the same energy input. +### Ice in drinks + +Ice at 0 °C absorbs 334 000 J per kilogram as it melts, before it warms at all. It cools a drink much more than the same mass of water at 0 °C. + +### Coastal climates + +Water has a high specific heat capacity, so the sea warms and cools slowly. Places near the coast have smaller temperature swings than places far inland. ### Steam burns -Steam at 100°C carries far more energy than boiling water at the same temperature, because of the latent heat released when it condenses on skin. + +Steam at 100 °C releases its latent heat when it condenses on skin, so it transfers far more energy than the same mass of water at 100 °C. diff --git a/content/lessons/thermodynamics/specific-heat/lesson.yaml b/content/lessons/thermodynamics/specific-heat/lesson.yaml index 96b83516..7c51965e 100644 --- a/content/lessons/thermodynamics/specific-heat/lesson.yaml +++ b/content/lessons/thermodynamics/specific-heat/lesson.yaml @@ -15,7 +15,7 @@ related: visualization: type: function-plot options: - expr: "t1 = m*41800/P; t2 = t1 + m*334000/P; t3 = t2 + m*418600/P; x < t1 ? -20 + P*x/(m*2090) : (x < t2 ? 0 : (x < t3 ? 100*(x - t2)/(t3 - t2) : 100))" + expr: 't1 = m*41800/P; t2 = t1 + m*334000/P; t3 = t2 + m*418600/P; x < t1 ? -20 + P*x/(m*2090) : (x < t2 ? 0 : (x < t3 ? 100*(x - t2)/(t3 - t2) : 100))' domain: - 0 - 450 @@ -68,4 +68,4 @@ challenges: - check: m*(41800+334000+418600)/P < 200 - check: m*334000/P target: 60 - - check: abs(m-1.5)<0.05 and m*794400/P > 300 + - check: abs(m-1.5)<0.05 and m*794400/P < 700 diff --git a/content/lessons/thermodynamics/temperature-and-kinetic-energy/ar.md b/content/lessons/thermodynamics/temperature-and-kinetic-energy/ar.md index ee26e028..5c6e73d7 100644 --- a/content/lessons/thermodynamics/temperature-and-kinetic-energy/ar.md +++ b/content/lessons/thermodynamics/temperature-and-kinetic-energy/ar.md @@ -1,69 +1,63 @@ --- -title: درجة الحرارة هي حركة الجزيئات -summary: >- - ميزان الحرارة يقيس شيئًا واحدًا: سرعة اهتزاز الجزيئات. لهذا لا يبرد شيء تحت −273 درجة. +title: درجة الحرارة وحركة الجزيئات +summary: 'كلما سخن الغاز تحركت جزيئاته أسرع. هنا ترى كم تبلغ سرعتها، ولماذا تسبق الجزيئات الخفيفة الثقيلة.' parameters: - T: درجة الحرارة المطلقة T - M: الكتلة المولية للغاز M + T: 'T — درجة الحرارة بالكلفن' + M: 'M — كتلة مول واحد من الغاز' variables: - - متوسط الطاقة الحركية لجزيء واحد - - ثابت بولتزمان، 1.38×10⁻²³ J/K - - متوسط سرعة الجزيئات (الجذر التربيعي لمتوسط مربع السرعة) - - ثابت الغازات العام، 8.314 J/(mol·K) - - كتلة مول واحد من الغاز + - 'متوسط طاقة حركة الجزيء الواحد' + - 'ثابت بولتزمان' + - 'السرعة النموذجية للجزيئات، وتسمى v_rms' + - 'ثابت الغازات' + - 'كتلة مول واحد من الغاز بوحدة kg/mol' --- ## Try it -1. اسحب منزلق «درجة الحرارة T» من قرب الصفر إلى الأعلى. راقب جزيئات الصندوق تتسارع ويمتلئ الميزان. -2. اسحب «درجة الحرارة T» إلى الأسفل، قرب 1 K. راقب الجزيئات تكاد تتوقف عن الحركة. -3. اخفض منزلق «الكتلة المولية M» إلى قيمة الهيليوم، وأبقِ T ثابتة. راقب السرعة النموذجية تقفز رغم أن درجة الحرارة لم تتغير. +1. اجعل T = 293 K وM = 0.029 kg/mol. هذه درجة حرارة غرفة، نحو 19.9°C، وهذه كتلة مول من الهواء. تتحرك الجزيئات بسرعة نحو 502 m/s. +2. ثبّت M وارفع T إلى 586 K، أي إلى الضعف. تتضاعف طاقة حركة الجزيئات، لكن سرعتها ترتفع إلى نحو 710 m/s فقط، لا إلى الضعف. +3. عُد إلى 293 K واجعل M = 0.004 kg/mol، وهي كتلة مول من الهيليوم. ترتفع السرعة إلى نحو 1352 m/s، وتبقى طاقة الحركة كما هي. الخطوط في الرسم ثابتة وتدل على السرعة فقط، أما العرض الثلاثي الأبعاد فيعرض الحركة مبطأة. ## Real-life examples -1. **هواء الغرفة.** تتحرك جزيئات النيتروجين والأكسجين (M ≈ 0.029 kg/mol) عند 293 K بسرعة نحو 500 م/ث، أسرع من رصاصة بندقية. لا تشعر بشيء لأنها خفيفة جدًا وصغيرة. -2. **بالون الهيليوم.** تتحرك جزيئات الهيليوم (M = 0.004 kg/mol) عند 293 K نفسها أسرع من جزيئات النيتروجين بثلاثة أضعاف تقريبًا. لهذا يتسرب الهيليوم من البالون أسرع بكثير من الهواء. -3. **نيتروجين سائل يغلي.** يغلي النيتروجين السائل عند 77 K. عند هذه الدرجة تتحرك جزيئات الغاز بثلث سرعتها في حرارة الغرفة تقريبًا. +1. **هواء الغرفة.** عند T = 293 K وM = 0.029 kg/mol تكون السرعة نحو 502 m/s. الهواء خليط من عدة غازات، وهذه الكتلة متوسط لها. +2. **هيليوم في الغرفة نفسها.** عند T = 293 K وM = 0.004 kg/mol تكون السرعة نحو 1352 m/s. هذا نحو 2.7 ضعف سرعة جزيئات الهواء. +3. **نيتروجين شديد البرودة.** عند T = 77 K وM = 0.028 kg/mol تكون السرعة نحو 262 m/s، أي نحو نصف سرعته في الغرفة. في الواقع يتحول النيتروجين إلى سائل قرب هذه الدرجة، لكن النموذج هنا يعامله غازًا. ## Test yourself -1. اجعل السرعة النموذجية للجزيئات 1500 م/ث. -2. اضبط غازًا باردًا وثقيلًا. أبقِ درجة الحرارة دون 100 K، واختر كتلة مولية أعلى من 0.02 kg/mol. -3. اضبط غازًا ساخنًا وخفيفًا. اجعل السرعة تتجاوز 2000 م/ث بكتلة مولية أقل من 0.01 kg/mol. +1. اختر T وM لتصل السرعة إلى قرابة 1500 m/s. +2. اجعل T أقل من 100 K وM أكبر من 0.02 kg/mol. +3. اجعل السرعة أكبر من 2000 m/s مع M أقل من 0.01 kg/mol. ## Intuition -لا يسكن جزيء غاز أبدًا. يطير كل جزيء باستمرار، ويصطدم بجيرانه وبجدران الوعاء الذي يحبسه. تقيس «درجة الحرارة» متوسط سرعة هذا الطيران، برقم واحد فقط. اسحب منزلق «درجة الحرارة T»، بوحدة الكلفن، وراقب الجسيمات في الصندوق. عند T منخفضة تكاد الجسيمات لا تتحرك، وعند اقتراب T من 1000 K تندفع عبر الصندوق بسرعة كبيرة. +يبدو الهواء حولك ساكنًا، لكن جزيئاته لا تتوقف عن الحركة. في غرفة درجة حرارتها 20°C تتحرك جزيئات الهواء بسرعة نحو 500 m/s، أي نحو ضعف سرعة طائرة ركاب. لا نشعر بريح لأن الجزيئات تتحرك في كل الاتجاهات ويصطدم بعضها ببعض. درجة الحرارة تقيس متوسط طاقة حركة هذه الجزيئات. إذا سخّنت الغاز زادت طاقة حركتها، وإذا برّدته نقصت. وعند درجة الحرارة نفسها يكون متوسط طاقة الحركة واحدًا في كل الغازات. لذلك يتحرك الجزيء الخفيف، مثل جزيء الهيليوم، أسرع من الجزيء الثقيل ليحمل الطاقة نفسها. -يقيس كلفن وسيليزيوس الاهتزاز نفسه، لكن كل مقياس يبدأ العدّ من نقطة مختلفة. يقابل 0°C، أي ذوبان الجليد، 273 K. ويقابل «الصفر المطلق» عند 0 K درجة −273.15°C. عند هذه النقطة يفقد الجسم كل طاقته الحركية تقريبًا. لهذا لا يبرد شيء أكثر من الصفر المطلق، فلا يوجد أبطأ من السكون التام. اخفض الآن منزلق «الكتلة المولية M» نحو قيمة الهيليوم، وأبقِ T ثابتة. تقفز السرعة النموذجية رغم أن درجة الحرارة لم تتغير. فالجزيء الخفيف يتحرك أسرع من الثقيل ليحمل الطاقة الحركية نفسها. +نقيس درجة الحرارة هنا بالكلفن. الدرجة الواحدة في الكلفن تساوي الدرجة الواحدة في المقياس المئوي، لكن الصفر مختلف. صفر الكلفن يساوي −273.15°C، ويسمى الصفر المطلق، ولا توجد درجة حرارة أقل منه. يبدأ المنزلق من 1 K، أي فوق الصفر المطلق بقليل. في الرسم يرتفع عمود مقياس الحرارة مع T، وتدل العلامات عليه على درجات مألوفة مثل انصهار الجليد وغليان الماء. يصف هذا النموذج الغازات جيدًا، ولا يصف السوائل والمواد الصلبة. ## Formal -يعتمد متوسط الطاقة الحركية لجزيء في غاز مثالي على درجة الحرارة وحدها: $\overline{KE} = \tfrac{3}{2}k_BT$، حيث $k_B$ ثابت بولتزمان. +في الغاز المثالي، متوسط طاقة حركة الجزيء الواحد هو $\overline{KE}_{trans}=\tfrac32k_BT$. تقاس T بالكلفن، وثابت بولتزمان هو $k_B=1.380649\times10^{-23}\ \mathrm{J/K}$. هذه طاقة انتقال الجزيء من مكان إلى آخر فقط، ولا تشمل دورانه أو اهتزازه. -وتنتج عن هذه الطاقة سرعة جذرية تربيعية متوسطة قدرها $v_{rms} = \sqrt{3RT/M}$، حيث $R = N_Ak_B$ ثابت الغازات، و$M = N_Am$ الكتلة المولية. +السرعة النموذجية للجزيئات هي $v_{rms}=\sqrt{\overline{v^2}}=\sqrt{3RT/M}$. نحصل عليها بتربيع سرعات الجزيئات، ثم حساب متوسط المربعات، ثم أخذ جذر هذا المتوسط. ثابت الغازات هو $R\approx8.314\ \mathrm{J/(mol\cdot K)}$، وM كتلة مول واحد بالكيلوغرام. وإذا كانت درجة الحرارة بالمئوي فحوّلها أولًا إلى الكلفن: $T_K=T_C+273.15$. ## Advanced -تتخيل النظرية الحركية الغاز سربًا من جسيمات صغيرة جدًا، تتحرك حركة عشوائية مستمرة ومرنة. والضغط نفسه هو معدل قصف هذه الجزيئات لسطح الوعاء. لهذا يضغط الغاز الأسخن على جدران وعائه بقوة أكبر، عند الحجم والكمية نفسيهما. +لا تتحرك الجزيئات كلها بالسرعة نفسها؛ بعضها أبطأ من v_rms وبعضها أسرع. أما العرض الثلاثي الأبعاد فيعطي الجزيئات كلها سرعة واحدة للتبسيط. ولأن الجزيئات تتحرك في كل الاتجاهات، لا ينتقل الغاز كله إلى أي جهة مع أن جزيئاته سريعة. وعند درجات حرارة منخفضة جدًّا أو ضغط عالٍ جدًّا تتقارب الجزيئات ويجذب بعضها بعضًا، فلا يبقى نموذج الغاز المثالي دقيقًا. ## Derivation -1. تساوي النظرية الحركية متوسط الطاقة الحركية لجزيء، $\tfrac12 m\overline{v^2}$، بالمقدار $\tfrac32 k_BT$، وهذا هو تعريف درجة الحرارة في هذا النموذج. -2. حُلّ المعادلة لإيجاد متوسط مربع السرعة، ثم استبدل كتلة الجزيء $m$ وثابت بولتزمان $k_B$ بصيغتين تستخدمان الكتلة المولية $M$ وثابت الغازات $R$. -3. خذ الجذر التربيعي فتحصل على السرعة الجذرية التربيعية المتوسطة، وهي السرعة النموذجية التي تصف حركة الغاز. +1. نبدأ من أن متوسط طاقة حركة الجزيء يساوي ثلاثة أنصاف ثابت بولتزمان مضروبًا في درجة الحرارة بالكلفن. +2. طاقة الحركة تساوي نصف الكتلة في مربع السرعة، فنحسب منها متوسط مربع السرعة. ثم نكتب كتلة الجزيء على أنها كتلة المول مقسومة على عدد الجزيئات في المول. +3. نأخذ الجذر التربيعي فنحصل على السرعة النموذجية. ## Real world -### مناطيد الطقس -تتبع الأجهزة درجة حرارة الهواء بوحدة الكلفن، لأن الكلفن لا يصبح سالبًا أبدًا. فهو عدّ مباشر لطاقة الجزيئات، لا مقياس بشري اعتباطي. +### مقارنة الغازات -### التبريد الشديد -يُستخدم الهيليوم السائل لتبريد مغناطيسات أجهزة الرنين المغناطيسي إلى نحو 4 K. عند هذه الدرجة تحمل ذرات الهيليوم طاقة حركية ضئيلة جدًا، فلا حرارة تقريبًا لتفقدها. +عند درجة الحرارة نفسها تتحرك جزيئات الغاز الأخف أسرع. هذا لا يعني أن الغاز الأخف أسخن. -### تسرب الغازات -تتسرب الغازات الخفيفة، كالهيدروجين والهيليوم، من الثقوب الصغيرة وجدران البالون الرقيقة أسرع من الغازات الأثقل. عند درجة الحرارة نفسها تتحرك جزيئاتها أسرع، فتخرج أسرع. +### الضغط داخل وعاء -### أبحاث الصفر المطلق -بردت المختبرات ذرات إلى أقل من جزء من مليار من الكلفن فوق الصفر المطلق. لكن أحدًا لم يبلغ 0 K الحقيقي، لأن ذلك يتطلب إزالة كل أثر للطاقة الحركية. - +تصطدم الجزيئات بجدران الوعاء وتدفعها. إذا سخّنت غازًا في وعاء مغلق اشتدت الاصطدامات وارتفع الضغط. diff --git a/content/lessons/thermodynamics/temperature-and-kinetic-energy/en.md b/content/lessons/thermodynamics/temperature-and-kinetic-energy/en.md index 83b2adfb..516c33e0 100644 --- a/content/lessons/thermodynamics/temperature-and-kinetic-energy/en.md +++ b/content/lessons/thermodynamics/temperature-and-kinetic-energy/en.md @@ -1,71 +1,63 @@ --- -title: Temperature is molecules in motion -summary: >- - A thermometer in a warm room and one in a freezer are not reading two - different "kinds" of hot and cold — they are counting how fast the - air molecules around them are jiggling, and that single idea explains - Celsius, Kelvin, and why nothing can get colder than −273.15°C. +title: Temperature and molecular motion +summary: 'Relate an ideal gas’s temperature to average translational kinetic energy, and see why lighter particles move faster at the same temperature.' parameters: - T: absolute temperature T - M: molar mass of the gas M + T: 'T — absolute temperature' + M: 'M — molar mass' variables: - - average kinetic energy of one molecule - - Boltzmann constant, 1.38×10⁻²³ J/K - - root-mean-square molecular speed - - universal gas constant, 8.314 J/(mol·K) - - mass of one mole of the gas + - 'average translational kinetic energy per particle' + - 'Boltzmann constant' + - 'square root of mean squared particle speed' + - 'molar gas constant' + - 'mass of one mole, in kg/mol' --- ## Try it -1. Drag the slider "temperature T" up from near zero. Watch the molecules in the box speed up and the thermometer fill. -2. Pull "temperature T" down toward 1 K. Watch the molecules almost stop moving. -3. Lower the slider "molar mass M" to helium's value with T fixed. Watch the typical speed jump even though the temperature has not changed. +1. Set T = 293 K and M = 0.029 kg/mol. The Celsius readout is about 19.9°C and the root-mean-square speed is about 502 m/s. +2. Keep M fixed and raise T to 586 K. Average translational kinetic energy doubles, but the speed rises only by a factor of √2, to about 710 m/s. +3. Return to 293 K and set M = 0.004 kg/mol. Speed rises to about 1352 m/s while average translational kinetic energy stays unchanged. The 2D streaks are static indicators with capped lengths; the 3D particles show slowed, schematic motion. ## Real-life examples -1. **Room-temperature air.** Nitrogen and oxygen (M ≈ 0.029 kg/mol) at 293 K, a mild room, have molecules zipping around at roughly 500 m/s — faster than a rifle bullet, yet you feel nothing because they are so light and so small. -2. **A helium balloon.** Helium (M = 0.004 kg/mol) at the same 293 K room temperature has molecules moving over three times faster than the nitrogen around it, which is part of why helium leaks out of a balloon so much quicker than air would. -3. **Liquid nitrogen boiling off.** Nitrogen gas cooled to 77 K, the temperature at which liquid nitrogen boils, has molecules moving barely a third as fast as they do at room temperature. +1. **A gas representing room-temperature air.** At T = 293 K and M = 0.029 kg/mol, the model gives about 502 m/s. Air is a mixture, so this effective molar mass simplifies its different molecular species. +2. **Helium at the same temperature.** At T = 293 K and M = 0.004 kg/mol, the speed is about 1352 m/s, roughly 2.69 times the first value—not three times. +3. **Cold nitrogen in the ideal-gas model.** At T = 77 K and M = 0.028 kg/mol, the speed is about 262 m/s. Compared with the same gas at 293 K, it is about 51% as large. Whether actual nitrogen remains a gas also depends on pressure. ## Test yourself -1. Get the typical molecular speed to 1500 m/s. -2. Set up a cold, heavy gas: keep the temperature under 100 K with a molar mass above 0.02 kg/mol. -3. Set up a hot, light gas: get the speed above 2000 m/s using a molar mass under 0.01 kg/mol. +1. Find T and M that give a root-mean-square speed near 1500 m/s. +2. Set T below 100 K and M above 0.02 kg/mol. +3. Make the speed greater than 2000 m/s while keeping M below 0.01 kg/mol. ## Intuition -Nothing in a gas sits still — every molecule is flying around, bouncing off its neighbours and off the walls of whatever holds it, and "temperature" is simply a number for how fast that flying around is, on average. On screen, drag the slider "temperature T", measured in kelvin, and watch the particles in the box: at low T they barely drift, and as T climbs toward 1000 K they streak across the box far faster. +Gas particles move in many directions and at many speeds. Temperature is related to their average random translational kinetic energy in this model; it is not the speed of every particle. Two gases at the same temperature have the same average translational energy per particle. A lighter particle needs a larger speed to have the same kinetic energy as a heavier one. -Kelvin and Celsius describe the same jiggling, just counted from different starting lines: 0°C (ice melting) sits at 273 K, and 0 K — "absolute zero" — sits at −273.15°C, the point where a substance has given up essentially all the kinetic energy it can give up. That is also why nothing can get colder than absolute zero: there is no such thing as slower than not moving. Now lower the slider "molar mass M" toward helium's value while T stays fixed, and the typical speed jumps up even though nothing about the temperature changed — light molecules simply have to move faster than heavy ones to carry the same amount of kinetic energy. +Kelvin and Celsius use equal-sized temperature intervals but different zero points. Absolute zero is 0 K, or −273.15°C; the lowest slider setting, 1 K, is above it. A thermometer measures a temperature-dependent property after exchanging energy with its surroundings, rather than literally counting molecular speeds. The ideal-gas picture is useful here, but it is not a complete description of all matter near absolute zero. ## Formal -The average translational kinetic energy of a molecule in an ideal gas depends on temperature alone: $\overline{KE} = \tfrac{3}{2}k_BT$, with $k_B$ the Boltzmann constant. +For a classical ideal gas in thermal equilibrium in three dimensions, $\overline{KE}_{trans}=\tfrac32k_BT$, with T in kelvin and $k_B=1.380649\times10^{-23}\ \mathrm{J/K}$. This is translational kinetic energy per particle, not necessarily all its internal energy. -The root-mean-square speed that follows from that energy is $v_{rms} = \sqrt{3RT/M}$, where $R = N_Ak_B$ is the gas constant and $M = N_Am$ is the molar mass. +Root-mean-square speed is $v_{rms}=\sqrt{\overline{v^2}}=\sqrt{3RT/M}$, where $R\approx8.314\ \mathrm{J/(mol\cdot K)}$ and M is molar mass in kilograms per mole. It differs from the mean speed. Convert temperatures using $T_K=T_C+273.15$ before applying this formula. ## Advanced -Kinetic theory treats a gas as a swarm of point-like particles in constant, random, elastic motion; pressure itself is nothing more than the rate at which these molecules bombard a surface, which is why a hotter, faster-moving gas pushes harder on the walls of its container for the same volume and amount. +For a gas at rest overall, the mean velocity vector can be zero while the root-mean-square speed is large: opposite directions cancel in a vector average, but squared speeds do not. A real equilibrium gas has a distribution of speeds, whereas the 3D illustration assigns one speed scale to all displayed particles. Quantum effects and intermolecular interactions can invalidate the classical ideal-gas approximation, especially at low temperatures or high densities. ## Derivation -1. Kinetic theory equates a molecule's average kinetic energy, $\tfrac12 m\overline{v^2}$, with $\tfrac32 k_BT$ — the definition of temperature in this model. -2. Solve for the mean-square speed and rewrite the per-molecule mass $m$ and Boltzmann constant $k_B$ in terms of molar mass $M$ and the gas constant $R$. -3. Take the square root to get the root-mean-square speed, the typical molecular speed used to describe a gas. +1. Equate mean translational kinetic energy to three halves of Boltzmann's constant times absolute temperature. +2. Solve for mean squared speed and replace particle mass with molar mass divided by Avogadro's constant. +3. Take the square root to obtain the root-mean-square speed. ## Real world -### Weather balloons -Instruments track air temperature by kelvin internally because kelvin never goes negative — it is a direct count of molecular energy, not an arbitrary human scale. +### Comparing gas species -### Cryogenics -Liquid helium, used to cool MRI magnets to about 4 K, works because at that temperature helium atoms carry almost no kinetic energy left to conduct away as heat. +At equal temperature, lighter ideal-gas particles have a greater root-mean-square speed. This does not mean the lighter gas is hotter. -### Gas leaks -Lighter gases such as hydrogen and helium escape through small leaks and thin balloon walls faster than heavier gases at the very same temperature, exactly because their molecules move faster. +### Pressure in a container -### Absolute zero research -Laboratories have cooled atoms to within a billionth of a kelvin of absolute zero, but true 0 K has never been reached — it would require removing every last trace of kinetic energy. +Particles exchange momentum with the walls. At fixed volume and particle number, increasing temperature increases ideal-gas pressure. diff --git a/content/lessons/thermodynamics/temperature-and-kinetic-energy/lesson.yaml b/content/lessons/thermodynamics/temperature-and-kinetic-energy/lesson.yaml index d2d5f859..5056477c 100644 --- a/content/lessons/thermodynamics/temperature-and-kinetic-energy/lesson.yaml +++ b/content/lessons/thermodynamics/temperature-and-kinetic-energy/lesson.yaml @@ -16,7 +16,7 @@ visualization: options: {} visualization3d: type: gas-box - options: {} + options: { molarMass: true } parameters: T: min: 1 diff --git a/content/lessons/thermodynamics/the-second-law/ar.md b/content/lessons/thermodynamics/the-second-law/ar.md index 1d58d05a..04579583 100644 --- a/content/lessons/thermodynamics/the-second-law/ar.md +++ b/content/lessons/thermodynamics/the-second-law/ar.md @@ -1,72 +1,73 @@ --- -title: 'القانون الثاني: لماذا لا يعود العطر إلى زجاجته' -summary: >- - افتح عطرًا تنتشر رائحته في الغرفة كلها، ولا تعود إلى الزجاجة أبدًا. هذا هو القانون - الثاني للديناميكا الحرارية. +title: 'القانون الثاني: لماذا ينتشر الغاز ولا يتجمع من جديد؟' +summary: 'ينتشر العطر في الغرفة ولا يعود إلى الزجاجة. هنا تعدّ طرق توزّع الجزيئات لتعرف السبب.' parameters: - nLeft: الجزيئات في اليسار n_L - nRight: الجزيئات في اليمين n_R - perm: مدى انفتاح الحاجز + nLeft: 'n_L — عدد الجزيئات في النصف الأيسر' + nRight: 'n_R — عدد الجزيئات في النصف الأيمن' + perm: 'انفتاح الحاجز، بالنسبة المئوية' variables: - - الإنتروبيا - - ثابت بولتزمان، 1.38×10⁻²³ J/K - - التعددية، عدد الترتيبات المجهرية المطابقة لهذا التقسيم - - الجزيئات في الجانب الأيسر - - الجزيئات في الجانب الأيمن - - إجمالي الجزيئات، n_L + n_R + - 'الإنتروبيا' + - 'ثابت بولتزمان، 1.38×10⁻²³ J/K' + - 'عدد الطرق التي يتحقق بها هذا التوزيع' + - 'عدد الجزيئات في النصف الأيسر' + - 'عدد الجزيئات في النصف الأيمن' + - 'العدد الكلي للجزيئات، n_L + n_R' --- ## Try it -1. اضبط «الجزيئات في اليسار» عاليًا و«الجزيئات في اليمين» منخفضًا، ثم ارفع «مدى انفتاح الحاجز». راقب الغاز يمتزج نحو تقسيم متساوٍ من تلقاء نفسه. -2. اسحب كلا المنزلقين إلى 50. لاحظ أن هذا التقسيم المتساوي له أكبر عدد من الترتيبات المجهرية الممكنة. إنها الحالة الأرجح بفارق كبير. -3. اخفض «مدى انفتاح الحاجز» نحو الصفر مع تقسيم غير متساوٍ. لاحظ أن هذا الاختلال يمكن أن يبقى الآن إلى ما لا نهاية، لأن شيئًا يكاد لا يعبر ليُخل به. +1. اجعل n_L = 90 وn_R = 10. تعرض القراءة S ≈ 32.51 k_B. أكبر قيمة ممكنة لـ100 جزيء هي 69.31 k_B، فالشريط ممتلئ إلى أقل من نصفه. +2. اجعل n_L = 50 وn_R = 50. المجموع ما زال 100، لكن S بلغت أكبر قيمة، 69.31 k_B. الشريط ممتلئ كله. +3. عُد إلى n_L = 90 وn_R = 10 وغيّر انفتاح الحاجز. لا تتغير قراءة الإنتروبيا. الانفتاح يحدد سهولة عبور الجزيئات فقط. وفي العرض الثلاثي الأبعاد، كلما اتسع الانفتاح تساوى الجانبان أسرع. ## Real-life examples -1. **عطر يُطلق في زاوية واحدة.** ابدأ بـ95 جزيئًا من الرائحة مركَّزة في اليسار، و5 فقط في اليمين. يسمح حاجز مفتوح لها بالانتشار حتى تمتلئ الغرفة بالتساوي. ينهار نظام مرتب إلى فوضى، لا العكس أبدًا. -2. **غرفة تهوّت بالكامل.** مع 50 جزيئًا في كل جانب والحاجز مفتوح على مصراعيه، يستقر الغاز في حالته الأكثر امتزاجًا وأعلى إنتروبيا. لهذا التشكيل طرق أكثر بفارق هائل لترتيب الجزيئات نفسها من أي تقسيم غير متساوٍ. -3. **زجاجة مغلقة لم تُفتح.** يوجد 80 جزيئًا محبوسًا في اليسار و20 فقط في اليمين، لكن الحاجز مغلق تقريبًا بالكامل. يبقى ذلك الاختلال قائمًا. النظام ليس ممنوعًا، لكنه غير محتمل إطلاقًا أن ينشأ أو يستمر بمجرد أن تصبح الجزيئات حرة فعلًا في التجوال. +1. **غاز أُطلق في جانب واحد.** عند n_L = 95 وn_R = 5 وحاجز مفتوح بنسبة 40%، تكون S ≈ 19.85 k_B. هذه قيمة بعيدة عن أكبر قيمة، 69.31 k_B. الجزيئات تستطيع العبور، فيتجه العددان إلى التساوي. +2. **غاز اختلط تمامًا.** عند 50 جزيئًا في كل جانب وحاجز مفتوح بنسبة 80%، تكون S عند أكبر قيمة لها، 69.31 k_B. تستمر الجزيئات في العبور، لكن العددين يبقيان متقاربين. +3. **حاجز شبه مغلق.** عند n_L = 80 وn_R = 20 وحاجز مفتوح بنسبة 2%، تكون S ≈ 50.04 k_B. يبقى التوزيع غير متساوٍ مدة طويلة لأن العبور صعب. إغلاق الحاجز لا يخفض الإنتروبيا، بل يبطئ التغير. ## Test yourself -1. اجعل الجانبين يحملان العدد نفسه بالضبط من الجزيئات. -2. ادفع الإنتروبيا (بوحدات k_B) فوق 60 مع إبقاء الجانبين غير متساويين بوضوح، بفارق أكبر من 10. -3. أبقِ الجانب الأيسر فوق 90 جزيئًا والحاجز شبه مغلق، أقل من 5% مفتوح. +1. اجعل عدد الجزيئات في النصفين متساويًا. +2. ارفع S فوق 60 k_B والفرق بين العددين أكبر من 10. +3. أبقِ أكثر من 90 جزيئًا في اليسار والحاجز مفتوح بأقل من 5%. ## Intuition -أسقِط مكعب ثلج في مشروب دافئ، فسينصهر ويبرّد المشروب. لم تشاهد قط مشروبًا دافئًا يتجمد جزء منه تلقائيًا إلى مكعب ثلج عائم بينما يسخن الباقي. لا يمنع القانون الأول للديناميكا الحرارية، حفظ الطاقة، ذلك فعليًا. ما يمنعه هو القانون الثاني. تتدفق الحرارة من الساخن إلى البارد لأن هناك طرقًا أكثر بكثير لتنتهي الطاقة موزعة بالتساوي، من أن تتركز من جديد في بقعة باردة صغيرة واحدة. اضبط «الجزيئات في اليسار» عاليًا و«الجزيئات في اليمين» منخفضًا في الرسم، ثم افتح الحاجز. راقب الفكرة نفسها تتكرر مع غاز بدل الحرارة. تتجول الجزيئات من حيث هي مزدحمة إلى حيث ليست كذلك، لأن طرق الانتشار أكثر بكثير من طرق الازدحام في زاوية واحدة. +افتح زجاجة عطر في زاوية غرفة. بعد دقائق تشم العطر في كل مكان. لكنك لن ترى العطر يعود ويتجمع في الزجاجة. لماذا؟ لنجرّب بعدد صغير. ضع 4 جزيئات مرقّمة في صندوق له نصفان. كل جزيء إما في اليسار وإما في اليمين، فعدد الطرق 2 × 2 × 2 × 2 = 16 طريقة. طريقة واحدة فقط تضع الأربعة كلها في اليسار. وست طرق تضع اثنين في كل جانب. إذن التوزيع المتساوي أرجح بست مرات، لأن الطرق المؤدية إليه أكثر. -يتساوى احتمال كل ترتيب محدد للجزيئات مع احتمال أي ترتيب آخر. لكن الحالات الممتزجة تهيمن لأن عددها أكبر بفارق هائل. حتى تقسيم 50/50 لعدد متواضع كـ100 جزيء يملك ترتيبات مجهرية ممكنة أكثر بكثير من تقسيم 95/5. ولنحو 10²³ جزيء في غاز حقيقي، تتسع الفجوة كثيرًا. تحتاج حينها مشاهدة الغاز ينفصل عكسيًا من تلقاء نفسه زمنًا أطول من عمر الكون. الأمر ليس مستحيلًا من حيث المبدأ. لكنه غير محتمل لدرجة أن كلمة «أبدًا» هي الكلمة الصادقة هنا. +مع 100 جزيء يكبر الفرق كثيرًا. التوزيع 95 مقابل 5 يتحقق بنحو 75 مليون طريقة. والتوزيع 50 مقابل 50 يتحقق بنحو 10²⁹ طريقة. الجزيئات تتحرك عشوائيًّا وتنتقل من طريقة إلى أخرى، فنجدها في أغلب الوقت قرب التوزيع المتساوي. العودة إلى 95 مقابل 5 ليست ممنوعة، لكنها نادرة جدًّا. وفي الغاز الحقيقي نحو 10²³ جزيء، فتصبح نادرة إلى حد أنها لا تحدث أبدًا. الإنتروبيا عدد يقيس كثرة هذه الطرق. في الرسم، النقاط تبيّن نسبة الجزيئات في كل جانب، وليست كل نقطة جزيئًا واحدًا. أنت تحدد العددين بالمنزلقين، فالرسم يعرض الحالة التي اخترتها ولا يتحرك مع الزمن. والشريط يقارن إنتروبيا هذه الحالة بأكبر قيمة ممكنة للمجموع نفسه. ## Formal -تعدّ الإنتروبيا عدد الترتيبات المجهرية $\Omega$ المتوافقة مع ما يمكنك ملاحظته على المستوى الكبروي: $S = k_B\ln\Omega$. +تعريف الإنتروبيا هو $S=k_B\ln\Omega$. الرمز $\Omega$ هو عدد الطرق التي يتحقق بها التوزيع. والرمز $k_B$ هو ثابت بولتزمان، 1.38×10⁻²³ J/K. ليكن عدد الجزيئات N، منها $n_L$ في اليسار، و$n_R$ في اليمين. عندها $\Omega=N!/(n_L!\,n_R!)$. نستخدم اللوغاريتم لأن الأعداد كبيرة جدًّا، ولأنه يجعل إنتروبيا نظامين معًا تساوي مجموع إنتروبيتيهما. -لـ$N$ جزيء مقسَّمة إلى $n_L$ في اليسار و$n_R$ في اليمين، يعطي تقريب ستيرلنغ $S/k_B \approx N\ln N - n_L\ln n_L - n_R\ln n_R$. تبلغ هذه الدالة أقصاها عند التقسيم المتساوي $n_L = n_R$ بالضبط، وهي الحالة ذات الطرق الأكثر لتحدث. لهذا يتجه إليها أي نظام معزول. +للأعداد الكبيرة توجد صيغة تقريبية تسمى تقريب ستيرلنغ: $S/k_B\approx N\ln N-n_L\ln n_L-n_R\ln n_R$. المجموع هو $N=n_L+n_R$. إذا ثبت المجموع كانت الإنتروبيا أكبر ما يمكن عند $n_L=n_R$. وقيمتها هناك $N\ln 2$. القراءة في الرسم تستخدم هذا التقريب: عند 90 و10 تعطي 32.51، والعدّ الدقيق يعطي 30.48. ينص القانون الثاني على أن إنتروبيا نظام معزول فيه عدد هائل من الجزيئات لا تنقص. ## Advanced -القانون الثاني إحصائي في جوهره، لا مطلق. لا شيء في الفيزياء يمنع كل جزيء في غرفة من الاندفاع تلقائيًا إلى زاوية واحدة في اللحظة نفسها. لكن هذا غير محتمل إلى درجة أن أحدًا لم يشاهده قط لعدد حقيقي من الجزيئات. لهذا يُصاغ القانون بصيغة «لا تنقص الإنتروبيا أبدًا» للأنظمة الكبيرة واقعيًا، لا كاستحالة منطقية صارمة. +القانون الثاني قانون احتمالات. الفرق العشوائي بين الجانبين يكون عادة قريبًا من الجذر التربيعي لعدد الجزيئات. مع 100 جزيء هذا نحو 10، فيُلاحظ. ومع 10²³ جزيء هو جزء لا يُذكر من المجموع. هذا النموذج يعدّ مكان كل جزيء فقط، في نصفين متساويين ودرجة حرارة واحدة. إنتروبيا الغاز الحقيقي تعتمد أيضًا على توزّع الطاقة بين الجزيئات. ولهذا السبب نفسه تنتقل الحرارة من الساخن إلى البارد. ## Derivation -1. التعددية Ω(n_L, n_R) = N!/(n_L!n_R!) تعدّ كل طريقة مميزة لوضع N جزيء، بحيث n_L في اليسار وn_R في اليمين. -2. يضبط تعريف بولتزمان الإنتروبيا بأنها S = k_B ln Ω، فيحوّل ذلك العدّ مباشرة إلى كمية فيزيائية. -3. يحوّل تقريب ستيرلنغ، للأعداد الكبيرة N، المضروبات العاملية إلى لوغاريتمات. فيعطي S/k_B ≈ N ln N − n_L ln n_L − n_R ln n_R، وتبلغ أقصاها عند التقسيم المتساوي. +1. نعدّ الطرق. يمكن ترتيب N جزيئًا بعدد N! من الترتيبات. لكن تبديل الجزيئات داخل النصف نفسه لا يغيّر التوزيع، فنقسم على ذلك. +2. نأخذ اللوغاريتم ونضرب في ثابت بولتزمان، فنحصل على الإنتروبيا. +3. للأعداد الكبيرة نستخدم تقريب ستيرلنغ بدل المضروب. الناتج أكبر ما يمكن حين يتساوى العددان. ## Real world -### الثلاجات -لا تخالف الثلاجة القانون الثاني. فهي تنقل الحرارة من البارد إلى الساخن فقط ببذل شغل وطرح حرارة إضافية في الغرفة. لهذا ترتفع الإنتروبيا الكلية للثلاجة والغرفة معًا. +### الروائح والاختلاط -### مزج القشدة في القهوة -تنتشر القشدة بالتساوي عبر القهوة، ولا تتجمع أبدًا من جديد في قطرة واحدة. هذا الانجراف الإحصائي ذو الاتجاه الواحد هو نفسه الذي يملأ به الغاز غرفة. +تنتشر الرائحة في الغرفة، والحليب المصبوب في الشاي لا ينفصل عنه. الترتيبات المنتشرة أكثر عددًا بكثير من الترتيبات المتجمعة. -### حجج «الموت الحراري» -يصف بعض علماء الكونيات مصير الكون البعيد المدى بالمنطق نفسه بالضبط. تنتشر الطاقة نحو ترتيبها الأكثر احتمالًا، والأكثر توزّعًا بالتساوي. +### الثلاجة -### الموثوقية الهندسية -يصمم المهندسون عمليات ذات اتجاه واحد، كالاحتراق والكبح، حول القانون الثاني. فلا يمكن أبدًا استعادة الطاقة المتحررة كحرارة كاملة كشغل مفيد، وهذا يضع سقفًا صارمًا لكفاءة أي محرك. - +تخفض الثلاجة إنتروبيا ما بداخلها، لكنها ترمي حرارة أكثر في المطبخ. الإنتروبيا الكلية للطعام والمطبخ معًا تزداد. + +### المحركات + +لا يتحول كل ما ينتج عن حرق الوقود من حرارة إلى حركة. يجب أن يخرج جزء منها إلى الهواء حتى لا تنقص الإنتروبيا الكلية. + +### تحلية ماء البحر + +الملح الذائب منتشر في الماء كله. فصله عن الماء يخفض إنتروبيا المخلوط، ولذلك يحتاج دائمًا إلى طاقة. diff --git a/content/lessons/thermodynamics/the-second-law/en.md b/content/lessons/thermodynamics/the-second-law/en.md index 5cbc585a..ff96db11 100644 --- a/content/lessons/thermodynamics/the-second-law/en.md +++ b/content/lessons/thermodynamics/the-second-law/en.md @@ -1,73 +1,73 @@ --- -title: 'The second law: why things never un-mix' -summary: >- - Open a bottle of perfume in a corner of a room and its scent spreads - to fill every corner within minutes — but no one has ever watched a - room full of scented air spontaneously gather itself back into the - bottle, and that one-way street is the second law of thermodynamics. +title: 'The second law: why a gas spreads out and does not gather again' +summary: 'Count the ways molecules can be divided between the two halves of a box, and use that count to explain why an uneven gas spreads out.' parameters: - nLeft: molecules on the left n_L - nRight: molecules on the right n_R - perm: how open the partition is + nLeft: 'n_L — molecules in the left half' + nRight: 'n_R — molecules in the right half' + perm: 'partition opening, in percent' variables: - - entropy - - Boltzmann constant, 1.38×10⁻²³ J/K - - multiplicity, the number of microscopic arrangements matching this split - - molecules on the left side - - molecules on the right side - - total molecules, n_L + n_R + - 'entropy' + - 'Boltzmann constant, 1.38×10⁻²³ J/K' + - 'multiplicity: the number of microscopic arrangements that match this split' + - 'number of molecules in the left half' + - 'number of molecules in the right half' + - 'total number of molecules, n_L + n_R' --- ## Try it -1. Set "molecules on the left" high and "molecules on the right" low, then raise "how open the partition is". Watch the gas mix toward an even split on its own. -2. Drag both sliders to 50. Notice this even split has the largest number of possible microscopic arrangements — the most likely state by far. -3. Lower "how open the partition is" toward zero with an uneven split. Notice the order can now sit there indefinitely, because almost nothing can cross to disturb it. +1. Set n_L = 90 and n_R = 10. The readout shows S ≈ 32.51 k_B, while the maximum for 100 molecules is 69.31 k_B. The bar is less than half full. +2. Set n_L = 50 and n_R = 50. The total is still 100, and now S equals the maximum, 69.31 k_B. The bar is full. +3. Return to n_L = 90 and n_R = 10 and change the partition opening. The entropy readout stays the same: the opening controls how readily molecules cross, not how many arrangements a split has. In the 3D view, a wider opening lets the two sides balance sooner. ## Real-life examples -1. **Perfume released in one corner.** Starting with 95 molecules of scent concentrated on the left and only 5 on the right, an open partition lets them spread until the room is filled evenly — order collapsing into disorder, never the other way around. -2. **A room that has fully aired out.** With 50 molecules on each side and the partition wide open, the gas sits at its most-mixed, highest-entropy state — the configuration with overwhelmingly more ways to arrange the same molecules than any lopsided split has. -3. **A sealed, unopened bottle.** With 80 molecules trapped on the left and only 20 on the right, but the partition almost fully closed, that imbalance survives — order is not forbidden, it is just enormously unlikely to arise or persist once molecules are actually free to wander. +1. **Gas released at one side.** With n_L = 95, n_R = 5 and the partition 40% open, S ≈ 19.85 k_B, far below the maximum of 69.31 k_B. Molecules can cross, so the split moves toward equal numbers. +2. **A fully mixed gas.** With 50 molecules on each side and the partition 80% open, S is at its maximum of 69.31 k_B. Molecules still cross, but the numbers stay close to equal. +3. **A nearly closed partition.** With n_L = 80, n_R = 20 and the partition 2% open, S ≈ 50.04 k_B. The uneven split lasts a long time because few molecules can cross. Closing the partition does not lower the entropy; it slows the change. ## Test yourself -1. Get the two sides to exactly the same number of molecules. -2. Push the entropy (in units of k_B) above 60 while keeping the two sides clearly unequal (differing by more than 10). -3. Keep the left side above 90 molecules with the partition nearly sealed (below 5% open). +1. Give the two halves the same number of molecules. +2. Raise S above 60 k_B while the two counts differ by more than 10. +3. Keep more than 90 molecules on the left with the partition less than 5% open. ## Intuition -Drop an ice cube into a warm drink and it melts, cooling the drink; you have never once seen a warm drink spontaneously freeze part of itself into a floating ice cube while the rest gets warmer, even though nothing in the first law of thermodynamics — energy conservation — actually forbids that. What forbids it is the second law: heat flows from hot to cold because there are vastly more ways for the energy to end up spread evenly than concentrated back into one small cold patch. On screen, set "molecules on the left" high and "molecules on the right" low, then open the partition, and watch the same idea play out with gas instead of heat: molecules wander from where they are crowded to where they are not, simply because there are so many more ways to be spread out than to be crowded in a corner. +Put 4 numbered molecules in a box with two halves. Each molecule can be on the left or on the right, so there are 2 × 2 × 2 × 2 = 16 arrangements. If the molecules move freely, each arrangement is equally likely. Only 1 arrangement has all four on the left. Six arrangements have two on each side. An even split is therefore six times as likely as “all on the left”. No single arrangement is favoured; the even split wins because more arrangements produce it. The number of arrangements that match a split is called its multiplicity. -Every specific arrangement of molecules is exactly as likely as every other specific arrangement — the reason mixed states dominate is that there are overwhelmingly more of them. A 50/50 split of even a modest 100 molecules already has vastly more possible microscopic arrangements than a 95/5 split does, and for the roughly 10²³ molecules in a real gas the gap becomes so extreme that watching them spontaneously un-mix would take far, far longer than the age of the universe — not impossible in principle, just so overwhelmingly improbable that "never" is the honest word for it. +With 100 molecules the difference is far larger. A 95/5 split can happen in about 75 million ways, and a 50/50 split in about 10²⁹ ways. Molecules that can cross the partition pass from one arrangement to another, so the gas is almost always found near the even split. A return to 95/5 is not forbidden, only very rare. For the roughly 10²³ molecules in a real sample of gas, it is so rare that it is never observed. Entropy measures the multiplicity on a logarithmic scale. In the picture, the two groups of dots show the proportions on each side, not one dot per molecule. The sliders set the two counts directly, so the picture shows a chosen state and not motion over time. The bar compares the entropy of that state with the largest value possible for the same total. ## Formal -Entropy counts the number of microscopic arrangements, $\Omega$, consistent with what you can observe macroscopically: $S = k_B\ln\Omega$. +Entropy is defined by $S=k_B\ln\Omega$. Here $\Omega$ is the multiplicity, and $k_B$ is the Boltzmann constant, 1.38×10⁻²³ J/K. For N molecules with $n_L$ on the left and $n_R$ on the right, $\Omega=N!/(n_L!\,n_R!)$. The logarithm makes the entropies of two independent systems add, while their multiplicities multiply. -For $N$ molecules split $n_L$ left and $n_R$ right, Stirling's approximation gives $S/k_B \approx N\ln N - n_L\ln n_L - n_R\ln n_R$, which is maximised exactly at the even split $n_L = n_R$ — the state with the most ways to happen, and so the state any isolated system drifts toward. +For large numbers, Stirling's approximation gives $S/k_B\approx N\ln N-n_L\ln n_L-n_R\ln n_R$, with $N=n_L+n_R$. For a fixed total this is largest at $n_L=n_R$, where it equals $N\ln 2$. The readout uses the approximation: at 90 and 10 it gives 32.51, while the exact count gives 30.48. The second law states that the entropy of an isolated system with very many particles does not decrease. ## Advanced -The second law is fundamentally statistical, not absolute: nothing in physics prevents every molecule in a room from spontaneously rushing into one corner at the same instant, it is merely so improbable for a real number of molecules that no one has ever observed it, which is why the law is phrased as "entropy never decreases" for realistically large systems rather than as a strict logical impossibility. +The second law is statistical. Chance differences between the two sides are typically of the order of the square root of N, so they are noticeable for 100 molecules and far too small to detect for 10²³. This model counts only which half each molecule occupies, with equal halves and the same temperature throughout. The entropy of a real gas also depends on how energy is shared among the molecules, which is what links this count to heat flow from hot to cold. ## Derivation -1. The multiplicity Ω(n_L, n_R) = N!/(n_L!n_R!) counts every distinct way to place N molecules with n_L on the left and n_R on the right. -2. Boltzmann's definition sets entropy as S = k_B ln Ω, turning that count directly into a physical quantity. -3. Stirling's approximation for large N turns the factorials into logarithms, giving S/k_B ≈ N ln N − n_L ln n_L − n_R ln n_R, maximised at the even split. +1. Count the arrangements. There are N! orderings of the molecules, and reordering the molecules within the left half or within the right half does not change which half each one occupies. +2. Take the logarithm and multiply by the Boltzmann constant to obtain entropy in joules per kelvin. +3. For large numbers, replace the logarithm of each factorial by Stirling's approximation. The remaining expression is largest when the two counts are equal. ## Real world +### Smells and mixing + +A scent released in one corner spreads through a room, and milk stirred into tea does not separate again. Spread-out arrangements vastly outnumber gathered ones. + ### Refrigerators -A fridge does not break the second law — it moves heat from cold to hot only by doing work and dumping extra heat into the room, so the total entropy of fridge-plus-room still rises. -### Mixing cream into coffee -Cream disperses evenly through coffee and never gathers itself back into a single drop, the same one-way statistical drift as gas filling a room. +A refrigerator lowers the entropy of its contents by doing work and passing more heat to the room. The total entropy of contents and room still rises. + +### Engines + +Heat released by burning fuel cannot all be converted to work, because the exhaust and surroundings must gain at least as much entropy as the hot gas loses. -### Heat death arguments -Some cosmologists describe the universe's very long-term fate using exactly this logic: energy spreading toward its most probable, most evenly distributed arrangement. +### Separating mixtures -### Engineering reliability -Engineers design one-way processes such as combustion and braking around the second law: the energy released as heat can never fully be recaptured as useful work, which sets a hard ceiling on any engine's efficiency. +Separating air into oxygen and nitrogen or removing salt from seawater lowers the entropy of the mixture, so it always requires work. diff --git a/content/lessons/thermodynamics/the-second-law/lesson.yaml b/content/lessons/thermodynamics/the-second-law/lesson.yaml index d64affa1..2fab84db 100644 --- a/content/lessons/thermodynamics/the-second-law/lesson.yaml +++ b/content/lessons/thermodynamics/the-second-law/lesson.yaml @@ -27,13 +27,13 @@ parameters: max: 100 step: 1 value: 90 - unit: "" + unit: '' nRight: min: 1 max: 100 step: 1 value: 10 - unit: "" + unit: '' perm: min: 0 max: 100 @@ -41,16 +41,16 @@ parameters: value: 30 unit: '%' variables: - - entropy - - Boltzmann constant, 1.38×10⁻²³ J/K - - multiplicity — the number of microscopic arrangements matching this split - - number of molecules on the left side - - number of molecules on the right side - - total number of molecules, n_L + n_R + - S + - k_B + - \Omega + - n_L + - n_R + - N derivation: - - \Omega(n_L,n_R) = \dfrac{N!}{n_L!\,n_R!} \;\text{counts the arrangements of } N \text{ molecules split } n_L/n_R \text{ between the two halves.} - - S = k_B\ln\Omega \;\text{(Boltzmann's definition of entropy).} - - \text{Stirling's approximation gives } S/k_B \approx N\ln N - n_L\ln n_L - n_R\ln n_R. + - \Omega = \frac{N!}{n_L!\,n_R!} + - S = k_B\ln\Omega + - \frac{S}{k_B} \approx N\ln N - n_L\ln n_L - n_R\ln n_R charts: [] primary: nLeft presets: diff --git a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/ar.md b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/ar.md index d1eb6217..d8d80177 100644 --- a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/ar.md +++ b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/ar.md @@ -1,73 +1,75 @@ --- -title: التوصيل الحراري والعزل -summary: >- - الصوف يدفئ لأن الهواء المحبوس فيه لا يوصل الحرارة. كل مادة لها سرعة تسريب خاصة. +title: الموصلية الحرارية والعزل +summary: 'لماذا يحفظ الجدار المعزول دفء البيت؟ هنا تحسب كم تتسرب الحرارة عبر جدار من مادته وسُمكه ومساحته.' parameters: - k: التوصيل الحراري k - A: مساحة الجدار A - d: سماكة الجدار d - dT: فرق درجة الحرارة داخل/خارج ΔT + k: 'k — موصلية المادة للحرارة' + A: 'A — مساحة الجدار' + d: 'd — سُمك الجدار' + dT: 'ΔT — فرق درجة الحرارة بين وجهي الجدار' variables: - - الحرارة الموصَّلة - - الزمن - - التوصيل الحراري للمادة - - المساحة التي تعبرها الحرارة - - فرق درجة الحرارة عبر الجدار - - سماكة الجدار - - قيمة U، وتساوي k/d + - 'الحرارة التي تعبر الجدار، بالجول' + - 'الزمن، بالثانية' + - 'موصلية المادة للحرارة' + - 'المساحة التي تعبرها الحرارة' + - 'فرق درجة الحرارة بين الوجهين' + - 'سُمك الجدار' + - 'قيمة U، وتساوي k/d' --- ## Try it -1. ارفع منزلق «السماكة d». راقب معدل فقد الحرارة ينخفض. الجدار الأسمك من المادة نفسها يفقد الحرارة دائمًا أبطأ. -2. ارفع منزلق «التوصيل k» من قيمة الصوف نحو قيمة الطوب. راقب الجدار نفسه يفقد الحرارة أسرع بكثير. -3. ارفع منزلق «مساحة الجدار A». راقب معدل فقد الحرارة الكلي يرتفع، رغم أن شيئًا لم يتغير في مادة الجدار. +1. اجعل k = 0.04 W/(m·K) وA = 15 m² وd = 0.15 m وΔT = 20 °C. تعرض القراءتان Q/t = 80 W وU = 0.267 W/(m²·K). +2. لا تغيّر شيئًا إلا d: ارفعها إلى 0.30 m. ينخفض Q/t إلى النصف، 40 W. صار على الحرارة أن تقطع ضعف المسافة داخل الجدار. +3. أعد d إلى 0.15 m وارفع k إلى 0.80 W/(m·K). يصبح Q/t مساويًا 1600 W، أي 20 مرة من القيمة الأولى. ويصير لون الجدار أغمق. ## Real-life examples -1. **جدار معزول بالصوف.** يفقد جدار معزول بالصوف، مساحته 15 م² (k = 0.04 W/(m·K)) وسماكته 15 سم، نحو 80 واط فقط عند فارق 20°C بين الداخل والخارج. هذا بقدر مصباح خافت تقريبًا. -2. **جدار طوب عارٍ غير معزول.** بالمساحة نفسها 15 م² والفارق نفسه 20°C، لكن بـ25 سم من الطوب العادي (k = 0.8 W/(m·K)) بدلًا من الصوف، يفقد الجدار نحو 960 واط. هذا أكثر من عشرة أضعاف الحرارة عبر جدار بسماكة مشابهة. -3. **باب خشبي أمامي.** يفقد باب خشبي مساحته 2 م² (k = 0.13 W/(m·K)) وسماكته 4 سم، بفارق 15°C، نحو 100 واط. هذا ملحوظ، لكنه أقل بكثير مما ستفقده المساحة نفسها من طوب عارٍ. +1. **جدار معزول بالصوف.** عند k = 0.04 W/(m·K) وA = 15 m² وd = 0.15 m وΔT = 20 °C تتسرب الحرارة بمعدل 80 W. +2. **جدار من الطوب بلا عزل.** عند k = 0.8 W/(m·K) وd = 0.25 m، والمساحة وفرق درجة الحرارة كما هما، تتسرب الحرارة بمعدل 960 W. الطوب أسمك من الصوف، لكنه يسرّب 12 مرة أكثر. +3. **باب خشبي.** عند k = 0.13 W/(m·K) وA = 2 m² وd = 0.04 m وΔT = 15 °C تتسرب الحرارة بمعدل نحو 98 W. قيمة U للباب 3.25 W/(m²·K)، وهي قريبة من قيمة جدار الطوب. لكن الباب يسرّب أقل لأن مساحته صغيرة. ## Test yourself -1. اجعل معدل فقد الحرارة دون 50 واط لجدار أكبر من 10 م². -2. اجعل قيمة U دون 0.3 واط/(م²·كلفن)، جدارًا معزولًا حقًا. -3. اضبط جدارًا مُسرِّبًا: فقد حرارة فوق 500 واط بتوصيل فوق 0.5 واط/(م·كلفن). +1. اخفض معدل تسرب الحرارة إلى أقل من 50 W مع A أكبر من 10 m². +2. اخفض قيمة U إلى أقل من 0.15 W/(m²·K). +3. ارفع معدل تسرب الحرارة فوق 500 W مع k أكبر من 0.5 W/(m·K). ## Intuition -اضغط يدك على جدار طوب عارٍ، ثم على كنزة صوفية، في يوم بارد. سيبدو الطوب أبرد بكثير عند اللمس، حتى عند درجة الحرارة نفسها. يوصل الطوب الحرارة خارج يدك الدافئة أسرع بكثير مما يفعل الصوف. ويعمل الجدار بالطريقة نفسها تمامًا. ارفع منزلق «التوصيل k» في الرسم من قيمة الصوف المنخفضة نحو قيمة الطوب الأعلى بكثير، مع إبقاء كل شيء آخر ثابتًا. راقب معدل فقد الحرارة يرتفع بحدة، للسماكة نفسها وفارق درجة الحرارة نفسه بالضبط. +في يوم بارد، المس جدارًا من الطوب ثم المس بطانية من الصوف. الاثنان في الغرفة نفسها ولهما درجة الحرارة نفسها، لكن الجدار يبدو أبرد. السبب أن الطوب يسحب الحرارة من يدك أسرع من الصوف. نسمي سهولة مرور الحرارة في المادة موصليتها الحرارية، ورمزها k. موصلية الصوف نحو 0.04، وموصلية الطوب نحو 0.8، أي 20 مرة أكثر. لنحسب الآن جدارًا مساحته 15 m² من عازل صوفي سُمكه 0.15 m. داخل البيت أدفأ من الخارج بـ20 °C. تتسرب الحرارة بمعدل 0.04 × 15 × 20 / 0.15 = 80 W، أي 80 J كل ثانية. وعلى المدفأة أن تعوّض هذا المقدار ليبقى البيت دافئًا. -تقاوم السماكة التوصيل. ارفع منزلق «السماكة d»، فتفقد المادة نفسها الحرارة أبطأ الآن، لأن على الحرارة أن تقطع مسافة أطول عبرها. يجمع البنّاؤون التأثيرين في رقم واحد، قيمة U، $U = k/d$. تعني قيمة U المنخفضة أن الجدار بالكاد يتسرب منه حرارة، سواء أتت تلك القيمة من طبقة رقيقة من عازل ممتاز جدًا أو طبقة سميكة من عازل متوسط. لهذا بالضبط يصنع الصوف والقش والهواء المحبوس، وكلها موصلات ضعيفة، عزلًا فعالًا وخفيف الوزن مقارنة ببلاطة من طوب صلب. +كل كمية تغيّر التسرب بطريقة واضحة. إذا تضاعفت المساحة تضاعف التسرب. وإذا تضاعف فرق درجة الحرارة تضاعف التسرب أيضًا. وإذا تضاعف السُّمك نزل التسرب إلى النصف. المادة والسُّمك يظهران معًا دائمًا في صورة k مقسومة على d. لذلك يجمعهما المهندسون في رقم واحد اسمه قيمة U. كلما صغرت قيمة U كان الجدار أفضل عزلًا. طبقة رقيقة من عازل جيد قد تساوي طبقة سميكة جدًّا من مادة عادية: صوف بسُمك 0.15 m له U = 0.267، ولا يساويه الطوب إلا بسُمك 3 m. في الرسم، عرض الجدار يتبع d، واللون الأغمق يعني k أكبر. كثرة الأسهم تعني تسربًا أكبر، لكن الرسم لا يرسم أكثر من 14 سهمًا، فاقرأ القيمة من الرقم. ## Formal -يعطي قانون فورييه معدل انتقال الحرارة بالتوصيل عبر بلاطة بـ$Q/t = kA\Delta T/d$، حيث $k$ التوصيل الحراري للمادة، و$A$ المساحة، و$\Delta T$ فرق درجة الحرارة عبرها، و$d$ سماكتها. +معدل مرور الحرارة عبر جدار مستوٍ من مادة واحدة هو $Q/t=kA\Delta T/d$. Q الحرارة بالجول التي تعبر في زمن t بالثانية، فتكون Q/t بالواط. تقاس k بوحدة W/(m·K)، وA بوحدة m²، وd بالمتر. الرمز $\Delta T$ هو فرق درجة الحرارة بين وجهي الجدار، وهو بالعدد نفسه سواء قسته بالدرجة المئوية أو بالكلفن. -يجمع البنّاؤون $k$ و$d$ في قيمة U واحدة، $U = k/d$، فتصبح العلاقة نفسها $Q/t = UA\Delta T$. قيمة U أدنى تعني دائمًا جدارًا أو نافذة أو سقفًا معزولًا بشكل أفضل. +قيمة U هي $U=k/d$، ووحدتها W/(m²·K). بها يصير القانون $Q/t=UA\Delta T$. قيمة U الأصغر تعني تسربًا أقل للمساحة نفسها وفرق درجة الحرارة نفسه. ## Advanced -عادة ما تكون الجدران الحقيقية متعددة الطبقات: جص وطوب وعزل وطلاء. وتضيف كل طبقة مقاومتها الحرارية الخاصة $d/k$ على التوالي. فتُجمع مقاومات الطبقات ببساطة، ثم تُعكس مجددًا إلى قيمة U إجمالية واحدة، تمامًا كما تُجمع مقاومات كهربائية على التوالي قبل إيجاد تيار مدمج. +الجدار الحقيقي عدة طبقات: طلاء ثم طوب ثم عازل. لكل طبقة مقاومة للحرارة تساوي d/k. نجمع مقاومات الطبقات، ثم نأخذ مقلوب المجموع فنحصل على قيمة U للجدار كله. وتلتصق بسطحي الجدار طبقة رقيقة من الهواء الساكن تزيد العزل قليلًا. إذا ابتلّ العازل ضعف عزله. والهواء الذي يتسرب من الشقوق ينقل حرارة لا يحسبها هذا النموذج. ## Derivation -1. ينص قانون فورييه على أن انتقال الحرارة بالتوصيل عبر بلاطة يعتمد على توصيل المادة ومساحة العبور وفرق درجة الحرارة، وينقص عكسيًا مع سماكة البلاطة. -2. كتابة تلك العلاقة تعطي معدل فقد الحرارة مباشرة: Q/t = kAΔT/d، بالواط. -3. اجمع k وd في نسبة واحدة، قيمة U = k/d، فيمكنك كتابة المعدل نفسه Q/t = UAΔT. +1. يزيد معدل مرور الحرارة مع الموصلية والمساحة وفرق درجة الحرارة، ويقل كلما زاد السُّمك. +2. نجمع ما يخص الجدار نفسه، أي مادته وسُمكه، في رقم واحد هو قيمة U. +3. نعوّض بها. المعدل يساوي قيمة U في المساحة في فرق درجة الحرارة. ## Real world -### النوافذ مزدوجة الزجاج -تنقل فجوة مغلقة من هواء ساكن محبوس بين لوحي زجاج الحرارة أبطأ بكثير من لوح سميك واحد. لهذا تمتلك النوافذ مزدوجة وثلاثية الزجاج قيم U أدنى بكثير من الزجاج الفردي. +### الزجاج المزدوج + +نافذة من لوحين بينهما هواء محبوس تعزل أفضل كثيرًا من لوح واحد. الهواء الساكن يوصل الحرارة أسوأ كثيرًا من الزجاج. ### عزل السقف -تفقد المنازل حصة كبيرة من حرارتها عبر السقف. لهذا فإن طبقة سميكة من عزل سقف منخفض التوصيل من أرخص التحديثات وأكثرها فاعلية لخفض فاتورة التدفئة. -### فراء وريش الحيوانات -يحبس معطف سميك من الفراء أو الريش طبقة من الهواء الساكن قرب الجلد. الهواء المحبوس يوصل الحرارة بضعف شديد، فتلك الطبقة المحبوسة، لا الفراء نفسه، هي ما يُبقي الحيوان دافئًا فعليًا. +يتسرب جزء كبير من حرارة البيت عبر السقف. طبقة سميكة من العازل فوقه تخفض قيمة U وتقلل فاتورة التدفئة والتكييف. + +### الفرو والريش + +يحبس الفرو والريش طبقة من الهواء الساكن قرب الجلد. هذا الهواء هو الذي يعزل، وليس الشعر نفسه. ### أنظمة البناء -تضع أنظمة البناء الحديثة حدًا أقصى مسموحًا لقيمة U للجدران والأسقف والنوافذ. هذا يُجبر المباني الجديدة على استخدام سماكة عزل كافية أو مواد منخفضة التوصيل بما يكفي لتحقيق معيار كفاءة الطاقة. - + +تحدد أنظمة البناء أكبر قيمة U مسموح بها للجدران والأسقف والنوافذ. يحققها البنّاء بعازل أفضل أو بطبقة أسمك. diff --git a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/en.md b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/en.md index 2b184c83..9013d8b0 100644 --- a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/en.md +++ b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/en.md @@ -1,76 +1,75 @@ --- title: Thermal conductivity and insulation -summary: >- - A sheep grows a thick woolly coat instead of a thin one because - trapped air barely conducts heat at all, and a builder chooses - fibreglass over solid brick for exactly the same reason — how fast - a wall leaks heat depends on one material property, its thermal - conductivity, combined with how thick you make it. +summary: 'Calculate how fast heat passes through a wall from its material, thickness and area and the temperature difference across it.' parameters: - k: thermal conductivity k - A: wall area A - d: wall thickness d - dT: indoor–outdoor temperature difference ΔT + k: 'k — thermal conductivity of the material' + A: 'A — wall area' + d: 'd — wall thickness' + dT: 'ΔT — temperature difference between the two faces' variables: - - heat energy conducted - - time - - thermal conductivity of the material - - area heat crosses - - temperature difference across the wall - - wall thickness - - U-value, k/d + - 'heat conducted through the wall, in joules' + - 'time, in seconds' + - 'thermal conductivity of the material' + - 'area the heat passes through' + - 'temperature difference between the two faces' + - 'wall thickness' + - 'U-value, k/d' --- ## Try it -1. Raise the slider "thickness d". Watch the heat-loss rate fall — a thicker wall of the same material always leaks heat more slowly. -2. Raise the slider "conductivity k" from wool's value toward brick's. Watch the same wall lose heat far faster. -3. Raise the slider "wall area A". Watch the total heat-loss rate climb, even though nothing about the wall material changed. +1. Set k = 0.04 W/(m·K), A = 15 m², d = 0.15 m and ΔT = 20 °C. The readouts show Q/t = 80 W and U = 0.267 W/(m²·K). +2. Keep the other values and raise d to 0.30 m. Q/t halves to 40 W, because the heat has twice as far to travel through the material. +3. Return d to 0.15 m and raise k to 0.80 W/(m·K). Q/t becomes 1600 W, twenty times the first value, and the wall is drawn darker. ## Real-life examples -1. **A wool-insulated wall.** A 15 m² wall of wool insulation (k = 0.04 W/(m·K)), 15 cm thick, with a 20°C gap between inside and outside, loses only about 80 W — roughly one dim light bulb's worth of heat. -2. **A bare, uninsulated brick wall.** The same 15 m² area and 20°C gap, but now 25 cm of plain brick (k = 0.8 W/(m·K)) instead of wool, loses around 960 W — more than ten times as much heat through a wall of similar thickness. -3. **A wooden front door.** A 2 m² wooden door (k = 0.13 W/(m·K)), 4 cm thick, with a 15°C gap, loses roughly 100 W — noticeable, but far less than the same area of bare brick would. +1. **A layer of wool insulation.** With k = 0.04 W/(m·K), A = 15 m², d = 0.15 m and ΔT = 20 °C, heat passes at 80 W. +2. **A bare brick wall.** With k = 0.8 W/(m·K), the same area and temperature difference, and d = 0.25 m, heat passes at 960 W. The brick is thicker than the wool, yet it passes twelve times as much. +3. **A wooden door.** With k = 0.13 W/(m·K), A = 2 m², d = 0.04 m and ΔT = 15 °C, heat passes at about 98 W. Its U-value, 3.25 W/(m²·K), is close to the brick wall's; the door loses less in total because its area is small. ## Test yourself -1. Get the heat-loss rate below 50 W on a wall bigger than 10 m². -2. Get the U-value below 0.3 W/(m²·K), a genuinely well-insulated wall. -3. Set up a leaky wall: heat loss above 500 W with a conductivity above 0.5 W/(m·K). +1. Bring the heat-flow rate below 50 W with A greater than 10 m². +2. Bring the U-value below 0.15 W/(m²·K). +3. Make the heat-flow rate exceed 500 W with k greater than 0.5 W/(m·K). ## Intuition -Push your hand against a plain brick wall and a wool jumper on a cold day, and the brick feels far colder to the touch, even at the same temperature — brick conducts heat out of your warm hand much faster than wool does, and a wall works the same way. On screen, raise the slider "conductivity k" from wool's low value toward brick's much higher one, keeping everything else fixed, and watch the heat-loss rate climb sharply for the exact same wall thickness and temperature gap. +On a cold day, touch a brick wall and a wool jumper that are at the same temperature. The brick feels colder. It is not colder; it carries heat away from your hand faster. How readily a material passes heat is its thermal conductivity, k. Wool with air trapped between its fibres has k of about 0.04 W/(m·K), and brick about 0.8, twenty times as much. Now take a wall of area 15 m² made of 0.15 m of wool insulation, with the inside face 20 °C warmer than the outside face. Heat passes through at 0.04 × 15 × 20 / 0.15 = 80 W, which is 80 J every second. A heater must supply that much to keep the room's temperature steady. -Thickness fights back against conductivity: raise the slider "thickness d" and the same material now loses heat more slowly, because the heat has farther to travel through it. Builders combine both effects into a single number, the U-value, $U = k/d$: a low U-value means a wall barely leaks heat regardless of whether that comes from a thin layer of a very good insulator or a thick layer of an average one, which is exactly why wool, straw and trapped air (all poor conductors) make such effective, lightweight insulation compared to a slab of solid brick. +Each quantity changes the rate in a predictable way. Twice the area gives twice the rate, because there is twice as much wall for heat to cross. Twice the temperature difference also gives twice the rate. Twice the thickness gives half the rate. The material and the thickness always appear together as k divided by d, so builders combine them into one number, the U-value: the rate through each square metre for each degree of difference. A thin layer of a good insulator and a thick layer of a poor one can share a U-value: 0.15 m of wool has U = 0.267 W/(m²·K), and brick would need to be 3 m thick to match it. In the picture, the wall's drawn width follows d and a darker shade means a larger k. More arrows mean a larger rate, but the picture uses at most 14 arrows, so read the exact rate from the number. ## Formal -Fourier's law gives the rate of conductive heat flow through a slab as $Q/t = kA\Delta T/d$, where $k$ is the material's thermal conductivity, $A$ the area, $\Delta T$ the temperature difference across it, and $d$ its thickness. +For a flat, uniform wall in steady conditions, Fourier's law gives $Q/t=kA\Delta T/d$. Q is the heat in joules that passes in time t in seconds, so Q/t is in watts. The conductivity k is in W/(m·K), the area A in m² and the thickness d in metres, with d greater than zero. $\Delta T$ is the temperature difference between the two faces; a difference of 1 °C equals a difference of 1 K. -Builders combine $k$ and $d$ into a single U-value, $U = k/d$, so the same relationship becomes $Q/t = UA\Delta T$ — a lower U-value always means a better-insulated wall, window or roof. +The U-value is $U=k/d$, in W/(m²·K), and the same law becomes $Q/t=UA\Delta T$. A lower U-value means slower heat flow for the same area and temperature difference. ## Advanced -Real walls are usually layered — plaster, brick, insulation, render — and each layer adds its own thermal resistance $d/k$ in series, so the layers' resistances simply add before being inverted back into a single overall U-value, exactly the way electrical resistors in series add before a combined current is found. +A real wall has several layers. Each layer has a thermal resistance d/k; the resistances of layers in series add, and the overall U-value is the reciprocal of their sum. Thin films of still air at the two surfaces add resistance as well, so the faces of a wall differ in temperature by less than the indoor and outdoor air do. Published U-values include these films. Moisture raises the conductivity of most insulating materials, and air leaking through gaps carries heat that this conduction model does not count. ## Derivation -1. Fourier's law states that conductive heat flow through a slab depends on the material's conductivity, the crossing area, and the temperature difference, and inversely on the slab's thickness. -2. Writing that relationship out gives the heat-loss rate directly: Q/t = kAΔT/d, in watts. -3. Combining k and d into a single ratio, the U-value U = k/d, lets the same rate be written Q/t = UAΔT. +1. Fourier's law: the rate is proportional to the conductivity, the area and the temperature difference, and inversely proportional to the thickness. +2. Collect the two properties of the wall itself, its material and its thickness, into one quantity, the U-value. +3. Substitute it. The rate is the U-value times the area times the temperature difference. ## Real world ### Double glazing -A sealed gap of still, trapped air between two panes of glass conducts far more slowly than a single thick pane, which is why double- and triple-glazed windows have dramatically lower U-values than single glazing. -### Loft insulation -Homes lose a large share of their heat through the roof, so a thick layer of low-conductivity loft insulation is one of the cheapest, most effective upgrades for cutting a heating bill. +Two panes with a sealed layer of still gas between them conduct much less heat than a single pane, because the gas has a far lower conductivity than glass. -### Animal fur and feathers -A thick coat of fur or feathers traps a layer of still air next to the skin, and since trapped air conducts heat extremely poorly, that trapped layer — not the fur itself — is what actually keeps an animal warm. +### Roof insulation -### Building regulations -Modern building codes set a maximum allowed U-value for walls, roofs and windows, forcing new buildings to use enough insulation thickness or low enough conductivity materials to meet an energy-efficiency standard. +Much of a house's heat can escape through the roof. A thick layer of low-conductivity material there lowers the U-value and the heating needed. + +### Fur and feathers + +Fur and feathers hold a layer of still air next to the skin. The air's low conductivity does most of the insulating. + +### Building rules + +Many building codes set a largest permitted U-value for walls, roofs and windows. A builder can meet it with a better insulator or a thicker layer. diff --git a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/lesson.yaml b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/lesson.yaml index 2a65bed7..d298ebd3 100644 --- a/content/lessons/thermodynamics/thermal-conductivity-and-insulation/lesson.yaml +++ b/content/lessons/thermodynamics/thermal-conductivity-and-insulation/lesson.yaml @@ -48,9 +48,9 @@ variables: - d - U derivation: - - '\text{Fourier''s law: conductive heat flow through a slab depends on } k, A, \Delta T \text{ and inversely on thickness } d.' - - \frac{Q}{t} = \frac{kA\Delta T}{d} \;\text{gives the heat-loss rate directly, in watts.} - - \text{Builders roll } k/d \text{ into one number, the U-value, so } \frac{Q}{t} = UA\Delta T. + - \frac{Q}{t} = \frac{kA\Delta T}{d} + - U = \frac{k}{d} + - \frac{Q}{t} = UA\Delta T charts: [] primary: k presets: @@ -68,5 +68,5 @@ presets: dT: 15 challenges: - check: k*A*dT/d < 50 and A > 10 - - check: k/d < 0.3 + - check: k/d < 0.15 - check: k*A*dT/d > 500 and k > 0.5 diff --git a/content/lessons/thermodynamics/thermal-expansion/ar.md b/content/lessons/thermodynamics/thermal-expansion/ar.md index 3212f887..d2af0ae4 100644 --- a/content/lessons/thermodynamics/thermal-expansion/ar.md +++ b/content/lessons/thermodynamics/thermal-expansion/ar.md @@ -1,69 +1,63 @@ --- title: التمدد الحراري -summary: >- - السكك الحديدية تنحني في الصيف لأن كل مادة صلبة تطول قليلًا حين تسخن. +summary: 'تطول المواد قليلًا حين تسخن وتقصر حين تبرد. هنا تحسب مقدار هذا التغير في الطول.' parameters: - alpha: معامل التمدد الطولي α (×10⁻⁶/°C) - L0: الطول الأصلي L₀ - dT: التغيّر في درجة الحرارة ΔT + alpha: 'α — معامل التمدد، بأجزاء من مليون لكل °C' + L0: 'L₀ — الطول قبل التسخين' + dT: 'ΔT — التغير في درجة الحرارة' variables: - - التغيّر في الطول - - معامل التمدد الطولي - - الطول الأصلي قبل التسخين - - التغيّر في درجة الحرارة + - 'التغير في الطول؛ موجب عند التمدد وسالب عند الانكماش' + - 'معامل التمدد الطولي للمادة' + - 'الطول قبل تغير درجة الحرارة' + - 'التغير في درجة الحرارة؛ موجب عند التسخين وسالب عند التبريد' --- ## Try it -1. ارفع منزلق «التغيّر في درجة الحرارة ΔT» من السالب إلى الموجب. راقب فجوة تمدد القضيب تُغلق، وقيمة ΔL تكبر. -2. ارفع منزلق «معامل التمدد α» نحو قيمة الألومنيوم. لاحظ أن فرق درجة الحرارة نفسه يدفع القضيب أبعد الآن. -3. ارفع منزلق «الطول الأصلي L₀». راقب قضيبًا أطول يتحرك ملليمترات أكثر بكثير، لفرق درجة الحرارة نفسه بالضبط. +1. اجعل α = 12 وL₀ = 18 m وΔT = 35°C. المنزلق α يقاس بأجزاء من مليون لكل درجة. يزداد الطول 7.56 mm. +2. ثبّت α وL₀ واجعل ΔT = 0 ثم −30°C. يصبح التغير صفرًا، ثم −6.48 mm. الإشارة السالبة تعني أن القضيب قصر بالتبريد. +3. عُد إلى ΔT = 35°C وضاعف L₀ إلى 36 m. تتضاعف الزيادة إلى 15.12 mm. الفجوة في الرسم مكبّرة لتُرى؛ خذ القيمة الصحيحة من الرقم. ## Real-life examples -1. **خط سكة حديد فولاذي عند الظهيرة.** يسخن قضيب طوله 18 م (α = 12×10⁻⁶/°C) بمقدار 35°C في الشمس، فيطول نحو 7.6 مم. هذا قدر صغير لكل قضيب، لكنه يكفي لثني سكة ملحومة متواصلة بلا فواصل تمدد. -2. **عارضة جسر ألومنيوم في الصيف.** تسخن عارضة ألومنيوم طولها 40 م (α = 23×10⁻⁶/°C) بمقدار 45°C، فتتمدد أكثر من 4 سم. لهذا بالضبط تستند الجسور الطويلة على بكرات أو فواصل تمدد عند أحد طرفيها. -3. **بلاطة طريق خرسانية في موجة برد شتوية.** تبرد بلاطة طولها 25 م (α = 12×10⁻⁶/°C) بمقدار 30°C، فتنكمش نحو 9 مم. وتفتح بذلك الفجوات المحكمة بين البلاطات التي أغلقها حر الصيف. +1. **قضيب من الفولاذ.** عند α = 12 × 10⁻⁶/°C وL₀ = 18 m وΔT = 35°C يزداد الطول 7.56 mm، إذا كان القضيب حرًّا غير مثبت من طرفيه. +2. **قضيب من الألومنيوم.** عند α = 23 × 10⁻⁶/°C وL₀ = 40 m وΔT = 45°C تكون الزيادة 41.4 mm، أي 4.14 cm. +3. **قضيب يبرد.** عند α = 12 × 10⁻⁶/°C وL₀ = 25 m وΔT = −30°C يكون التغير −9 mm. القضيب قصر 9 mm، وطوله الكلي ما زال موجبًا. ## Test yourself -1. اجعل التغيّر في الطول نحو 2 سم (0.02 م). -2. اجعل المادة تنكمش: احصل على تغيّر سالب في الطول. -3. اضبط تمددًا كبيرًا: اجعل α فوق 20×10⁻⁶/°C، وL₀ فوق 30 م، وΔT فوق 40°C، كلها معًا. +1. احصل على زيادة في الطول قريبة من 0.02 m، أي 20 mm. +2. احصل على تغير سالب في الطول. +3. اجعل α أكبر من 20، وL₀ أكبر من 30 m، وΔT أكبر من 40°C. ## Intuition -سخّن مادة صلبة، فلن تكبر ذراتها، بل تهتز أكثر فقط وتبتعد قليلًا في المتوسط عن جاراتها. لهذا ينمو الجسم كله قليلًا في كل بُعد. اسحب «التغيّر في درجة الحرارة ΔT» للأعلى، وراقب فجوة تمدد القضيب تُغلق مع ارتفاع قيمة ΔL. اسحبها دون الصفر، فينكمش القضيب من جديد وتُفتح الفجوة مرة أخرى. +تُترك بين قضبان سكة الحديد فجوات صغيرة. السبب أن الفولاذ يطول في الصيف، ولو لم توجد الفجوة لانحنى القضيب. كم يطول؟ خذ قضيبًا طوله 18 m ارتفعت درجة حرارته 35°C. كل متر من الفولاذ يطول 12 جزءًا من مليون من المتر لكل درجة. نضرب 12 من مليون في 35 درجة ثم في 18 مترًا، فنحصل على 0.00756 m، أي نحو 7.5 mm. الزيادة في كل متر صغيرة جدًّا، لكنها تتجمع على طول القضيب. ولهذا يطول القضيب الأطول أكثر. -تتمدد المواد المختلفة بمقادير مختلفة لفرق درجة الحرارة نفسه، ويلتقط معامل α هذا الفرق. ارفع منزلق «معامل التمدد α» نحو قيمة الألومنيوم، وأبقِ ΔT وL₀ ثابتين. ينتج التسخين نفسه الآن ΔL أكبر بوضوح، لأن ذرات الألومنيوم مرتبطة ببعضها أضعف من ذرات الفولاذ. يستغل الشريط ثنائي المعدن، وهو معدنان مختلفان ملصقان معًا، هذا التفاوت. يتمدد النحاس الأصفر أسرع من الفولاذ، فيلتف الشريط الساخن نحو جهة الفولاذ. هذا الالتفاف هو ما يقلب المفتاح داخل ثرموستات قديم الطراز. +لكل مادة معامل تمدد خاص بها؛ الألومنيوم مثلًا يتمدد نحو ضعف تمدد الفولاذ. تتمدد المادة لأن ذراتها تهتز أكثر حين تسخن، فتتباعد قليلًا. الذرات نفسها لا تكبر. معظم المواد الصلبة تتمدد بالتسخين، وقليل منها ينكمش في بعض درجات الحرارة. في الرسم شريط من معدنين ملتصقين، فولاذ ونحاس أصفر. يتمدد أحدهما أكثر من الآخر فينحني الشريط. هذا الشريط يتأثر بـΔT فقط، ولا يتأثر بالمنزلقين α وL₀. ## Formal -لفروق درجة حرارة متواضعة، يكون التغيّر في طول مادة صلبة $\Delta L = \alpha L_0 \Delta T$، حيث $\alpha$ معامل التمدد الطولي للمادة، و$L_0$ طولها الأصلي، و$\Delta T$ التغيّر في درجة الحرارة. +إذا كان الجسم حرًّا في التمدد فإن $\Delta L=\alpha L_0\Delta T$. التغير في درجة الحرارة هو $\Delta T=T_{final}-T_{initial}$. والطول الجديد هو $L=L_0+\Delta L$. نضرب قيمة المنزلق في $10^{-6}$ لنحصل على α لكل درجة مئوية. -عادة لا يتجاوز $\alpha$ بضعة أجزاء من المليون لكل درجة، فيبقى $\Delta L$ صغيرًا في تقلبات درجة الحرارة اليومية. لكنه لا يساوي صفرًا أبدًا، وعلى المهندسين حسابه كلما كان الهيكل طويلًا وصلبًا ومعرَّضًا للطقس. +نسبة التغير إلى الطول الأصلي هي $\Delta L/L_0=\alpha\Delta T$. تصح هذه العلاقة ما دام التغير صغيرًا، أي $|\alpha\Delta T|\ll1$. إذا كانت α موجبة فالتسخين يزيد الطول والتبريد ينقصه. وإذا كان الجسم مثبتًا لا يستطيع التمدد، نشأت فيه قوى ضغط بدل أن يطول. ## Advanced -تتمدد المساحة والحجم أسرع من الطول. تنمو مساحة صفيحة مسطحة بمعدل يقارب $2\alpha$ لكل درجة، ويكبر حجم جسم صلب بمعدل يقارب $3\alpha$ لكل درجة. فكل بُعد من البعدين أو الأبعاد الثلاثة يتمدد باستقلالية بالكسر الطولي نفسه، وتُجمع هذه الكسور الصغيرة ببساطة. +تتمدد المساحة والحجم أيضًا. للتغيرات الصغيرة في مادة تتمدد بالمقدار نفسه في كل الاتجاهات: $\Delta A/A_0=2\alpha\Delta T$ و$\Delta V/V_0=3\alpha\Delta T$. بعض المواد، كالخشب، تتمدد في اتجاه أكثر من آخر، فلا تنطبق عليها هاتان العلاقتان كما هما. انحناء الشريط في الرسم توضيحي؛ الانحناء الحقيقي يعتمد أيضًا على سُمك الطبقتين وصلابتهما. ## Derivation -1. ينمو كل بُعد من مادة صلبة خطيًا تقريبًا مع درجة الحرارة عبر مدى متواضع، وهذا بالضبط ما يقيسه α. -2. الكسر التغيّري في الطول يساوي α مضروبًا في التغيّر في درجة الحرارة: ΔL/L₀ = αΔT. -3. اضرب في الطول الأصلي فتحصل على التغيّر في الطول مباشرة: ΔL = αL₀ΔT. +1. معامل التمدد يخبرنا كم يطول كل متر من المادة لكل درجة واحدة. +2. نضربه في التغير في درجة الحرارة، فنعرف كم يطول كل متر. +3. نضرب في الطول الأصلي، فنحصل على التغير الكلي في الطول. ## Real world -### سكك القطارات -تُمد السكك الملحومة الحديثة المتواصلة بإجهاد مدمج أو فواصل تمدد صغيرة، لتمتص النمو الذي يعتري قضيبًا فولاذيًا كامل الطول في حر الصيف. - ### الجسور -تستند الجسور الطويلة على بكرات أو مساند أو فواصل تمدد عند أحد طرفيها، فينمو الهيكل الكامل وينكمش مع الفصول دون أن يتشقق. -### الثرموستات -ينحني شريط ثنائي المعدن ملفوف حين يسخن، لأن معدنيه الملصَقين يتمددان بمعدلات مختلفة. وهذا الانحناء يفتح أو يغلق تماسًا كهربائيًا فعليًا. +تُترك في الجسور فواصل تسمح لها بأن تطول وتقصر مع تغير درجة الحرارة دون أن تتشقق. + +### الشريط ثنائي المعدن -### خطوط الكهرباء -تُعلَّق الكابلات العلوية بترهُّل مقصود، لأنها تنكمش وتُشد أكثر في الليالي الباردة. وكابل صيفي مشدود سينقطع في تجمد شتوي قاسٍ. - +ينحني شريط من معدنين مختلفين حين يسخن. تُستخدم هذه الحركة لفصل الكهرباء تلقائيًّا في المكواة والسخان. diff --git a/content/lessons/thermodynamics/thermal-expansion/en.md b/content/lessons/thermodynamics/thermal-expansion/en.md index 9ace9d00..0d02007d 100644 --- a/content/lessons/thermodynamics/thermal-expansion/en.md +++ b/content/lessons/thermodynamics/thermal-expansion/en.md @@ -1,72 +1,63 @@ --- title: Thermal expansion -summary: >- - Railway lines used to buckle in summer heat and old bridges have - finger-like metal gaps you can feel through your car tyres — both - exist because almost every solid grows slightly longer when it warms - up, and a thermostat's coiled metal strip turns that tiny growth into - a useful on/off switch. +summary: 'Calculate a small change in length from temperature change, original length and a material’s expansion coefficient.' parameters: - alpha: linear expansion coefficient α (×10⁻⁶/°C) - L0: original length L₀ - dT: temperature change ΔT + alpha: 'α — coefficient in millionths per °C' + L0: 'L₀ — initial length' + dT: 'ΔT — final minus initial temperature' variables: - - change in length - - linear expansion coefficient - - original length before heating - - change in temperature + - 'signed change in length' + - 'linear expansion coefficient' + - 'initial length at the reference temperature' + - 'signed temperature change' --- ## Try it -1. Raise the slider "temperature change ΔT" from negative to positive. Watch the rail's expansion gap close and the numeric ΔL grow. -2. Raise the slider "expansion coefficient α" toward aluminium's value. Watch the same ΔT now push the rail further apart. -3. Raise the slider "original length L₀". Watch a longer starting rail move by far more millimetres for the exact same ΔT. +1. Set α = 12, L₀ = 18 m and ΔT = 35°C. The α control is in millionths per degree, so the calculated extension is 7.56 mm. +2. Keep α and L₀ fixed and change ΔT to 0, then −30°C. Length change becomes zero, then −6.48 mm: cooling gives contraction for this positive coefficient. +3. Return to ΔT = 35°C and double L₀ to 36 m. Extension doubles to 15.12 mm. The gap graphic exaggerates the small length change; use the readout for the physical value. ## Real-life examples -1. **A steel railway line at midday.** An 18 m length of rail (α = 12×10⁻⁶/°C) heating by 35°C in the sun grows by about 7.6 mm — small per rail, but enough to buckle a continuously welded track without expansion joints. -2. **An aluminium bridge girder in summer.** A 40 m aluminium girder (α = 23×10⁻⁶/°C) warming by 45°C stretches over 4 cm, which is exactly why long bridges rest on rollers or expansion joints at one end. -3. **A concrete road slab in a winter cold snap.** A 25 m slab (α = 12×10⁻⁶/°C) cooling by 30°C shrinks by about 9 mm, opening the sealed gaps between slabs that summer heat had closed. +1. **A freely expanding steel-like bar.** With α = 12 × 10⁻⁶/°C, L₀ = 18 m and ΔT = 35°C, the bar lengthens by 7.56 mm if unconstrained. +2. **An aluminium-like member.** With α = 23 × 10⁻⁶/°C, L₀ = 40 m and ΔT = 45°C, the calculated increase is 41.4 mm, or 4.14 cm. +3. **A cooling member.** With α = 12 × 10⁻⁶/°C, L₀ = 25 m and ΔT = −30°C, the change is −9 mm. Negative change means shortening, not negative total length. ## Test yourself -1. Get the length change to about 2 cm (0.02 m). -2. Make the material contract: get a negative length change. -3. Set up a big expansion: α above 20×10⁻⁶/°C, L₀ above 30 m, and ΔT above 40°C, all at once. +1. Obtain a positive length change near 0.02 m, or 20 mm. +2. Obtain a negative length change. +3. Set α above 20 on its millionths-per-degree scale, L₀ above 30 m and ΔT above 40°C. ## Intuition -Heat a solid and its atoms do not get bigger — they simply vibrate more, and on average sit slightly farther apart from their neighbours, so the whole object grows a little in every dimension. On screen, drag "temperature change ΔT" upward and watch the rail's expansion gap close as the numeric length change ΔL climbs; drag it below zero and the rail shrinks back, opening the gap again. +A long object can have a noticeable total expansion even when each metre grows only a little. For the first example, each metre gains 12 millionths of a metre per degree. Multiplying by 35 degrees and 18 metres gives 0.00756 m. Doubling length doubles the number of small extensions being added. -Different materials expand by different amounts for the same temperature change, captured by the coefficient α: raise the slider "expansion coefficient α" toward aluminium's value with ΔT and L₀ fixed, and the same warming now produces a noticeably bigger ΔL, because aluminium's atoms are held more loosely than steel's. A bimetallic strip, two different metals bonded together, exploits exactly this mismatch: brass expands faster than steel, so a heated strip of the two bonds curls toward the steel side, and that curl is precisely what flips the switch inside an old-fashioned thermostat. +The coefficient describes how much a particular material expands over a temperature range. Many solids expand on heating because their average atomic separations increase; the atoms themselves do not simply get larger. Materials differ, and some contract on heating over certain ranges. The separate bimetal illustration uses fixed steel-like and brass-like coefficients and responds only to ΔT, not to the α and L₀ controls. ## Formal -For modest temperature changes, a solid's change in length is $\Delta L = \alpha L_0 \Delta T$, where $\alpha$ is the material's linear expansion coefficient, $L_0$ its original length, and $\Delta T$ the temperature change. +For approximately constant linear expansion coefficient and free expansion, $\Delta L=\alpha L_0\Delta T$. Here $\Delta T=T_{final}-T_{initial}$ and the final length is $L=L_0+\Delta L$. The control value must be multiplied by $10^{-6}$ to obtain α in inverse degrees Celsius. -Because $\alpha$ is usually only a few parts per million per degree, $\Delta L$ stays small for everyday temperature swings — but it is never zero, and engineers must design for it whenever a structure is long, rigid, and exposed to weather. +The fractional change is $\Delta L/L_0=\alpha\Delta T$. This is a small-change approximation when $|\alpha\Delta T|\ll1$. For positive α, warming lengthens and cooling shortens the object. If expansion is constrained, stresses arise and the actual length change need not equal the free-expansion prediction. ## Advanced -Area and volume expand faster than length: a flat sheet's area grows at roughly $2\alpha$ and a solid's volume at roughly $3\alpha$ per degree, because each of the two or three dimensions expands independently by the same linear fraction, and those small fractional changes simply add. +For an isotropic material with small expansion, area and volume changes are approximately $\Delta A/A_0=2\alpha\Delta T$ and $\Delta V/V_0=3\alpha\Delta T$. These factors do not apply unchanged to anisotropic materials. A bonded bimetal bends because its layers prefer different free expansions; its actual curvature also depends on thickness and elastic properties. The displayed rotation is schematic, not a calculated thermostat deflection. ## Derivation -1. Each dimension of a solid grows almost linearly with temperature over modest ranges, which is exactly what α is defined to capture. -2. The fractional change in length equals α times the temperature change: ΔL/L₀ = αΔT. -3. Multiplying through by the original length gives the length change directly: ΔL = αL₀ΔT. +1. Define the linear expansion coefficient as fractional length change per unit temperature change in the small-change approximation. +2. Multiply that coefficient by the temperature change to get the fractional length change. +3. Multiply by the original length to obtain the change in length. ## Real world -### Railway tracks -Modern continuously welded rail is laid with built-in stress or small expansion joints specifically to absorb the growth a full-length steel rail undergoes in summer heat. +### Structural movement -### Bridges -Long bridges rest on rollers, bearings or expansion joints at one end so the whole structure can grow and shrink with the seasons without cracking. +Bridge bearings and joints can accommodate temperature-related movement. A complete design also considers restraint, loads and material properties. -### Thermostats -A coiled bimetallic strip bends as it warms because its two bonded metals expand at different rates, and that bending physically opens or closes an electrical contact. +### Bimetal devices -### Power lines -Overhead cables are hung with deliberate sag because they contract and pull tighter on cold nights, and a taut summer cable would snap in a hard winter freeze. +Two bonded layers with different expansion coefficients can bend as temperature changes. That motion can operate a mechanical temperature switch. diff --git a/content/lessons/thermodynamics/thermal-expansion/lesson.yaml b/content/lessons/thermodynamics/thermal-expansion/lesson.yaml index fceb98ea..9d61d9f3 100644 --- a/content/lessons/thermodynamics/thermal-expansion/lesson.yaml +++ b/content/lessons/thermodynamics/thermal-expansion/lesson.yaml @@ -38,7 +38,7 @@ variables: - L_0 - \Delta T derivation: - - '\text{Each dimension of a solid grows almost linearly with temperature over modest ranges: } \alpha \text{ is that fractional growth per degree.}' + - \alpha \approx \frac{\Delta L/L_0}{\Delta T} - \frac{\Delta L}{L_0} = \alpha \Delta T - \Delta L = \alpha L_0 \Delta T charts: [] 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' 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|- - الدرجة تقسم الدائرة 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. 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. 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: 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. 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. 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. 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°. 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: 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. 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. 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. diff --git a/content/lessons/waves/damped-oscillation-resonance/ar.md b/content/lessons/waves/damped-oscillation-resonance/ar.md index 8699e7c6..e3513a76 100644 --- a/content/lessons/waves/damped-oscillation-resonance/ar.md +++ b/content/lessons/waves/damped-oscillation-resonance/ar.md @@ -1,18 +1,17 @@ --- title: التذبذب المخمَّد والرنين -summary: >- - الأرجوحة تتوقف وحدها، لكن ادفعها بالإيقاع الصحيح فترتفع أعلى بكثير. +summary: 'افصل بين سؤالين: كيف يضعف اهتزاز حر، وما سعة استجابة مهتز تؤثر فيه قوة دورية؟' parameters: - A: السعة الابتدائية A - g: معدل التخميد γ - w: التردد الزاوي للتذبذب ω - x: الزمن t - F: سعة القوة المحرِّكة F - w0: التردد الطبيعي ω0 + A: 'A — الإزاحة الابتدائية في الرسم الحر' + g: 'γ — معدل اضمحلال الغلاف' + w: 'ω — تردد الرسم الحر الزاوي / تردد القيادة المختار' + x: 'x — الزمن t' + F: 'F — قوة القيادة لكل وحدة كتلة' + w0: 'ω₀ — التردد الطبيعي للنموذج المدفوع' variables: - - معدل التخميد — سرعة تناقص المغلّف - - التردد الزاوي للتذبذب الحر (الرسم الرئيسي) - - التردد الطبيعي وسعة القوة المحرِّكة المستخدمان في مخطط الرنين + - 'معدل اضمحلال سعة الاهتزاز أسيًا' + - 'التردد الزاوي المختار للمنحنى الحر وللقيادة' + - 'التردد الطبيعي الزاوي وقوة القيادة لكل وحدة كتلة في نموذج الاستجابة' charts: - title: 'الرنين: سعة الاستجابة مقابل التردد المحرّك' xLabel: التردد المحرّك ω (rad/s) @@ -23,54 +22,50 @@ charts: ## Try it -1. راقب المنحنى. يتأرجح صعودًا ونزولًا، بينما ينكمش نحو الصفر، تمامًا كجرس يرنّ ثم يخفت. -2. ارفع منزلق «معدل التخميد γ» نحو 1. تتوقف التأرجحات عن الحركة على الفور تقريبًا. -3. أنزل γ نحو الصفر. بالكاد تخفت الحركة، فتستمر بالرنين طويلًا، كشوكة رنّانة ضُربت للتو. +1. في الرسم الرئيسي، اجعل A = 3 وγ = 0.2 وω = 3. يمثل الإحداثي الأفقي x الزمن. حرّكه لفحص الإزاحة وميل المماس في لحظات مختلفة. +2. ارفع γ إلى 0.9. ينخفض الغلاف بعد ثانية إلى نحو 41% من قيمته الابتدائية؛ ولم يصل إلى الصفر. اخفض γ إلى 0.06 لترى اضمحلالًا أبطأ. +3. في رسم الاستجابة، اجعل ω₀ = 3 وF = 2 وγ = 0.2. قرّب ω من 3 rad/s لتقترب العلامة من القمة. تختار ω هنا تردد القيادة الزاوي؛ أما x فيبقى الزمن للرسم الرئيسي والعرض الثلاثي الأبعاد. ## Real-life examples -1. **وتر الغيتار.** وتر يُقرَع (السعة A = 1.5، معدل التخميد γ = 0.06 في الثانية) يستمر بالرنين طويلًا. تتسرب منه طاقة قليلة جدًا في كل اهتزاز. -2. **أرجوحة الملعب.** تُدفع مرة واحدة ثم تُترك (A = 3، γ = 0.3 في الثانية). تتأرجح بضع مرات، ثم يوقفها الاحتكاك ومقاومة الهواء. -3. **سيارة تمر فوق حفرة.** نظام التعليق (A = 2.5، γ = 0.9 في الثانية) مصمَّم ليوقف الارتداد خلال نحو ثانية واحدة. تعود الرحلة سلسة بسرعة. +1. **اضمحلال بطيء.** عند A = 1.5 وγ = 0.06 وω = 5، يحتاج الغلاف إلى نحو 16.7 s ليصبح 1/e من قيمته الابتدائية؛ أي أكثر من نافذة الرسم الرئيسية البالغة 12 s. +2. **اضمحلال متوسط.** عند A = 3 وγ = 0.3 وω = 1.5، تكون تلك المدة نحو 3.33 s. أما الزمن الدوري للاهتزاز فنحو 4.19 s. +3. **اضمحلال أسرع.** عند A = 2.5 وγ = 0.9 وω = 3، تكون تلك المدة نحو 1.11 s. هذه معاملات نموذج، وليست مواصفات مقاسة لنظام تعليق سيارة. ## Test yourself -1. أوقف التأرجح خلال ثانية واحدة تقريبًا. اضبط معدل التخميد γ على 0.9 في الثانية على الأقل. -2. اجعل التذبذب يهتز بسرعة 4.5 راديان في الثانية. -3. ادفع النظام على إيقاعه الطبيعي بالضبط. اجعل منزلق التردد x ضمن 0.3 راديان/ثانية من التردد الطبيعي ω0. +1. اجعل γ تساوي 0.9 في الثانية على الأقل ليضمحل الغلاف أسرع. +2. اجعل التردد الزاوي ω يساوي 4.5 rad/s. +3. قرّب تردد القيادة الزاوي ω من ω₀ بحيث يكون الفرق أقل من 0.3 rad/s. استخدم ω، لا منزلق الزمن x؛ فهذا قريب من الرنين عندما يكون التخميد ضعيفًا. ## Intuition -ادفع أرجوحة دفعة واحدة، ثم اتركها. كل حركة تالية أقل ارتفاعًا من سابقتها، حتى تتوقف تمامًا. الخط الأزرق على الشاشة يُظهر هذا النمط بالضبط عبر الزمن، بالثواني على المحور الأفقي. يبدأ عند ارتفاع 3، ويتأرجح ذهابًا وإيابًا وهو ينكمش داخل حد غير مرئي. اسحب النقطة البرتقالية على طول المنحنى، وراقب الخط القصير المماس لها. يُظهر هذا الخط سرعة حركة الأرجوحة في تلك اللحظة بالذات. ارفع المنزلق المسمى «معدل التخميد $\gamma$»، وهو مدى سرعة انكماش كل حركة، من 0.2 إلى 0.9. تتوقف الأرجوحة نفسها خلال ثانية واحدة تقريبًا، بدلًا من عشر ثوانٍ. +تتناقص سعة الحركة الحرة المخمّدة مع الزمن. يضرب الرسم الرئيسي دالة جيب تمام في دالة أسية متناقصة. يعطي جيب التمام تكرار تغيير الاتجاه، بينما تحدد الدالة الأسية حدًا متناقصًا للإزاحة. يقيس المماس تغير الإزاحة في الثانية. لهذا المنحنى تحديدًا سرعة غير صفرية عند t = 0، فلا يمثل إطلاق الجسم من السكون. -تخيّل الآن أنك تدفع الأرجوحة نفسها مرارًا. جرّب إيقاعات مختلفة لترى أيها يصنع أعلى ارتفاع. يرسم المخطط الثاني هذا بالضبط، أي مدى قوة استجابة النظام مقابل سرعة الدفع. الدفع قرب إيقاع الأرجوحة الطبيعي، $\omega_0$، وهو ترددها الطبيعي وهنا 3 راديان في الثانية، يجعل الاستجابة ترتفع أعلى بكثير من أي إيقاع آخر. هذه القمة المفاجئة تسمى الرنين. اجعل $\gamma$ صغيرة في المخطط الأول، فتصبح القمة في المخطط الثاني طويلة وضيقة. أي أن إيقاعًا دقيقًا واحدًا فقط يعطي استجابة كبيرة. اجعل $\gamma$ كبيرة بدل ذلك، فتتسطح القمة، ويعطي أي إيقاع تقريبًا استجابة مشابهة. +يطرح الرسم الأصغر سؤالًا آخر: بعد استقرار الحركة تحت تأثير قوة جيبية متكررة، ما سعة الاستجابة لكل تردد قيادة؟ عند ضعف التخميد، يعطي نطاق ضيق قرب التردد الطبيعي استجابة كبيرة. هذان عرضان يشتركان في بعض أدوات التحكم، وليسا تلقائيًا الحركة الحرة والمدفوعة للمهتز نفسه. يوضح النابض الثلاثي الأبعاد الاستجابة المدفوعة المستقرة؛ لكن سعته المرئية محدودة، وحركة الحامل توضيحية. ## Formal -التذبذب الحر المخمَّد يحقق $\ddot x + 2\gamma\dot x + \omega_0^2 x = 0$، وله الحل $x(t)=Ae^{-\gamma t}\cos(\omega t)$ (حالة التخميد الجزئي، حيث $\gamma<\omega_0$). +الرسم الرئيسي هو $q(t)=Ae^{-\gamma t}\cos(\omega t)$ حيث $t=x$. غلافه $Ae^{-\gamma t}$ وزمن اضمحلاله $\tau=1/\gamma$. سرعته الابتدائية $q'(0)=-\gamma A$. لهذا المنحنى الحر، يكون التردد الطبيعي دون تخميد $\sqrt{\omega^2+\gamma^2}$، ولا يلزم أن يساوي منزلق ω₀ المستقل. -سعة الاستجابة المستقرة عند التحريك هي $X(\omega) = F/\sqrt{(\omega_0^2-\omega^2)^2 + (2\gamma\omega)^2}$. تبلغ أقصاها بالقرب من $\omega \approx \omega_0$، وتزداد حدة وارتفاعًا كلما صغُرت $\gamma$. +للنموذج المدفوع $q''+2\gamma q'+\omega_0^2q=F\cos(\Omega t)$، تكون السعة المستقرة $X(\Omega)=F/\sqrt{(\omega_0^2-\Omega^2)^2+(2\gamma\Omega)^2}$. تمثل F القوة لكل وحدة كتلة، ويختار منزلق ω القيمة Ω. تقع قمة السعة عند تردد موجب $\Omega_{peak}=\sqrt{\omega_0^2-2\gamma^2}$ إذا كان $\omega_0^2>2\gamma^2$؛ وإلا كانت أكبر استجابة عند التردد صفر. ## Advanced -تتحدد قمة الرنين بـ $\gamma$. يقيس «عامل الجودة» $Q = \omega_0/2\gamma$ مدى حدة القمة وطول استمرار رنينها. يربط هذا مباشرة بين مغلّف التناقص في مجال الزمن، الظاهر في الرسم الرئيسي، وحدة الاستجابة في مجال التردد، الظاهرة في المخطط. فـ $\gamma$ نفسها تحكم كلا الأمرين. هذا من أوضح الأمثلة على مبادلة عدم اليقين بين الزمن والتردد في الفيزياء. +يصف الاشتقاق أدناه مهتزًا حرًا ناقص التخميد، يتحدد تردده المخمّد من تردده الطبيعي ومعدل التخميد. أما الرسم الرئيسي فيتيح اختيار التردد المخمّد والتخميد مستقلين. عند ضعف التخميد، يصف $Q=\omega_0/(2\gamma)$ رنينًا ضيقًا وقويًا. وقد يزيل التخميد الكبير قمة الرنين عند الترددات الموجبة. يستخدم رسم الاستجابة عددًا محدودًا من عينات التردد، ولذلك قد لا يُظهر ارتفاع قمة شديدة الضيق بدقة. ## Derivation -1. أضف حدًا للتخميد (الاحتكاك) متناسبًا مع السرعة إلى معادلة المذبذب التوافقي. -2. جرّب $x = e^{\lambda t}$. تعطي المعادلة المميِّزة جذورًا مركّبة $\lambda=-\gamma\pm i\omega$، عندما تكون $\gamma<\omega_0$. -3. أعد كتابة مجموع الجيب وجيب التمام كجيب تمام متناقص واحد، بسعة $A$ وطور $\varphi$. +1. نضيف تخميدًا متناسبًا مع السرعة إلى معادلة المهتز الحر، دون قوة قيادة دورية. +2. نحل المعادلة المميزة في حالة نقص التخميد؛ فيكون تردد الاهتزاز أقل من التردد الطبيعي دون تخميد. +3. ندمج الجيب وجيب التمام في جيب تمام ذي إزاحة طور داخل الغلاف الأسي المتناقص. ## Real world -### الجسور -انهيار جسر تاكوما ناروز حالة شهيرة. اقترب فيها تذبذب مدفوع بالرياح من التردد الرنيني للمنشأة. +### اهتزاز يخفت -### ضبط تردد الراديو -دارة ضبط الراديو مذبذب رنيني من نوع LC. تختار تردد محطة واحدة من بين محطات كثيرة. +قد يفقد جسم مهتز طاقة إلى محيطه بعد طرقه. يوفر المهتز المخمّد تقريبًا مفيدًا لنمط اهتزاز منفرد. -### أراجيح الملاعب -دفع الأرجوحة عند ترددها الطبيعي يبني السعة بفعالية أكبر بكثير من أي إيقاع آخر. +### أنظمة تقودها قوة دورية -### ممتصات الصدمات -تُخمَّد أنظمة تعليق المركبات عمدًا، لتفادي الارتداد الرنيني فوق أسطح الطرق الوعرة والدورية. +قد تنتج القوة الدورية استجابة قوية قرب التردد الطبيعي للنظام. تعتمد الاستجابة على التخميد وشدة القوة أيضًا؛ فلا يفسر التردد وحده اهتزازًا كبيرًا. diff --git a/content/lessons/waves/damped-oscillation-resonance/en.md b/content/lessons/waves/damped-oscillation-resonance/en.md index 60f382c1..20acc6fb 100644 --- a/content/lessons/waves/damped-oscillation-resonance/en.md +++ b/content/lessons/waves/damped-oscillation-resonance/en.md @@ -1,20 +1,17 @@ --- title: Damped oscillation and resonance -summary: >- - A swing pushed once loses a little height on every pass and eventually - stops — but pushed at just the right rhythm instead, it can climb far - higher than any single push, and this lesson shows both effects together. +summary: 'Separate two questions: how a free oscillation fades, and how strongly a repeatedly driven oscillator responds.' parameters: - A: initial amplitude A - g: damping rate γ - w: oscillation angular frequency ω - x: time t - F: driving force amplitude F - w0: natural frequency ω0 + A: 'A — initial displacement in the free plot' + g: 'γ — envelope decay rate' + w: 'ω — free-plot angular frequency / selected drive frequency' + x: 'x — time t' + F: 'F — driving force per unit mass' + w0: 'ω₀ — natural frequency of the driven model' variables: - - damping rate — how fast the envelope decays - - angular frequency of the free oscillation (main plot) - - natural frequency and driving amplitude used in the resonance chart + - 'rate of exponential amplitude decay' + - 'angular frequency chosen for the free curve and the drive' + - 'natural angular frequency and driving force per unit mass in the response model' charts: - title: 'Resonance: response amplitude vs driving frequency' xLabel: driving frequency ω (rad/s) @@ -25,54 +22,50 @@ charts: ## Try it -1. Watch the curve. It swings up and down while shrinking toward zero, like a bell that rings and then fades. -2. Raise the slider "damping rate γ" toward 1. The swings now die out almost immediately. -3. Lower γ back toward 0. The swings barely fade at all — they ring on and on, like a struck tuning fork. +1. In the main plot, set A = 3, γ = 0.2 and ω = 3. The horizontal coordinate x is time. Move x to inspect displacement and tangent slope at different instants. +2. Raise γ to 0.9. The envelope falls to about 41% of its initial value after 1 s; it has not become zero. Lower γ to 0.06 to see a slower decay. +3. In the response chart, set ω₀ = 3, F = 2 and γ = 0.2. Move ω near 3 rad/s to move the chart's marker near the peak. Here ω selects driving frequency; x still selects time for the main plot and 3D view. ## Real-life examples -1. **A guitar string.** A plucked string (amplitude A = 1.5, damping rate γ = 0.06 per second) rings for a long time, because so little energy leaks out with each vibration. -2. **A playground swing.** Pushed once and let go (A = 3, γ = 0.3 per second), a swing rocks a few times before friction and air resistance bring it to a stop. -3. **A car driving over a pothole.** The suspension (A = 2.5, γ = 0.9 per second) is built to stop bouncing within about a second, so the ride feels smooth again quickly. +1. **Slow decay.** With A = 1.5, γ = 0.06 and ω = 5, the envelope takes about 16.7 s to fall to 1/e of its starting value—beyond the main plot's 12 s window. +2. **Moderate decay.** With A = 3, γ = 0.3 and ω = 1.5, that time is about 3.33 s. The oscillation period is about 4.19 s. +3. **Faster decay.** With A = 2.5, γ = 0.9 and ω = 3, that time is about 1.11 s. These are model parameters, not measured specifications for a car suspension. ## Test yourself -1. Make the swings die out almost immediately: set the damping rate γ to at least 0.9 per second. -2. Make the oscillation rock back and forth at 4.5 radians per second. -3. Drive the system at its own natural rhythm: bring the frequency slider x within 0.3 rad/s of the natural frequency ω0. +1. Set γ to at least 0.9 per second for faster envelope decay. +2. Set angular frequency ω to 4.5 rad/s. +3. Bring driving frequency ω within 0.3 rad/s of ω₀. Use ω, not the time control x; this is near resonance when damping is small. ## Intuition -Push a swing once and let go: each arc is a little lower than the one before, until it stops. The blue curve on screen shows exactly that pattern over time, in seconds along the bottom. It starts at a height of 3 and rocks back and forth while shrinking inside an invisible boundary. Drag the orange point along the curve and watch the short tangent line: it shows how fast the swing is moving at that exact instant. Raise the slider called "damping rate $\gamma$" — how quickly each swing shrinks — from 0.2 toward 0.9, and the same swing now dies out in about a second instead of ten. +A damped free motion loses amplitude over time. The main plot multiplies a cosine by a shrinking exponential. The cosine supplies the repeated changes of direction, while the exponential sets a decreasing bound on displacement. The tangent measures displacement change per second. At t = 0 this particular curve already has a nonzero velocity, so it is not a release from rest. -Now imagine pushing that same swing over and over, trying different rhythms to see which one builds the highest arc. The second graph plots exactly that: how strongly the system responds, against how fast you push it. Pushing close to the swing's own natural rhythm, $\omega_0$ (its natural frequency, here 3 radians per second), makes the response shoot up far higher than pushing at any other pace — this sudden peak is called resonance. Make $\gamma$ small on the first graph and the peak on the second graph turns tall and narrow, so only one precise rhythm gets a big response. Make $\gamma$ large instead and the peak flattens out, so almost any rhythm works about as well. +The smaller chart asks a different question: after repeated sinusoidal driving has settled, how large is the response at each driving frequency? With weak damping, a narrow range near the natural frequency produces a large response. These are two demonstrations with shared controls, not automatically the free and driven motion of one identical oscillator. In 3D the spring shows the driven steady response; its visible amplitude is capped, and the support movement is schematic. ## Formal -Free damped oscillation: $\ddot x + 2\gamma\dot x + \omega_0^2 x = 0$ has solution $x(t)=Ae^{-\gamma t}\cos(\omega t)$ (underdamped case, $\gamma<\omega_0$). +The main plot is $q(t)=Ae^{-\gamma t}\cos(\omega t)$ with $t=x$. Its envelope is $Ae^{-\gamma t}$ and its decay time is $\tau=1/\gamma$. Its initial velocity is $q'(0)=-\gamma A$. For this free curve, the corresponding undamped natural frequency is $\sqrt{\omega^2+\gamma^2}$, not necessarily the separate ω₀ control. -Driven steady-state amplitude: $X(\omega) = F/\sqrt{(\omega_0^2-\omega^2)^2 + (2\gamma\omega)^2}$, maximised near $\omega \approx \omega_0$ — sharper and taller the smaller $\gamma$ is. +For the driven model $q''+2\gamma q'+\omega_0^2q=F\cos(\Omega t)$, steady amplitude is $X(\Omega)=F/\sqrt{(\omega_0^2-\Omega^2)^2+(2\gamma\Omega)^2}$. F is force per unit mass, and the ω control selects Ω. The positive-frequency amplitude peak is $\Omega_{peak}=\sqrt{\omega_0^2-2\gamma^2}$ when $\omega_0^2>2\gamma^2$; otherwise the largest response is at zero frequency. ## Advanced -The resonance peak's width is set by $\gamma$: the "quality factor" $Q = \omega_0/2\gamma$ measures how sharply peaked and long-ringing the resonance is, connecting the time-domain decay envelope seen in the main plot directly to the frequency-domain sharpness seen in the chart — the same $\gamma$ governs both, one of the clearest examples of a time-frequency uncertainty trade-off in physics. +The derivation below describes a free underdamped oscillator, with damped frequency determined by its natural frequency and damping rate. The main plot instead allows damped frequency and damping to be selected independently. For weak damping, $Q=\omega_0/(2\gamma)$ describes a narrow, strong resonance. Large damping need not leave a resonance peak at a positive frequency. The response chart samples a finite number of frequencies, so a very narrow peak can be under-resolved. ## Derivation -1. Add a damping (friction) term proportional to velocity to the harmonic oscillator equation. -2. Try $x = e^{\lambda t}$; the characteristic equation gives complex roots $\lambda=-\gamma\pm i\omega$ when $\gamma<\omega_0$. -3. Rewrite the sum of sine and cosine as a single decaying cosine with amplitude $A$ and phase $\varphi$. +1. Add velocity-proportional damping to the free oscillator equation, with no periodic driving force. +2. Solve the characteristic equation in the underdamped case; the oscillation frequency is smaller than the undamped natural frequency. +3. Combine sine and cosine into a phase-shifted cosine inside the decaying exponential envelope. ## Real world -### Bridges -The Tacoma Narrows collapse is a famous case of wind-driven oscillation approaching a structure's resonant frequency. +### A fading vibration -### Radio tuning -A radio's tuning circuit is a resonant LC oscillator selecting one station's frequency out of many. +A struck object can lose vibration energy to its surroundings. A damped oscillator is a useful approximation for an isolated vibration mode. -### Playground swings -Pumping a swing at its natural frequency builds up amplitude far more effectively than any other rhythm. +### Driven systems -### Shock absorbers -Vehicle suspensions are deliberately damped to avoid resonant bouncing over bumpy, periodic road surfaces. +Periodic forcing can produce a strong response near a system's natural frequency. The response depends on damping as well as forcing strength; a large vibration is not explained by frequency alone. diff --git a/content/lessons/waves/damped-oscillation-resonance/lesson.yaml b/content/lessons/waves/damped-oscillation-resonance/lesson.yaml index 18560521..44222b79 100644 --- a/content/lessons/waves/damped-oscillation-resonance/lesson.yaml +++ b/content/lessons/waves/damped-oscillation-resonance/lesson.yaml @@ -72,7 +72,7 @@ charts: - domain: - 0 - 6 - marker: w0 + marker: w series: - F/sqrt((w0^2 - x^2)^2 + (2*g*x)^2) primary: g @@ -90,4 +90,4 @@ challenges: - check: g >= 0.9 - check: w target: 4.5 - - check: abs(x - w0) < 0.3 + - check: abs(w - w0) < 0.3 diff --git a/content/lessons/waves/diffraction/ar.md b/content/lessons/waves/diffraction/ar.md index a1fe99e8..48ad2377 100644 --- a/content/lessons/waves/diffraction/ar.md +++ b/content/lessons/waves/diffraction/ar.md @@ -1,66 +1,61 @@ --- title: الحيود -summary: >- - الموجة تنتشر بعد الفتحة. لهذا تسمع من خلف الجدار ولا ترى. +summary: 'قارن الطول الموجي بعرض الفتحة لفهم الانتشار، وحدّد أول انعدام للشدة عندما تسمح صيغة الشق الواحد بذلك.' parameters: - a: عرض الفتحة a - lambda: الطول الموجي λ + a: 'a — عرض الفتحة' + lambda: 'λ — الطول الموجي' variables: - - الطول الموجي - - عرض الفتحة - - نصف زاوية الانتشار + - 'المسافة بين جبهتين موجيتين متتاليتين' + - 'عرض الفتحة' + - 'زاوية أول انعدام للشدة عندما يكون λ ≤ a' --- ## Try it -1. راقب جبهات الموجة تصل الفتحة وتنتشر على شكل قوس خلفها. -2. صغّر منزلق الفتحة a نحو منزلق الطول الموجي λ. تكبر زاوية الانتشار حتى تنتشر الموجة تقريبًا في كل اتجاه خلف الفتحة. -3. وسّع الآن a كثيرًا عن λ. تنكمش زاوية الانتشار إلى شبه صفر، وتعبر الموجة كحزمة ضيقة بدل ذلك. +1. اجعل عرض الفتحة a = 1 m والطول الموجي λ = 0.7 m. تبلغ زاوية أول انعدام للشدة نحو 44.4° من اتجاه الأمام. +2. وسّع a إلى 4 m مع ثبات λ. تنخفض الزاوية إلى نحو 10.1°. تعطي الفتحة الأوسع قمة حيود مركزية أضيق. +3. اجعل a = 0.3 m وλ = 0.7 m. أصبح الطول الموجي أكبر من عرض الفتحة. يوضح الرسم انتشارًا واسعًا، لكن الصيغة لا تعطي أول انعدام عند زاوية حقيقية في الجهة الأمامية. ## Real-life examples -1. **صوت عبر باب.** الطول الموجي لصوت الكلام العادي قريب من عرض باب مفتوح (a = 1 m، λ = 0.7 m)، فينتشر بشدة إلى الغرفة التالية. ولهذا تسمع شخصًا من خلف زاوية. -2. **ضوء عبر الباب نفسه.** على الرسم نفسه بمقياس مكبَّر، طول موجي أصغر بكثير من الفتحة (a = 4 m، λ = 0.1 m) بالكاد ينتشر. طول الضوء الموجي الحقيقي نحو نصف جزء من مليون من المتر، أصغر بملايين المرات من أي باب. لهذا لا ترى أبدًا خلف الزاوية كما تسمع خلفها. -3. **فتحة ضيقة قريبة من الطول الموجي.** حين تتساوى الفتحة والطول الموجي تقريبًا (a = 0.3 m، λ = 0.3 m)، تنتشر الموجة في كل اتجاه تقريبًا خلف الفتحة. +1. **طول موجي قريب من عرض باب.** عند a = 1 m وλ = 0.7 m، تكون النسبة 0.7 وزاوية أول انعدام المقدّرة 44.4°. يوضح ذلك انتشارًا واسعًا؛ أما الصوت البشري فيضم أطوالًا موجية كثيرة. +2. **نسبة صغيرة بين الطول والعرض.** عند a = 4 m وλ = 0.1 m، تكون النسبة 0.025 والزاوية نحو 1.43°. الطول 0.1 m ليس طولًا موجيًا للضوء المرئي؛ يوضح الإعداد النسبة فقط. +3. **تساوي العرض والطول الموجي.** عند a = λ = 0.3 m، يقع أول انعدام حدي عند 90°. ولا يوجد أول انعدام داخل الجهة الأمامية قبل هذه الزاوية. ## Test yourself -1. اجعل الفتحة مساوية للطول الموجي بالضبط. -2. اجعل نسبة الطول الموجي إلى الفتحة أصغر من 0.05، بحيث تنتشر الموجة بالكاد. -3. اضبط نصف زاوية انتشار قريبة من 30°. +1. اجعل عرض الفتحة مساويًا للطول الموجي. +2. اجعل λ/a قريبة من 0.05، بهامش 0.02. +3. اختر a وλ لتكون زاوية أول انعدام نحو 30°. ## Intuition -قف خلف زاوية، وفي الغرفة التالية صديق يتحدث. لا تراه، لكنك تسمعه جيدًا. الضوء والصوت كلاهما موجة تعبر الباب نفسه، لكنهما يسلكان سلوكًا مختلفًا تمامًا بعد عبوره. السبب هو حجم الفتحة مقارنة بالطول الموجي للموجة نفسها. +لا تظل الموجة بعد عبور فتحة محصورة دائمًا في شريط ذي حواف حادة. تتراكب المساهمات الآتية من أجزاء الفتحة المختلفة؛ فتقوّي بعضها في اتجاهات، ويلغي بعضها بعضًا في اتجاهات أخرى. يشكّل هذا الانتشار والتداخل نمط الحيود. -حين يكون الطول الموجي قريبًا من حجم الفتحة التي تعبرها الموجة، تنحني الموجة وتنتشر بشدة خلفها، فتملأ المساحة خلف الفتحة كأنها مروحة تقريبًا. حين يكون الطول الموجي أصغر بكثير من الفتحة، بالكاد تنحني الموجة، وتواصل مسارها كحزمة مستقيمة تقريبًا. الأطوال الموجية للصوت، من نصف متر تقريبًا إلى بضعة أمتار، قريبة من حجم الباب العادي، فينتشر الصوت بشدة عبره. أما طول الضوء الموجي فنحو نصف جزء من مليون من المتر، أصغر بكثير من أي باب، فبالكاد ينتشر ويترك بدل ذلك ظلاً حادّ الحواف. +المقارنة المهمة هي الطول الموجي مقسومًا على عرض الفتحة. تعطي النسبة الصغيرة قمة مركزية ضيقة، وتعطي الأكبر انتشارًا أوسع. المنطقة المظللة دليل على النطاق المركزي، وليست حدًا تختفي الموجة بعده. والأقواس الخارجة توضيحية. يحيد الضوء أيضًا، لكن طوله الموجي أصغر بكثير من عرض باب معتاد، لذلك يكون حيوده هناك أقل وضوحًا من حيود كثير من الموجات الصوتية. ## Formal -لموجة طولها الموجي $\lambda$ تعبر فتحة عرضها $a$، تقع أول نقطة يهبط عندها نمط الانتشار إلى شبه صفر عند زاوية $\theta$ من الاتجاه الأمامي، ويعطيها $\sin\theta = \lambda/a$. معظم طاقة الموجة تنتشر تقريبًا ضمن نصف الزاوية هذا حول اتجاه المرور المستقيم. +لشق واحد مضاء بانتظام، وفي تقريب المجال البعيد، يحقق أول انعدام للشدة $a\sin\theta=\lambda$. عندما يكون $0<\lambda/a\le1$، تكون الزاوية الحدية الموجبة $\theta=\arcsin(\lambda/a)$. تقع القمة المركزية بين الزاويتين السالبة والموجبة المقابلتين. -حين يكون $a \gg \lambda$، تنكمش هذه الزاوية نحو الصفر، وتعبر الموجة شبه مستقيمة تاركة ظلاً حادّ الحواف. حين يكون $a$ قريبًا من $\lambda$، تكبر الزاوية نحو 90°، وتنتشر الموجة عبر كامل المساحة تقريبًا خلف الفتحة. +للنسب الصغيرة، يكون $\theta\approx\lambda/a$ بالراديان. عند $\lambda=a$، تضع الصيغة أول انعدام عند $90^\circ$. وإذا كان $\lambda>a$، فلا تعطي زاوية حقيقية لأول انعدام. الرسم الواسع بزاوية 90° حينها حد للعرض، وليس موضعًا محسوبًا لانعدام الشدة. ## Advanced -يأتي هذا التقدير لفتحة واحدة من معاملة كل نقطة عبر الفتحة كمصدر تموّجه الخاص، وهذا هو مبدأ هويغنز، ثم جمعها على شاشة بعيدة. حيث تصل هذه التموّجات خارج التوافق تُلغي بعضها، وأول إلغاء كهذا يقع عند $\sin\theta=\lambda/a$. المشهد ثلاثي الأبعاد يجمع هذه التموّجات مباشرة، ويُظهر نمط التداخل الكامل الذي تقرّبه هذه الزاوية فقط. +لهذا الشق المثالي، تكون $I(\theta)/I(0)=(\sin u/u)^2$، حيث $u=\pi a\sin\theta/\lambda$، وتُعرّف القيمة عند u = 0 باستخدام النهاية. توجد قمم ثانوية خارج القمة المركزية. يجمع العرض الثلاثي الأبعاد تسعة مصادر منفصلة على شبكة محدودة الدقة؛ فيوضح التراكب، لكنه لا يحل مسألة الشق المتصل بدقة عند كل إعداد. وقد تظهر آثار أخذ العينات عند الأطوال الموجية القصيرة. ## Derivation -1. معاملة كل نقطة عبر الفتحة كمصدر موجة خاص بها وجمع إسهاماتها يعطي أول زاوية إلغاء $\theta = \arcsin(\lambda/a)$. -2. حين تكون الفتحة أوسع بكثير من الطول الموجي، تنكمش هذه الزاوية نحو الصفر، فتعبر الموجة شبه مستقيمة. -3. حين تكون الفتحة قريبة من حجم الطول الموجي، تكبر الزاوية نحو زاوية قائمة، فتنتشر الموجة عبر كامل المساحة تقريبًا خلف الفتحة. +1. في المجال البعيد، تلغي مساهمات أجزاء متقابلة من الشق بعضها عند أول انعدام عندما يكون فرق الطور نصف دورة؛ ويكون فرق المسار عبر الشق كله طولًا موجيًا واحدًا. +2. عندما يزيد عرض الفتحة كثيرًا على الطول الموجي، تصغر زاوية أول انعدام. +3. عندما تقترب النسبة من الواحد من أسفل، تقترب الزاوية الحدية من 90°. وبعد تجاوز الواحد لا يعود للصيغة حل حقيقي. ## Real world -### السمع خلف الزوايا -تحيد الأطوال الموجية الطويلة للصوت بشدة عبر الأبواب وحول العوائق، فتسمع أشخاصًا وحركة مرور لا تراها. +### الصوت حول العوائق -### استقبال الراديو في الوديان -تحيد إشارات الراديو ذات الطول الموجي الطويل حول التلال والمباني التي كانت ستحجب تمامًا إشارة أقصر طولاً موجيًا، وهذا جزء من سبب وصول إذاعة AM إلى أماكن لا تصلها FM. +يساعد الحيود الصوت على الوصول إلى مناطق خارج خط النظر المباشر. وقد تسهم الانعكاسات ومسارات انتقال أخرى أيضًا. -### شبكات الحيود -انتشار الضوء عبر سلسلة من فتحات ضيقة جدًا ومتقاربة ينتج أنماط حيود حادة تستخدمها أجهزة الطيف لتفريق الضوء إلى أطواله الموجية المكوّنة. +### دقة الصورة الضوئية -### حدود حيود عدسة الكاميرا -إغلاق فتحة الكاميرا كثيرًا يجعلها فتحة ضيقة للضوء، فيحيد الضوء ويُلطّف تفاصيل الصورة الدقيقة بما لا يستعيده أي تركيز لاحق. +تسبب الفتحة المحدودة حيودًا يحد من تفاصيل الصورة. ويختلف نمط فتحة العدسة الدائرية عن نمط الشق الواحد المستخدم هنا. diff --git a/content/lessons/waves/diffraction/en.md b/content/lessons/waves/diffraction/en.md index 3eb92e2f..06f4861e 100644 --- a/content/lessons/waves/diffraction/en.md +++ b/content/lessons/waves/diffraction/en.md @@ -1,68 +1,61 @@ --- title: Diffraction -summary: >- - A wave passing through a gap spreads out on the far side, and how much it - spreads depends on the gap's size compared with the wavelength — which is - why you can hear someone around a corner but never see them. +summary: 'Compare wavelength with slit width to understand spreading, and locate the first minimum when the single-slit formula permits one.' parameters: - a: gap width a - lambda: wavelength λ + a: 'a — gap width' + lambda: 'λ — wavelength' variables: - - the wavelength - - the gap's width - - the spreading half-angle + - 'distance between successive wavefronts' + - 'width of the opening' + - 'first-minimum angle when λ ≤ a' --- ## Try it -1. Watch the wavefronts arrive at the gap and spread out into an arc on the far side. -2. Shrink the gap slider a toward the wavelength slider λ. The spreading angle grows until the wave fans out almost everywhere behind the gap. -3. Now widen a far past λ. The spreading angle shrinks to almost nothing, and the wave passes through as a narrow beam instead. +1. Set gap width a = 1 m and wavelength λ = 0.7 m. The estimated first-minimum angle is about 44.4° from straight ahead. +2. Widen a to 4 m while keeping λ fixed. The angle falls to about 10.1°. A wider opening gives a narrower central diffraction peak. +3. Set a = 0.3 m and λ = 0.7 m. The wavelength now exceeds the gap width. The diagram shows broad spreading, but there is no first minimum at a real forward angle in this formula. ## Real-life examples -1. **A voice through a doorway.** A typical speaking voice's wavelength is close to the width of an open doorway (a = 1 m, λ = 0.7 m), so it spreads out widely into the next room — which is why you can hear someone from around a corner. -2. **Light through the same doorway.** On the same scaled picture, a wavelength far smaller than the gap (a = 4 m, λ = 0.1 m) barely spreads at all — real light's wavelength is about half a millionth of a metre, millions of times smaller than any doorway, so you never see around a corner the way you hear around one. -3. **A narrow gap close to the wavelength.** When the gap and the wavelength are nearly equal (a = 0.3 m, λ = 0.3 m), the wave spreads out in almost every direction on the far side. +1. **A wavelength comparable to a doorway.** With a = 1 m and λ = 0.7 m, the ratio is 0.7 and the first-minimum estimate is 44.4°. This illustrates broad spreading; a voice contains many wavelengths. +2. **A small wavelength-to-gap ratio.** With a = 4 m and λ = 0.1 m, the ratio is 0.025 and the angle is about 1.43°. A 0.1 m wavelength is not visible light; the preset illustrates the ratio only. +3. **Equal width and wavelength.** With a = λ = 0.3 m, the limiting first minimum is at 90°. There is no first minimum strictly inside the forward half-plane. ## Test yourself -1. Make the gap exactly equal to the wavelength. -2. Make the wavelength-to-gap ratio smaller than 0.05, so the wave barely spreads at all. -3. Set a spreading half-angle of about 30°. +1. Make gap width equal to wavelength. +2. Make λ/a close to 0.05, within 0.02. +3. Choose a and λ for a first-minimum angle of approximately 30°. ## Intuition -Stand around the corner from a friend talking in the next room: you cannot see them, but you can hear them perfectly well. Both light and sound are waves passing through the same doorway, yet they behave completely differently once through it — and the reason is the size of the gap compared with the wave's own wavelength. +A wave passing through an opening does not always keep travelling as a sharply bounded strip. Contributions from different parts of the opening overlap beyond it. They reinforce in some directions and cancel in others. This spreading and interference form a diffraction pattern. -When a wave's wavelength is close to the size of the gap it squeezes through, it bends and spreads out widely on the far side, filling the space behind the gap almost like a fan. When the wavelength is far smaller than the gap, the wave barely bends at all and carries on mostly in a straight beam. Sound wavelengths (roughly half a metre to a few metres) are close to the size of an ordinary doorway, so sound spreads widely through it; light's wavelength is roughly half a millionth of a metre, far smaller than any doorway, so it barely spreads and casts a sharp shadow instead. +The important comparison is wavelength divided by opening width. A small ratio gives a narrow central peak; a larger ratio gives broader spreading. The shaded wedge is a guide to the central region, not a boundary beyond which the wave vanishes. The outgoing arcs are schematic. Light diffracts too, but its wavelength is much smaller than an ordinary doorway, so diffraction there is much less obvious than for many sound wavelengths. ## Formal -For a wave of wavelength $\lambda$ passing through a gap of width $a$, the first point where the spreading pattern drops to (near) zero sits at an angle $\theta$ from straight ahead given by $\sin\theta = \lambda/a$; most of the wave's energy spreads within roughly this half-angle of the straight-through direction. +For a uniformly illuminated single slit in the far-field approximation, the first intensity minima satisfy $a\sin\theta=\lambda$. For $0<\lambda/a\le1$, the positive limiting angle is $\theta=\arcsin(\lambda/a)$. The central peak lies between the corresponding negative and positive angles. -When $a \gg \lambda$, this angle shrinks toward zero and the wave passes through almost undeviated, casting a sharp-edged shadow; when $a$ is comparable to $\lambda$, the angle grows toward 90°, and the wave spreads through nearly the whole space on the far side of the gap. +For small ratios, $\theta\approx\lambda/a$ in radians. At $\lambda=a$, the formula places the first minimum at $90^\circ$. For $\lambda>a$, it has no real first-minimum angle. The broad 90° drawing in that case is a display limit, not a calculated zero of intensity. ## Advanced -This single-slit estimate comes from treating every point across the gap as a source of its own outward ripple (Huygens' principle) and adding them up on a distant screen; where those ripples arrive out of step they cancel, and the first such cancellation happens at $\sin\theta=\lambda/a$. The 3D scene sums these ripples directly and shows the full interference pattern this angle only approximates. +For this ideal slit, $I(\theta)/I(0)=(\sin u/u)^2$, where $u=\pi a\sin\theta/\lambda$ and the value at u = 0 is defined by its limit. Secondary peaks exist outside the central peak. The 3D scene sums nine discrete sources on a coarse mesh, illustrating superposition rather than accurately solving a continuous slit at every setting. At short wavelengths it can show sampling artifacts. ## Derivation -1. Treating every point across the gap as its own wave source and adding their contributions gives a first cancellation angle of $\theta = \arcsin(\lambda/a)$. -2. When the gap is much wider than the wavelength, this angle shrinks toward zero, so the wave passes through nearly straight. -3. When the gap is close to the wavelength in size, the angle grows toward a right angle, so the wave spreads through nearly the whole space beyond the gap. +1. In the far field, contributions from paired parts of the slit cancel at the first minimum when their phase difference is half a cycle; the full-slit path difference is one wavelength. +2. When gap width is much larger than wavelength, the first-minimum angle is small. +3. As the ratio approaches one from below, the limiting angle approaches 90°. Beyond one, the first-minimum formula no longer has a real solution. ## Real world -### Hearing around corners -Sound's long wavelengths diffract strongly through doorways and around obstacles, letting you hear people and traffic you cannot see. +### Sound around obstacles -### Radio reception in valleys -Long-wavelength radio signals diffract around hills and buildings that would completely block a shorter-wavelength signal, which is part of why AM radio reaches into places FM cannot. +Diffraction helps sound reach regions outside a direct line of sight. Reflections and other propagation paths can also contribute. -### Diffraction gratings -Spreading light through a series of very narrow, closely spaced slits produces sharp diffraction patterns that spectrometers use to split light into its component wavelengths. +### Optical resolution -### Camera lens diffraction limits -Closing a camera's aperture down too far makes it act like a narrow gap for light, diffracting the image and softening fine detail no amount of focusing can recover. +A finite aperture produces diffraction that limits image detail. A circular lens aperture has a different pattern from the single slit modelled here. diff --git a/content/lessons/waves/diffraction/lesson.yaml b/content/lessons/waves/diffraction/lesson.yaml index eb0f905c..2f2a0768 100644 --- a/content/lessons/waves/diffraction/lesson.yaml +++ b/content/lessons/waves/diffraction/lesson.yaml @@ -37,7 +37,7 @@ variables: derivation: - \theta = \arcsin\!\left(\dfrac{\lambda}{a}\right) - a \gg \lambda \Rightarrow \theta \to 0 - - a \approx \lambda \Rightarrow \theta \to \text{90°} + - a \to \lambda^+ \Rightarrow \theta \to 90^\circ charts: [] primary: a presets: diff --git a/content/lessons/waves/doppler-effect/ar.md b/content/lessons/waves/doppler-effect/ar.md index 52b7213a..981877bd 100644 --- a/content/lessons/waves/doppler-effect/ar.md +++ b/content/lessons/waves/doppler-effect/ar.md @@ -1,68 +1,63 @@ --- title: ظاهرة دوبلر -summary: >- - صفارة الإسعاف أحدّ وهي تقترب وأثقل وهي تبتعد. بالحيلة نفسها يقيس الرادار سرعة السيارة. +summary: 'يغيّر المصدر الصوتي المتحرك المسافة بين الجبهات الموجية، فيسمع المستمع الساكن ترددًا مختلفًا.' parameters: - f: تردد الصفارة f - vs: سرعة المصدر vs + f: 'f — التردد الصادر' + vs: 'vs — سرعة المصدر بالنسبة إلى الوسط' variables: - - تردد الصفارة نفسها، بلا انزياح - - سرعة الصوت - - سرعة المصدر - - سرعة المستمع - - التردد الذي تسمعه فعلاً، مقتربًا ومبتعدًا وبشكل عام + - 'التردد الذي يصدره المصدر' + - 'سرعة الصوت في الوسط، ثابتة عند 343 m/s' + - 'سرعة المصدر بالنسبة إلى الوسط' + - 'سرعة المستمع بالنسبة إلى الوسط، وتساوي صفرًا هنا' + - 'التردد المستقبَل أمام المصدر وخلفه وفي الحالة العامة' --- ## Try it -1. راقب الدوائر تنتشر من الصفارة المتحركة. تتزاحم أمامها وتتباعد خلفها. -2. ارفع منزلق سرعة المصدر vs. يزداد التزاحم أمامها، وترتفع قراءة التردد الأمامي. -3. قارن القراءتين: التردد أمام الصفارة أعلى دائمًا من نبرتها الحقيقية، والتردد خلفها أقل دائمًا، بمقادير تكبر كلما كبرت vs. +1. اجعل f = 500 Hz وسرعة المصدر vs = 0. تساوي القراءتان 500 Hz؛ فلا يوجد تغير في التردد بسبب الحركة هنا. +2. زد vs إلى 20 m/s. تصبح القراءة أمام المصدر نحو 531 Hz وخلفه نحو 472 Hz. +3. ثبّت vs وضاعف f إلى 1000 Hz. يتضاعف الترددان المستقبَلان، لكن نسبتيهما إلى f لا تتغيران. الحلقات المتحركة توضيحية، ولا تمثل كل دورة صوتية فعلية. ## Real-life examples -1. **سيارة إسعاف تمرّ بجانبك.** عند سرعة قيادة معتادة (f = 500 هرتز، vs = 20 m/s)، ترتفع نبرة الصفارة بوضوح وهي تقترب وتنخفض بعد مرورها. -2. **بوق سيارة سريعة.** قرب سرعة الطريق السريع (f = 800 هرتز، vs = 35 m/s)، الانزياح في النبرة أوضح وأسهل سماعًا. -3. **بوق قطار بطيء.** بسرعة مشي إلى هرولة (f = 300 هرتز، vs = 5 m/s)، الانزياح صغير لكنه لا يزال قابلاً للقياس في القراءات. +1. **نغمة من مصدر متحرك.** عند f = 500 Hz وvs = 20 m/s، يستقبل مستمع ساكن أمام المصدر مباشرةً نحو 531 Hz، وآخر خلفه مباشرةً نحو 472 Hz. +2. **مصدر أسرع.** عند f = 800 Hz وvs = 35 m/s، تصبح القراءتان نحو 891 Hz أمامه و726 Hz خلفه. +3. **مصدر بطيء الحركة.** عند f = 300 Hz وvs = 5 m/s، تكون القراءتان نحو 304 Hz أمامه و296 Hz خلفه. يكون تغير التردد أصغر. ## Test yourself -1. اجعل التردد المسموع أمام المصدر أعلى بنسبة 10% من نبرته الحقيقية. -2. اجعل التردد المسموع خلف المصدر أقل بنسبة 10% من نبرته الحقيقية. -3. ادفع المصدر إلى أقصى سرعته، 40 m/s. +1. اجعل التردد أمام المصدر أعلى من التردد الصادر بنحو 10%. +2. اجعل التردد خلف المصدر أقل من التردد الصادر بنحو 10%. +3. اجعل سرعة المصدر أكبر قيمة متاحة، وهي 40 m/s. ## Intuition -قف عند الطريق وسيارة إسعاف تمرّ وصفارتها تعمل. وهي تقترب، تبدو نبرتها أعلى من نبرة الصفارة الحقيقية. في اللحظة التي تمرّ فيها بجانبك، تنخفض النبرة لتبدو أثقل من نبرتها الحقيقية. الصفارة نفسها لا تغيّر نبرتها أبدًا. ما يتغيّر هو عدد مرات وصول قمة موجة جديدة إلى أذنك، لأن سيارة الإسعاف تطارد موجات صوتها المتجهة للأمام، وتبتعد عن الموجات المتجهة للخلف. +تخيّل مصدرًا يصدر قمة موجية، ثم يتقدم قبل إصدار القمة التالية. تبدأ القمة الجديدة أقرب إلى السابقة أمامه، وأبعد عنها خلفه. مع ذلك، تنتقل كل قمة بسرعة الصوت نفسها بالنسبة إلى الهواء. يغير المصدر تباعد القمم، لا سرعة انتشارها. -أمام المصدر المتحرك، تُصدَر كل قمة موجة أقرب قليلاً إلى حيث صدرت القمة السابقة. لذلك تصل القمم إلى المستمع أكثر تكرارًا من تردد المصدر الحقيقي، فتُسمع نبرة أعلى. خلف المصدر، تُصدَر كل قمة أبعد قليلاً عن مكان سابقتها، فتصل القمم أقل تكرارًا، وتُسمع نبرة أثقل. كلما تحرك المصدر أسرع، ازداد تزاحم القمم أمامه وازداد تباعدها خلفه. هذا بالضبط ما تُظهره الدوائر على الشاشة. +يقابل المستمع الساكن أمام المصدر مباشرةً القمم المتقاربة بمعدل أعلى، فيسمع ترددًا أعلى. وخلف المصدر مباشرةً يقابل القمم المتباعدة بمعدل أقل، فيسمع ترددًا أقل. عند سكون المصدر تتساوى الترددات. يبطئ الرسم الحركة ويعرض عددًا محدودًا من الجبهات؛ لذلك يغير منزلق التردد القراءات العددية دون أن يغير الفترة بين الحلقات المرسومة. ## Formal -مصدر يتحرك بسرعة $v_s$ داخل وسط ينتقل فيه الصوت بسرعة $v$. مستمع ثابت أمام المصدر يسمع $f_1 = f\,v/(v - v_s)$، ومستمع ثابت خلفه يسمع $f_2 = f\,v/(v + v_s)$. الأول أعلى من تردد المصدر الحقيقي $f$، والثاني أثقل منه. +لسرعة صوت $v=343\ \mathrm{m/s}$ وتردد صادر f وسرعة مصدر $0\le v_s- - A siren sounds higher-pitched as it races toward you and lower-pitched as - it speeds away — the same shift that lets a radar gun read a car's speed. +summary: 'A moving sound source changes the spacing of arriving wavefronts, so a stationary listener can hear a different frequency.' parameters: - f: siren frequency f - vs: source speed vs + f: 'f — emitted frequency' + vs: 'vs — source speed through the medium' variables: - - the siren's own frequency, un-shifted - - the speed of sound - - the source's speed - - the observer's speed - - the frequency you actually hear, approaching, receding, and in general + - 'frequency emitted by the source' + - 'sound speed in the medium, fixed at 343 m/s' + - 'source speed relative to the medium' + - 'observer speed relative to the medium; zero here' + - 'forward, rear and general received frequencies' --- ## Try it -1. Watch the circles spread out from the moving siren. Ahead of it they crowd together; behind it they spread apart. -2. Raise the source speed slider vs. The crowding ahead gets tighter, and the front readout frequency climbs higher. -3. Compare the two readouts: the frequency ahead of the siren is always higher than its true pitch, and the frequency behind it is always lower — by amounts that grow as vs grows. +1. Set f = 500 Hz and source speed vs = 0. Both listener readouts equal 500 Hz: no motion means no shift here. +2. Increase vs to 20 m/s. The forward readout becomes about 531 Hz and the rear readout about 472 Hz. +3. Keep vs fixed and double f to 1000 Hz. Both received frequencies double, but their ratios to f stay unchanged. The animated rings are illustrative and do not show each actual sound cycle. ## Real-life examples -1. **An ambulance passing by.** At a typical driving speed (f = 500 Hz, vs = 20 m/s), the siren's pitch noticeably rises as it approaches and drops as it passes. -2. **A fast car horn.** Near highway speed (f = 800 Hz, vs = 35 m/s), the pitch shift is sharper and easier to hear. -3. **A slow train horn.** At walking-to-jogging speed (f = 300 Hz, vs = 5 m/s), the shift is small but still measurable in the readouts. +1. **A moving tone.** At f = 500 Hz and vs = 20 m/s, a stationary listener directly ahead receives about 531 Hz; one directly behind receives about 472 Hz. +2. **A faster source.** At f = 800 Hz and vs = 35 m/s, the values are about 891 Hz ahead and 726 Hz behind. +3. **A slowly moving source.** At f = 300 Hz and vs = 5 m/s, the values are about 304 Hz ahead and 296 Hz behind. The shift is smaller. ## Test yourself -1. Make the frequency heard ahead of the source 10% higher than its true pitch. -2. Make the frequency heard behind the source 10% lower than its true pitch. -3. Push the source to its top speed, 40 m/s. +1. Make the forward frequency about 10% greater than the emitted frequency. +2. Make the rear frequency about 10% less than the emitted frequency. +3. Set the source to the maximum available speed, 40 m/s. ## Intuition -Stand by the road as an ambulance drives past with its siren on: as it approaches, the pitch sounds higher than the siren really is; the instant it passes you, the pitch drops to sound lower than its true note. The siren itself never changes pitch — what changes is how often each new wave crest reaches your ear, because the ambulance is chasing its own sound waves forward and running away from the ones behind it. +Suppose a source emits one crest and moves forward before emitting the next. The new crest starts closer to the previous crest in front, but farther from the previous crest behind. Each crest still travels at the sound speed relative to the air. The source changes their spacing, not that propagation speed. -Ahead of a moving source, each wave crest is emitted a little closer to where the last one was, so crests arrive at a listener more often than the source's true frequency — a higher pitch. Behind the source, each crest is emitted a little farther from where the last one was, so crests arrive less often — a lower pitch. The faster the source moves, the more squeezed the crests ahead become and the more stretched out those behind become, which is exactly what the circles on screen show. +A stationary listener directly ahead encounters the compressed crests more often and hears a higher frequency. A listener directly behind encounters the wider spacing and hears a lower frequency. At zero source speed the frequencies agree. The drawing slows and sparsely samples the wavefronts; changing the frequency control changes the numerical readouts without changing the illustrated emission interval. ## Formal -For a source moving at speed $v_s$ through a medium where sound travels at speed $v$, a stationary listener ahead of it hears $f_1 = f\,v/(v - v_s)$, and one behind it hears $f_2 = f\,v/(v + v_s)$, both higher and lower respectively than the source's true frequency $f$. +For sound speed $v=343\ \mathrm{m/s}$, emitted frequency f and source speed $0\le v_s- - نغمتان متقاربتان تعلوان وتخفتان معًا بإيقاع مسموع. بهذه الضربات يدوزن الموسيقيون - آلاتهم. +summary: 'اجمع اهتزازين، ولاحظ كيف يجعل فرق صغير بين تردديهما السعة ترتفع وتنخفض ببطء.' parameters: - f1: التردد f1 - f2: التردد f2 - x: الزمن t + f1: 'f1 — التردد الأول' + f2: 'f2 — التردد الثاني' + x: 'x — زمن المراقبة' variables: - - الترددان المنفردان اللذان يُجمعان - - تردد الضربات — عدد مرات تصاعد السعة المجمّعة + - 'ترددا الاهتزازين ذوي السعة الواحدة' + - 'القيمة المطلقة لفرق التردد، وهي معدل الخفقان للترددات المتقاربة' --- ## Try it -1. راقب المنحنى. يهتز بسرعة، بينما يتصاعد ارتفاعه العام وينخفض ببطء. -2. ارفع منزلق f2 مبتعدًا عن f1. يتسارع التصاعد. -3. أعد f2 قريبًا من f1. يتباطأ التصاعد حتى يكاد يتوقف. تبدو النغمتان الآن نغمة واحدة. +1. اجعل f1 = 8 Hz وf2 = 9 Hz. يعرض الرسم مجموع الإزاحتين خلال أربع ثوانٍ، ويتكرر غلاف السعة كل ثانية. +2. اجعل f2 = 8.2 Hz. يتكرر الغلاف كل 5 s، وهي مدة أطول من نافذة الزمن المعروضة. هذه الترددات المنخفضة تسهّل قراءة الرسم؛ وليست نغمات غيتار معتادة. +3. اجعل الترددين 8 Hz. تتجمع الموجتان المتفقتان في الطور في موجة جيبية سعتها 2. حرّك x لفحص لحظات مختلفة؛ إذ يمثل x الزمن في هذا الدرس. ## Real-life examples -1. **ضبط الغيتار.** وتران متقاربان في الضبط (f1 = 8، f2 = 8.2) يتصاعد صوتهما ويخفت ببطء. يستمع عازف الغيتار إلى هذا، ويشدّ الوتر حتى يتوقف التصاعد. -2. **نغمتا بيانو غير متوافقتين.** فرق أكبر بين الترددين (f1 = 6، f2 = 6.8) ينبض بسرعة أوضح. لهذا يبدو الصوت أخشن، وأوضح في عدم توافقه. -3. **مزج إشارتي راديو.** يجمع المهندسون تردد محطة مع تردد مرجعي بعيد عنه (f1 = 5، f2 = 11). ينتج هذا نبضًا سريعًا يسهل معالجته إلكترونيًا. +1. **فرق صغير.** الفرق بين 8 و8.2 Hz هو 0.2 Hz، فتستغرق دورة الخفقان 5 s. +2. **فرق أكبر.** الفرق بين 6 و6.8 Hz هو 0.8 Hz، فتستغرق دورة الخفقان 1.25 s. +3. **ترددان متباعدان.** الفرق بين 5 و11 Hz هو 6 Hz. تبقى متطابقة الجمع صحيحة، لكن الشكل لا يعود غلافًا بطيئًا واضحًا يحيط باهتزاز أسرع منه بكثير. ## Test yourself -1. اجعل النغمتين تنبضان مرة واحدة بالضبط كل ثانية (تردد نبض 1 Hz). -2. قرِّب الترددين حتى يكاد النبض يختفي، بفارق أقل من 0.05 Hz. -3. اجعل النبض سريعًا، بمعدل 5 نبضات في الثانية على الأقل. +1. اختر ترددين الفرق بينهما 1 Hz. +2. اجعل الفرق أقل من 0.05 Hz؛ وبخطوات المنزلقات المتاحة، اجعل الترددين متساويين. +3. اجعل الفرق بينهما 5 Hz على الأقل. ## Intuition -اقرع وترَي غيتار مضبوطين قرب النغمة نفسها، لكن ليس بالضبط. ليكن ترددهما 220 و224 اهتزازة في الثانية. لن تسمع نغمة ثابتة واحدة. بدلًا من ذلك يتصاعد الصوت، ثم يخفت تقريبًا إلى الصمت، ثم يتصاعد من جديد، أربع مرات كل ثانية. الرسم على الشاشة يُظهر الأثر نفسه بأرقام أبطأ وأسهل للمشاهدة. المنحنى الأزرق المتموّج هو مجموع موجتين بتردد $f_1$ و$f_2$، تبدآن عند 8 و9، أي 8 و9 دورة في الثانية. راقب ارتفاع المنحنى وهو يعلو ثم يهبط داخل مخطط عام بطيء يشبه التنفس. هذا المخطط هو النبض. +تتجه إزاحتا اهتزازين أحيانًا إلى الجهة نفسها وأحيانًا إلى جهتين متعاكستين. إذا تقارب تردداهما، تغير التوافق بينهما ببطء: يقوّي أحدهما الآخر، ثم يلغيه جزئيًا، ثم يقوّيه من جديد. تكبر سعة المجموع وتصغر رغم ثبات سعة كل موجة بمفردها. -اسحب المنزلق $f_2$ مبتعدًا عن $f_1$، فيتسارع هذا التصاعد. قرّبهما من بعضهما، فيتباطأ حتى يكاد يتوقف. اضبط $f_1$ على 8 و$f_2$ على 9، وعُدّ. تتكرر دورة العلو والخفوت مرة كل ثانية، بقدر الفارق بينهما بالضبط، وهو 1. هذا الفارق، $|f_1-f_2|$، يُسمّى تردد النبض. لا يهمه ارتفاع النغمتين أو انخفاضهما، بل فقط المسافة بينهما. +المنحنى الأزرق هو مجموع الإزاحتين بإشارتيهما عند موضع مراقبة واحد، وليس تسجيلًا صوتيًا. يصف الغلاف أكبر مقدار للاهتزازات السريعة. مع تساوي السعتين وصغر فرق التردد، ينتج الخفقان. مثلًا، تعطي نغمتان مسموعتان بترددَي 220 و224 Hz خفقانًا بمعدل 4 Hz في هذا النموذج المثالي. يستخدم الرسم ترددات أقل حتى يظهر الحساب نفسه بوضوح. ## Formal -يتحقّق $\sin(2\pi f_1 x)+\sin(2\pi f_2 x) = 2\cos(2\pi\tfrac{f_1-f_2}{2}x)\sin(2\pi\tfrac{f_1+f_2}{2}x)$. هذا اهتزاز سريع عند متوسط التردد، مُطاف السعة بجيب تمام بطيء. +إذا رمزنا للزمن بـx كما في الرسم، فإن $s(x)=\sin(2\pi f_1x)+\sin(2\pi f_2x)$. تعطي متطابقة الجمع $s(x)=2\cos[\pi(f_1-f_2)x]\sin[\pi(f_1+f_2)x]$. سعة كل مركبة هي 1. -يتكرر مغلّف السعة، $|2\cos(2\pi\tfrac{f_1-f_2}{2}x)|$، بتردد $|f_1-f_2|$. يحدث هذا مرتين خلال كل دور للمغلّف، لأنه قيمة مطلقة. +غلاف السعة غير السالب هو $E(x)=2|\cos[\pi(f_1-f_2)x]|$. عندما يختلف الترددان، يكون زمنه الدوري $T_b=1/|f_1-f_2|$، ومنه تردد الخفقان $f_b=|f_1-f_2|$. وعند تساوي الترددين واتفاق الطور كما في العرض، يبقى الغلاف ثابتًا عند 2. ## Advanced -الأذن تستجيب لتضمين سعة المغلّف، لا للطور الكامن وراءه. لهذا فإن معدل النبض المُدرَك هو $|f_1-f_2|$، حتى مع أن «تردد» مغلّف جيب التمام نفسه هو $(f_1-f_2)/2$. يأتي عامل الاثنين من عبور المغلّف للصفر، أي نبضة، في نصفَي دورته الموجب والسالب كليهما. +يغير عامل جيب التمام إشارته، لكن غلاف السعة يستخدم قيمته المطلقة. لذلك تعطي قممه الموجبة والسالبة أقصى سعة، بينما تعطي نقاط عبوره للصفر أدنى سعة. يبقي الجمع الخطي الترددين الأصليين وحدهما في الطيف. أما إنتاج مركبة مستقلة بتردد الفرق فيحتاج إلى عملية غير خطية، مثل الضرب أو الكشف. في العرض الثلاثي الأبعاد، يشمل نموذجا مصدرَي التموج تأخر الانتقال وتغير السعة مع المسافة؛ لذا لا يمثل السطح منحنى الزمن نفسه عند كل نقطة. ## Derivation -1. استخدم متطابقة تحويل المجموع إلى جداء. -2. عوّض بطوري الموجتين. -3. احصل على مغلّف بطيء عند تردد الفرق، مضروبًا في حامل سريع عند متوسط التردد. +1. نبدأ بالمتطابقة التي تحول مجموع جيبين إلى حاصل ضرب جيب في جيب تمام. +2. نعوض بطور كل اهتزاز. +3. يحدد متوسط الترددين عامل الجيب، بينما يحدد الفرق بينهما تكرار غلاف السعة. ## Real world -### ضبط الآلات الموسيقية -يضبط الموسيقيون آلاتهم بالاستماع إلى النبضات بين نغمتين متقاربتين. يعدّلونهما حتى يتباطأ النبض إلى الصفر. +### الضبط بالخفقان -### التخفيض الترددي في الراديو -يمزج المهندسون ترددين إذاعيين لإنتاج ترددات نبض. تُستخدم هذه لنقل الإشارات إلى تردد أنسب للمعالجة. +قد تنتج النغمات المتقاربة خفقانًا مسموعًا. يدل بطؤه على صغر فرق التردد، ويزيل تساوي الترددين هذا السبب للخفقان. -### رادار دوبلر -تكشف ترددات النبض بين الإشارة المرسلة والمنعكسة سرعة الهدف المتحرك. +### المزج الإلكتروني -### النشاز الصوتي -النبض السريع والحاد بين ترددات متقاربة وغير متوافقة جزء من سبب سماع بعض الفواصل الموسيقية نشازًا. +يمكن للمزج غير الخطي توليد ترددَي المجموع والفرق. وهذا يختلف عن مجرد جمع إشارتين كما يفعل الرسم الرئيسي. diff --git a/content/lessons/waves/interference-and-beats/en.md b/content/lessons/waves/interference-and-beats/en.md index 47dde63e..44da32f0 100644 --- a/content/lessons/waves/interference-and-beats/en.md +++ b/content/lessons/waves/interference-and-beats/en.md @@ -1,68 +1,61 @@ --- title: Interference and beats -summary: >- - Two musical notes that are almost — but not quite — the same pitch don't - sound steady together; they pulse louder and softer in a rhythm you can - hear, and this lesson shows why. +summary: 'Add two oscillations and see how a small frequency difference produces a slowly changing amplitude.' parameters: - f1: frequency f1 - f2: frequency f2 - x: time t + f1: 'f1 — first frequency' + f2: 'f2 — second frequency' + x: 'x — observation time' variables: - - the two individual frequencies being combined - - the beat frequency — how often the combined amplitude swells + - 'frequencies of the two unit-amplitude oscillations' + - 'absolute frequency difference, the beat rate for nearby frequencies' --- ## Try it -1. Watch the curve: it wiggles quickly while its overall height swells and shrinks slowly. -2. Raise the slider f2 away from f1. The swelling speeds up. -3. Bring f2 back close to f1. The swelling slows almost to a stop — the two notes now sound like one. +1. Set f1 = 8 Hz and f2 = 9 Hz. The graph shows the summed displacement over four seconds, with an amplitude envelope that repeats every second. +2. Set f2 = 8.2 Hz. The envelope repeats every 5 s, longer than the visible time window. These low frequencies make the graph readable; they are not ordinary guitar notes. +3. Set both frequencies to 8 Hz. The equal-phase waves add to one sine with amplitude 2. Move x to inspect different times; x is time in this lesson. ## Real-life examples -1. **Tuning a guitar.** Two strings almost in tune (f1 = 8, f2 = 8.2) swell and fade slowly — a guitarist listens for this and tightens the string until it stops. -2. **Two out-of-tune piano notes.** A bigger mismatch (f1 = 6, f2 = 6.8) beats noticeably faster, which is why it sounds harsher and more obviously "off". -3. **Mixing two radio signals.** Engineers combine a station's frequency with a reference frequency far away (f1 = 5, f2 = 11) to produce a fast beat that is easier to process electronically. +1. **A small mismatch.** Frequencies 8 and 8.2 Hz differ by 0.2 Hz, giving a beat period of 5 s. +2. **A larger mismatch.** Frequencies 6 and 6.8 Hz differ by 0.8 Hz, giving a beat period of 1.25 s. +3. **Widely separated frequencies.** Frequencies 5 and 11 Hz differ by 6 Hz. The sum identity still holds, but the shape no longer has a clearly slow envelope around a much faster oscillation. ## Test yourself -1. Make the two notes beat exactly once per second (a beat frequency of 1 Hz). -2. Tune the two frequencies so close together that the beating nearly disappears (within 0.05 Hz). -3. Make the beating fast: at least 5 beats per second. +1. Choose frequencies whose difference is 1 Hz. +2. Bring the frequencies within 0.05 Hz of each other; with these slider steps, set them equal. +3. Make their difference at least 5 Hz. ## Intuition -Pluck two guitar strings tuned almost, but not quite, to the same note — say 220 and 224 vibrations per second — and you do not hear one steady tone. Instead the sound swells louder, fades to almost silence, then swells again, four times every second. The graph on screen shows this same effect with slower, easier-to-see numbers: the wiggly blue curve is the sum of two waves at frequencies $f_1$ and $f_2$ (starting at 8 and 9, meaning 8 and 9 cycles per second). Watch the curve's height rise and fall inside a slow, breathing outline — that outline is the beat. +Two oscillations sometimes pull in the same direction and sometimes in opposite directions. When their frequencies are close, their relative timing changes slowly: they reinforce, then partly cancel, then reinforce again. The amplitude grows and shrinks even though each individual wave keeps a constant amplitude. -Drag the slider $f_2$ away from $f_1$ and that swelling speeds up; bring them close together and it slows down almost to a standstill. Set $f_1$ to 8 and $f_2$ to 9 and count: the loud-soft cycle happens once every second, matching the gap between them, 1. This gap, $|f_1-f_2|$, is called the beat frequency, and it does not care how high or low the two notes are — only how far apart they sit. +The blue curve is the signed sum at one observation point, not a sound recording. Its envelope describes the largest magnitude of the rapid oscillations. For equal amplitudes and a small frequency difference, that envelope produces beats. For example, audible tones at 220 and 224 Hz would have a 4 Hz beat rate in this ideal model. The graph uses lower frequencies to show the same arithmetic clearly. ## Formal -$\sin(2\pi f_1 x)+\sin(2\pi f_2 x) = 2\cos(2\pi\tfrac{f_1-f_2}{2}x)\sin(2\pi\tfrac{f_1+f_2}{2}x)$; a fast oscillation at the average frequency, amplitude-modulated by a slow cosine. +Writing time as x to match the graph, $s(x)=\sin(2\pi f_1x)+\sin(2\pi f_2x)$. The sum identity gives $s(x)=2\cos[\pi(f_1-f_2)x]\sin[\pi(f_1+f_2)x]$. Each component has amplitude 1. -The amplitude envelope, $|2\cos(2\pi\tfrac{f_1-f_2}{2}x)|$, repeats with frequency $|f_1-f_2|$ — twice per envelope period since it is an absolute value. +The nonnegative amplitude envelope is $E(x)=2|\cos[\pi(f_1-f_2)x]|$. For unequal frequencies its period is $T_b=1/|f_1-f_2|$, so the beat frequency is $f_b=|f_1-f_2|$. Equal frequencies with the displayed equal phase give a constant envelope of 2. ## Advanced -Because the ear responds to the envelope's amplitude modulation, not the underlying phase, the perceived beat rate is $|f_1-f_2|$ even though the cosine envelope itself has "frequency" $(f_1-f_2)/2$ — the factor of two comes from the envelope crossing zero (a beat) on both its positive and negative half-cycles. +The cosine factor changes sign, but the amplitude envelope uses its absolute value. Both positive and negative cosine peaks therefore correspond to maximum amplitude; zero crossings correspond to minimum amplitude. Linear addition leaves only the two original frequencies in the spectrum. Producing a separate difference-frequency component requires a nonlinear operation such as multiplication or detection. In 3D, two schematic ripple sources include travel delays and distance-dependent amplitudes, so the surface is not the same time trace at every point. ## Derivation -1. Sum-to-product trigonometric identity. -2. Substitute the two wave phases. -3. A slow envelope at the difference frequency times a fast carrier at the average frequency. +1. Start with the identity that rewrites a sum of two sines as a sine times a cosine. +2. Substitute the phase of each oscillation. +3. The average frequency sets the sine factor, while the frequency difference sets the repeating amplitude envelope. ## Real world -### Tuning instruments -Musicians tune by listening for beats between two nearly matched notes and adjusting until the beating slows to zero. +### Tuning by beats -### Radio heterodyning -Mixing two radio frequencies produces beat frequencies used to shift signals to a more convenient frequency for processing. +Nearly matching tones can produce audible beats. Slower beats indicate a smaller frequency difference; equal frequency removes this source of beating. -### Doppler radar -Beat frequencies between transmitted and reflected signals reveal the speed of a moving target. +### Electronic mixing -### Acoustic dissonance -Fast, harsh beating between close, out-of-tune frequencies is part of why certain intervals sound dissonant. +A nonlinear mixer can generate sum and difference frequencies. This differs from simply adding the two signals as the main graph does. 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/lessons/waves/reflection-and-echoes/ar.md b/content/lessons/waves/reflection-and-echoes/ar.md index 69ed8529..d6dbd909 100644 --- a/content/lessons/waves/reflection-and-echoes/ar.md +++ b/content/lessons/waves/reflection-and-echoes/ar.md @@ -1,67 +1,62 @@ --- title: الانعكاس والصدى -summary: >- - النبضة ترتد عن الجدار، وزمن الرحلة ذهابًا وإيابًا يخبرك بُعده. هذه فكرة السونار. +summary: 'يقطع الصدى رحلة ذهاب وعودة. احسب زمنها، وميّز هذا الحساب عن طريقة انعكاس نبضة على حبل.' parameters: - d: البُعد عن الجدار d - v: سرعة الموجة v - endType: نوع الطرف + d: 'd — المسافة في اتجاه واحد' + v: 'v — سرعة الانتشار' + endType: 'الطرف — 0: ثابت، 1: حر' variables: - - البُعد عن الجدار العاكس - - سرعة الموجة - - تأخير الصدى ذهابًا وإيابًا + - 'المسافة إلى السطح العاكس في اتجاه واحد' + - 'سرعة الانتشار في الوسط' + - 'زمن رحلة الذهاب والعودة' --- ## Try it -1. راقب النبضة تنتقل يمينًا، تصطدم بالجدار، وترتدّ نحو المصدر. اقرأ تأخير الصدى في القراءات. -2. حرّك منزلق البُعد d إلى الأبعد. تستغرق النبضة وقتًا أطول للعودة، ويزداد تأخير الصدى. -3. بدّل منزلق نوع الطرف بين 0 و1. عند طرف ثابت، أي جدار صلب، تنقلب النبضة رأسًا على عقب عند ارتدادها. عند طرف حر ترتدّ بالاتجاه نفسه. التوقيت يبقى متطابقًا في الحالتين. +1. اجعل d = 50 m وv = 340 m/s. زمن الذهاب والعودة المحسوب نحو 0.294 s. +2. ضاعف d إلى 100 m. يتضاعف الزمن المحسوب. تبقى وتيرة الرسوم المتحركة ثابتة للتوضيح؛ اقرأ الزمن المعروض بدلًا من توقيت الحركة على الشاشة. +3. بدّل endType بين 0 للطرف الثابت و1 للطرف الحر. تنقلب إزاحة نبضة الحبل عند انعكاسها عن الطرف الثابت، ولا تنقلب عند الطرف الحر. زمن الانتقال المحسوب لا يتغير. ## Real-life examples -1. **الصياح عند جرف صخري.** واقفًا على بُعد 34 m من واجهة صخرية (d = 34، v = 340 m/s)، يعود صياحك صدى واضحًا ومنفصلاً بعد نحو 0.2 ثانية. -2. **نبضة سونار نحو قاع البحر.** نبضة سونار مرسلة مباشرة إلى قاع على عمق 750 m في ماء البحر (d = 750، v = 1500 m/s) تستغرق ثانية كاملة للعودة، فتعطي عمق الماء. -3. **نداء خفاش قرب باب مفتوح.** قرب حد ليّن ومفتوح (d = 5، v = 340 m/s، طرف حر) يعبر معظم النبضة بدل أن ترتدّ بقوة، وما يعود منها قليل يعود بالاتجاه نفسه. +1. **سطح عاكس يبعد 34 m.** عند v = 340 m/s، تقطع النبضة 68 m إجمالًا وتعود بعد 0.2 s. أما سماع الصوت كصدى منفصل فيعتمد أيضًا على طبيعة الصوت والمكان. +2. **سطح عاكس تحت الماء.** عند d = 750 m وبافتراض سرعة ثابتة مقدارها 1500 m/s، تستغرق رحلة الذهاب والعودة ثانية واحدة. +3. **طرف حر مثالي.** عند d = 5 m وv = 340 m/s، يكون زمن العودة نحو 0.0294 s. تعود نبضة إزاحة الحبل دون انقلاب؛ ولا يمثل هذا الإعداد مرور الصوت عبر باب مفتوح. ## Test yourself -1. اضبط صدى يستغرق 0.5 ثانية بالضبط ليعود. -2. اضبط صدى يستغرق ثانيتين بالضبط ليعود. -3. بدّل إلى طرف حرّ مع جدار أقرب من 10 m. +1. اختر d وv ليكون زمن الذهاب والعودة 0.5 s. +2. اخترهما ليكون الزمن 2 s. +3. اختر طرفًا حرًا ومسافة أقل من 10 m. ## Intuition -اصرخ نحو جدار بعيد. بعد لحظة قصيرة تسمع صراخك نفسه يعود، وهذا هو الصدى. لم يختفِ الصوت عند وصوله الجدار، بل ارتدّ وأعاد الطريق نفسه إلى أذنيك. التأخير الذي تسمعه هو ببساطة زمن الرحلة ذهابًا وإيابًا. الرسم على الشاشة يُظهر هذا بالضبط. تغادر نبضة المصدر، وتصل الجدار، وتعود، وتوقّت القراءة الرحلة كلها. +تخيل أنك ترسل نبضة نحو سطح يبعد 50 مترًا. حتى تعود إليك، تقطع 50 مترًا في الذهاب ومثلها في العودة. إذن الزمن المقاس يخص رحلة طولها 100 متر. إذا نسيت رحلة العودة، فستحسب بُعد السطح ضعف بُعده الحقيقي. -لا يبدو كل ارتداد متشابهًا. عند جدار صلب، وهو ما يسميه الفيزيائيون طرفًا ثابتًا، تعود النبضة مقلوبة رأسًا على عقب. عند حد ليّن أو مفتوح، وهو طرف حر، تعود النبضة بالاتجاه نفسه. في الحالتين لا يتغير التوقيت. ما يهم لقياس المسافة هو مدة الرحلة ذهابًا وإيابًا فقط، لا اتجاه انقلاب النبضة عند عودتها. +يمثل شكل النبضة إزاحة حبل مثالي. الطرف الثابت لا يتحرك، لذا تلغي الإزاحة المنعكسة الإزاحة الواردة عنده، وتعود النبضة مقلوبة. أما الطرف الحر المثالي فيعكسها دون هذا الانقلاب. يعرض الرسم مسار الرحلة بصورة مبسطة، ولا يرسم التداخل الكامل بين النبضتين عند الطرف. ضغط الصوت وإزاحة الحبل كميتان مختلفتان؛ لذلك لا نعمم قاعدة الإشارة هذه على كل انعكاس موجي. ## Formal -نبضة تنتقل بسرعة $v$ تقطع المسافة $d$ إلى العاكس، ثم تقطع المسافة $d$ نفسها في طريق العودة. لذلك يكون تأخير الصدى ذهابًا وإيابًا $t_{echo} = 2d/v$. قياس هذا التأخير مع معرفة سرعة الموجة يكفي لاستنتاج المسافة، $d = v\,t_{echo}/2$، دون الحاجة إلى الوصول إلى العاكس مباشرة. +لمصدر وسطح عاكس ساكنين تفصل بينهما مسافة d في وسط منتظم، يكون طول رحلة الذهاب والعودة $2d$. عند سرعة ثابتة v، نحصل على $t_{echo}=2d/v$، ومنه بُعد السطح $d=vt_{echo}/2$. -الطرف الثابت يُجبر الوسط على البقاء ساكنًا عند الحد تمامًا، فتنقلب إشارة النبضة المرتدة. الطرف الحر يترك الحد يتحرك بحرية، فتبقى إشارة النبضة المرتدة كما هي. لا يغيّر أي من الشرطين $v$ ولا زمن الانتقال، بل يغيّر شكل ما يعود فقط. +لإزاحة مستعرضة على وتر مثالي، يفرض الطرف الثابت الشرط $y=0$ عند النهاية، ويفرض الطرف الحر المثالي الشرط $\partial y/\partial x=0$. ينتج عنهما انعكاس بإشارة معاكسة وبالإشارة نفسها، على الترتيب. ولا يغيّر هذان الشرطان زمن الانتقال عبر الوتر ما دامت خصائصه ثابتة. ## Advanced -ترسل أنظمة السونار والرادار الحقيقية نبضة قصيرة وحادة بدل نقطة واحدة. هذا يتيح توقيت النبضة العائدة بدقة مقابل لحظة إرسال معروفة. كلما كانت النبضة أحدّ، قلّ تداخل أصداء عاكسَين متقاربَين وتشوّشهما معًا. هذا يضع حدًّا لأقرب مسافة بين جسمين ما زالا يمكن تمييزهما. +يجب تحديد الكمية التي ندرس انعكاسها. فالجدار الصلب المثالي، مثلًا، يعكس اضطراب ضغط الصوت دون قلب إشارة الضغط، مع أن حركة جسيمات الوسط العمودية على الجدار يجب أن تتلاشى عنده. وللنبضة مدة زمنية أيضًا، لذلك قد تتداخل أصداء أسطح متقاربة. يفترض حساب الزمن البسيط عودة يمكن تمييزها وسرعة انتشار واحدة معلومة. انظر [شرح الانعكاس في HyperPhysics](https://www.hyperphysics.phy-astr.gsu.edu/hbase/Sound/reflec.html). ## Derivation -1. تستغرق النبضة زمنًا $d/v$ للوصول إلى العاكس. -2. تستغرق الزمن نفسه $d/v$ للعودة. -3. جمع المرحلتين يعطي إجمالي تأخير الصدى ذهابًا وإيابًا، $t_{echo} = 2d/v$. +1. نقسم مسافة الذهاب على السرعة: $d/v$. +2. مسافة العودة وسرعتها مساويتان لما في الذهاب، لذا يستغرق الرجوع أيضًا $d/v$. +3. نجمع الزمنين فنحصل على $t_{echo} = 2d/v$. ## Real world -### الخفافيش -تُصدر الخفافيش نداءات فوق صوتية وتوقّت أصداءها المرتدة عن الحشرات والعوائق لبناء صورة متحركة لمحيطها في ظلام تام. +### قياس البُعد بالصدى -### السونار -ترسل السفن والغواصات نبضات صوتية عبر الماء وتوقّت أصداءها عن قاع البحر أو سفن أخرى لقياس العمق والمسافة. +يقدّر السونار بُعد السطح العاكس من زمن رحلة النبضة الصوتية ذهابًا وإيابًا. يحتاج تحويل الزمن إلى مسافة إلى تقدير مناسب لسرعة الصوت. -### الموجات فوق الصوتية الطبية -يرسل مسبار الموجات فوق الصوتية نبضات صوتية داخل الجسم ويوقّت أصداءها المرتدة عن حدود الأنسجة الداخلية لبناء صورة. +### موجات الوتر -### صوتيات القاعات الموسيقية -يصمم المهندسون المعماريون الجدران والأسقف للتحكم في ارتداد الصوت داخل القاعة، ويتجنبون أصداء تصل متأخرة بما يكفي لتُسمع تكرارًا منفصلاً ومزعجًا. +توضح نبضة على وتر مشدود الفرق بين الطرف الثابت والطرف الحر. إزاحتها الرأسية ليست رسمًا لضغط الصوت. diff --git a/content/lessons/waves/reflection-and-echoes/en.md b/content/lessons/waves/reflection-and-echoes/en.md index 4ac85cf8..4ddfab89 100644 --- a/content/lessons/waves/reflection-and-echoes/en.md +++ b/content/lessons/waves/reflection-and-echoes/en.md @@ -1,69 +1,62 @@ --- title: Reflection and echoes -summary: >- - A pulse that hits a wall bounces back, and timing how long the round trip - takes tells you how far away the wall is — the idea behind echoes, sonar - and a bat's built-in radar. +summary: 'An echo makes a round trip. Calculate its delay, and distinguish that timing from the way a rope pulse reflects.' parameters: - d: distance to the wall d - v: speed of the wave v - endType: end type + d: 'd — one-way distance' + v: 'v — propagation speed' + endType: 'end — 0: fixed, 1: free' variables: - - distance to the reflecting wall - - speed of the wave - - the round-trip echo delay + - 'one-way distance to the reflector' + - 'propagation speed in the medium' + - 'round-trip travel time' --- ## Try it -1. Watch the pulse travel right, hit the wall, and bounce back toward the source. Read the echo delay in the readouts. -2. Drag the distance slider d further out. The pulse takes longer to return, and the echo delay grows. -3. Switch the end type slider between 0 and 1. At a fixed (hard) end the pulse flips upside down when it bounces; at a free end it bounces back the same way up — the timing is identical either way. +1. Set d = 50 m and v = 340 m/s. The calculated round-trip delay is about 0.294 s. +2. Double d to 100 m. The delay doubles. The animation keeps a fixed demonstration pace; read the calculated time rather than timing the animation. +3. Switch endType between 0 (fixed) and 1 (free). The returning rope-displacement pulse changes sign at a fixed end, but not at a free end. The calculated travel time is unchanged. ## Real-life examples -1. **Shouting at a cliff.** Standing 34 m from a rock face (d = 34, v = 340 m/s), your shout returns as a clear, separate echo about 0.2 seconds later. -2. **Sonar pinging the seafloor.** A sonar pulse sent straight down to a 750 m seafloor in seawater (d = 750, v = 1500 m/s) takes a full second to return, giving the water's depth. -3. **A bat's call near an open doorway.** Close to a soft, open boundary (d = 5, v = 340 m/s, free end) most of the pulse passes through rather than reflecting strongly, and what little returns comes back the same way up. +1. **A reflector 34 m away.** With v = 340 m/s, the pulse travels 68 m in total and returns after 0.2 s. Whether a sound is heard as a separate echo also depends on the sound and surroundings. +2. **An underwater reflector.** With d = 750 m and an assumed constant speed of 1500 m/s, the round trip takes 1 s. +3. **An ideal free end.** With d = 5 m and v = 340 m/s, return time is about 0.0294 s. A rope-displacement pulse returns without inversion; this preset does not model sound passing through a doorway. ## Test yourself -1. Set up an echo that takes exactly 0.5 seconds to return. -2. Set up an echo that takes exactly 2 seconds to return. -3. Switch to a free end with the wall closer than 10 m away. +1. Choose d and v for a round-trip time of 0.5 s. +2. Choose them for a round-trip time of 2 s. +3. Select a free end and a distance less than 10 m. ## Intuition -Shout toward a distant wall and, a short moment later, you hear your own shout come back — an echo. The sound did not vanish when it reached the wall; it bounced, retracing its path back to your ears, and the delay you hear is just the time the round trip took. The picture on screen shows exactly this: a pulse leaves the source, travels to the wall, and returns, with a readout timing the whole trip. +Imagine sending a pulse toward a reflector 50 metres away. To return to you it must cover 50 metres out and 50 metres back. The measured delay therefore belongs to a 100-metre journey. Forgetting the return leg would make your estimated distance twice as large. -Not every reflection looks the same. Off a hard wall — what physicists call a fixed end — the returning pulse comes back flipped upside down. Off a soft or open boundary — a free end — it comes back the same way up. Either way, the timing is unchanged: what matters for measuring distance is only how long the round trip took, not which way the pulse is flipped when it returns. +The pulse shape illustrates displacement on an ideal rope. A fixed end cannot move, so the reflected displacement cancels the incident displacement at the end. This produces an inverted reflected pulse. An ideal free end reflects without that inversion. The illustration shows the trip schematically; it does not show the full overlap of the two pulses at the boundary. Sound pressure and rope displacement are different quantities, so do not apply this sign rule to every wave reflection. ## Formal -A pulse travelling at speed $v$ covers the distance $d$ to a reflector and the same distance $d$ back, so the round-trip echo delay is $t_{echo} = 2d/v$. Measuring that delay and knowing the wave's speed is enough to recover the distance, $d = v\,t_{echo}/2$, without ever having to reach the reflector directly. +For a stationary source and reflector separated by d in a uniform medium, the round-trip path is $2d$. At constant speed v, $t_{echo}=2d/v$, so the reflector distance is $d=vt_{echo}/2$. -A fixed end forces the medium to stay still exactly at the boundary, which flips the reflected pulse's sign; a free end lets the boundary move freely, which keeps the reflected pulse's sign the same. Neither condition changes $v$ or the travel time, only the shape of what comes back. +For transverse displacement on an ideal string, a fixed boundary requires $y=0$ at the end; an ideal free boundary requires $\partial y/\partial x=0$. These conditions give opposite-sign and same-sign reflected displacement pulses, respectively. They do not change the travel time through the unchanged string. ## Advanced -Real sonar and radar systems send a short, sharp pulse rather than a single point so that the returning echo can be timed precisely against a known transmission moment; the sharper the pulse, the less two nearby reflectors' echoes overlap and blur together, which sets a limit on how close together two objects can be and still be told apart. +The reflected quantity matters. For example, an ideal rigid wall reflects a sound-pressure disturbance without pressure inversion, although the normal particle motion must cancel at the wall. Also, a finite pulse has duration: nearby reflectors can produce overlapping echoes. The simple timing model assumes a clearly identifiable return and one known propagation speed. See [HyperPhysics on reflection](https://www.hyperphysics.phy-astr.gsu.edu/hbase/Sound/reflec.html). ## Derivation -1. The pulse takes a time $d/v$ to travel out to the reflector. -2. It takes the same time $d/v$ to travel back. -3. Adding the two legs gives the total round-trip echo delay, $t_{echo} = 2d/v$. +1. Divide the outward distance by speed: $d/v$. +2. The return leg has the same distance and speed, so it also takes $d/v$. +3. Add the two times to obtain $t_{echo} = 2d/v$. ## Real world -### Bats -Bats emit ultrasonic calls and time the echoes bouncing off insects and obstacles to build a moving picture of their surroundings in complete darkness. +### Echo ranging -### Sonar -Ships and submarines send sound pulses through water and time their echoes off the seafloor or other vessels to measure depth and distance. +Sonar estimates a reflector's distance from a sound pulse's round-trip time. Converting time to distance requires a suitable sound-speed estimate. -### Medical ultrasound -An ultrasound probe sends sound pulses into the body and times echoes reflecting off internal boundaries between tissues to build an image. +### Waves on a string -### Concert hall acoustics -Architects shape walls and ceilings to control how sound reflects inside a hall, avoiding echoes that arrive late enough to be heard as a distinct, distracting repeat. +A pulse on a stretched string illustrates the difference between fixed and free boundary conditions. Its vertical displacement is not a graph of sound pressure. diff --git a/content/lessons/waves/refraction-snells-law/ar.md b/content/lessons/waves/refraction-snells-law/ar.md index 74f87356..0601862f 100644 --- a/content/lessons/waves/refraction-snells-law/ar.md +++ b/content/lessons/waves/refraction-snells-law/ar.md @@ -1,67 +1,62 @@ --- title: الانكسار وقانون سنل -summary: >- - القشة في كوب الماء تبدو منحنية لأن الضوء ينحني حين تتغير سرعته. قاعدة واحدة تحسب الانحناء. +summary: 'قِس زاوية الضوء من العمود المقام، واستخدم معامل الانكسار لتوقّع اتجاهه بعد عبور سطح فاصل.' parameters: - theta1: زاوية السقوط θ₁ - n1: معامل انكسار الوسط الأول - n2: معامل انكسار الوسط الثاني + theta1: 'θ₁ — الزاوية من العمود المقام' + n1: 'n₁ — معامل الوسط الذي يأتي منه الضوء' + n2: 'n₂ — معامل الوسط الذي ينفذ إليه الضوء' variables: - - معامل انكسار الوسط الأول والوسط الثاني - - زاوية السقوط وزاوية الانكسار، وتُقاسان من الخط العمودي على السطح - - سرعة الضوء في الوسط الأول والوسط الثاني + - 'معاملا الانكسار على جانبَي السطح' + - 'زاويتا السقوط والانكسار من العمود المقام' + - 'سرعتا الطور في الوسطين' --- ## Try it -1. اسحب الشعاع الداخل أعلى الرسم. راقبه ينحني وهو يعبر إلى المادة السفلية. -2. ارفع «معامل انكسار الوسط الثاني» (n2). ينحني الشعاع النافذ أكثر نحو الخط المتقطع العمودي. -3. ادفع زاوية السقوط θ1 نحو 89°. راقب كمية أكبر فأكبر من الضوء تنعكس، بدل أن تنفذ. +1. اجعل n1 = 1 وn2 = 1.5 وθ₁ = 40°. تكون زاوية الانكسار نحو 25.4°، مقاسة من العمود المتقطع. +2. ثبّت المعاملين واخفض θ₁ إلى 0°. يعبر الشعاع مستقيمًا. قد تتغير سرعته رغم بقاء اتجاهه كما هو. +3. اجعل n1 = n2. يحتفظ الشعاع النافذ باتجاهه، وتصبح النسبة المنعكسة صفرًا في هذا النموذج المثالي. ثم أعد اختلاف المعاملين وقارن القراءة عند زيادة θ₁. ## Real-life examples -1. **قشة في كوب ماء.** الضوء ينتقل من الهواء (n1 = 1) إلى الماء (n2 = 1.33) بزاوية 40°، وينحني نحو الخط العمودي. لهذا تبدو القشة مكسورة عند سطح الماء. -2. **قلم رصاص ملاصق لكتلة زجاجية.** الضوء يدخل الزجاج (n1 = 1، n2 = 1.5) بزاوية 50°، وينحني بحدّة أكبر. الزجاج يبطئ الضوء أكثر من الماء. -3. **سمكة تنظر إلى الأعلى خارج الماء.** الضوء يخرج من الماء (n1 = 1.33) إلى الهواء (n2 = 1) بزاوية 30°، وينحني مبتعدًا عن العمودي. تنضغط رؤية السمكة لكل السماء داخل دائرة ضيقة فوقها. +1. **من الهواء إلى الماء.** بمعاملين تقريبيين 1 و1.33 وزاوية سقوط 40°، تكون زاوية الانكسار نحو 28.9°. يقترب الشعاع من العمود. +2. **من الهواء إلى الزجاج.** بمعاملين 1 و1.5 وزاوية سقوط 50°، تكون زاوية الانكسار نحو 30.7°. +3. **من الماء إلى الهواء.** بمعاملين 1.33 و1 وزاوية سقوط 30°، تكون زاوية الانكسار نحو 41.7°. يبتعد الشعاع عن العمود. معاملات هذه المواد قيم تمثيلية. ## Test yourself -1. اضبط زاوية السقوط θ1 على 45° بالضبط. -2. جِد قيمًا لـ θ1 وn1 وn2 تجعل الشعاع المنكسر ينحني إلى 25° بالضبط من العمودي. -3. جِد قيمًا تجعل الشعاع المنكسر ينحني إلى 5° فقط من العمودي، أي يكاد يمر مستقيمًا. +1. اجعل زاوية السقوط 45°. +2. اختر معاملين وزاوية سقوط للحصول على زاوية انكسار 25°. +3. ابحث عن إعدادات تعطي زاوية انكسار لا تبعد عن 5° بأكثر من 0.5°. ## Intuition -اغمس قشة في كوب ماء، وانظر إليها من الجانب. تبدو القشة منحنية بالضبط عند نقطة دخولها سطح الماء، مع أنها مستقيمة تمامًا. يحدث هذا لأن الضوء يسير في الماء أبطأ مما يسير في الهواء. يعيد الرسم على الشاشة إنتاج هذا الأثر مباشرة. اسحب الشعاع الداخل، أعلى يسار الرسم، لتغيير زاويته عن الخط العمودي. تُسمّى هذه الزاوية زاوية السقوط $\theta_1$، وابدأ بها عند نحو 40°. تُقاس من الخط المتقطع العمودي، لا من سطح الماء نفسه. راقب الشريط المظلل أسفل السطح الفاصل. كلما أعتمته ارتفع $n_2$، وهو معامل انكسار المادة السفلية، رقم مثل 1 للهواء أو نحو 1.33 للماء، يقيس مدى قوة إبطاء المادة للضوء. +العمود المقام خط تخيلي عمودي على السطح. نقيس زاويتي الشعاعين منه، لا من السطح. يعني معامل الانكسار الأعلى سرعة طور أقل للضوء. عند السقوط المائل، يقترب الشعاع النافذ من العمود إذا دخل وسطًا أعلى معاملًا، ويبتعد عنه إذا دخل وسطًا أقل معاملًا. -ادفع $\theta_1$ نحو السقوط شبه المماسي، قرب 90°. راقب مؤشر النسبة المنعكسة يرتفع. يرتد جزء من الضوء دائمًا عند الحد بين مادتين مختلفتين. ينحني الشعاع النافذ دائمًا نحو الخط العمودي عند دخوله مادة أكثف، أي $n_2$ أكبر. يبتعد عنه عند خروجه منها. عند $\theta_1 = 0°$، أي النظر مباشرة إلى الأسفل، لا ينحني الشعاع مطلقًا، مهما اختلف $n_1$ عن $n_2$. لهذا لا يبدو أي تشويه عند النظر عموديًا إلى بركة ماء. يظهر التشويه فقط عند النظر إليها من الجانب. +لا يعني تغير السرعة دائمًا تغير الاتجاه؛ فالشعاع الساقط على امتداد العمود يستمر مستقيمًا. يعرض الرسم الانعكاس أيضًا. استخدم قراءة النسبة المنعكسة لمقارنة حصص الطاقة؛ فقد ضُبط سطوع الخطوط لتبقى مرئية، وليس مقياسًا دقيقًا. معامل الانكسار خاصية ضوئية، وليس اسمًا آخر للكثافة الكتلية. ## Formal -قانون سنل: $n_1 \sin\theta_1 = n_2 \sin\theta_2$. تُقاس الزاويتان من الخط العمودي على السطح، لا من السطح نفسه. +قانون سنيل هو $n_1\sin\theta_1=n_2\sin\theta_2$. تقاس الزاويتان من العمود المقام. عندما يمكن للشعاع النفاذ، تكون $\theta_2=\arcsin[(n_1/n_2)\sin\theta_1]$. -يُعرَّف معامل الانكسار بمقدار ما يبطئ الوسط الضوء، أي $n = c/v$. ارتفاع $n_2$ يعني موجة أبطأ، وبحسب قانون سنل يعني $\theta_2$ أصغر. ينحني الشعاع نحو العمودي عند دخوله وسطًا أكثف. +معامل الانكسار هو $n=c/v$، حيث v سرعة الطور في الوسط وc سرعة الضوء في الفراغ. يبقى التردد ثابتًا عند عبور سطح ساكن، ولذلك يتغير الطول الموجي مع السرعة. إذا كان $n_1\sin\theta_1>n_2$، فلا توجد زاوية حقيقية لشعاع نافذ، ويحدث انعكاس داخلي كلي عند السطح المثالي. ## Advanced -ينتج قانون سنل من اشتراط بقاء جبهات الموجة متصلة عبر السطح الفاصل. يجب أن يكون للشعاعين سرعة الأثر نفسها على طول السطح، وهذا يفرض $\sin\theta_1/v_1 = \sin\theta_2/v_2$. الشرط نفسه، حين يُطبَّق على معادلة الموجة الكاملة بشروطها الحدية على المجالين الكهربائي والمغناطيسي، يعطي أيضًا معاملات فرينل للانعكاس والنفاذ، الظاهرة في المؤشرات هنا. +يفترض النموذج سطحًا مستويًا بين وسطين شفافين متماثلَي الخواص وغير ممتصين. تؤدي مطابقة طور الموجة على امتداد السطح إلى قانون سنيل. والنسبة المنعكسة هي متوسط معاملي انعكاس القدرة لفريسنل للضوء غير المستقطب. يعتمد الانعكاس على الاستقطاب؛ فلا يصح القول إن كل استقطاب يعكس دائمًا جزءًا من القدرة عند كل زاوية. ## Derivation -1. مطابقة سرعة انسياح جبهة الموجة على طول السطح في كل وسط تعطي $\sin\theta_1/\sin\theta_2 = v_1/v_2$. -2. يُعرَّف معامل الانكسار بأنه $n = c/v$، فسرعة كل وسط هي $v_1 = c/n_1$ و$v_2 = c/n_2$. -3. تعويض السرعتين يحوّل النسبة إلى صيغة سنل المألوفة، $n_1\sin\theta_1 = n_2\sin\theta_2$. +1. نطابق طور الموجة على امتداد السطح لربط جيبَي الزاويتين بسرعتي الانتشار؛ وعند السقوط العمودي نستخدم الصيغة بعد الضرب التبادلي. +2. نكتب سرعة الطور في كل وسط بقسمة سرعة الضوء في الفراغ على معامل الانكسار. +3. نعوض ونعيد الترتيب فنحصل على قانون سنيل. ## Real world -### العمق الظاهري لحمام السباحة -يبتعد الضوء الخارج من جسم مغمور عن الخط العمودي عند خروجه إلى الهواء. لهذا تبدو قاعدة الحمام أقرب مما هي عليه فعلًا. +### العمق الظاهري -### قوس قزح والمنشور -ينكسر كل طول موجي بمقدار مختلف قليلًا داخل المنشور. يتوزع الضوء الأبيض إلى طيفه الملون. +يتغير اتجاه الضوء الصادر من جسم مغمور عند خروجه من الماء. إذا مددنا الأشعة الخارجة إلى الخلف، ظهر الجسم على عمق مختلف. والنظر من أعلى بصورة شبه عمودية لا يلغي أثر العمق الظاهري لحزمة الأشعة التي تدخل العين. -### السراب الصحراوي -الهواء الساخن قرب الأرض أقل معامل انكسار من الهواء البارد فوقه. ينحني الضوء صعودًا، وتبدو السماء كأنها بركة ماء على الطريق. +### المنشور -### غروب متأخر -ينكسر ضوء الشمس في غلاف الأرض الجوي بما يكفي، فتبقى الشمس مرئية دقائق بعد أن تكون قد غابت هندسيًا تحت الأفق. +قد يعتمد معامل الانكسار على الطول الموجي، فتخرج الألوان في اتجاهات مختلفة. يستخدم النموذج الحالي معاملًا واحدًا لكل وسط، ولا يفصل الألوان. diff --git a/content/lessons/waves/refraction-snells-law/en.md b/content/lessons/waves/refraction-snells-law/en.md index afc12ad0..6470f3dc 100644 --- a/content/lessons/waves/refraction-snells-law/en.md +++ b/content/lessons/waves/refraction-snells-law/en.md @@ -1,69 +1,62 @@ --- title: Refraction and Snell's law -summary: >- - A straw in a glass of water looks bent, and a lens can focus light to a - point, because light bends whenever it crosses into a material where it - travels at a different speed — one equation predicts exactly how much. +summary: 'Measure light’s angles from the normal and use refractive index to predict its direction across a boundary.' parameters: - theta1: angle of incidence θ₁ - n1: refractive index of medium 1 - n2: refractive index of medium 2 + theta1: 'θ₁ — angle from the normal' + n1: 'n₁ — index of the incident medium' + n2: 'n₂ — index of the transmitted medium' variables: - - refractive indices of the first and second medium - - angle of incidence and angle of refraction, both measured from the normal - - speed of light in the first and second medium + - 'refractive indices on the two sides' + - 'incident and transmitted angles from the normal' + - 'phase speeds in the two media' --- ## Try it -1. Drag the incoming ray at the top. Watch it bend as it crosses into the lower material. -2. Raise "refractive index of medium 2" (n2). The transmitted ray bends closer to the vertical dashed line. -3. Push the incidence angle θ1 toward 89°. Watch more and more light reflect instead of passing through. +1. Set n1 = 1, n2 = 1.5 and θ₁ = 40°. The transmitted angle is about 25.4°, measured from the dashed normal line. +2. Keep the indices fixed and reduce θ₁ to 0°. The ray goes straight through. Its speed can still change even though its direction does not. +3. Set n1 = n2. The transmitted ray keeps its direction and the reflected share becomes zero in this ideal model. Then restore different indices and compare the readout as you increase θ₁. ## Real-life examples -1. **A straw in a glass of water.** Light going from air (n1 = 1) into water (n2 = 1.33) at 40° bends toward the vertical, which is why the straw looks broken at the surface. -2. **A pencil pressed against a glass block.** Light entering glass (n1 = 1, n2 = 1.5) at 50° bends even more sharply, because glass slows light down more than water does. -3. **A fish looking up out of the water.** Light leaving water (n1 = 1.33) for air (n2 = 1) at 30° bends away from the vertical, squeezing the fish's whole view of the sky into a narrow circle overhead. +1. **Air to water.** With approximate indices 1 and 1.33 and incidence 40°, refraction is about 28.9°. The ray bends toward the normal. +2. **Air to glass.** With indices 1 and 1.5 and incidence 50°, refraction is about 30.7°. +3. **Water to air.** With indices 1.33 and 1 and incidence 30°, refraction is about 41.7°. The ray bends away from the normal. These material indices are representative values. ## Test yourself -1. Set the angle of incidence θ1 to exactly 45°. -2. Find values of θ1, n1 and n2 that bend the refracted ray to exactly 25° from the vertical. -3. Find values that bend the refracted ray to just 5° from the vertical — nearly straight through. +1. Set the incidence angle to 45°. +2. Find indices and an incidence angle that give a transmitted angle of 25°. +3. Find settings that give a transmitted angle within 0.5° of 5°. ## Intuition -Dip a straw into a glass of water and look at it from the side: the straw appears to bend right where it enters the surface, even though it is perfectly straight. That happens because light travels slower in water than in air, and the picture on screen recreates it directly. Drag the incoming ray (top left) to change its angle from the vertical — this is the angle of incidence, $\theta_1$ — and start it around 40°, measured from the dashed vertical line, not from the water's surface. Watch the shaded strip below the boundary: darkening it raises $n_2$, the refractive index of the lower material, a number like 1 for air or about 1.33 for water that measures how strongly a material slows light down. +The normal is an imaginary line perpendicular to the surface. Measure both ray angles from this line, not along the surface. A higher refractive index means a lower phase speed of light. At oblique incidence, entering a higher-index medium turns the transmitted ray toward the normal; entering a lower-index medium turns it away. -Push $\theta_1$ toward grazing incidence, close to 90°, and watch the readout for the reflected share climb: some light always bounces back at the boundary between two different materials. The transmitted ray always bends toward the vertical line when it enters a denser material (a higher $n_2$), and away from it when leaving one. At $\theta_1 = 0°$, straight down the middle, there is no bending at all, no matter how different $n_1$ and $n_2$ are — which is why looking straight down into a pool shows no distortion, only a view from the side does. +A change in speed does not always mean a change in direction: a ray arriving along the normal continues straight. The diagram also includes reflection. Use the reflected-percentage readout to compare energy fractions; the brightness of the drawn lines is adjusted for visibility and is not an exact scale. Refractive index is an optical property, not another name for mass density. ## Formal -Snell's law: $n_1 \sin\theta_1 = n_2 \sin\theta_2$, with both angles measured from the normal to the boundary, not from the surface itself. +Snell's law is $n_1\sin\theta_1=n_2\sin\theta_2$. Both angles are measured from the normal. When transmission is possible, $\theta_2=\arcsin[(n_1/n_2)\sin\theta_1]$. -Refractive index is defined by how much a medium slows light down: $n = c/v$, so a higher $n_2$ means a slower wave and, by Snell's law, a smaller $\theta_2$ — the ray bends toward the normal when entering a denser medium. +Refractive index is $n=c/v$, where v is phase speed in the medium and c is vacuum light speed. Frequency stays unchanged across a stationary boundary, so wavelength changes with speed. If $n_1\sin\theta_1>n_2$, no real transmitted ray angle exists: the ideal interface gives total internal reflection. ## Advanced -Snell's law follows from requiring the wavefronts to stay continuous across the boundary: the two rays must have the same trace speed along the interface, which forces $\sin\theta_1/v_1 = \sin\theta_2/v_2$. It is the same continuity condition that, applied to the full wave equation with boundary conditions on the electric and magnetic fields, also yields the Fresnel reflection and transmission coefficients shown in the readouts here. +This model assumes a flat boundary between transparent, isotropic, nonabsorbing media. Matching wave phase along the boundary gives Snell's law. The reflected percentage is the average of the two Fresnel power reflectances for unpolarised light. Reflection depends on polarisation; it is not correct to say that every individual polarisation always has some reflected power at every angle. ## Derivation -1. Matching how fast the wavefronts sweep along the boundary in each medium gives $\sin\theta_1/\sin\theta_2 = v_1/v_2$. -2. Refractive index is defined as $n = c/v$, so each medium's speed is $v_1 = c/n_1$ and $v_2 = c/n_2$. -3. Substituting the speeds turns the ratio into Snell's familiar form, $n_1\sin\theta_1 = n_2\sin\theta_2$. +1. Match the wave phase along the boundary to relate the sines of the angles to the propagation speeds; use the cross-multiplied form at normal incidence. +2. Express each phase speed as vacuum light speed divided by refractive index. +3. Substitute and rearrange to obtain Snell's law. ## Real world -### Apparent depth of a swimming pool -Light leaving an underwater object bends away from the normal as it exits into air, so the pool bottom looks shallower than it really is. +### Apparent depth -### Rainbows and prisms -A prism refracts different wavelengths by slightly different amounts, fanning white light out into its spectrum of colors. +Light from a submerged object changes direction as it leaves water. Tracing the emerging rays backward makes the object appear at a different depth. Looking nearly straight down does not remove the apparent-depth effect for the bundle of rays entering an eye. -### Desert mirages -Hot air near the ground has a lower refractive index than the cooler air above it, bending light upward and making the sky look like a puddle on the road. +### A prism -### A late sunset -Earth's atmosphere refracts sunlight enough that the sun is still visible for a few minutes after it has geometrically dropped below the horizon. +Refractive index can depend on wavelength, so different colours can emerge in different directions. The current model uses one index per medium and does not separate colours. diff --git a/content/lessons/waves/sine-wave/ar.md b/content/lessons/waves/sine-wave/ar.md index 721b3223..c1effeec 100644 --- a/content/lessons/waves/sine-wave/ar.md +++ b/content/lessons/waves/sine-wave/ar.md @@ -1,72 +1,67 @@ --- title: الموجة المتحركة -summary: >- - نمط الموجة يتقدم بينما الماء نفسه يهتز إلى أعلى وأسفل فقط. +summary: 'اقرأ الموجة الجيبية بوصفها إزاحة تتغير: تحدد السعة ارتفاعها، والطول الموجي تباعد قممها، والتردد سرعة تكرارها.' parameters: - A: السعة A - L: الطول الموجي λ - f: التردد f - phi: الطور φ - x: موضع المراقبة x - t: الزمن t + A: 'A — سعة الإزاحة' + L: 'L — الطول الموجي λ' + f: 'f — عدد الدورات في الثانية' + phi: 'φ — الطور الابتدائي' + x: 'x — موضع المراقبة' + t: 't — الزمن' variables: - - السعة، أقصى إزاحة - - الطول الموجي، المسافة بين قمتين متجاورتين - - التردد، عدد التذبذبات في الثانية عند أي نقطة ثابتة - - الطور، الموضع الذي تبدأ منه الموجة في دورتها - - سرعة الموجة، وتساوي دائمًا $f\lambda$ + - 'أقصى إزاحة عن موضع الاتزان' + - 'المسافة بين قمتين متتاليتين' + - 'عدد الدورات في الثانية عند موضع ثابت' + - 'إزاحة طور ثابتة مقاسة بالراديان' + - 'سرعة انتقال النمط الموجي' --- ## Try it -1. شغّل الحركة وراقب النقطة المُعلَّمة على الموجة تتحرك فقط إلى الأعلى والأسفل. -2. حرّك «التردد f» إلى الأعلى. راقب النقطة تهتز أسرع. -3. حرّك الآن «الطول الموجي λ (L)» إلى قيمة أوسع. تتباعد القمم أكثر. +1. اجعل A = 1.5 وL = 4 m وf = 0.4 Hz وφ = 0، ثم شغّل الحركة. عند تثبيت x تتحرك العلامة صعودًا وهبوطًا، بينما تنتقل القمم إلى اليمين. +2. أوقف الحركة وغيّر L من 4 m إلى 2 m. يتسع الرسم لدورات أكثر. مع ثبات f، تنخفض سرعة الموجة المختارة من 1.6 إلى 0.8 m/s. +3. ثبّت A وL وf وغيّر φ. ينزاح المنحنى على المحور الأفقي دون أن يتغير ارتفاعه أو تباعد قممه أو سرعته. ## Real-life examples -1. **تموّج في حوض استحمام.** موجة صغيرة ارتفاعها 0.3 m وطولها الموجي 1 m، تتذبذب مرة كل ثانية، تنتقل عبر الماء بسرعة 1 m/s. -2. **موجة تُرسَل عبر حبل قفز.** نفض الحبل ينتج موجة ارتفاعها 1.5 m وطولها الموجي 4 m تتكرر 0.4 مرة في الثانية، وتنتقل عبر الحبل بسرعة 1.6 m/s. -3. **موجة محيط.** موجة بطيئة وعالية ارتفاعها 2.5 m وطولها الموجي 8 m وإيقاعها اللطيف 0.15 هرتز تتدحرج نحو الشاطئ بسرعة 1.2 m/s فقط. +1. **موجة قصيرة صغيرة السعة.** تعطي A = 0.3 وL = 1 m وf = 1 Hz سرعة 1 m/s وزمنًا دوريًا قدره ثانية واحدة. +2. **موجة أطول.** تعطي A = 1.5 وL = 4 m وf = 0.4 Hz سرعة 1.6 m/s وزمنًا دوريًا 2.5 s. +3. **تكرار بطيء.** تعطي A = 2.5 وL = 8 m وf = 0.15 Hz سرعة 1.2 m/s وزمنًا دوريًا يقارب 6.67 s. هذه أمثلة رياضية، وليست قياسات لموجات المحيط. ## Test yourself -1. اجعل سرعة الموجة 1 m/s بالضبط. -2. أبقِ سرعة الموجة عند نحو 1 m/s لكن مدّد الطول الموجي إلى 6 m على الأقل. -3. اجعل سرعة الموجة تتجاوز 2 m/s مع إبقاء الطول الموجي أقل من 3 m. +1. اضبط التردد والطول الموجي لتحصل على سرعة 1 m/s. +2. أبقِ السرعة ضمن 0.05 m/s من 1 m/s، مع جعل الطول الموجي 6 m على الأقل. +3. اجعل الطول الموجي أقل من 3 m والسرعة أكبر من 2 m/s. ## Intuition -تخيل تموّجًا في حوض استحمام، موجة صغيرة ارتفاعها 0.3 متر وتفصل بين قممها 1 متر، تتكرر مرة كل ثانية. شغّل الحركة وراقب النقطة المُعلَّمة على الموجة. إنها تتحرك فقط إلى الأعلى والأسفل، بينما ينزلق النمط كله نحو اليمين. الموجة تنقل الشكل والطاقة، لا الماء نفسه. +الرسم لقطة للإزاحة على امتداد خط. محوره الأفقي للموضع، لا للزمن. عند تشغيل الحركة تتغير هذه اللقطة مع مرور الوقت. تتبّع قمة لترى انتقال النمط، ثم راقب موضعًا ثابتًا لترى الاهتزاز. هاتان حركتان مختلفتان. -ارفع «التردد f» فتهتز النقطة المُعلَّمة أسرع، ومدّد «الطول الموجي λ» فتتباعد القمم أكثر. افعل الأمرين معًا فيندفع النمط بسرعة. سرعته هي بالضبط التردد مضروبًا في الطول الموجي، أي طول موجي واحد إلى الأمام مع كل دورة تكتمل. +تقيس السعة أقصى إزاحة عن الصفر، ويقيس الطول الموجي المسافة بين قمتين متتاليتين. ويعدّ التردد الدورات في الثانية عند موضع ثابت، بينما يحدد الطور أين تبدأ الدورة. تصف أدوات التحكم نمطًا جيبيًا مثاليًا؛ ولا تفرض خصائص حبل محدد أو سطح ماء بعينه. ## Formal -$y(x,t) = A\sin(kx - \omega t + \varphi)$ حيث $k = 2\pi/\lambda$ و $\omega = 2\pi f$. +صيغة النموذج هي $y(x,t)=A\sin(kx-\omega t+\varphi)$، حيث $k=2\pi/\lambda$ و$\omega=2\pi f$. يمثل المنزلق L الطول الموجي λ. عندما يكون k وω موجبين، تعني الإشارة السالبة قبل حد الزمن أن الموجة تنتقل نحو قيم x الأكبر. -النقطة ذات الطور الثابت تحقق $kx - \omega t = \text{const}$، ولذلك تتحرك بسرعة $v = \omega/k = f\lambda$. +للقمة طور ثابت، أي $kx-\omega t+\varphi=\mathrm{constant}$. باشتقاق هذه العلاقة أثناء تتبّع القمة نحصل على $v=\omega/k=f\lambda$. وعند موضع ثابت يكون الزمن الدوري $T=1/f$. لا تدخل سعة الإزاحة A في صيغة السرعة لهذا النموذج. ## Advanced -أي دالة على الصيغة $g(x - vt)$ تحقق معادلة الموجة $\partial_t^2 y = v^2 \partial_x^2 y$. وتكتسب الدوال الجيبية أهميتها لأن المعادلة خطية، فبموجب مبرهنة فورييه يكون كل حل تركيبًا تراكبيًا منها. +ينتقل الشكل $g(x-vt)$ إلى اليمين دون أن يتغير. إذا كانت g قابلة للاشتقاق بما يلزم، فهو يحقق معادلة الموجة في بُعد واحد $\partial_t^2y=v^2\partial_x^2y$. وقد يتضمن الحل العام أيضًا موجات تنتقل إلى اليسار. أما جسيمات سطح الماء فلا يلزم أن تتحرك رأسيًا فقط، وقد تختلف سرعة الانتشار باختلاف الطول الموجي؛ لا يمثل هذا الرسم البسيط تلك التفاصيل. ## Derivation -1. دالة جيبية في الفضاء تتقدم أيضًا مع الزمن. -2. تابع قمة واحدة: يبقى طورها ثابتًا. -3. عوّض بتعريفي $\omega$ و $k$. +1. نكتب دالة جيب يعتمد طورها على الموضع والزمن؛ وتفترض خطوات الاشتقاق المعروضة أن إزاحة الطور الثابتة تساوي صفرًا. +2. نتتبع قمة بإبقاء طورها ثابتًا، ثم نشتق موضعها بالنسبة إلى الزمن. +3. نعوض بتعريفي التردد الزاوي والعدد الموجي، فنحصل على السرعة حاصل ضرب التردد في الطول الموجي. ## Real world -### الصوت -التردد هو طبقة الصوت، والسعة هي شدته. والسرعة ثابتة يحددها الهواء، ولذلك تكون النغمات الأعلى ذات طول موجي أقصر. +### الصوت في وسط منتظم -### الضوء والراديو -العلاقة نفسها مع $v = c$: شبكة الواي فاي لديك عند 2.4 جيجاهرتز طولها الموجي 12.5 سم. +إذا بقيت سرعة الانتشار ثابتة، قصُر الطول الموجي عند زيادة التردد. يرتبط التردد بحدّة النغمة، أما علو الصوت الذي نسمعه فيعتمد على عوامل أخرى إلى جانب السعة. -### التيار الكهربائي المتردد -جهد الشبكة الكهربائية موجة جيبية بتردد 50/60 هرتز، وفرق الطور بين الجهد والتيار يحدد القدرة الفعلية. +### الإشارات والطور -### أوتار الآلات الموسيقية -موجتان متحركتان متضادتا الاتجاه تتجمعان لتكوّنا الموجات الواقفة التي تحدد نغمات الوتر. +قد تتساوى إشارتان دوريتان في التردد والسعة وتختلفان في الطور. تبين مقارنة الطور كيف تتوافق دورتاهما زمنيًا. diff --git a/content/lessons/waves/sine-wave/en.md b/content/lessons/waves/sine-wave/en.md index 854df57a..bf1fb882 100644 --- a/content/lessons/waves/sine-wave/en.md +++ b/content/lessons/waves/sine-wave/en.md @@ -1,74 +1,67 @@ --- title: Travelling wave -summary: >- - This is why the pattern of a wave slides forward while the water itself - only bobs up and down, and why a higher musical note has a shorter - wavelength. +summary: 'Read a travelling sine wave as a changing displacement: amplitude sets its height, wavelength its spacing, and frequency its rhythm.' parameters: - A: amplitude A - L: wavelength λ - f: frequency f - phi: phase φ - x: watch position x - t: time t + A: 'A — displacement amplitude' + L: 'L — wavelength λ' + f: 'f — cycles per second' + phi: 'φ — initial phase' + x: 'x — observation position' + t: 't — time' variables: - - amplitude — the maximum displacement - - wavelength — distance between neighbouring crests - - frequency — oscillations per second at any fixed point - - phase — where in its cycle the wave starts - - 'wave speed, always $f\lambda$' + - 'largest displacement from equilibrium' + - 'distance between successive crests' + - 'cycles per second at a fixed position' + - 'constant phase offset in radians' + - 'speed of the travelling pattern' --- ## Try it -1. Let it animate and watch the marked point on the wave move only up and down. -2. Drag "frequency f" up. Watch the point bob faster. -3. Now drag "wavelength λ (L)" wider. The crests spread further apart. +1. Set A = 1.5, L = 4 m, f = 0.4 Hz and φ = 0. Start the animation. At a fixed x, the marker moves up and down while crests travel right. +2. Pause and change L from 4 m to 2 m. More cycles fit across the graph. With f unchanged, the selected wave speed falls from 1.6 to 0.8 m/s. +3. Keep A, L and f fixed and change φ. The curve shifts along the horizontal axis without changing its height, spacing or speed. ## Real-life examples -1. **A ripple in a bathtub.** A small 0.3 m ripple with a 1 m wavelength, oscillating once per second, travels across the water at 1 m/s. -2. **A wave sent down a jump rope.** Flicking the rope creates a 1.5 m wave with a 4 m wavelength repeating 0.4 times per second, moving down the rope at 1.6 m/s. -3. **An ocean swell.** A slow, tall 2.5 m swell with an 8 m wavelength and a gentle 0.15 Hz rhythm rolls toward shore at just 1.2 m/s. +1. **A short, small wave.** A = 0.3, L = 1 m and f = 1 Hz give speed 1 m/s and period 1 s. +2. **A wider wave.** A = 1.5, L = 4 m and f = 0.4 Hz give speed 1.6 m/s and period 2.5 s. +3. **A slow rhythm.** A = 2.5, L = 8 m and f = 0.15 Hz give speed 1.2 m/s and period about 6.67 s. These are mathematical examples, not measured ocean waves. ## Test yourself -1. Make the wave speed exactly 1 m/s. -2. Keep the wave speed at about 1 m/s but stretch the wavelength to at least 6 m. -3. Make the wave speed exceed 2 m/s while keeping the wavelength under 3 m. +1. Set frequency and wavelength for a speed of 1 m/s. +2. Keep speed within 0.05 m/s of 1 m/s while making wavelength at least 6 m. +3. Make wavelength less than 3 m and speed greater than 2 m/s. ## Intuition -Picture a ripple in a bathtub, a small wave 0.3 m tall with crests 1 m apart, repeating once per second. Let it animate and watch the marked point on the wave: it only moves up and down, while the whole pattern slides to the right. A wave carries shape and energy, not the water itself. +The graph is a snapshot of displacement along a line. Its horizontal axis is position, not time. Starting the animation changes the snapshot over time. Following one crest shows how the pattern travels; watching one fixed position shows an oscillation. Those are two different motions. -Raise "frequency f" and the marked point bobs faster; stretch "wavelength λ" and the crests spread further apart. Do both together and the pattern races along: its speed is exactly frequency times wavelength, one full wavelength forward for every cycle completed. +Amplitude measures the largest displacement from zero. Wavelength measures the distance between successive crests. Frequency counts cycles per second at a fixed position. Phase chooses where the cycle starts. The controls describe an ideal sinusoidal pattern; they do not enforce the material properties of a particular rope or water surface. ## Formal -$y(x,t) = A\sin(kx - \omega t + \varphi)$ with $k = 2\pi/\lambda$ and $\omega = 2\pi f$. +The model is $y(x,t)=A\sin(kx-\omega t+\varphi)$, where $k=2\pi/\lambda$ and $\omega=2\pi f$. The L control represents λ. With positive k and ω, the minus sign before the time term gives travel toward increasing x. -A point of constant phase satisfies $kx - \omega t = \text{const}$, so it moves at $v = \omega/k = f\lambda$. +A crest has constant phase, so $kx-\omega t+\varphi=\mathrm{constant}$. Differentiating along that crest gives $v=\omega/k=f\lambda$. At a fixed position the period is $T=1/f$. The displacement amplitude A does not enter this model's speed formula. ## Advanced -Any $g(x - vt)$ solves the wave equation $\partial_t^2 y = v^2 \partial_x^2 y$; sinusoids matter because the equation is linear, so by Fourier’s theorem every solution is a superposition of them. +A shifted profile $g(x-vt)$ travels right without changing shape. For suitable differentiable g it solves the one-dimensional wave equation $\partial_t^2y=v^2\partial_x^2y$. General solutions can also include left-travelling terms. Water-surface particles need not move only vertically, and different wavelengths can travel at different speeds; this simple graph does not model those details. ## Derivation -1. A sine in space that also advances in time. -2. Follow one crest: its phase stays fixed. -3. Substitute the definitions of $\omega$ and $k$. +1. Write a sine whose phase depends on position and time; the displayed derivation sets the constant phase offset to zero. +2. Follow a crest by holding its phase constant and differentiating its position with respect to time. +3. Replace angular frequency and wavenumber with their definitions to obtain speed as frequency times wavelength. ## Real world -### Sound -Frequency is pitch, amplitude is loudness; speed is fixed by the air, so higher notes have shorter wavelengths. +### Sound in a uniform medium -### Light and radio -The same relation with $v = c$: your Wi-Fi at 2.4 GHz has a 12.5 cm wavelength. +If propagation speed stays fixed, increasing frequency shortens wavelength. Pitch is related to frequency; perceived loudness also depends on factors beyond amplitude alone. -### AC electricity -Mains voltage is a 50/60 Hz sine; phase differences between voltage and current determine real power. +### Signals and phase -### Musical strings -Two opposite travelling waves add up to the standing waves that set a string’s notes. +Two periodic signals can have the same frequency and amplitude but different phases. Comparing their phase tells us how their cycles line up. 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/lessons/waves/speed-of-sound/ar.md b/content/lessons/waves/speed-of-sound/ar.md index d119a6b2..8129d0c1 100644 --- a/content/lessons/waves/speed-of-sound/ar.md +++ b/content/lessons/waves/speed-of-sound/ar.md @@ -1,68 +1,63 @@ --- title: سرعة الصوت -summary: >- - الصوت أسرع في الهواء الدافئ، وأسرع بكثير في الماء والفولاذ. لهذا يخبرك عدّ الثواني بعد البرق ببعد العاصفة. +summary: 'احسب المسافة التي تقطعها نبضة صوتية من زمن انتقالها، وتعرّف إلى أثر الوسط في سرعتها.' parameters: - T: درجة حرارة الهواء T - medium: الوسط - t: الثواني المعدودة + T: 'T — درجة حرارة الهواء' + medium: 'الوسط — 0: هواء، 1: ماء، 2: فولاذ' + t: 't — زمن الانتقال' variables: - - سرعة الصوت في الوسط المختار - - سرعة الصوت في الهواء عند 0°C، نحو 331 m/s - - درجة حرارة الهواء - - المسافة المقطوعة + - 'سرعة الصوت في الوسط المختار' + - 'سرعة الصوت التقريبية في الهواء عند 0°C' + - 'درجة حرارة الهواء بالدرجة المئوية' + - 'المسافة المقطوعة في اتجاه واحد' --- ## Try it -1. أبقِ الوسط هواءً وحرّك منزلق درجة الحرارة T. راقب قراءة السرعة ترتفع مع دفء الهواء. -2. بدّل منزلق الوسط إلى الماء، ثم إلى الفولاذ. تقفز السرعة أعلى كثيرًا في كل مرة. الصوت يعبر السوائل والمواد الصلبة أسرع بكثير من الهواء. -3. أعد الوسط إلى الهواء وحرّك منزلق الثواني t. راقب قراءة المسافة تُظهر بُعد العاصفة عند ذلك التأخير المعدود. +1. اختر الهواء، واجعل T = 20°C وt = 3 s. ستقرأ سرعة 343 m/s ومسافة تقارب 1.03 km. +2. ثبّت t واختر الماء، ثم الفولاذ. يستخدم النموذج سرعتين هما 1480 m/s و5000 m/s، فتقطع النبضة مسافة أكبر في الزمن نفسه. +3. عد إلى الهواء واخفض T إلى −10°C. تصبح السرعة 325 m/s. يؤثر تغيير الحرارة في حساب الهواء؛ أما الماء والفولاذ فلهما قيمتان ثابتتان في هذا المثال. ## Real-life examples -1. **يوم ربيعي بارد.** عند 20°C، ينتقل الصوت في الهواء بسرعة 343 m/s. عدّ 3 ثوانٍ بعد الومضة يضع العاصفة على بُعد أكثر بقليل من 1 كم. -2. **ليلة شتوية متجمدة.** عند −10°C، يتباطأ الصوت إلى نحو 325 m/s. التأخير المعدود نفسه يعني الآن أن العاصفة أقرب قليلاً مما توحي به قراءة اليوم الربيعي. -3. **الطرق على قضيب فولاذي.** في الفولاذ ينطلق الصوت بنحو 5000 m/s، أي أكثر من 14 ضعف سرعته في الهواء. لهذا كان وضع الأذن على قضيب القطار قديمًا يكشف قدوم قطار قبل وصول صوته عبر الهواء بزمن طويل. +1. **ثلاث ثوانٍ في الهواء.** عند 20°C، تقطع النبضة 343 × 3 = 1029 m. هذه مسافة انتقالها في اتجاه واحد. +2. **خمس ثوانٍ في هواء أبرد.** عند −10°C، تصبح المسافة 325 × 5 = 1625 m. السرعة أقل، لكن الزمن الأطول يجعل المسافة أكبر من المثال الأول. +3. **نبضة في الفولاذ.** يبدأ هذا الإعداد عند t = 0، ولذلك تكون المسافة صفرًا. اجعل t = 1 s لتحصل على 5000 m وفق السرعة التقريبية المستخدمة. ## Test yourself -1. بدّل إلى الماء واقرأ سرعة الصوت فيه. -2. بدّل إلى الفولاذ واقرأ سرعة الصوت فيه. -3. ابقَ في الهواء، واعثر على درجة حرارة T وعدد ثوانٍ t يجعلان العاصفة على بُعد نحو 1 كم. +1. اختر الماء واقرأ السرعة المستخدمة له. +2. اختر الفولاذ واقرأ السرعة المستخدمة له. +3. اختر الهواء، ثم اضبط T وt لتحصل على مسافة تبعد عن 1 km بمقدار لا يزيد على 30 m. ## Intuition -عُدّ الثواني بين رؤية ومضة البرق وسماع الرعد المصاحب لها. يصلك الضوء شبه فوريًا، لكن الصوت يستغرق وقتًا. تلك الفجوة تقيس في الحقيقة زمن انتقال الصوت إليك. كلما بعدت العاصفة طال العدّ، ومعرفة سرعة الصوت تحوّل هذا العدّ مباشرة إلى مسافة. +النبضة الصوتية اضطراب ينتقل عبر مادة. يتوقف زمن وصولها على المسافة وعلى سرعة انتقال الاضطراب في تلك المادة. إذا كانت السرعة 343 مترًا في الثانية، قطعت النبضة 343 مترًا في الثانية الأولى، ومثلها في الثانية التالية، ما دامت السرعة ثابتة. -هذه السرعة ليست ثابتة. تتحرك جزيئات الهواء الدافئ أسرع، وتصطدم بجاراتها أسرع، فينتقل الصوت أسرع قليلاً في يوم حار منه في يوم بارد. تزداد السرعة نحو 0.6 m/s مع كل درجة مئوية يدفأ بها الهواء. بدّل الوسط بعيدًا عن الهواء فتكبر القفزة كثيرًا. جزيئات الماء تجلس أقرب من جزيئات الهواء، وذرات الفولاذ الصلب تجلس أقرب حتى من ذلك، فينتقل الدفع من واحدة إلى التالية أسرع بكثير. لهذا يعبر الصوت الماء بأكثر من 4 أضعاف سرعته في الهواء، ويعبر الفولاذ بنحو 14 ضعفًا. +تقارن الأعمدة بين ثلاثة أوساط. تعتمد السرعة على مقاومة المادة للانضغاط أو التشوه وعلى قصورها الذاتي، ولا يكفي تفسيرها بتقارب الجسيمات وحده. يغيّر منزلق الحرارة سرعة الصوت في الهواء. أما قيمتا الماء والفولاذ فثابتتان للتوضيح؛ إذ تتأثر السرعات الفعلية أيضًا بالحرارة والتركيب ونوع الموجة. والدائرة رسم توضيحي، وليست خريطة بمقياس رسم. ## Formal -في الهواء، تُقارَب سرعة الصوت جيدًا بالصيغة $v = v_0 + 0.6\,T$، حيث $v_0 \approx 331\ \text{m/s}$ عند $0\text{°C}$، و$T$ بالدرجات المئوية. عند حرارة الغرفة، $20\text{°C}$، تعطي هذه الصيغة نحو $343\ \text{m/s}$، وهي القيمة الشائعة في الاستخدام اليومي. +للهواء ضمن درجات الحرارة المعروضة، نستخدم $v=v_0+0.6T$، حيث $v_0=331\ \mathrm{m/s}$ وتقاس T بالدرجة المئوية. وحدة المعامل 0.6 هي متر في الثانية لكل درجة مئوية. عند 20°C نحصل على $v=343\ \mathrm{m/s}$. لا نستخدم صيغة الهواء هذه لحساب عمودَي الماء والفولاذ. -ومتى عُرفت السرعة، تُستنتج المسافة مباشرة من التوقيت، $d = v\,t$، حيث $t$ هو الزمن الذي استغرقه الصوت في رحلته. عدّ الثواني بين ومضة البرق ورعدها، ثم ضربها في سرعة الصوت في الهواء، يعطي تقديرًا لبُعد العاصفة التي ضربت. +عند ثبات السرعة، تكون المسافة في اتجاه واحد $d=vt$. إذا قسنا t بالثانية وv بالمتر لكل ثانية، حصلنا على المسافة بالمتر. أما الصدى فيتضمن رحلة ذهاب وعودة؛ لذا يكون بُعد السطح العاكس $d=vt/2$، بافتراض ثبات السرعة في الاتجاهين. ## Advanced -رقم 0.6 m/s لكل درجة هو نفسه تقريب لصيغة أدق، $v = \sqrt{\gamma R T_K / M}$، حيث $T_K$ درجة الحرارة المطلقة بالكلفن. سرعة الصوت في غاز تعتمد فعلاً على الحرارة عبر جذر تربيعي لا خط مستقيم. لكن على مدى حرارة الطقس اليومي يبقى التقريب الخطي دقيقًا، ودقته تفوق ما يسمح به عدّ الثواني يدويًا أصلاً. +في المائع، تكون سرعة الاضطرابات الصغيرة $v=\sqrt{B/\rho}$، حيث B معامل الانضغاط الحجمي وρ الكثافة. وللغاز المثالي تصبح $v=\sqrt{\gamma RT_K/M}$، مع قياس الحرارة المطلقة بالكلفن. تقرّب قاعدة الهواء السابقة هذا الاعتماد على الحرارة. وفي المواد الصلبة قد تختلف السرعة باختلاف نوع الموجة. انظر [شرح سرعة الصوت في OpenStax](https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound). ## Derivation -1. ترتفع سرعة الصوت في الهواء تقريبًا بخط مستقيم مع الحرارة، بنحو 0.6 m/s لكل درجة مئوية فوق قيمتها عند 0°C. -2. التعويض بحرارة غرفة مريحة عند 20°C يعطي القيمة الشائعة 343 m/s. -3. المسافة ببساطة هي السرعة مضروبة في زمن انتقال الصوت حتى وصوله. +1. نبدأ بسرعة الهواء التقريبية عند 0°C، ونضيف 0.6 m/s لكل درجة مئوية. +2. بالتعويض عن الحرارة بـ20°C نحصل على 331 + 12 = 343 m/s. +3. نضرب السرعة الثابتة في زمن الانتقال لنحسب المسافة المقطوعة. ## Real world -### عدّ البرق والرعد -عدّ الثواني بين ومضة البرق ورعدها وضربها في سرعة الصوت في الهواء يعطي تقديرًا تقريبيًا لبُعد العاصفة، مفيد للحكم على الوقت المتبقي قبل وصولها. +### قياس المسافة بالصوت -### السونار والمسح تحت الماء -لأن الصوت ينتقل في الماء أسرع بكثير من الهواء، تُوقّت أنظمة السونار صدى تحت الماء وتستخدم سرعة الصوت الأعلى في الماء لاستنتاج العمق أو المسافة. +يمكن للحساس توقيت نبضة منعكسة. يحتاج الحساب إلى سرعة الصوت في الوسط الفعلي، وإلى احتساب رحلة الذهاب والعودة. -### الموجات فوق الصوتية والحساسات -يوقّت كل من التصوير الطبي بالموجات فوق الصوتية وحساسات ركن السيارات زمن ارتداد نبضة صوتية. يستخدمان سرعة الصوت المعروفة في الوسط الذي يعبرانه. +### آلات النفخ -### ضبط الآلات الموسيقية -تعتمد نغمة آلة هوائية على سرعة الصوت داخل الهواء بداخلها، ولهذا قد تنحرف الآلات النحاسية والخشبية قليلاً عن الضبط مع دفء الغرفة أو برودتها. +تؤثر سرعة الصوت في عمود الهواء في ترددات رنينه. لذلك قد تتغير النغمة عند تغير درجة الحرارة. diff --git a/content/lessons/waves/speed-of-sound/en.md b/content/lessons/waves/speed-of-sound/en.md index 4d9556fe..a9d125e5 100644 --- a/content/lessons/waves/speed-of-sound/en.md +++ b/content/lessons/waves/speed-of-sound/en.md @@ -1,70 +1,63 @@ --- title: Speed of sound -summary: >- - Sound does not travel at one fixed speed — it moves faster through warmer - air, and far faster through water and steel than through air at all, which - is why counting seconds after lightning tells you how far the storm is. +summary: 'Use a sound pulse’s travel time to calculate distance, and see how its speed depends on the medium.' parameters: - T: air temperature T - medium: medium - t: seconds counted + T: 'T — air temperature' + medium: 'medium — 0: air, 1: water, 2: steel' + t: 't — elapsed travel time' variables: - - the speed of sound in the chosen medium - - the speed of sound in air at 0°C, about 331 m/s - - air temperature - - distance travelled + - 'sound speed in the selected medium' + - 'approximate air speed at 0°C' + - 'air temperature in degrees Celsius' + - 'one-way distance travelled' --- ## Try it -1. Leave the medium set to air and drag the temperature slider T. Watch the speed readout climb as the air warms. -2. Switch the medium slider to water, then to steel. The speed jumps far higher each time — sound races through solids and liquids much faster than through air. -3. Set the medium back to air and drag the seconds slider t. Watch the distance readout show how far away a storm must be for that counted delay. +1. Select air, T = 20°C and t = 3 s. Read 343 m/s and a distance of about 1.03 km. +2. Keep t fixed and select water, then steel. The model uses 1480 m/s and 5000 m/s, so the pulse travels farther in the same time. +3. Return to air and lower T to −10°C. Speed becomes 325 m/s. Changing temperature affects the air calculation; water and steel have fixed example values here. ## Real-life examples -1. **A cool spring day.** At 20°C, sound in air travels at 343 m/s; counting 3 seconds after a flash puts the storm just over 1 km away. -2. **A freezing winter night.** At −10°C, sound slows to about 325 m/s; the same counted delay now means the storm is a little closer than the spring-day estimate would suggest. -3. **Tapping a steel rail.** In steel, sound races at about 5000 m/s — more than fourteen times its speed in air — which is why placing an ear on a train track once let people hear an approaching train long before its sound reached them through the air. +1. **Three seconds through air.** At 20°C, distance is 343 × 3 = 1029 m. This is one-way travel. +2. **Five seconds through colder air.** At −10°C, distance is 325 × 5 = 1625 m. Despite the lower speed, the longer time gives a greater distance than in the first example. +3. **A pulse in steel.** This preset starts at t = 0, so distance is zero. Set t = 1 s to obtain 5000 m with the model's rounded speed. ## Test yourself -1. Switch to water and read off its speed of sound. -2. Switch to steel and read off its speed of sound. -3. Staying in air, find a temperature T and a count of seconds t that put a storm about 1 km away. +1. Select water and read its example speed. +2. Select steel and read its example speed. +3. Select air and find T and t that give a distance within 30 m of 1 km. ## Intuition -Count the seconds between seeing lightning flash and hearing the thunder that goes with it: light reaches you almost instantly, but sound takes its time, so that gap is really measuring how long the sound spent travelling to you. The farther away the storm, the longer the count — and knowing sound's speed turns that count directly into a distance. +A sound pulse is a disturbance passed through a material. Its travel time depends on the distance and on how quickly the material transmits the disturbance. If the speed is 343 metres per second, the pulse covers 343 metres in the first second and another 343 in the next, provided the speed stays constant. -That speed is not fixed. Warm air molecules move faster and bump into their neighbours sooner, so sound outruns itself a little quicker on a hot day than a cold one — about 0.6 m/s faster for every degree Celsius the air warms. Switch the medium away from air and the jump is much bigger: water molecules sit closer together than air molecules, and the atoms in solid steel sit closer still, so a push travels from one to the next far sooner. That is why sound crosses water more than four times faster than air, and steel about fourteen times faster. +The bars compare three example media. Speed depends on the material's resistance to compression or deformation and its inertia, not just on how close its particles are. The temperature control changes the air speed. Water and steel use fixed representative values; actual speeds also depend on temperature, composition and the kind of wave. The circle is an illustration, not a map drawn to scale. ## Formal -In air, the speed of sound is well approximated by $v = v_0 + 0.6\,T$, with $v_0 \approx 331\ \text{m/s}$ at $0\text{°C}$ and $T$ in degrees Celsius — at room temperature, $20\text{°C}$, this gives about $343\ \text{m/s}$, the everyday value most often quoted. +For air over the temperature range shown, use $v=v_0+0.6T$, with $v_0=331\ \mathrm{m/s}$ and T measured in degrees Celsius. The coefficient is 0.6 metres per second per degree Celsius. At 20°C this gives $v=343\ \mathrm{m/s}$. This air formula is not used for the water or steel bars. -Once the speed is known, distance follows directly from timing: $d = v\,t$, where $t$ is the time sound takes to make the trip. Counting the seconds between a lightning flash and its thunder, then multiplying by air's speed of sound, gives an estimate of how far away the storm struck. +At constant speed, one-way distance is $d=vt$. Use seconds for t and metres per second for v to obtain metres. For an echo, the pulse travels out and back; the distance to the reflector is then $d=vt/2$, assuming the same speed on both legs. ## Advanced -The 0.6 m/s-per-degree figure is itself an approximation of $v = \sqrt{\gamma R T_K / M}$, where $T_K$ is the absolute temperature in kelvin — sound speed in a gas actually depends on temperature through a square root, not a straight line, but over the range of everyday weather the straight-line fit is accurate to well within the timing precision of counting seconds by hand. +In a fluid, the small-signal speed is $v=\sqrt{B/\rho}$, where B is bulk modulus and ρ is density. For an ideal gas it becomes $v=\sqrt{\gamma RT_K/M}$, with absolute temperature in kelvin. The air rule above approximates this temperature dependence. In solids, different wave modes can have different speeds. See [OpenStax’s treatment of sound speed](https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound). ## Derivation -1. Air's sound speed rises roughly linearly with temperature, about 0.6 m/s per degree Celsius above the 0°C value. -2. Plugging in a comfortable room temperature of 20°C gives the commonly quoted 343 m/s. -3. Distance is simply speed multiplied by the travel time the sound took to arrive. +1. Start from the approximate air speed at 0°C and add 0.6 m/s for each degree Celsius. +2. Substituting 20°C gives 331 + 12 = 343 m/s. +3. Multiply a constant speed by elapsed travel time to obtain the distance covered. ## Real world -### Lightning-and-thunder counting -Counting seconds between a flash and its thunder and multiplying by air's speed of sound gives a rough distance to a storm, useful for judging how much time remains before it arrives. +### Measuring distance with sound -### Sonar and underwater surveying -Because sound moves so much faster in water than in air, sonar systems time an underwater echo and use water's higher speed of sound to work out depth or distance. +A sensor can time a reflected pulse. It needs the speed in the actual medium and must account for the round trip. -### Ultrasound and ultrasonic sensors -Medical ultrasound and parking sensors both time how long a pulse takes to bounce back, using the known speed of sound in the medium it travels through. +### Wind instruments -### Musical instrument tuning -A wind instrument's pitch depends on the speed of sound in the air inside it, which is why brass and woodwind instruments can drift slightly out of tune as a room warms up or cools down. +The speed of sound in the air column affects its resonant frequencies. A temperature change can therefore change the pitch. diff --git a/content/lessons/waves/speed-of-sound/lesson.yaml b/content/lessons/waves/speed-of-sound/lesson.yaml index a8ce012f..d569d9ef 100644 --- a/content/lessons/waves/speed-of-sound/lesson.yaml +++ b/content/lessons/waves/speed-of-sound/lesson.yaml @@ -56,6 +56,4 @@ presets: challenges: - check: medium==1 - check: medium==2 - - check: (331+0.6*T)*t - target: 1000 - tol: 30 + - check: medium==0 and abs((331+0.6*T)*t-1000)<=30 diff --git a/content/lessons/waves/standing-waves/ar.md b/content/lessons/waves/standing-waves/ar.md index 444805e0..4b9cf331 100644 --- a/content/lessons/waves/standing-waves/ar.md +++ b/content/lessons/waves/standing-waves/ar.md @@ -1,70 +1,64 @@ --- title: 'الموجات المستقرة: لماذا لكل وتر نغمته' -summary: >- - هزّ حبل القفز بالسرعة الصحيحة فيثبت شكله: نقاط ساكنة وحدبات تتأرجح. هكذا تختار - الأوتار نغماتها. +summary: 'اجمع موجتين تنتقلان في اتجاهين متعاكسين لتظهر عُقد ثابتة، ثم عدّ البطون بين طرفَي الوتر.' parameters: - A: السعة A - 'n': رقم التوافقي n - f: التردد f - t: الزمن t - x: الموضع على طول الوتر x + A: 'A — سعة كل موجة منتقلة' + n: 'n — عدد البطون' + f: 'f — تردد الاهتزاز' + t: 't — الزمن' + x: 'x — الموضع على الوتر' variables: - - طول الوتر الثابت، 6 m (كلا الطرفين مثبَّت وساكن) - - رقم التوافقي — عدد الحدبات التي تتسع على طول الوتر - - سعة التذبذب وتردده + - 'طول الوتر الثابت، وهو 6 m' + - 'عدد صحيح موجب يعدّ أنصاف الأطوال الموجية' + - 'سعة الموجة المكوّنة وتردد الاهتزاز' --- ## Try it -1. شغّل الحركة. كل نقطة على الوتر تتحرك صعودًا ونزولًا في مكانها. النمط نفسه لا يتحرك من مكانه. -2. ارفع منزلق «رقم التوافقي n» خطوة خطوة. عُدّ الحدبات التي تظهر. -3. راقب النقاط الساكنة، وتُسمى العُقد. تقف عند طرفَي الوتر وعند أي نقطة بالكاد تتحرك. +1. اجعل n = 2 وA = 1 وشغّل الحركة. يبقى الطرفان والمنتصف عند الصفر، بينما يتبادل الجزآن الصعود والهبوط. +2. زد n من 1 إلى 6. ستجد n من البطون وn + 1 من العُقد، مع احتساب الطرفين. انظر إلى الشكل بعيدًا عن اللحظات التي يمر فيها الوتر كله بخط الصفر. +3. ثبّت n وغيّر f. يسرع الاهتزاز أو يبطؤ دون أن تنتقل العُقد. يسمح العرض بتغيير الشكل والتوقيت مستقلين لتسهيل استكشافهما. ## Real-life examples -1. **النغمة الأساسية لوتر الغيتار.** يُقرَع الوتر بأبسط شكل له (التوافقي n = 1، السعة A = 1.2). يتأرجح الوتر كله كحدبة كبيرة واحدة. هذه أخفض نغمة يعزفها الوتر وأعلاها صوتًا. -2. **وتر مضغوط عند منتصفه بالضبط.** لمس المنتصف يفرض نقطة ساكنة هناك (n = 2، A = 0.8). ينقسم الوتر إلى حدبتين أصغر، ترنّان بنغمة أعلى. -3. **نغمة علوية في أنبوب أرغن.** يستقر الهواء داخل الأنبوب أيضًا على نمط أدق (n = 4، A = 0.5). يضيف هذا لمعانًا فوق نغمة الأنبوب الأساسية. +1. **بطن واحد.** عند n = 1 وA = 1.2 وf = 0.5 Hz، تقع العقدتان عند 0 و6 m. تبلغ أقصى إزاحة للمنتصف 2.4، وتستغرق الدورة ثانيتين. +2. **بطنان.** عند n = 2 وA = 0.8 وf = 0.8 Hz، تظهر عقدة إضافية عند 3 m. تبلغ أقصى إزاحة 1.6. +3. **أربعة بطون.** عند n = 4 وA = 0.5 وf = 1.2 Hz، تفصل بين العُقد مسافة 1.5 m. أقصى إزاحة هي 1. هذه أنماط مستقلة، وليست توافقات لوتر فعلي واحد ثابت الخصائص. ## Test yourself -1. كوّن التوافقي الثاني. اجعل الحدبات حدبتين بالضبط، مع نقطة ساكنة في المنتصف (n = 2). -2. ادفع الوتر إلى أعلى توافقي ممكن. اجعله يُظهر 6 حدبات في آن واحد (n = 6). -3. اجعل الوتر يهتز ببطء، بتردد أقل من 0.5 Hz، بينما يُظهر 3 حدبات (n = 3). +1. اختر n = 2 لتحصل على بطنين. +2. اختر n = 6، وهو أكبر عدد توافقي متاح في العرض. +3. أظهر ثلاثة بطون بتردد أقل من 0.5 Hz. ## Intuition -اهزز طرف حبل قفز طويل صعودًا ونزولًا. ليُمسك صديقك الطرف الآخر ثابتًا. جرّب سرعات هز مختلفة. عند معظم السرعات يتحرك الحبل بفوضى. لكن عند سرعات قليلة معينة يستقر على شكل نظيف متكرر، يبدو وكأنه يتنفس في مكانه بدل أن ينتقل. الرسم على الشاشة يُظهر هذا بالضبط. اضغط تشغيل، فتتحرك كل نقطة على الوتر الأزرق صعودًا ونزولًا. لكن النمط العام يبقى ثابتًا بين الطرفين. بعض النقاط، وتُسمى العُقد، بالكاد تتحرك. نقاط أخرى في منتصف المسافة بينها، وتُسمى البطون، تتأرجح بأكبر مدى. +أرسل موجتين جيبيتين متساويتين على وتر في اتجاهين متعاكسين. تُجمع إزاحتاهما. عند مواضع معينة تلغي إحداهما الأخرى دائمًا؛ هذه هي العُقد. وفي منتصف المسافة بين كل عقدتين تكون الحركة أكبر ما يمكن؛ وهذا موضع البطن. تبقى العُقد ثابتة رغم أن كل موجة من الموجتين تنتقل. -ارفع منزلق «رقم التوافقي n» خطوة خطوة. عُدّ الحدبات في كل خطوة. عند n = 1 يتأرجح الوتر بطوله الكامل، 6 أمتار، كحدبة كبيرة واحدة. عند n = 2 ينقسم الوتر إلى حدبتين أصغر، مع نقطة ساكنة جديدة في المنتصف. وهكذا يزداد عدد الحدبات مع n. لا يُسمح إلا بعدد صحيح من الحدبات، لأن الوتر يجب أن يبقى ساكنًا عند طرفيه الثابتين مهما حدث. منزلق «التردد f» يضبط سرعة تنفس النمط. منزلق «السعة A» يضبط مدى تأرجح كل حدبة. لا يغيّر أي منهما عدد الحدبات. +إذا كان الوتر مثبتًا من طرفيه، فلا بد أن يكون كل طرف عقدة. يعدّ n أنصاف الأطوال الموجية التي تتسع لها المسافة بينهما. تمثل A هنا سعة كل موجة منتقلة، ولذلك تبلغ أقصى إزاحة للموجة الواقفة ضعف A. ولا تصبح النقطة عقدة لمجرد مرورها بالصفر لحظةً؛ فالعقدة تبقى عند الصفر طوال الدورة. ## Formal -المعادلة $y(x,t) = 2A\sin(k_n x)\cos(\omega t)$ تصف الوتر، حيث $k_n = n\pi/L$. هذا تراكب لموجة تتحرك يمينًا وأخرى تتحرك يسارًا، بالسعة نفسها. +لطول $L=6\ \mathrm{m}$، يكون الشكل المعروض $y(x,t)=2A\sin(n\pi x/L)\cos(2\pi ft)$. وطوله الموجي $\lambda_n=2L/n$. العدد n صحيح موجب، وأقصى إزاحة عند البطن هي $2A$. -تحدث العُقد حين $\sin(k_n x) = 0$، أي عند $x = 0, L/n, 2L/n, \dots, L$. وتشمل هذه النقاط دائمًا الطرفين الثابتين. +تحقق العُقد $\sin(n\pi x/L)=0$، أي $x=jL/n$ حيث $j=0,1,\ldots,n$. على وتر مثالي فعلي ذي سرعة موجة ثابتة v، تكون الترددات المسموح بها $f_n=nv/(2L)$. لا يفرض منزلقا n وf المستقلان في هذا العرض علاقة السرعة الثابتة تلك. ## Advanced -الموجات المستقرة هي الأنماط الطبيعية للوتر. أي اهتزاز مسموح فيزيائيًا، مع تثبيت الطرفين كليهما، يُكتب على هيئة تراكب $\sum_n c_n \sin(n\pi x/L)\cos(2\pi f_n t + \varphi_n)$. هذه متسلسلة فورييه في المكان، عند كل لحظة زمنية. التفكيك نفسه يقوم عليه تحليل أي صوت دوري معقّد إلى مجموع من التوافقيات النقية. +قد يجمع اهتزاز عام عدة أنماط للوتر؛ فلا يلزم أن يهتز الوتر المنقور بالتردد الأساسي وحده. ولا يحدد العدد التوافقي وحده علو الصوت. في العرض الثلاثي الأبعاد يتبع الوتر المعادلة نفسها. يوضح السطح الدائري المجاور أنماطًا مكانية إضافية، لكنها تقريبية وليست أنماط طبل دقيقة؛ فأنماط الغشاء الدائري الدقيقة تحتاج إلى دوال شعاعية مختلفة. ## Derivation -1. موجتان متطابقتان تتحركان في اتجاهين متعاكسين. -2. ركّب الموجتين معًا (الموجات تُجمع خطيًا). -3. استخدم متطابقة تحويل المجموع إلى جداء. ينفصل الاعتماد على المكان عن الاعتماد على الزمان، فينتج نمط موقوف. +1. نكتب موجتين جيبيتين متساويتَي السعة تنتقلان في اتجاهين متعاكسين. +2. نجمع إزاحتيهما وفق مبدأ التراكب الخطي. +3. نستخدم متطابقة جمع الجيب لفصل الشكل الذي يعتمد على الموضع عن الاهتزاز الذي يعتمد على الزمن. ## Real world -### الأوتار الموسيقية -تهتز أوتار الغيتار والبيانو بتوافقيات الموجة المستقرة. هذه التوافقيات تحدد النغمة وتوافقياتها العلوية. +### الآلات الوترية -### الآلات الهوائية -يُكوِّن الهواء داخل الفلوت وأنابيب الأرغن موجات موقوفة. تتحدد عُقدها وبطونها بحسب انفتاح طرف الأنبوب أو انغلاقه. +للوتر المثالي المثبت من طرفيه ترددات توافقية تساوي مضاعفات صحيحة لتردده الأساسي. قد تختلف الأوتار الحقيقية عن هذا المثال بسبب الصلابة وغيرها. -### أفران الميكروويف -تُكوِّن موجات الميكروويف موجات موقوفة داخل تجويف الفرن. لهذا توجد الأطباق الدوارة، فهي تتفادى النقاط الباردة عند العُقد. +### أعمدة الهواء -### رنين الجسور والمباني -يمكن أن تنشأ في المنشآت أنماط اهتزاز شبيهة بالموجات المستقرة. يحدث هذا تحت أحمال دورية مثل الرياح أو خطوات المشاة. +تظهر موجات واقفة في أعمدة الهواء أيضًا، لكن شروط الحدود تختلف بين الضغط وإزاحة جسيمات الوسط. لا يعادل طرف الأنبوب المفتوح ببساطة طرف وتر ثابتًا. diff --git a/content/lessons/waves/standing-waves/en.md b/content/lessons/waves/standing-waves/en.md index 566c6f7c..f43dd38d 100644 --- a/content/lessons/waves/standing-waves/en.md +++ b/content/lessons/waves/standing-waves/en.md @@ -1,71 +1,64 @@ --- title: Standing waves on a string -summary: >- - A jump rope shaken at one end settles into a shape that does not travel - anywhere — some points stay still while others swing widely — and how many - humps appear depends only on how fast you shake it. +summary: 'Combine opposite travelling waves to make stationary nodes, and count the loops between a string’s fixed ends.' parameters: - A: amplitude A - 'n': harmonic number n - f: frequency f - t: time t - x: position along string x + A: 'A — amplitude of each travelling wave' + n: 'n — number of loops' + f: 'f — oscillation frequency' + t: 't — time' + x: 'x — position along the string' variables: - - 'fixed string length, 6 m (both ends held still)' - - harmonic number — how many humps fit along the string - - amplitude and frequency of the oscillation + - 'string length, fixed at 6 m' + - 'positive integer counting half-wavelength loops' + - 'component amplitude and oscillation frequency' --- ## Try it -1. Let it animate. Every point along the string moves up and down in place, but the pattern itself does not travel. -2. Raise the slider "harmonic number n" one step at a time. Count the humps that appear. -3. Watch the still points, called nodes — they mark the two ends and any point where the string barely moves at all. +1. Set n = 2 and A = 1. Start the animation. The ends and midpoint stay at zero while the two loops alternate sides. +2. Increase n from 1 to 6. Count n loops and n + 1 nodes, including the endpoints. Inspect the shape away from instants when the whole string crosses zero. +3. Keep n fixed and change f. Oscillation becomes faster or slower without moving the nodes. The controls let shape and timing vary independently for exploration. ## Real-life examples -1. **A guitar string's basic note.** Plucked in its simplest shape (harmonic n = 1, amplitude A = 1.2), the whole string swings as one big hump — this is the string's lowest, loudest note. -2. **A string pinched exactly at its middle.** Touching the midpoint forces a still point there (n = 2, A = 0.8), splitting the string into two smaller humps that ring a higher note. -3. **An organ pipe's higher overtone.** Air inside the pipe can also settle into a finer pattern (n = 4, A = 0.5), adding brightness on top of the pipe's basic tone. +1. **One loop.** With n = 1, A = 1.2 and f = 0.5 Hz, the nodes are at 0 and 6 m. The midpoint's maximum displacement is 2.4, and a cycle takes 2 s. +2. **Two loops.** With n = 2, A = 0.8 and f = 0.8 Hz, an additional node appears at 3 m. The largest displacement is 1.6. +3. **Four loops.** With n = 4, A = 0.5 and f = 1.2 Hz, nodes are 1.5 m apart. The largest displacement is 1. These presets are separate patterns, not harmonics of one unchanged physical string. ## Test yourself -1. Create the second harmonic: get exactly 2 humps with a still point in the middle (n = 2). -2. Push the string to its highest possible harmonic: 6 humps at once (n = 6). -3. Make the string wiggle slowly (frequency below 0.5 Hz) while still showing 3 humps (n = 3). +1. Select n = 2 to obtain two loops. +2. Select n = 6, the largest harmonic number available in this display. +3. Show three loops oscillating at a frequency below 0.5 Hz. ## Intuition -Shake one end of a long jump rope up and down while a friend holds the other end still, and try different shaking speeds. At most speeds the rope just flails around messily — but at a few special speeds it settles into a clean, repeating shape that seems to breathe in place instead of travelling anywhere. The picture on screen shows exactly this: press play and every point on the blue string moves up and down, yet the overall pattern stays fixed between the two ends. Some points, called nodes, barely move at all; others, halfway between nodes and called antinodes, swing with the largest reach. +Send equal sinusoidal waves along a string in opposite directions. Their displacements add. At certain positions they always cancel, creating nodes. Halfway between adjacent nodes they combine to produce the largest motion; these positions are antinodes. The nodes stay in place even though each contributing wave travels. -Raise the slider "harmonic number n" one step at a time and count the humps: at n = 1 the whole 6-metre string swings as one big hump; at n = 2 it splits into two smaller humps with a new still point in the middle; and so on. Only whole numbers of humps are allowed, because the string must stay motionless at both fixed ends no matter what. The slider "frequency f" controls how fast the pattern breathes in and out, and "amplitude A" controls how far each hump swings — neither one changes how many humps fit. +For a string fixed at both ends, each end must be a node. The number n counts the half-wavelength loops that fit along the length. Here A is the amplitude of each travelling wave, so the largest standing-wave displacement is twice A. A point briefly crossing zero is not necessarily a node: a node stays there throughout the cycle. ## Formal -$y(x,t) = 2A\sin(k_n x)\cos(\omega t)$ where $k_n = n\pi/L$, a superposition of a right- and left-travelling wave of equal amplitude. +For length $L=6\ \mathrm{m}$, the displayed shape is $y(x,t)=2A\sin(n\pi x/L)\cos(2\pi ft)$. Its wavelength is $\lambda_n=2L/n$. The integer n is positive, and the maximum antinode displacement is $2A$. -Nodes occur where $\sin(k_n x) = 0$: $x = 0, L/n, 2L/n, \dots, L$ — always including both fixed ends. +Nodes satisfy $\sin(n\pi x/L)=0$, giving $x=jL/n$ for $j=0,1,\ldots,n$. On a physical ideal string with fixed wave speed v, the allowed frequencies are $f_n=nv/(2L)$. This display's independent n and f controls do not enforce that fixed-speed relation. ## Advanced -Standing waves are the normal modes of the string: any physically allowed vibration (with both ends fixed) can be written as a superposition $\sum_n c_n \sin(n\pi x/L)\cos(2\pi f_n t + \varphi_n)$, a Fourier series in space at each instant in time — this is the same decomposition that underlies analysing any complex periodic sound as a sum of pure harmonics. +A general vibration can combine several string modes; a plucked string need not vibrate in only the fundamental. Loudness does not follow from harmonic number alone. In the 3D view, the string follows the same equation. The nearby circular surface illustrates additional spatial patterns, but its shapes are schematic rather than exact drum modes; exact circular-membrane modes require different radial functions. ## Derivation -1. Two identical waves travelling in opposite directions. -2. Superpose them (waves add linearly). -3. Sum-to-product identity: the space and time dependence factor apart — a standing pattern. +1. Write two equal-amplitude sinusoidal waves travelling in opposite directions. +2. Add their displacements using linear superposition. +3. Apply the sine sum identity to separate the position-dependent shape from the time-dependent oscillation. ## Real world -### Musical strings -Guitar and piano strings vibrate in standing-wave harmonics, which determine the note and its overtones. +### String instruments -### Wind instruments -Air columns in flutes and organ pipes form standing waves with nodes and antinodes set by the pipe's open or closed ends. +An ideal fixed string has harmonic frequencies that are integer multiples of its fundamental. Real strings can depart from the ideal because of stiffness and other effects. -### Microwave ovens -Microwaves form standing waves inside the cavity, which is why food turntables exist — to avoid cold spots at the nodes. +### Air columns -### Bridge and building resonance -Structures can develop standing-wave-like vibration modes under periodic loading such as wind or footsteps. +Standing waves also occur in air columns, but the boundary conditions for pressure and particle displacement differ. An open pipe end is not simply a fixed string end. diff --git a/content/lessons/waves/standing-waves/lesson.yaml b/content/lessons/waves/standing-waves/lesson.yaml index a21b3c1b..41c29fef 100644 --- a/content/lessons/waves/standing-waves/lesson.yaml +++ b/content/lessons/waves/standing-waves/lesson.yaml @@ -21,8 +21,8 @@ visualization: - 0 - 6 range: - - -3 - - 3 + - -4.2 + - 4.2 mode: plain animate: param: t diff --git a/content/lessons/waves/thin-lenses/ar.md b/content/lessons/waves/thin-lenses/ar.md index 2b242bd9..9cfe8f71 100644 --- a/content/lessons/waves/thin-lenses/ar.md +++ b/content/lessons/waves/thin-lenses/ar.md @@ -1,68 +1,63 @@ --- title: العدسات الرقيقة وتكوين الصورة -summary: >- - العدسة المكبرة قرب الصفحة تكبّر الحروف، وعلى بعد متر تقلب المشهد. رقمان فقط يحددان الصورة. +summary: 'حدّد موضع الصورة بعدسة مجمِّعة، واعرف هل هي حقيقية أم وهمية، معتدلة أم مقلوبة.' parameters: - f: البعد البؤري f - doo: بعد الجسم d₀ - ho: ارتفاع الجسم h₀ + f: 'f — البعد البؤري الموجب' + doo: 'd₀ — بُعد الجسم' + ho: 'h₀ — ارتفاع الجسم' variables: - - البعد البؤري f - - بعد الجسم وبعد الصورة - - ارتفاع الجسم وارتفاع الصورة - - التكبير m + - 'البعد البؤري الموجب للعدسة المجمِّعة' + - 'بُعد الجسم وبُعد الصورة ذو الإشارة' + - 'ارتفاع الجسم وارتفاع الصورة ذو الإشارة' + - 'نسبة ارتفاع الصورة إلى ارتفاع الجسم مع الإشارة' --- ## Try it -1. اسحب السهم الأحمر، وهو الجسم، بعيدًا عن العدسة. راقب الأشعة الثلاثة تتقاطع على الجانب الآخر، فترسم صورة صغيرة مقلوبة. -2. اسحب الجسم أقرب، متجاوزًا العلامة $F$. تتباعد الأشعة الآن بدل أن تتقاطع، فتظهر صورة كبيرة منتصبة متقطعة بدلًا من ذلك. -3. ارفع منزلق «البعد البؤري f». راقب أين تتحرك نقطة التقاطع، أو الصورة المتقطعة. +1. اجعل f = 6 وd₀ = 15 وh₀ = 3. بُعد الصورة 10 والتكبير −2/3؛ أي إن الصورة حقيقية مقلوبة وارتفاعها وحدتان. +2. قرّب الجسم إلى d₀ = 3. يصبح بُعد الصورة −6 والتكبير +2. تحدد امتدادات الأشعة المتقطعة إلى الخلف صورة وهمية معتدلة. +3. اجعل d₀ = f = 6. تخرج الأشعة متوازية، ولا توجد صورة على مسافة منتهية. قرب هذا الإعداد قد تقع الصورة خارج الرسم؛ راجع القراءات. ## Real-life examples -1. **كاميرا تصوّر شجرة بعيدة.** مع بُعد الشجرة (بعد الجسم d₀ = 25، البعد البؤري f = 6، الارتفاع h₀ = 2)، تكوّن العدسة صورة حقيقية صغيرة مقلوبة على الحساس. هذا بالضبط ما تلتقطه الكاميرا. -2. **عدسة مكبّرة فوق نص صغير.** مُمسكة قريبة من الصفحة (d₀ = 3، f = 6، h₀ = 1)، يقع الجسم داخل البعد البؤري. تُنتج العدسة صورة خيالية كبيرة ومنتصبة تستطيع العين التركيز عليها. -3. **عدسة جهاز عرض تُظهر شريحة.** موضوعة خارج بعدها البؤري بقليل (d₀ = 12، f = 10، h₀ = 1.5)، تُسقط العدسة صورة حقيقية كبيرة مقلوبة على شاشة بعيدة. لهذا تُركَّب الشريحة مقلوبة داخل الجهاز. +1. **صورة حقيقية أصغر.** عند f = 6 وd₀ = 25 وh₀ = 2، نحصل على dᵢ ≈ 7.89 وm ≈ −0.316 وhᵢ ≈ −0.632. تشبه هذه الهندسة تكوين صورة على حساس كاميرا. +2. **عدسة مكبّرة.** عند f = 6 وd₀ = 3 وh₀ = 1، يكون dᵢ = −6 وm = +2. الصورة وهمية معتدلة وارتفاعها وحدتان. +3. **صورة حقيقية أكبر.** عند f = 10 وd₀ = 12 وh₀ = 1.5، يكون dᵢ = 60 وm = −5 وhᵢ = −7.5. تقع الصورة خارج نافذة الرسم الثنائي الأبعاد، كما قد يحدث في هندسة جهاز عرض. ## Test yourself -1. ضع الجسم بحيث تتكوّن الصورة على بُعد 10 وحدات بالضبط خلف العدسة (بعد الصورة = 10). -2. حرّك الجسم إلى داخل البعد البؤري، لتُنتج العدسة صورة خيالية، تمامًا كالعدسة المكبّرة. -3. احصل على تكبير يساوي −2 بالضبط. اجعل الصورة أطول من الجسم بمرتين، ومقلوبة. +1. اختر f وd₀ لتقع صورة حقيقية على بُعد 10 وحدات خلف العدسة. +2. ضع الجسم بين العدسة وبؤرتها لتكوين صورة وهمية. +3. احصل على m = −2: صورة مقلوبة ارتفاعها ضعف ارتفاع الجسم. ## Intuition -أمسك عدسة مكبّرة على بعد بضعة سنتيمترات فوق صفحة نص. تبدو الحروف أكبر، وتبقى في وضعها الصحيح. حرّك العدسة نفسها إلى بعد متر واحد بدلًا من ذلك، فتقلب المشهد كله رأسًا على عقب. يأتي السلوكان من العدسة نفسها. الفارق الوحيد هو بُعد الجسم، ويُسمّى $d_0$. في الرسم، السهم الأحمر الواقف على المحور هو الجسم. اسحبه مقتربًا من العدسة أو مبتعدًا عنها. وهو بعيد تمامًا خارج العلامة $F$، وهي النقطة البؤرية، وتبعد هنا 6 وحدات عن العدسة بالقيم الابتدائية. تتقاطع الأشعة الإنشائية الثلاثة على الجانب الآخر، وترسم صورة حقيقية مقلوبة. اسحبه بعيدًا بما يكفي، فتنكمش تلك الصورة نحو $F$. +يرسل سهم الجسم أشعة نحو العدسة. ينكسر الشعاع الموازي للمحور نحو البؤرة البعيدة، بينما يستمر الشعاع المار بمركز العدسة الرقيقة المثالية مستقيمًا. حيث تلتقي الأشعة الخارجة تتكون صورة حقيقية، ويمكن لشاشة موضوعة هناك استقبالها. -الآن اسحب الجسم إلى داخل $F$، أي أقرب إلى العدسة من بعدها البؤري. تتباعد الأشعة الخارجة من العدسة الآن بدل أن تتقاطع، فلا تكوّن صورة حقيقية أبدًا. فقط امتداداتها الخلفية تلتقي، على الجانب نفسه للجسم، مرسومة هنا كسهم متقطع منتصب ومكبّر. هذا السهم المتقطع صورة خيالية، تمامًا مثل التي أنتجتها العدسة المكبّرة حين أمسكتها قريبة من الصفحة. +إذا كان الجسم أقرب إلى العدسة من البعد البؤري، تخرج الأشعة متباعدة. تلتقي امتداداتها إلى الخلف في جهة الجسم، فتحدد صورة وهمية. لا يتجمع الضوء فعليًا في ذلك الموضع، لكن الأشعة الخارجة تبدو كأنها صادرة منه. وفي هذا النموذج، يغير ارتفاع الجسم ارتفاع الصورة دون أن يغير بُعدها. ## Formal -تربط معادلة العدسة الرقيقة بين الأبعاد الثلاثة، وهي $\dfrac{1}{f} = \dfrac{1}{d_0} + \dfrac{1}{d_i}$. يخرج $d_i$ سالبًا حين تكون الصورة خيالية. +لهذه العدسة المجمِّعة والجسم الحقيقي، يكون $f>0$ و$d_0>0$. معادلة العدسة الرقيقة هي $1/f=1/d_0+1/d_i$، ومنه $d_i=fd_0/(d_0-f)$ عندما يكون $d_0\ne f$. يشير بُعد الصورة الموجب إلى الجهة الأخرى من العدسة، والسالب إلى جهة الجسم. -يقارن التكبير الارتفاعين، $m = h_i/h_0 = -d_i/d_0$. قيمة $m$ السالبة تعني صورة حقيقية مقلوبة، وقيمة $m$ الموجبة تعني صورة خيالية منتصبة. +التكبير هو $m=h_i/h_0=-d_i/d_0$. تعني m السالبة هنا صورة حقيقية مقلوبة، وتعني الموجبة صورة وهمية معتدلة. عند $d_0=f$، لا يوجد مستوى صورة على بُعد منتهٍ. استخدم وحدة طول واحدة لجميع المسافات والارتفاعات. ## Advanced -المعادلة نفسها، مع اصطلاح إشارات، تغطي العدسات المفرِّقة إلى جانب المجمِّعة ($f < 0$). تصف أيضًا الأنظمة المركّبة بمعاملة صورة كل عدسة كجسم للعدسة التالية. تكدّس التصاميم البصرية الحقيقية عدة عدسات رقيقة كهذه لإلغاء الزيغ الذي لا تستطيع عدسة واحدة تجنّبه. +معادلة العدسة الرقيقة تقريب للأشعة القريبة من المحور التي تصنع معه زوايا صغيرة. تسمح المنزلقات باستكشاف المعادلة حتى عندما تصبح زوايا الرسم كبيرة. للعدسات الحقيقية سماكة محدودة وزيوغ بصرية. يضيف العرض الثلاثي الأبعاد حزمة أشعة، لكن مساحة العرض محدودة قرب الحالة التي يساوي فيها بُعد الجسم البعد البؤري؛ وتبقى القراءات العددية مرجع موضع الصورة. ## Derivation -1. المثلثات المتشابهة على جانبي العدسة تربط الارتفاعين بالبعدين، مع إشارة سالبة لأن الصورة مقلوبة. -2. الجمع بين تلك النسبة وهندسة الشعاعين الإنشائيين المارين بالنقطتين البؤريتين للعدسة يعطي معادلة العدسة الرقيقة. -3. إعادة ترتيب نسبة الارتفاعين حسب البعدين يعطي صيغة التكبير مباشرة. +1. يربط تشابه المثلثات للشعاع المركزي ارتفاع الصورة ذي الإشارة ببُعدها، وارتفاع الجسم ببُعده. +2. نجمع هذه العلاقة مع علاقة الشعاع الموازي للمحور الذي يمر بالبؤرة البعيدة بعد الانكسار. +3. نعبّر عن نسبة الارتفاعين بالتكبير، مع الاحتفاظ بالإشارة التي تحدد اتجاه الصورة. ## Real world ### الكاميرات -تُركّز عدسة الكاميرا الضوء القادم من المشهد على الحساس، تمامًا كما تصفه هذه المعادلة. التركيز التلقائي ما هو إلا تعديل آلي لـ $d_i$. -### العين البشرية -تغيّر عدسة العين بعدها البؤري بنفسها، وهذا هو التكيّف، لتبقي الصور حادة على الشبكية مع تغيّر $d_0$. +يكوّن نظام العدسات صورة على الحساس. يغير التركيز الهندسة الضوئية؛ وقد تحرّك أنظمة التركيز التلقائي مجموعات داخلية من العدسات، بدلًا من تحريك عدسة مثالية واحدة. ### العدسات المكبّرة -حمل عدسة مكبّرة أقرب إلى الجسم من بعدها البؤري ينتج الصورة الخيالية المنتصبة المكبّرة، التي تُرى حين يقع الجسم داخل النقطة $F$. -### أجهزة العرض -يضع جهاز العرض صورة المصدر خارج البعد البؤري بقليل، فتُسقط العدسة صورة حقيقية مقلوبة كبيرة على شاشة بعيدة. +يعطي الجسم الواقع داخل البعد البؤري صورة وهمية معتدلة. ويعتمد التكبير الزاوي الذي تراه العين أيضًا على موضع المشاهدة. diff --git a/content/lessons/waves/thin-lenses/en.md b/content/lessons/waves/thin-lenses/en.md index 8023843d..81b15367 100644 --- a/content/lessons/waves/thin-lenses/en.md +++ b/content/lessons/waves/thin-lenses/en.md @@ -1,71 +1,63 @@ --- title: Thin lenses and image formation -summary: >- - A magnifying glass held close to a page makes the letters look bigger and - upright, but held farther away it flips the whole view upside-down — where - the lens puts that image depends on just two numbers: its focal length and - how far away the object sits. +summary: 'Use a converging lens to locate an image and decide whether it is real or virtual, upright or inverted.' parameters: - f: focal length f - doo: object distance d₀ - ho: object height h₀ + f: 'f — positive focal length' + doo: 'd₀ — object distance' + ho: 'h₀ — object height' variables: - - focal length f - - object distance and image distance - - object height and image height - - magnification m + - 'positive focal length of the converging lens' + - 'object distance and signed image distance' + - 'object height and signed image height' + - 'signed ratio of image height to object height' --- ## Try it -1. Drag the red arrow (the object) far from the lens. Watch the three rays cross on the far side, drawing a small, upside-down image. -2. Drag the object closer, past the mark labelled F. The rays now spread apart instead of crossing — a big, upright, dashed image appears instead. -3. Raise the slider "focal length f". Watch where the crossing point (or the dashed image) moves. +1. Set f = 6, d₀ = 15 and h₀ = 3. The image distance is 10 and magnification is −2/3: the image is real, inverted and 2 units tall. +2. Move the object to d₀ = 3. Image distance becomes −6 and magnification becomes +2. Dashed backward extensions locate an upright virtual image. +3. Set d₀ = f = 6. The emerging rays are parallel and no finite image distance exists. Near this setting an image may lie outside the diagram; check the readouts. ## Real-life examples -1. **A camera photographing a distant tree.** With the tree far away (object distance d₀ = 25, focal length f = 6, height h₀ = 2) the lens forms a small, upside-down real image on the sensor — exactly what the shutter captures. -2. **A magnifying glass over small text.** Held close to the page (d₀ = 3, f = 6, h₀ = 1) the object sits inside the focal length, so the lens produces a large, upright, virtual image the eye can focus on. -3. **A projector lens showing a slide.** Placed just outside its focal length (d₀ = 12, f = 10, h₀ = 1.5), the lens throws a large, real, upside-down image onto the distant screen — which is why the slide is mounted upside-down inside the projector. +1. **A smaller real image.** For f = 6, d₀ = 25 and h₀ = 2, dᵢ ≈ 7.89, m ≈ −0.316 and hᵢ ≈ −0.632. This is the kind of geometry used to form an image on a camera sensor. +2. **A magnifier.** For f = 6, d₀ = 3 and h₀ = 1, dᵢ = −6 and m = +2. The virtual image is upright and 2 units tall. +3. **A larger real image.** For f = 10, d₀ = 12 and h₀ = 1.5, dᵢ = 60, m = −5 and hᵢ = −7.5. The image is beyond the 2D window, as can happen in projector geometry. ## Test yourself -1. Position the object so the image forms exactly 10 units behind the lens (image distance = 10). -2. Move the object inside the focal length so the lens makes a virtual image, like a magnifying glass. -3. Get a magnification of exactly −2: an image twice as tall as the object, and upside-down. +1. Choose f and d₀ to place a real image 10 units beyond the lens. +2. Place the object inside the focal distance to make a virtual image. +3. Obtain m = −2: an inverted image with twice the object's height. ## Intuition -Hold a magnifying glass a few centimetres above a page of text and the letters look bigger while staying right-side up — move the same glass a metre away instead, and it flips the whole scene upside-down. Both behaviours come from the same lens; only the object's distance changes, called $d_0$. On screen, the red arrow standing on the axis is the object: drag it closer to or farther from the lens. With it well outside the mark labelled $F$ (the focal point, 6 units from the lens by default), the three construction rays cross on the far side and trace a real, upside-down image; drag it far enough away and that image shrinks toward $F$. +The object arrow sends rays toward the lens. A ray parallel to the axis bends toward the far focal point, while a ray through the ideal thin lens's centre continues straight. Where the outgoing rays meet, they form a real image. A screen placed there could receive it. -Now drag the object inside $F$, closer to the lens than the focal length. The rays leaving the lens now spread apart instead of crossing, so they never form a real image — only their backward extensions meet, on the same side as the object, drawn here as a dashed, upright, enlarged arrow. That dashed arrow is a virtual image, exactly what the magnifying glass produced when held close to the page. +When the object is closer than the focal length, the outgoing rays spread apart. Their backward extensions meet on the object's side of the lens, marking a virtual image. Light does not actually converge at that location, but the outgoing rays appear to come from it. Changing object height changes image height without changing image distance in this model. ## Formal -The thin-lens equation relates the three distances: $\dfrac{1}{f} = \dfrac{1}{d_0} + \dfrac{1}{d_i}$, with $d_i$ coming out negative when the image is virtual. +For this converging lens and real object, $f>0$ and $d_0>0$. The thin-lens equation is $1/f=1/d_0+1/d_i$, so $d_i=fd_0/(d_0-f)$ when $d_0\ne f$. Positive image distance lies beyond the lens; negative image distance lies on the object's side. -Magnification compares heights: $m = h_i/h_0 = -d_i/d_0$, so a negative $m$ means an upside-down real image and a positive $m$ means an upright virtual one. +Magnification is $m=h_i/h_0=-d_i/d_0$. Here negative m means an inverted real image, and positive m means an upright virtual image. At $d_0=f$, there is no finite image plane. Use the same length unit for all distances and heights. ## Advanced -The same lens equation, with a sign convention, covers diverging as well as converging lenses ($f < 0$) and describes compound systems by treating each lens's image as the next lens's object. Real optical designs stack several such thin-lens elements to cancel aberrations that a single lens cannot avoid. +The thin-lens equation is a paraxial approximation: rays are close to the axis and make small angles with it. The sliders explore its algebra even when the drawing has large ray angles. Real lenses have finite thickness and aberrations. The 3D view adds a ray fan, but screen extent is limited near the focal-distance singularity; numerical readouts remain the reference for image position. ## Derivation -1. Similar triangles on either side of the lens relate the two heights to the two distances, with a minus sign for the image being upside-down. -2. Combining that ratio with the geometry of the two construction rays through the lens's focal points gives the thin-lens equation. -3. Rearranging the height ratio in terms of the distances gives the magnification formula directly. +1. Similar triangles for the central ray relate signed image height to image distance and object height to object distance. +2. Combine that relation with the ray parallel to the axis, which passes through the far focal point after refraction. +3. Express the height ratio as magnification, retaining the sign that records orientation. ## Real world ### Cameras -A camera lens focuses light from the scene onto the sensor exactly as this equation describes, and autofocus is just motorized adjustment of $d_i$. -### The human eye -The eye's lens changes its own focal length (accommodation) to keep images sharp on the retina as $d_0$ changes. +A lens system forms an image on a sensor. Focusing changes the optical geometry; real autofocus systems may move internal lens groups rather than simply moving one ideal lens. ### Magnifying glasses -Holding a magnifying glass closer to an object than its focal length produces the enlarged, upright virtual image seen when the object sits inside $F$. -### Projectors -A projector places its source image just outside the focal length so the lens casts a large, real, inverted image onto a distant screen. +An object inside the focal distance gives an upright virtual image. The apparent angular enlargement seen by an eye also depends on viewing geometry. diff --git a/content/lessons/waves/total-internal-reflection/ar.md b/content/lessons/waves/total-internal-reflection/ar.md index 58063b67..dce792f5 100644 --- a/content/lessons/waves/total-internal-reflection/ar.md +++ b/content/lessons/waves/total-internal-reflection/ar.md @@ -1,66 +1,61 @@ --- title: الانعكاس الداخلي الكلي -summary: >- - أضئ كشافًا من تحت الماء بزاوية مائلة بما يكفي فيرتد الضوء كله. هكذا تنقل الألياف الضوئية الإنترنت. +summary: 'اعثر على الزاوية الحرجة، وتعرّف إلى الشرطين اللازمين لانعكاس الضوء كليًا داخل وسط أعلى معاملًا للانكسار.' parameters: - theta1: زاوية السقوط θ₁ - n1: معامل انكسار الوسط الأول (الأكثف) - n2: معامل انكسار الوسط الثاني (الأقل كثافة) + theta1: 'θ₁ — زاوية السقوط من العمود' + n1: 'n₁ — معامل الوسط الأول' + n2: 'n₂ — معامل الوسط الثاني' variables: - - معامل انكسار الوسط الأول والوسط الثاني - - الزاوية الحرجة θ_c + - 'معاملا الانكسار للوسط الذي يأتي منه الضوء والوسط الثاني' + - 'الزاوية الحرجة، وتُعرّف عندما يكون n₁ > n₂' --- ## Try it -1. بالقيم الافتراضية، ابحث عن شعاع منحنٍ يعبر السطح الفاصل. لن تجده. يوجد فقط الشعاع المنعكس، مرسومًا بكامل سطوعه. -2. اسحب θ1 إلى الأسفل. راقب الشعاع المنكسر يظهر من جديد بعد تجاوزك الزاوية الحرجة. -3. ادفع n2 بدلًا من ذلك نحو n1. تكبر قراءة الزاوية الحرجة، حتى تصبح كل زاوية نافذة عند n1 = n2. +1. اجعل n1 = 1.5 وn2 = 1 وθ₁ = 50°. الزاوية الحرجة نحو 41.8°، ولذلك يعرض النموذج انعكاسًا داخليًا كليًا. +2. اخفض θ₁ إلى 40°. يظهر شعاع نافذ. لا بد أن تتجاوز زاوية السقوط الزاوية الحرجة لحدوث الانعكاس الداخلي الكلي. +3. اجعل n1 = n2 = 1.5. تختفي قراءة الزاوية الحرجة؛ فلا يوجد انتقال إلى وسط أقل معاملًا يتيح هذا الأثر. ## Real-life examples -1. **الضوء داخل نواة ليف ضوئي.** نواة زجاجية (n1 = 1.5) يحيط بها غلاف زجاجي أقل كثافة قليلًا (n2 = 1.4). يضرب الضوء الجدار بزاوية 80°، فينعكس تمامًا ويواصل السير داخل الليف. -2. **بريق الألماس.** يضرب الضوء داخل الألماس (n1 = 2.42) سطحه السفلي بزاوية 30°، أبعد بكثير من الزاوية الحرجة بين الألماس والهواء (n2 = 1). يرتد إلى الأعلى بدلًا من أن يتسرب. لهذا يلمع الألماس المصقول بشدة. -3. **سبّاح ينظر إلى الأعلى بزاوية منخفضة.** يحاول الضوء مغادرة الماء (n1 = 1.33) إلى الهواء (n2 = 1) بزاوية 60° من الرأسي، فيتجاوز الزاوية الحرجة بين الماء والهواء، وهي نحو 48.8°. ينعكس إلى الأسفل بدلًا من أن يهرب. لهذا تختفي السماء خارج دائرة ضيقة فوق رأسه. +1. **القلب والغلاف.** يعطي المعاملان 1.5 و1.4 زاوية حرجة تقارب 69.0°. يحقق السقوط عند 80° شرط الانعكاس الداخلي الكلي. +2. **من الألماس إلى الهواء.** يعطي المعاملان التمثيليان 2.42 و1 زاوية حرجة تقارب 24.4°. يتجاوزها السقوط عند 30°. +3. **من الماء إلى الهواء.** يعطي المعاملان 1.33 و1 زاوية حرجة نحو 48.8°. يتجاوزها السقوط عند 60°. نقيس هذه الزوايا من العمود المقام، لا من السطح. ## Test yourself -1. لأي n1 أكبر من n2 تختاره، اضبط θ1 على 2° فوق الزاوية الحرجة بالضبط. -2. اجعل الانعكاس الداخلي الكلي مستحيلًا. ارفع n2 حتى يطابق n1، بفارق أقل من 0.02. -3. لأي n1 أكبر من n2، جِد θ1 ضمن 0.5° من الزاوية الحرجة بالضبط. +1. اختر n1 > n2، واضبط θ₁ لتزيد درجتين على الزاوية الحرجة، بهامش 0.5°. +2. ساوِ بين n1 وn2 لإزالة فرق المعاملين. +3. مع إبقاء n1 > n2، اجعل θ₁ على مسافة أقل من 0.5° من الزاوية الحرجة نفسها. ## Intuition -اغطس تحت الماء، وانظر مباشرة إلى الأعلى. سترى السماء كلها مضغوطة داخل دائرة مضيئة فوقك. خارج تلك الدائرة يبدو السطح كالمرآة، يعكس لك قاع البركة. هذا الحد الشبيه بالمرآة هو موضوع هذا الدرس. في الرسم، $n_1$ مضبوط أعلى من $n_2$ بالقيم الافتراضية. يبدأ الضوء في المادة الأكثف. الزاوية الساقطة تجاوزت بالفعل النقطة التي يمكن عندها لشعاع منحنٍ أن يوجد. لا يوجد أي شعاع منكسر يعبر السطح الفاصل إطلاقًا، بل فقط الشعاع المنعكس، مرسومًا بكامل سطوعه. +عندما ينتقل الضوء من وسط أعلى معاملًا إلى وسط أقل معاملًا، يبتعد شعاعه النافذ عن العمود. ومع زيادة زاوية السقوط، يقترب اتجاهه أكثر من السطح. عند الزاوية الحرجة يكون اتجاهه الحدي موازيًا للسطح. وبعد تجاوزها، لا يوجد شعاع نافذ منتشر يحمل الطاقة بعيدًا داخل الوسط المثالي الثاني. -اسحب $\theta_1$ إلى الأسفل، وراقب الشعاع المنكسر يظهر من جديد بعد تجاوزك عتبة تُسمّى الزاوية الحرجة. ينزلق في البداية شبه موازٍ للسطح الفاصل، ثم ينحني أقرب إلى الخط العمودي كلما خفضت الزاوية أكثر. ادفع $n_2$ بدلًا من ذلك نحو $n_1$، فترتفع قراءة الزاوية الحرجة. تصبح عند $n_1 = n_2$ كل زاوية نافذة، ويستحيل حدوث الانعكاس الداخلي الكلي. هذا لا يحدث أصلًا إلا حين يحاول الضوء مغادرة مادة أكثف إلى مادة أقل كثافة. +يلزم شرطان معًا: أن يأتي الضوء من الجانب الأعلى معاملًا، وأن تتجاوز زاوية السقوط الزاوية الحرجة. لا تكفي زاوية كبيرة وحدها. يوضح الليف الثلاثي الأبعاد تكرار توجيه الضوء باستخدام هذا الشرط. مساره المنحني توضيحي؛ ولا يحسب زاوية السقوط المحلية عند كل انحناء في ليف فعلي. ## Formal -لقانون سنل، $n_1\sin\theta_1 = n_2\sin\theta_2$، حل حقيقي لـ $\theta_2$ فقط حين $n_1\sin\theta_1 \le n_2$. بعد تلك النقطة يحتاج $\sin\theta_2$ أن يتجاوز 1، وهذا مستحيل، فلا ينكسر شيء. +عندما يكون $n_1>n_2$، نضع $\theta_2=90^\circ$ في قانون سنيل، فنحصل على $\theta_c=\arcsin(n_2/n_1)$. فوق هذا الحد يكون $n_1\sin\theta_1>n_2$، فلا توجد زاوية حقيقية لشعاع نافذ. -تحدد الحالة الحدية الزاوية الحرجة، $\theta_c = \arcsin(n_2/n_1)$. لا توجد هذه الزاوية إلا حين $n_1 > n_2$. يجب أن يبدأ الضوء في الوسط الأكثف. +في النموذج المثالي عديم الفقد، يعطي $\theta_1>\theta_c$ معامل انعكاس قدرة $R=1$. وإذا كان $n_1\le n_2$، فلا يحدث انعكاس داخلي كلي من هذا النوع. المساواة عند الزاوية الحرجة حالة حدية باتجاه نافذ مماس للسطح؛ وهي تختلف عن تجاوز الحد فعلًا. ## Advanced -الانعكاس الداخلي الكلي كلي فعلًا. خلافًا للانعكاس عند سطح عادي، الذي يفقد دائمًا جزءًا من الضوء بالنفاذ، بعد $\theta_c$ يكون معامل الانعكاس مساويًا للواحد تمامًا في كلا الاستقطابين، بلا أي امتصاص في وسط مثالي بلا فقد. هذا ما يجعله مفيدًا لتوجيه الضوء مسافات طويلة بفقد شبه معدوم، لا مجرد تغيير اتجاهه. +يمتد مجال متلاشٍ مسافة قصيرة داخل الوسط الأقل معاملًا حتى أثناء الانعكاس الداخلي الكلي. لذلك لا يعني غياب الشعاع النافذ غياب المجال خارج الوسط. وقد يقترن وسط آخر قريب بهذا المجال وينقل منه طاقة. وفي الألياف الحقيقية يحدث توهين بسبب الامتصاص والتشتت والانحناءات؛ فلا تعني مثالية انعكاس السطح أن الانتقال عديم الفقد لأي مسافة. ## Derivation -1. يربط قانون سنل بين الزاويتين عند أي سطح فاصل بين الوسطين. -2. عند الزاوية الحرجة، يجب أن ينزلق الشعاع المنكسر موازيًا تمامًا للسطح الفاصل، أي بزاوية 90 درجة. هذا يحدد $\theta_c$ من نسبة معاملي الانكسار. -3. حل المعادلة لإيجاد الزاوية يعطي الزاوية الحرجة مباشرة من نسبة معاملي الانكسار. +1. نبدأ بقانون سنيل لشعاع يأتي من الجانب الأعلى معاملًا. +2. عند الزاوية الحدية يكون اتجاه الشعاع النافذ بزاوية 90° من العمود. +3. نقسم على معامل الوسط الأول ونأخذ الجيب العكسي لنحصل على الزاوية الحرجة. ## Real world ### الألياف الضوئية -ينعكس الضوء داخل ليف زجاجي مرارًا بالانعكاس الداخلي الكلي عن جدرانه. يخسر جزءًا ضئيلًا جدًا من شدته على مسافة كيلومترات، وهو أساس شبكة الإنترنت. -### الألماس -يمنح معامل الانكسار المرتفع للألماس زاوية حرجة صغيرة بشكل استثنائي. ينعكس الضوء الداخل من الأعلى داخليًا مرات عديدة قبل أن يهرب. هذا ما ينتج بريقه المميز. +يمكن لقلب أعلى معاملًا من غلافه أن يوجّه الضوء. ويحتاج الوصف الأشمل إلى دراسة الأنماط الموجية والفقد، إلى جانب صورة الشعاع المنعكس. -### المناظير الطبية -تنقل حزم الألياف الضوئية صورًا من داخل الجسم بالانعكاس الداخلي الكلي نفسه الذي ينقل إشارات الاتصالات. +### المناشير -### الإضاءة الزخرفية بالألياف الضوئية -يخرج الضوء المحقون في طرف ليف بلاستيكي فقط من المواضع المخدوشة أو المقطوعة. السطح السليم يواصل عكسه داخليًا. +يمكن لمنشور مناسب أن يغير اتجاه الضوء بانعكاس داخلي كلي عند سطح داخلي. تحدد زاوية السقوط والوسط المحيط تحقق الشرط. diff --git a/content/lessons/waves/total-internal-reflection/en.md b/content/lessons/waves/total-internal-reflection/en.md index 67461d6d..6761abcd 100644 --- a/content/lessons/waves/total-internal-reflection/en.md +++ b/content/lessons/waves/total-internal-reflection/en.md @@ -1,69 +1,61 @@ --- title: Total internal reflection -summary: >- - Shine a flashlight upward from underwater at a steep enough angle and none - of the light escapes into the air above — it all bounces back down, which - is also how optical fibres carry the internet across oceans without - leaking light. +summary: 'Find the critical angle and the two conditions needed to keep light reflecting inside a higher-index medium.' parameters: - theta1: angle of incidence θ₁ - n1: refractive index of medium 1 (denser) - n2: refractive index of medium 2 (less dense) + theta1: 'θ₁ — incidence angle from the normal' + n1: 'n₁ — index on the incident side' + n2: 'n₂ — index on the other side' variables: - - refractive indices of the first and second medium - - critical angle θ_c + - 'refractive indices of the incident and second media' + - 'critical angle, defined for n₁ > n₂' --- ## Try it -1. With the defaults loaded, look for a bent ray crossing the boundary. There isn't one — only the reflected ray, shown at full brightness. -2. Drag θ1 down. Watch the refracted ray reappear once you cross the critical angle. -3. Push n2 up toward n1 instead. The critical-angle readout grows until, at n1 = n2, every angle lets light through. +1. Set n1 = 1.5, n2 = 1 and θ₁ = 50°. The critical angle is about 41.8°, so the model shows total internal reflection. +2. Lower θ₁ to 40°. A transmitted ray appears. The angle must exceed the critical angle for total internal reflection. +3. Set n1 = n2 = 1.5. The critical-angle readout disappears: there is no lower-index boundary to produce this effect. ## Real-life examples -1. **Light inside an optical-fibre core.** A glass core (n1 = 1.5) surrounded by slightly less dense glass cladding (n2 = 1.4) hits the wall at 80°: the light reflects perfectly and keeps travelling down the fibre. -2. **A diamond's sparkle.** Light inside a diamond (n1 = 2.42) hits its underside at 30°, well past the critical angle for diamond-to-air (n2 = 1): it bounces back up instead of leaking out, which is why a cut diamond sparkles so brightly. -3. **A swimmer looking up at a shallow angle.** Light trying to leave water (n1 = 1.33) for air (n2 = 1) at 60° from straight up passes the water-to-air critical angle of about 48.8°, so it reflects back down instead of escaping — which is why the sky disappears outside a narrow circle overhead. +1. **Core and cladding.** Indices 1.5 and 1.4 give a critical angle of about 69.0°. Incidence at 80° satisfies the condition for total internal reflection. +2. **Diamond to air.** Representative indices 2.42 and 1 give a critical angle of about 24.4°. Incidence at 30° exceeds it. +3. **Water to air.** Indices 1.33 and 1 give about 48.8°. Incidence at 60° exceeds it. These angles are measured from the normal, not from the surface. ## Test yourself -1. For whatever n1 > n2 you choose, set θ1 to exactly 2° above the critical angle. -2. Make total internal reflection impossible: bring n2 up to match n1 (within 0.02). -3. For any n1 greater than n2, find θ1 within 0.5° of the exact critical angle. +1. Choose n1 > n2 and set θ₁ within 0.5° of two degrees above the critical angle. +2. Set n1 and n2 equal, removing the index difference. +3. With n1 > n2, place θ₁ within 0.5° of the critical angle itself. ## Intuition -Dive underwater and look straight up: the whole sky looks squeezed into one bright circle above you, and outside that circle the surface looks like a mirror, reflecting the pool floor back at you. That mirror-like edge is what this lesson is about. On screen, $n_1$ is set above $n_2$ by default — light starts in the denser material — and the incoming ray is already past the point where a bent ray could exist: there is no refracted ray crossing the boundary at all, only the reflected one, drawn at full brightness. +When light goes from a higher-index medium to a lower-index one, its transmitted ray bends away from the normal. Increasing the incident angle turns that ray farther toward the surface. At the critical angle, its limiting direction is along the surface. Beyond that angle, no travelling transmitted ray can carry energy away into the second ideal medium. -Drag $\theta_1$ down and watch the refracted ray reappear once you cross a threshold called the critical angle: at first it skims almost along the boundary, then bends closer to the vertical line as you lower the angle further. Push $n_2$ up toward $n_1$ instead and the critical-angle readout grows, until at $n_1 = n_2$ every angle lets light through and total internal reflection becomes impossible — this only happens, in fact, when light tries to leave a denser material for a less dense one. +Two conditions matter together: the light must approach from the higher-index side, and the incidence angle must exceed the critical angle. A large angle alone is not enough. The 3D fibre illustrates repeated guidance using this condition. Its bent path is schematic; it does not calculate the local incidence angle at every real fibre bend. ## Formal -Snell's law, $n_1\sin\theta_1 = n_2\sin\theta_2$, only has a real solution for $\theta_2$ when $n_1\sin\theta_1 \le n_2$; past that point $\sin\theta_2$ would need to exceed 1, which is impossible, so nothing refracts. +For $n_1>n_2$, set $\theta_2=90^\circ$ in Snell's law. This gives $\theta_c=\arcsin(n_2/n_1)$. Above the threshold, $n_1\sin\theta_1>n_2$, so there is no real transmitted ray angle. -The boundary case defines the critical angle: $\theta_c = \arcsin(n_2/n_1)$, and it only exists when $n_1 > n_2$ — light must start in the denser medium. +In the ideal lossless model, $\theta_1>\theta_c$ gives power reflectance $R=1$. If $n_1\le n_2$, total internal reflection of this kind cannot occur. Equality at the critical angle is the limiting case, with a grazing transmitted direction; distinguish it from angles strictly above the threshold. ## Advanced -Total internal reflection is genuinely total: unlike reflection at an ordinary boundary, which always loses some light to transmission, past $\theta_c$ the reflectance is exactly 1 for both polarizations, with no absorption in an ideal lossless medium. This is what makes it useful for guiding light over long distances with almost no loss, rather than merely redirecting it. +An evanescent field extends a short distance into the lower-index medium even during total internal reflection. Thus “no transmitted ray” does not mean “no field outside.” Another nearby medium can couple energy from that field. Real fibres also have attenuation from absorption, scattering and bends; ideal boundary reflectance is not a promise of lossless transmission over any distance. ## Derivation -1. Snell's law relates the two angles at any boundary between the two media. -2. At the critical angle the refracted ray would have to skim exactly along the boundary, an angle of 90°, which pins down $\theta_c$ in terms of the indices. -3. Solving for the angle gives the critical angle directly from the ratio of the two refractive indices. +1. Start with Snell's law for a ray approaching from the higher-index side. +2. At the limiting angle, the transmitted direction is 90° from the normal. +3. Divide by the incident index and take the inverse sine to obtain the critical angle. ## Real world ### Optical fibres -Light bounces down a glass fibre by total internal reflection off the walls, losing almost none of its intensity over kilometres — the basis of the internet's backbone. -### Diamonds -A diamond's high refractive index gives it an unusually small critical angle, so light entering the top reflects internally many times before escaping, producing its signature sparkle. +A core with a higher index than its cladding can guide light. Wave modes and losses are needed for a fuller description than the bouncing-ray picture. -### Endoscopes and medical imaging -Bundles of optical fibres carry images out of the body by the same total internal reflection that carries telecom signals. +### Prisms -### Fibre-optic decorative lighting -Light injected at one end of a plastic fibre emerges only where the fibre is scratched or cut, since an intact surface keeps reflecting it internally. +A suitable prism can redirect light by total internal reflection at an internal surface. The incidence angle and surrounding medium determine whether the condition holds. diff --git a/content/lessons/waves/total-internal-reflection/lesson.yaml b/content/lessons/waves/total-internal-reflection/lesson.yaml index 10eb598f..896ba02d 100644 --- a/content/lessons/waves/total-internal-reflection/lesson.yaml +++ b/content/lessons/waves/total-internal-reflection/lesson.yaml @@ -58,7 +58,5 @@ challenges: - check: theta1 - asin(n2/n1)*180/pi target: 2 tol: 0.5 - - check: n1 - n2 - target: 0 - tol: 0.02 + - check: n1 == n2 - check: n1>n2 and abs(theta1 - asin(n2/n1)*180/pi) < 0.5 diff --git a/content/lessons/waves/transverse-and-longitudinal/ar.md b/content/lessons/waves/transverse-and-longitudinal/ar.md index a9ad7440..61849c4c 100644 --- a/content/lessons/waves/transverse-and-longitudinal/ar.md +++ b/content/lessons/waves/transverse-and-longitudinal/ar.md @@ -1,69 +1,64 @@ --- title: الموجات المستعرضة والموجات الطولية -summary: >- - الحبل يهتز جانبًا، والنابض ينضغط ويتمدد على طوله. الصوت يسير بالطريقة الثانية. +summary: 'صنّف الموجة بمقارنة اتجاه إزاحة نقاط الوسط باتجاه انتشار النمط الموجي.' parameters: - f: التردد f - lambda: الطول الموجي λ - A: السعة A + f: 'f — عدد الاهتزازات في الثانية' + lambda: 'λ — المسافة بين أجزاء النمط المتكررة' + A: 'A — سعة الإزاحة' variables: - - المسافة بين تكرار النمط والتكرار الذي يليه - - كم مرة تُعيد كل نقطة حركتها في الثانية - - كم تبتعد كل نقطة عن موضع سكونها - - العدد الموجي، كم راديانًا من النمط يسع في كل متر - - التردد الزاوي، كم راديانًا من التذبذب يحدث كل ثانية + - 'المسافة بين أجزاء متكررة في لحظة واحدة' + - 'عدد الاهتزازات المحلية الكاملة في الثانية' + - 'أقصى إزاحة لنقطة مادية عن موضع سكونها' + - 'تغير الطور المكاني بالراديان لكل متر' + - 'تغير الطور الزمني بالراديان لكل ثانية' --- ## Try it -1. انظر إلى الحبل العلوي. كل نقطة فيه تتحرك صعودًا وهبوطًا، وهذا ما يسمى موجة مستعرضة، بينما ينتقل النمط نفسه جانبيًا. -2. انظر الآن إلى صف النقاط السفلي. كل نقطة فيه تتحرك يمينًا ويسارًا فقط، فتتقارب في بعض الأماكن وتتباعد في أخرى. هذا ما يسمى موجة طولية، وهذا التقارب بالضبط هو طريقة انتقال الصوت في الهواء. -3. ارفع منزلق الطول الموجي λ. يتمدد الرسمان معًا. تتباعد حدبات الحبل، وتتباعد تجمعات النقاط أسفله بالمقدار نفسه. +1. اجعل λ = 2 m وf = 0.8 Hz وA = 0.1 m. في الرسم العلوي تكون الإزاحة رأسية والنمط ينتشر أفقيًا؛ هذه حركة مستعرضة. +2. تتبّع نقطة واحدة في الصف السفلي. تتحرك أفقيًا ذهابًا وإيابًا، موازية لاتجاه الانتشار؛ هذه حركة طولية. المناطق المتقاربة تضاغطات، والمناطق المتباعدة تخلخلات. +3. زد λ إلى 4 m مع تثبيت f. تتباعد الأجزاء المتكررة في الرسمين. وتزيد سرعة النموذج من 1.6 إلى 3.2 m/s لأن التردد والطول الموجي قابلان للتحكم بصورة مستقلة هنا. ## Real-life examples -1. **موجة حبل طويلة وبطيئة.** هزة واسعة وهادئة (λ = 3.5 m، f = 0.4 هرتز) تُظهر حركة الحبل صعودًا وهبوطًا بوضوح، بحدبات واسعة سهلة العدّ. -2. **موجة حبل قصيرة وسريعة.** هزة سريعة وضيقة (λ = 1 m، f = 1.2 هرتز) تُقرّب الحدبات من بعضها وتُسرع مرورها. -3. **موجة متوسطة، جنبًا إلى جنب.** هزة متوسطة (λ = 2 m، f = 0.8 هرتز) تتيح مقارنة حدبات الحبل الجانبية مباشرة مع تقارب النقاط أسفله. +1. **نمط طويل.** عند λ = 3.5 m وf = 0.4 Hz وA = 0.1 m، ينتشر النمطان بسرعة 1.4 m/s. تكرر النقطة المحلية حركتها كل 2.5 s. +2. **نمط قصير.** عند λ = 1 m وf = 1.2 Hz وA = 0.1 m، ينتشر النمطان بسرعة 1.2 m/s. تتكرر الحركة المحلية كل 0.833 s تقريبًا. +3. **مقارنة الاتجاهين.** عند λ = 2 m وf = 0.8 Hz وA = 0.15 m، تكون السرعة 1.6 m/s في العرضين. نطبق صيغة الإزاحة العددية نفسها في اتجاهين مختلفين. ## Test yourself -1. اضغط الطول الموجي إلى 1 m حتى تتقارب النقاط بشدة وتكرار. -2. مدّد الطول الموجي فوق 3 m، وأبقِ التردد أقل من 0.5 هرتز. تحصل على موجة طويلة وبطيئة في الرسمين معًا. -3. ادفع التردد إلى أقصاه، 1.5 هرتز. +1. اجعل الطول الموجي 1 m. +2. اجعل الطول الموجي أكبر من 3 m والتردد أقل من 0.5 Hz. +3. اجعل التردد 1.5 Hz. ## Intuition -أمسك طرف حبل واهززه صعودًا وهبوطًا. تنطلق حدبة مبتعدة عن يدك. راقب أي نقطة على الحبل، فهي لا تتحرك إلا صعودًا وهبوطًا، ولا تتحرك جانبيًا أبدًا. هذا النمط، حركة جانبية تحملها اهتزازات عمودية، هو الموجة المستعرضة. الضوء وكل موجة على وتر من هذا النوع. +ليس من الضروري أن يتحرك الوسط في اتجاه انتشار الموجة نفسه. على الحبل العلوي تتحرك كل نقطة عموديًا على اتجاه الانتشار، فتكون الموجة مستعرضة. وفي الصف السفلي تتحرك النقاط موازية له، فتكون الموجة طولية. في الحالتين ينتقل نمط بينما تهتز النقاط محليًا حول مواضع سكونها. -أمسك الآن نابضًا (سلينكي) ممدودًا، وادفع طرفه واسحبه على طول امتداده بدل أن تهزّه جانبيًا. تنطلق نبضة من حلقات متقاربة على طول النابض. راقب حلقة واحدة، فهي تنزلق للأمام وللخلف على طول النابض فقط، ولا تتحرك جانبيًا أبدًا. هذه موجة طولية، وهي بالضبط طريقة انتقال الصوت. تدفع جزيئات الهواء الجزيئات المجاورة للأمام ثم ترتد، فتُمرّر نبضة هواء مضغوط (انضغاط) ونبضة هواء متخلخل (تخلخل) عبر الغرفة. لا يعبر أي جزيء هذه المسافة بنفسه. +يعتمد التضاغط على اختلاف إزاحات النقاط المتجاورة، لا على النقطة التي تقدمت أكثر. إذا اقتربت النقاط من بعضها انضغطت المادة، وإذا تباعدت تخلخلت. في موجة طولية جيبية صغيرة، يحدث أقصى تضاغط عندما تعبر الإزاحة الصفر بميل مكاني سالب، لا عند أكبر إزاحة موجبة. تمثل النقاط مناطق صغيرة من المادة، وليست وصفًا تفصيليًا للحركة العشوائية لجزيئات الهواء المنفردة. ## Formal -يشترك الرسمان في الرياضيات نفسها. الإزاحة $s(x,t) = A\sin(kx - \omega t)$، حيث يحسب $k = 2\pi/\lambda$ كم راديانًا من النمط يسع في كل متر، ويحسب $\omega = 2\pi f$ كم راديانًا يمرّ كل ثانية. الفرق الوحيد هو الاتجاه. في الموجة المستعرضة تكون $s$ عمودية على اتجاه الانتقال، وفي الموجة الطولية تكون $s$ موازية له. +يستخدم العرضان الإزاحة العددية $s(x,t)=A\sin(kx-\omega t)$، حيث يحدد x موضع السكون. العدد الموجي هو $k=2\pi/\lambda$، والتردد الزاوي $\omega=2\pi f$. تتجه s عموديًا على الانتشار في العرض المستعرض، وموازية له في العرض الطولي. -حين تكون إزاحة الموجة الطولية $s(x,t)$ في أقصاها ومتجهة للأمام، تتزاحم الجزيئات وتكوّن انضغاطًا. وحين تكون في أقصاها ومتجهة للخلف، تتباعد الجزيئات وتكوّن تخلخلًا. صف النقاط السفلي على الشاشة مرسوم من الصيغة نفسها $s(x,t)$، لكنها مطبَّقة جانبيًا بدل الأعلى والأسفل. +الإحداثي الفعلي لنقطة مادية في الموجة الطولية هو $x+s(x,t)$. تتغير المسافة المحلية بنسبة $1+\partial s/\partial x$. الميل المكاني السالب للإزاحة يعني تضاغطًا، والموجب يعني تخلخلًا. وللموجة الجيبية $\partial s/\partial x=Ak\cos(kx-\omega t)$. يبقي نطاق السعة المختار $Ak<1$، فيمنع انعكاس ترتيب المواضع المادية المتجاورة في النموذج. ## Advanced -الموجة الطولية تحتاج جزيئات يمكن دفعها معًا وسحبها متباعدة على خط الانتقال. لهذا تعبر أي وسط يقاوم الانضغاط، سواء كان غازًا أو سائلًا أو مادة صلبة. هذا ما يجعل الصوت يعبر الهواء والماء والفولاذ. أما الموجة المستعرضة على وتر فتحتاج شدًّا يبقي الوتر مشدودًا، لكي يجذب أي نقطة مُزاحة نحو جاراتها من جديد. بلا هذا الشدّ الجانبي، لا تجد الموجة الميكانيكية المستعرضة وسطًا تعبره. لهذا يكون الصوت في الهواء موجة طولية لا مستعرضة. +للاضطراب الطولي الصغير، يتناسب تغير الكثافة تقريبًا مع سالب التدرج المكاني للإزاحة. لذلك لا يلزم أن تبلغ الكثافة أو الضغط قمتهما عند قمة الإزاحة. في مائع عادي يكون الصوت اضطراب ضغط طوليًا، بينما تستطيع المواد الصلبة حمل موجات مرنة طولية ومستعرضة. أما الموجات الكهرومغناطيسية فتصف مجالات متذبذبة، لا جسيمات مادية تتحرك جانبيًا. ## Derivation -1. يحوّل العدد الموجي الطول الموجي إلى معدّل مكاني، $k = 2\pi/\lambda$ راديان لكل متر. -2. يحوّل التردد الزاوي التردد إلى معدّل زمني، $\omega = 2\pi f$ راديان لكل ثانية. -3. معًا يعطيان الصيغة الواحدة التي يُرسم منها الرسمان كلاهما، $s(x,t) = A\sin(kx-\omega t)$. +1. تقابل الدورة المكانية 2π راديان خلال طول موجي واحد، ولذلك k = 2π/λ. +2. تستغرق الدورة الزمنية 1/f ثانية، ولذلك ω = 2πf. +3. نجمع الطور المكاني والزمني في دالة الجيب. تطبيق الإزاحة في اتجاهين مختلفين يعطي نوعَي الموجة المعروضين. ## Real world -### الصوت في الهواء -الكلام والموسيقى وكل صوت تسمعه هو موجة ضغط طولية من انضغاطات وتخلخلات تنتقل عبر الهواء إلى أذنك. +### نابض ممدود -### موجات P وS الزلزالية -ترسل الزلازل نوعين من الموجات في آن واحد. موجات P الطولية سريعة تضغط الصخر على مسارها، وموجات S المستعرضة أبطأ وتهزّه جانبيًا. +قد تولّد حركة أحد طرفيه على امتداده تضاغطات، بينما تولّد الحركة الجانبية موجة مستعرضة. تحدد شروط الأطراف وقوى الإرجاع الموجات التي تنتشر. -### عروض السلينكي -تستخدم فصول الفيزياء نابضًا ممدودًا لإظهار نوعي الموجة على اللعبة نفسها. هزّه جانبيًا فتحصل على موجة مستعرضة، وادفعه واسحبه فتحصل على موجة طولية. +### الصوت في الهواء -### تصوير الموجات فوق الصوتية -يرسل التصوير الطبي بالموجات فوق الصوتية نبضات ضغط طولية داخل الجسم، ويوقّت أصداءها لبناء صورة. الفكرة نفسها هنا، انضغاط وتخلخل كما يحدث في صوت الهواء. +يتكون الاضطراب المنظم من تغيرات صغيرة في الضغط والكثافة تنتشر عبر الهواء. لا يحتاج الهواء إلى الانتقال من المصدر إلى المستمع مع الصوت. diff --git a/content/lessons/waves/transverse-and-longitudinal/en.md b/content/lessons/waves/transverse-and-longitudinal/en.md index 2b2ca926..adb8c707 100644 --- a/content/lessons/waves/transverse-and-longitudinal/en.md +++ b/content/lessons/waves/transverse-and-longitudinal/en.md @@ -1,71 +1,64 @@ --- title: Transverse and longitudinal waves -summary: >- - A rope wiggles side to side while a slinky's coils bunch and stretch along - its own length — two different ways a wave can shake a medium, and sound - travels the second way. +summary: 'Classify a wave by comparing the direction of local displacement with the direction the pattern travels.' parameters: - f: frequency f - lambda: wavelength λ - A: amplitude A + f: 'f — oscillations per second' + lambda: 'λ — spacing between repeated features' + A: 'A — displacement amplitude' variables: - - the distance between one repeat of the pattern and the next - - how many times per second each point repeats its motion - - how far each point swings from its resting position - - the wave number, how many radians of the pattern fit in one metre - - the angular frequency, how many radians of oscillation happen each second + - 'distance between repeated features at one instant' + - 'complete local oscillations per second' + - 'maximum displacement from a material point’s resting position' + - 'spatial phase change in radians per metre' + - 'temporal phase change in radians per second' --- ## Try it -1. Look at the top rope: each point moves up and down (transverse), while the pattern itself runs sideways. -2. Look at the bottom row of dots: each point only moves left and right, bunching close together in some places and spreading out in others (longitudinal) — that squeeze is exactly how sound moves through air. -3. Raise the wavelength slider λ. Both pictures stretch out: the rope's humps spread apart, and the dots' bunched clumps spread apart too, by the same amount. +1. Set λ = 2 m, f = 0.8 Hz and A = 0.1 m. In the upper view, displacement is vertical while the pattern travels horizontally: this is transverse motion. +2. Follow one dot in the lower view. It moves back and forth horizontally, parallel to pattern travel: this is longitudinal motion. Crowded regions are compressions; more spread-out regions are rarefactions. +3. Increase λ to 4 m with f fixed. The repeated features become farther apart in both views. The model speed also increases from 1.6 to 3.2 m/s because frequency and wavelength are independently controlled here. ## Real-life examples -1. **A long, slow rope wave.** A gentle, wide shake (λ = 3.5 m, f = 0.4 Hz) shows the up-and-down rope motion clearly, with wide, easy-to-count humps. -2. **A short, fast rope wave.** A quick, tight shake (λ = 1 m, f = 1.2 Hz) packs the humps close together and sends them past quickly. -3. **A medium wave, side by side.** A middling shake (λ = 2 m, f = 0.8 Hz) lets you compare the rope's sideways humps directly against the dots' bunching below it. +1. **A long pattern.** At λ = 3.5 m, f = 0.4 Hz and A = 0.1 m, both patterns travel at 1.4 m/s. A local point repeats its motion every 2.5 s. +2. **A short pattern.** At λ = 1 m, f = 1.2 Hz and A = 0.1 m, both patterns travel at 1.2 m/s. Local motion repeats about every 0.833 s. +3. **Comparing directions.** At λ = 2 m, f = 0.8 Hz and A = 0.15 m, speed is 1.6 m/s in both views. The same scalar displacement formula is applied in different directions. ## Test yourself -1. Squeeze the wavelength down to 1 m, so the dots bunch tightly and often. -2. Stretch the wavelength past 3 m while keeping the frequency under 0.5 Hz — a long, slow wave in both pictures. -3. Push the frequency to its fastest, 1.5 Hz. +1. Set wavelength to 1 m. +2. Make wavelength greater than 3 m and frequency less than 0.5 Hz. +3. Set frequency to 1.5 Hz. ## Intuition -Hold one end of a rope and shake it up and down: a hump runs away from your hand, and if you watch any single point on the rope, it only ever moves up and down, never sideways. That sideways-traveling, up-and-down-shaking motion is a transverse wave — light and every wave on a string behave this way. +A wave's direction of travel need not be the direction in which the medium moves. On the upper rope, each point moves across the travel direction, so the wave is transverse. In the lower row, points move along the travel direction, so the wave is longitudinal. In both cases a pattern travels while local points oscillate around their own resting positions. -Now hold a slinky stretched out and push-and-pull one end along its own length instead of shaking it sideways. A pulse of bunched-up coils runs down the slinky, and if you watch one coil, it only ever slides back and forth along the slinky's length, never sideways. That is a longitudinal wave, and it is exactly how sound travels: air molecules bump the next ones forward, then spring back, passing a pulse of squeezed air (compression) and thinned-out air (rarefaction) down the room without any single molecule crossing the space. +Compression depends on how neighbouring displacements differ, not on which dot moves farthest forward. If neighbouring points move closer together, the material is compressed; if they separate, it is rarefied. In a small sinusoidal longitudinal wave, maximum compression occurs where displacement crosses zero with a negative spatial slope, not at the maximum positive displacement. The dots represent small material regions, not the detailed random motion of individual air molecules. ## Formal -Both pictures share the same maths: a displacement $s(x,t) = A\sin(kx - \omega t)$, where $k = 2\pi/\lambda$ counts how many radians of pattern fit in each metre and $\omega = 2\pi f$ counts how many radians pass each second. The only difference is direction — in a transverse wave $s$ points perpendicular to the direction of travel; in a longitudinal wave $s$ points along it. +Both illustrations use the scalar displacement $s(x,t)=A\sin(kx-\omega t)$, where x labels a resting position. The wavenumber is $k=2\pi/\lambda$ and angular frequency is $\omega=2\pi f$. In the transverse view s is perpendicular to propagation; in the longitudinal view it is parallel. -Where a longitudinal wave's displacement $s(x,t)$ is largest and pointing forward, particles crowd together into a compression; where it is largest and pointing backward, they spread apart into a rarefaction. The bottom row of dots on screen is drawn from that same $s(x,t)$, applied sideways instead of up and down. +A longitudinal material point's actual coordinate is $x+s(x,t)$. The local spacing changes in proportion to $1+\partial s/\partial x$. Negative displacement slope means compression, and positive slope means rarefaction. For the sinusoid, $\partial s/\partial x=Ak\cos(kx-\omega t)$. The selected amplitude range keeps $Ak<1$, preventing neighbouring material positions from reversing order in this model. ## Advanced -Because a longitudinal wave needs particles that can be pushed together and pulled apart along the line of travel, it can move through anything that resists compression — gases, liquids and solids alike — which is why sound travels through air, water and steel. A transverse wave on a string needs tension holding the string taut to pull a displaced point back toward its neighbours; without that restoring sideways pull, a transverse mechanical wave has nothing to travel through, which is why sound in air is longitudinal, not transverse. +For a small longitudinal disturbance, the density change is approximately proportional to minus the displacement gradient. Pressure and displacement therefore need not peak together. In an ordinary fluid, sound is a longitudinal pressure disturbance; solids can support both longitudinal and transverse elastic waves. Electromagnetic waves describe oscillating fields rather than material particles moving sideways. ## Derivation -1. The wave number turns wavelength into a spatial rate: $k = 2\pi/\lambda$ radians per metre. -2. The angular frequency turns frequency into a rate in time: $\omega = 2\pi f$ radians per second. -3. Together they give the one formula both pictures are drawn from: $s(x,t) = A\sin(kx-\omega t)$. +1. One spatial cycle corresponds to 2π radians over a wavelength, giving k = 2π/λ. +2. Each temporal cycle takes 1/f seconds, giving ω = 2πf. +3. Combine spatial and temporal phase in the sine function. Applying its displacement in different directions gives the two illustrated wave types. ## Real world -### Sound in air -Speech, music and every sound you hear is a longitudinal pressure wave of compressions and rarefactions moving through the air to your ear. +### A stretched spring -### Seismic P-waves and S-waves -Earthquakes send both kinds at once — fast longitudinal P-waves that squeeze rock along their path, and slower transverse S-waves that shake it side to side. +Moving an end along the spring can produce compressions; moving it sideways can produce transverse motion. The boundary conditions and restoring forces determine which waves propagate. -### Slinky demonstrations -Physics classrooms use a stretched slinky to show both wave types on the same toy: shake it sideways for transverse, push-pull it for longitudinal. +### Sound in air -### Ultrasound imaging -Medical ultrasound sends longitudinal pressure pulses into the body and times their echoes to build an image, the same compression-and-rarefaction idea as sound in air. +The organized disturbance consists of small pressure and density changes that propagate through air. The air has no need to travel from the source to the listener with the sound. diff --git a/content/lessons/waves/transverse-and-longitudinal/lesson.yaml b/content/lessons/waves/transverse-and-longitudinal/lesson.yaml index edf3e94a..d25f2868 100644 --- a/content/lessons/waves/transverse-and-longitudinal/lesson.yaml +++ b/content/lessons/waves/transverse-and-longitudinal/lesson.yaml @@ -32,10 +32,10 @@ parameters: value: 2 unit: m A: - min: 0.1 - max: 0.8 - step: 0.05 - value: 0.5 + min: 0.02 + max: 0.15 + step: 0.01 + value: 0.1 unit: m variables: - \lambda @@ -52,13 +52,13 @@ primary: f presets: - lambda: 3.5 f: 0.4 - A: 0.6 + A: 0.1 - lambda: 1 f: 1.2 - A: 0.3 + A: 0.1 - lambda: 2 f: 0.8 - A: 0.5 + A: 0.15 challenges: - check: lambda target: 1 diff --git a/content/lessons/waves/wave-basics/ar.md b/content/lessons/waves/wave-basics/ar.md index 8fe4d34b..34033f18 100644 --- a/content/lessons/waves/wave-basics/ar.md +++ b/content/lessons/waves/wave-basics/ar.md @@ -1,68 +1,63 @@ --- title: أساسيات الموجة -summary: >- - حبل يُهز صعودًا وهبوطًا يرسل موجة على طوله، وأربعة أرقام تصفها: طولها وارتفاعها وترددها وسرعتها. +summary: 'ميّز حركة النمط الموجي عن حركة نقطة واحدة، واربط الطول الموجي بالتردد وسرعة الانتشار.' parameters: - f: التردد f - lambda: الطول الموجي λ - A: السعة A + f: 'f — عدد الدورات في الثانية' + lambda: 'λ — الطول الموجي' + A: 'A — سعة الإزاحة' variables: - - كم مرة تهزّ الحبل كل ثانية - - المسافة بين قمة وقمة تليها - - سرعة انتقال التموّجة نفسها على طول الحبل - - زمن الهزة الواحدة الكاملة، صعودًا ثم نزولًا + - 'عدد الدورات الكاملة في الثانية عند نقطة ثابتة' + - 'المسافة بين قمتين متتاليتين في لحظة واحدة' + - 'سرعة انتشار النمط الموجي' + - 'مدة دورة كاملة' --- ## Try it -1. راقب الحبل الأزرق يتموّج نحو اليمين. اقرأ رقم السرعة أسفل الرسم. -2. حرّك منزلق التردد f إلى الأعلى. تهتز يدك أسرع، فيسرع النمط كله في انتقاله على الحبل. -3. حرّك الآن منزلق الطول الموجي λ بدل ذلك، وأبقِ f كما هو. تتباعد التموجات أكثر وتزداد السرعة مجددًا. كلا المنزلقين يرفع السرعة، لكن كل واحد بطريقته الخاصة. +1. اجعل f = 0.5 Hz وλ = 2 m وA = 0.4 m. ينتشر النمط بسرعة 1 m/s، وتكمل النقطة الواحدة دورة صعود وهبوط كل ثانيتين. +2. راقب العلامة ذات الموضع الأفقي الثابت تتحرك رأسيًا، بينما تتحرك علامة القمة إلى اليمين. الأولى لحركة نقطة من الوسط، والثانية لحركة النمط. +3. ثبّت f وλ وزد A. تصبح الموجة أعلى، لكن سرعتها تبقى 1 m/s. ثم زد f إلى 1 Hz مع إبقاء λ = 2 m؛ تصبح سرعة الموجة المختارة 2 m/s. ## Real-life examples -1. **هزة بطيئة وواسعة.** اهزز حبلاً طويلاً ببطء وبتأرجح واسع (f = 0.5 هرتز، λ = 3 m). تزحف التموجة بسرعة بطيئة. -2. **هزة سريعة وضيقة.** حرّك معصمك بسرعة على مسافة قصيرة (f = 1.2 هرتز، λ = 1.2 m). تسير التموجة الآن أسرع بوضوح. -3. **هزة سريعة جدًا وصغيرة.** اهتز يدك بسرعة كبيرة مع تأرجح صغير جدًا (f = 2 هرتز، λ = 0.6 m). تسرع التموجة على الحبل رغم صغر كل تأرجح فردي. +1. **طول موجي كبير وتردد منخفض.** عند f = 0.5 Hz وλ = 3 m وA = 0.6 m، تكون السرعة 1.5 m/s والزمن الدوري ثانيتين. +2. **طول أقصر وتردد أعلى.** عند f = 1.2 Hz وλ = 1.2 m وA = 0.3 m، تكون السرعة 1.44 m/s. رغم ارتفاع التردد، ينتشر النمط أبطأ قليلًا من المثال الأول. +3. **اهتزازات صغيرة متكررة.** عند f = 2 Hz وλ = 0.6 m وA = 0.2 m، تكون السرعة 1.2 m/s والزمن الدوري 0.5 s. التردد الأعلى وحده لا يحدد السرعة إذا تغير الطول الموجي أيضًا. ## Test yourself -1. اجعل الموجة تنتقل بسرعة 1 m/s بالضبط. -2. اجعل الموجة تنتقل بسرعة 3.6 m/s بالضبط. -3. أبقِ التأرجح صغيرًا، بحيث A أقل من 0.2 m، وأرسل الموجة أسرع من 2 m/s. +1. اجعل سرعة انتشار النمط قريبة من 1 m/s. +2. اجعلها قريبة من 3.6 m/s. +3. أبقِ السعة أقل من 0.2 m، واجعل سرعة الانتشار أكبر من 2 m/s. ## Intuition -اربط طرف حبل قفز بمقبض باب، واهزز الطرف الآخر صعودًا وهبوطًا بثبات ومرارًا. نمط من الحدبات يتحرك مبتعدًا عن يدك نحو الباب. يدك نفسها لا تتحرك إلا صعودًا وهبوطًا، ولا تقترب من الباب أبدًا. هذا النمط المتحرك هو الموجة. الرسم على الشاشة يُظهر الشيء نفسه بالضبط: يُهزّ الحبل الأزرق من طرفه الأيسر، وتنطلق التموجة نحو اليمين. +راقب نقطة محددة على الحبل؛ تتحرك صعودًا وهبوطًا حول خط المنتصف. أما القمة فتتحرك على طول الحبل. الموجة هي هذا النمط المنتقل، ولا يلزم أن تنتقل قطعة الحبل معه. في الحركة المستعرضة المثالية المعروضة يبقى موضع النقطة الأفقي ثابتًا. -رقمان يصفان الشكل الذي تراه في أي لحظة. الطول الموجي λ هو المسافة من قمة إلى القمة التالية. حرّك منزلق λ وراقب هذه المسافة تتمدد أو تنضغط. السعة A تخبرك كم ترتفع كل نقطة أو تنخفض عن خط الوسط. هي تغيّر ارتفاع الحدبات، لا المسافة بينها. رقم ثالث هو التردد f، وهو عدد مرات إكمال يدك هزة كاملة كل ثانية. ارفعه فيتسارع النمط المتموج كله أمام عينيك، دون أن يتغير شكل أي حدبة بمفردها. +الطول الموجي هو المسافة بين قمتين متتاليتين في اللحظة نفسها. والسعة أقصى إزاحة عن المنتصف، لا المسافة الكاملة من القمة إلى القاع. يعدّ التردد الدورات الكاملة في الثانية عند موضع ثابت، بينما يقيس الزمن الدوري مدة دورة واحدة. خلال دورة واحدة يتقدم النمط طولًا موجيًا واحدًا. تتيح أدوات التحكم اختيار التردد والطول الموجي مستقلين، وبذلك نختار سرعة موجة النموذج أيضًا. ## Formal -الموجة المنتقلة على حبل تُكتب $y(x,t) = A\sin\!\big(2\pi(x/\lambda - ft)\big)$. عند لحظة ثابتة هي منحنى جيبي في المكان تباعد قممه $\lambda$. عند نقطة ثابتة تتذبذب في الزمن بدورة $T$، وتكمل $f$ دورة كل ثانية. +لنمط دوري ينتقل بطول موجي λ وزمن دوري موجب T، تكون $v=\lambda/T$. يحقق التردد $f=1/T$، ولذلك $v=f\lambda$. إذا كان الطول بالمتر والتردد بالهرتز، فالسرعة بالمتر لكل ثانية؛ والهرتز يعني دورة واحدة في الثانية. -سرعة الموجة هي المسافة التي تقطعها القمة كل ثانية. تتحرك القمة طولاً موجيًا كاملاً $\lambda$ خلال دورة واحدة $T$، فالسرعة $v = \lambda/T$. وبما أن $T = 1/f$، تصبح السرعة $v = f\lambda$. هذه هي الصيغة الوحيدة وراء كل موجة في هذا الموضوع، بما فيها الصوت والضوء. +الموجة الجيبية المعروضة هي $y(x,t)=A\sin[2\pi(x/\lambda-ft)]$. يمثل x الموضع على طول الحبل، وy الإزاحة العمودية عليه. المسافة من القمة إلى القاع هي $2A$. تصف الصيغة مركبة دورية واحدة، ولا تعني أن كل موجة جيبية الشكل. ## Advanced -السعة $A$ لا تظهر إطلاقًا في الصيغة $v = f\lambda$. هزة لطيفة وأخرى عنيفة، بالتردد والطول الموجي نفسيهما، ترسلان التموجة بالسرعة نفسها على طول الحبل. بل تتحكم السعة في مقدار الطاقة التي تحملها الموجة. التموجة الأعلى تحتاج جهدًا أكبر لصنعها، وتوصل دفعة أقوى عند وصولها، رغم أنها تصل في الوقت نفسه الذي تصل فيه تموجة أصغر. +للموجات المستعرضة الصغيرة على وتر مشدود، يحدد الشد والكتلة لكل وحدة طول سرعة الانتشار. لذلك تؤدي زيادة التردد على الوتر المثالي نفسه دون تغيير خصائصه إلى تقليل الطول الموجي، لا إلى زيادة السرعة بحرية. أما هذا العرض فيسمح بتغيير الاثنين لاستكشاف العلاقة. وفي الأوساط المشتتة قد تختلف سرعة الطور باختلاف التردد، وقد تختلف سرعة غلاف الموجة عن سرعة القمة. ## Derivation -1. السرعة هي المسافة مقسومة على الزمن. تتقدم الموجة طولاً موجيًا كاملاً كل دورة، إذن $v = \lambda/T$. -2. الدورة هي زمن الدورة الواحدة، أي مقلوب عدد الدورات في الثانية. إذن $T = 1/f$. -3. التعويض يعطي سرعة الموجة مباشرة من القيم التي تضبطها على الحبل. النتيجة $v = f\lambda$. +1. نتتبع قمة: تنتقل طولًا موجيًا واحدًا خلال زمن دوري واحد، فتكون السرعة حاصل قسمة الطول الموجي على الزمن الدوري. +2. التردد والزمن الدوري مقلوبان؛ فالأول دورات لكل ثانية، والثاني ثوانٍ لكل دورة. +3. نعوض بمقلوب الزمن الدوري لنحصل على السرعة بوصفها حاصل ضرب التردد في الطول الموجي. ## Real world -### الآلات الموسيقية -سرعة الموجة في وتر الغيتار تعتمد على شدّه وسُمكه. بعد ضبط هذين، تربط $v = f\lambda$ طول الوتر بكل نغمة يمكن أن يعزفها. +### وتر مشدود -### الموجات الزلزالية -تنتقل موجات الزلازل عبر الصخر بسرعة تحددها صلابته. معرفة $v$ تتيح لعلماء الزلازل حساب بُعد مركز الزلزال من زمن وصول موجاته. +يؤثر الشد والكتلة لكل وحدة طول في سرعة الموجة المنتقلة. عند ثبات هذه السرعة يرتبط التردد بالطول الموجي. -### الراديو والواي فاي -تنتقل كل موجات الراديو بسرعة الضوء. لذلك تحدد $v = f\lambda$ طولها الموجي فور اختيار المحطة تردد بثها. +### الضوء والراديو -### أمواج المحيط -يقرأ راكب الأمواج المسافة بين موجتين متتاليتين، وهي الطول الموجي، وعدد مرات وصولها، وهو التردد. من هذين يحكم على سرعة اقتراب الموجة من الشاطئ. +لموجة كهرومغناطيسية دورية واحدة، يحقق التردد والطول الموجي وسرعة الطور العلاقة نفسها. نستخدم السرعة في الوسط الفعلي؛ فسرعة الفراغ ليست بالضرورة السرعة داخل كل مادة. diff --git a/content/lessons/waves/wave-basics/en.md b/content/lessons/waves/wave-basics/en.md index 5a423f7d..918fb28b 100644 --- a/content/lessons/waves/wave-basics/en.md +++ b/content/lessons/waves/wave-basics/en.md @@ -1,71 +1,64 @@ --- title: Wave basics -summary: >- - A rope shaken up and down sends a rippling pattern down its length, and four - numbers — how far apart the ripples are, how fast you shake, how big they - swing, and how fast the ripple itself travels — describe every wave there is. +summary: 'Distinguish a wave’s travelling pattern from the motion of one point, and connect wavelength, frequency and speed.' parameters: - f: frequency f - lambda: wavelength λ - A: amplitude A + f: 'f — cycles per second' + lambda: 'λ — wavelength' + A: 'A — displacement amplitude' variables: - - how often you shake the rope each second - - the distance between one crest and the next - - how fast the ripple itself travels down the rope - - the time for one full shake, up and back down + - 'number of complete cycles per second at a fixed point' + - 'distance between successive crests at one instant' + - 'speed of the travelling pattern' + - 'time for one full cycle' charts: [] --- ## Try it -1. Watch the blue rope ripple to the right. Read the speed readout at the bottom. -2. Raise the frequency slider f. You shake faster, and the whole pattern races down the rope quicker. -3. Now raise the wavelength slider λ instead, keeping f the same. The ripples spread further apart, and the speed climbs again — both sliders push the speed, just by different means. +1. Set f = 0.5 Hz, λ = 2 m and A = 0.4 m. The pattern travels at 1 m/s, and one point completes an up-and-down cycle every 2 s. +2. Watch the fixed-position marker move vertically while the crest marker moves to the right. They represent particle motion and pattern motion, respectively. +3. Keep f and λ fixed and increase A. The wave becomes taller but its speed stays 1 m/s. Now increase f to 1 Hz while keeping λ = 2 m; the selected wave speed becomes 2 m/s. ## Real-life examples -1. **A slow, wide shake.** Shake a long rope slowly with wide swings (f = 0.5 Hz, λ = 3 m). The ripple crawls along at a leisurely pace. -2. **A quick, tight shake.** Flick your wrist fast over a short reach (f = 1.2 Hz, λ = 1.2 m). The ripple now runs noticeably faster. -3. **A very fast, small shake.** Vibrate your hand rapidly with barely any swing (f = 2 Hz, λ = 0.6 m). The ripple speeds down the rope even though each individual swing is tiny. +1. **Long wavelength, low frequency.** At f = 0.5 Hz, λ = 3 m and A = 0.6 m, speed is 1.5 m/s and period is 2 s. +2. **Shorter wavelength, higher frequency.** At f = 1.2 Hz, λ = 1.2 m and A = 0.3 m, speed is 1.44 m/s. Despite the higher frequency, the pattern is slightly slower than in the first example. +3. **Frequent small oscillations.** At f = 2 Hz, λ = 0.6 m and A = 0.2 m, speed is 1.2 m/s and period is 0.5 s. A higher frequency alone does not determine speed when wavelength also changes. ## Test yourself -1. Make the wave travel at exactly 1 m/s. -2. Make the wave travel at exactly 3.6 m/s. -3. Keep the swing small (A under 0.2 m) while still sending the wave faster than 2 m/s. +1. Make the pattern travel at approximately 1 m/s. +2. Make it travel at approximately 3.6 m/s. +3. Keep amplitude below 0.2 m while making the pattern travel faster than 2 m/s. ## Intuition -Tie one end of a jump rope to a doorknob and shake the other end up and down, steadily, again and again. A pattern of humps travels away from your hand toward the door, even though your hand only ever moves up and down — it never moves toward the door at all. That traveling pattern is a wave, and the picture on screen is exactly this: the blue rope is shaken at the left edge, and the ripple runs off to the right. +Watch one marked point on the rope: it moves up and down around the middle line. A crest, however, moves along the rope. The wave is this travelling pattern; the marked piece of rope does not have to travel along with it. In the ideal transverse motion shown here, its horizontal position stays fixed. -Two numbers describe the shape you see at any instant. The wavelength λ is the distance from one crest to the next — drag the λ slider and watch that spacing stretch or squeeze. The amplitude A is how far each point swings up or down from the middle — it changes how tall the humps are but not how far apart they sit. A third number, the frequency f, is how many times per second your hand completes a full shake; raise it and the whole rippling pattern visibly speeds up, without changing the shape of any single hump. +Wavelength is the distance between successive crests at one instant. Amplitude is the largest displacement from the middle, not the full crest-to-trough height. Frequency counts complete cycles at one fixed position per second, while period is the time for one cycle. In one period the pattern advances one wavelength. The controls let us choose frequency and wavelength independently, so they also choose the model's wave speed. ## Formal -A travelling wave on a rope is $y(x,t) = A\sin\!\big(2\pi(x/\lambda - ft)\big)$: at a fixed instant it is a sine curve in space with spacing $\lambda$; at a fixed point it oscillates in time with period $T$, completing $f$ cycles every second. +For a periodic travelling pattern with wavelength λ and positive period T, $v=\lambda/T$. Frequency satisfies $f=1/T$, so $v=f\lambda$. If wavelength is in metres and frequency in hertz, speed is in metres per second; one hertz means one cycle per second. -The wave's speed is how far one crest advances per second. Since a crest moves one full wavelength $\lambda$ in one period $T$, the speed is $v = \lambda/T$, and because $T = 1/f$, this is $v = f\lambda$ — the single formula behind every wave in this subject, sound and light included. +The displayed sinusoidal wave is $y(x,t)=A\sin[2\pi(x/\lambda-ft)]$. Here x is position along the rope and y is displacement across it. Its crest-to-trough displacement is $2A$. The formula describes a single periodic component; it does not mean that every wave has a sinusoidal shape. ## Advanced -Amplitude $A$ does not appear in $v = f\lambda$ at all: a gentle shake and a violent one, at the same frequency and wavelength, send the ripple down the rope at the same speed. Amplitude instead controls how much energy the wave carries — a taller ripple takes more effort to make and delivers more of a jolt when it arrives, even though it gets there at the same time as a smaller one. +For small transverse waves on a stretched string, the medium's tension and mass per unit length set the speed. On one unchanged ideal string, increasing frequency therefore reduces wavelength rather than freely increasing speed. This illustration instead lets both vary to explore the relation. In dispersive media, different frequencies can have different phase speeds, and the speed of an envelope need not equal a crest's speed. ## Derivation -1. Speed is distance over time; a wave advances one wavelength every period, so $v = \lambda/T$. -2. The period is the time for one cycle, the reciprocal of how many cycles happen per second: $T = 1/f$. -3. Substituting gives the wave speed directly from what you can set on the rope: $v = f\lambda$. +1. Follow a crest: in one period it moves one wavelength, so speed is wavelength divided by period. +2. Frequency and period are reciprocals because they count cycles per second and seconds per cycle. +3. Substitute the reciprocal period to obtain speed as frequency multiplied by wavelength. ## Real world -### Musical instruments -A guitar string's speed depends on its tension and thickness; once fixed, $v = f\lambda$ ties the string's length to every note it can ring at. +### A stretched string -### Seismic waves -Earthquake waves travel through rock at speeds set by the rock's stiffness; knowing $v$ lets seismologists work out how far away a quake struck from how long its waves took to arrive. +Tension and mass per unit length affect travelling-wave speed. Once that speed is fixed, frequency and wavelength are linked. -### Radio and Wi-Fi -Radio waves all travel at the speed of light, so $v = f\lambda$ fixes their wavelength the moment a station picks its broadcast frequency. +### Light and radio -### Ocean waves -A surfer reads the gap between swells (the wavelength) and how often they arrive (the frequency) to judge how fast a wave is moving toward the beach. +For a single periodic electromagnetic wave, frequency, wavelength and phase speed obey the same relation. Use the speed in the actual medium; the vacuum speed is not automatically the speed through every material. diff --git a/content/ui/ar.yaml b/content/ui/ar.yaml index 35c4eab0..eb848d76 100644 --- a/content/ui/ar.yaml +++ b/content/ui/ar.yaml @@ -38,7 +38,7 @@ home.subjects.d: كل مادة مسار قصير من الدروس، يبدأ ب home.lessons: '{n|zero=لا دروس|one=درس واحد|two=درسان|few=# دروس|many=# درسًا|other=# درس}' home.demo: حرّك المؤشر، فيبيّن الخط البرتقالي مدى انحدار المنحنى. home.slope: الانحدار -explore.placeholder: "اكتب معادلة هنا، مثل ⁦2x + 5 = 17⁩" +explore.placeholder: 'اكتب معادلة هنا، مثل ⁦2x + 5 = 17⁩' explore.button: أرِني explore.try: أو اضغط على مثال explore.help: هل تساءلت يومًا ماذا تعني معادلة مثل ⁦2x + 5 = 17⁩؟ اكتبها هنا، أو اضغط على أحد الأمثلة في الأسفل، فنرسمها لك ونشرحها بكلمات بسيطة. @@ -220,18 +220,18 @@ coin.successes: النجاحات 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(مريض) قبل الفحص +coin.band: 'التظليل: نطاق تقريبي لـ95% من النتائج عند كل عدد ثابت من المحاولات' +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 — عدد العناصر المتاحة @@ -352,7 +352,7 @@ moon.full: بدر moon.waningGibbous: أحدب متناقص moon.lastQuarter: تربيع أخير moon.waningCrescent: هلال متناقص -market.hint: اسحب لأعلى أو لأسفل لتحدّد سعرًا وترى العجز أو الفائض +market.hint: اسحب لأعلى أو لأسفل لتحدّد سعرًا وترى النقص أو الفائض market.qty: الكمية market.priceAxis: السعر market.demand: الطلب @@ -363,7 +363,7 @@ market.price: السعر market.demandAt: الكمية المطلوبة market.supplyAt: الكمية المعروضة market.surplus: فائض -market.shortage: عجز +market.shortage: نقص sampling.hint: النقاط هي العينات · المنحنى الملوّن ما تعيد العينات بناءه sampling.f: تردد الإشارة sampling.fs: معدل أخذ العينات @@ -391,6 +391,7 @@ buoy.hint: اسحب لأعلى أو لأسفل لتغيير كثافة الجس buoy.weight: الوزن buoy.buoyancy: قوة الطفو buoy.submerged: الجزء المغمور +buoy.neutral: متعادل الطفو buoy.state: النتيجة buoy.sinks: يغوص buoy.floats: يطفو @@ -481,7 +482,7 @@ emb.car: سيارة emb.bus: حافلة nlp.hint: 'نموذج لغوي في أصغر صورة: أي كلمة تميل إلى أن تتبع أي كلمة في هذا النص' nlp.corpusLabel: 'نص التدريب:' -nlp.corpus: جلس القط على البساط. جلس الكلب على الخشبة. رأى القط الكلب. رأى الكلب القط وركض. ركض القط إلى البساط. +nlp.corpus: جلس القط على البساط. جلس الكلب على الخشبة. جلس القط قرب الكلب. رأى الكلب القط وركض. ركض القط إلى البساط. nlp.words: عدد كلمات النص nlp.current: الكلمة الحالية nlp.temp: الحرارة @@ -605,14 +606,14 @@ qt.amman: عمّان qt.tea: شاي qt.coffee: قهوة qt.juice: عصير -qt.amount: الكمية +qt.amount: المبلغ qt.city: المدينة qt.product: المنتج qt.scanned: الصفوف المفحوصة qt.returned: الصفوف الناتجة qt.rowStore: التخزين بالصفوف يقرأ qt.colStore: التخزين بالأعمدة يقرأ -qt.saved: بيانات أقل تُقرأ +qt.saved: بيانات أقل بنسبة qt.atBillion: مع مليار صف (8 بايت لكل قيمة) qt.filterHint: الصفوف البرتقالية مطابقة search.linear: الفحص واحدًا واحدًا @@ -620,19 +621,19 @@ search.binary: التنصيف في كل مرة search.hint: اضغط المربع الذي تبحث عنه، وكل صف ينصّف البحث search.sorted: 64 قيمة مرتبة search.found: 'وُجد في {n|one=خطوة واحدة|two=خطوتين|few=# خطوات|many=# خطوة|other=# خطوة}' -mr.doc1: القط جلس -mr.doc2: الكلب ركض -mr.doc3: القط ركض -mr.doc4: كلب جلس +mr.doc1: جلس القط هنا +mr.doc2: ركض الكلب هنا +mr.doc3: ركض القط هنا +mr.doc4: جلس الكلب هناك mr.stage: المرحلة -mr.machines: الأجهزة +mr.machines: الآلات mr.words: الكلمات mr.unique: الكلمات المختلفة -mr.s0: التقسيم -mr.s1: التعيين -mr.s2: الخلط -mr.s3: التجميع -mr.machine: جهاز +mr.s0: التقسيم (split) +mr.s1: المعالجة (map) +mr.s2: الخلط (shuffle) +mr.s3: التجميع (reduce) +mr.machine: آلة photo.wavelength: الطول الموجي photo.uv: فوق بنفسجي photo.ir: تحت أحمر @@ -731,7 +732,7 @@ rot.speedVisible: السرعة عند {r} kpc من المادة المرئية rot.speedModel: السرعة مع الهالة المظلمة rot.miss: البعد عن القياسات rot.darkShare: حصة الكتلة غير المرئية -rot.hint: أضف كتلة غير مرئية حتى يمر المنحنى بالنقاط المقيسة السوداء +rot.hint: أضف كتلة غير مرئية حتى يمر المنحنى بالنقاط المقيسة الكبيرة rot.distance: البعد عن المركز (kpc) rot.speed: سرعة الدوران (km/s) rot.measured: مقيس @@ -748,7 +749,7 @@ lens.hint: مجرة خلف كتلة ثقيلة كما تُرى من الأرض exp.scale: حجم الكون (اليوم = 1) exp.time: الزمن منذ الانفجار العظيم exp.billionYears: مليار سنة -exp.state: التوسع +exp.state: التمدد exp.speedingUp: يتسارع exp.slowingDown: يتباطأ exp.hint: تتباعد المجرات لأن الفضاء بينها يتمدد diff --git a/content/ui/ar/agent-loop.yaml b/content/ui/ar/agent-loop.yaml index e8886ea4..00a41f8d 100644 --- a/content/ui/ar/agent-loop.yaml +++ b/content/ui/ar/agent-loop.yaml @@ -1,4 +1,4 @@ -agent.hint: ▶ اسحب «t» لتنفيذ المشوار — ثم خذ صندوق الأدوات، أو جوّع الميزانية، ونفّذه من جديد +agent.hint: ▶ اسحب «t» لتنفيذ المشوار — ثم أزل صندوق الأدوات، أو قلّل الميزانية، ونفّذه من جديد agent.task: 'المشوار: «اعرف طقس الغد وأرسله رسالةً إلى أمي»' agent.model: النموذج agent.tool: أداة @@ -9,7 +9,7 @@ agent.loops: لفات مستخدمة agent.budget: ميزانية اللفات agent.toolbox: صندوق الأدوات agent.toolsOn: متاح -agent.toolsOff: مأخوذ +agent.toolsOff: غير متاح agent.state: الحلقة agent.running: تعمل… agent.idle: جاهزة @@ -31,6 +31,6 @@ agent.doneSub: أربع لفات حول الحلقة، كلٌّ تضيف ما ت agent.diedMsg: توقف في منتصف المشوار agent.diedSub: نفدت الميزانية قبل أن تنفد القائمة agent.guessMsg: '«مشمس غالبًا، نحو 25°؟»' -agent.guessSub: طليق وواثق وغير مُتحقَّق من شيء — تخمين في بذلة أنيقة +agent.guessSub: طليق وواثق ولم يتحقق من شيء — تخمين في بذلة أنيقة agent.waiting: اسحب t لبدء الحلقة agent.caption: الحلقة هي الحيلة كلها — النموذج يقترح، والأداة تفعل، والنتيجة تعود إلى السياق، ثم التكرار — والنموذج وحده، بلا حلقة، لا يستطيع إلا الكلام diff --git a/content/ui/ar/binding-energy.yaml b/content/ui/ar/binding-energy.yaml index 6f561725..e8a5ef8f 100644 --- a/content/ui/ar/binding-energy.yaml +++ b/content/ui/ar/binding-energy.yaml @@ -7,7 +7,7 @@ binding.peak: 'القمة ≈ {v} MeV/نوية' binding.A: العدد الكتلي A binding.Z: البروتونات Z binding.N: النيوترونات N -binding.eb: طاقة الترابط +binding.eb: طاقة الربط binding.ebA: لكل نوية viz3d.binding.note: النويات مرصوصة بمقياس حقيقي · اللون يبيّن كم جارًا قريبًا يشدّ كل نوية viz3d.binding.stats: 'Z{z} N{n} · {eba} MeV/A · السطح {surf}%' 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/ar/boundary-layer.yaml b/content/ui/ar/boundary-layer.yaml index 6e885a05..6fcc4578 100644 --- a/content/ui/ar/boundary-layer.yaml +++ b/content/ui/ar/boundary-layer.yaml @@ -1,8 +1,8 @@ -bl.hint: ▶ فعّل النقر واسحب السرعة والحجم — راقب أين يفلت الانسياب عن السطح +bl.hint: ▶ شغّل النُّقَر أو أطفئها، وغيّر السرعة والقطر — راقب أين ينفصل الهواء عن سطح الكرة bl.regime: الطبقة bl.laminar: طبقية (تنفصل مبكرًا) bl.turbulent: مضطربة (تلتصق مدة أطول) bl.sep: زاوية الانفصال bl.drag: قوة السحب bl.wakeLabel: الأثر المنفصل -bl.caption: انسياب مفاهيمي حول كرة — ليس حلًا بديناميكا الموائع الحاسوبية. +bl.caption: رسم توضيحي لحركة الهواء حول كرة، وليس محاكاة دقيقة. diff --git a/content/ui/ar/buoyancy3d.yaml b/content/ui/ar/buoyancy3d.yaml index 9173a954..f5a9952f 100644 --- a/content/ui/ar/buoyancy3d.yaml +++ b/content/ui/ar/buoyancy3d.yaml @@ -1,2 +1,3 @@ viz3d.buoyancy.floats: يطفو viz3d.buoyancy.sinks: يغرق +viz3d.buoyancy.neutral: متعادل الطفو diff --git a/content/ui/ar/cell-size.yaml b/content/ui/ar/cell-size.yaml index 2231d1b7..e9c99678 100644 --- a/content/ui/ar/cell-size.yaml +++ b/content/ui/ar/cell-size.yaml @@ -6,5 +6,5 @@ cs.depth: عمق وصول الأكسجين cs.starved: الحجم الجائع cs.core: لُب جائع — بعيد جدًا عن السطح cs.safe: تغذية كاملة — كل جزء قريب بما يكفي من السطح -cs.caption: مقطع عرضي، غير مرسوم بمقياس حقيقي — يعرض العرض ثلاثي الأبعاد الجسم الحقيقي +cs.caption: مقطع عرضي، غير مرسوم بمقياس حقيقي — ترى المجسّم الحقيقي في العرض الثلاثي الأبعاد cs.gauge: المساحة/الحجم (μm⁻¹) diff --git a/content/ui/ar/cloud-base.yaml b/content/ui/ar/cloud-base.yaml index c737dd3d..16b2a78c 100644 --- a/content/ui/ar/cloud-base.yaml +++ b/content/ui/ar/cloud-base.yaml @@ -4,6 +4,6 @@ cloud.temp: درجة الحرارة (°م) cloud.height: الارتفاع (م) cloud.base: قاعدة السحابة cloud.fog: ضباب — الهواء مشبع أصلًا عند الأرض -cloud.clear: هواء جاف — لا سحابة ضمن المدى +cloud.clear: هواء جاف — لا سحابة في الرسم cloud.tLine: درجة حرارة الهواء cloud.tdLine: نقطة الندى diff --git a/content/ui/ar/cloud-vpc.yaml b/content/ui/ar/cloud-vpc.yaml index dc99bcfc..6f00eecf 100644 --- a/content/ui/ar/cloud-vpc.yaml +++ b/content/ui/ar/cloud-vpc.yaml @@ -6,4 +6,4 @@ vpc.block: الكتلة المستأجرة vpc.public: الشبكات العامة vpc.private: الشبكات الخاصة vpc.more: '+{n} شبكات فرعية أخرى' -vpc.caption: 'كل بلاطة تحوي {h} عنوانًا صالحًا — بلاطات 🌍 تواجه العالم، وبلاطات 🔒 لا تُبلغ إلا من الداخل' +vpc.caption: 'كل مربع يحوي {h} عنوانًا صالحًا — مربعات 🌍 تواجه العالم، ومربعات 🔒 لا يمكن الوصول إليها إلا من الداخل' 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/ar/convolution-scan.yaml b/content/ui/ar/convolution-scan.yaml index a47f1e5e..6748c0e1 100644 --- a/content/ui/ar/convolution-scan.yaml +++ b/content/ui/ar/convolution-scan.yaml @@ -1,4 +1,4 @@ -conv.hint: ▶ اسحب «الموضع» لتزلق القالب — اختر نواةً فتجيب الصورة نفسها سؤالًا مختلفًا +conv.hint: ▶ اسحب «الموضع» لتحرّك القالب — اختر نواةً فتجيب الصورة نفسها سؤالًا مختلفًا conv.input: الصورة (12×12) conv.output: ما تراه الطبقة (10×10) conv.stencil: القالب (3×3) @@ -9,5 +9,5 @@ conv.kBlur: التمويه (المتوسط) conv.at: القالب عند conv.dot: اضرب واجمع conv.done: بكسلات محسوبة -conv.legend: الأخضر استجابة موجبة والأحمر سالبة والساطع قوي — يضيء الخرج حيث يسكن النمط -conv.caption: قالب واحد صغير، مزلوق في كل مكان، يجد الملمح أينما اختبأ — كدّس طبقات منه فتصير الحواف عيونًا والعيون وجوهًا +conv.legend: الأخضر استجابة موجبة والأحمر سالبة والساطع قوي — يضيء الخرج حيث يوجد النمط +conv.caption: قالب واحد صغير، نمرّره على كل مكان، يجد الملمح أينما اختبأ — ضع طبقات منه فوق بعضها فتصير الحواف عيونًا والعيون وجوهًا 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/ar/diffraction.yaml b/content/ui/ar/diffraction.yaml index a8ed44df..c3046c7d 100644 --- a/content/ui/ar/diffraction.yaml +++ b/content/ui/ar/diffraction.yaml @@ -1,5 +1,6 @@ diffraction.hint: تصل موجات مستوية من اليسار وتنتشر بعد الفتحة diffraction.a: عرض الفتحة a diffraction.lambda: الطول الموجي λ -diffraction.theta: زاوية الانتشار θ +diffraction.theta: 'زاوية أول انعدام θ' diffraction.gap: الفتحة +diffraction.noMinimum: 'لا يوجد أول انعدام' diff --git a/content/ui/ar/diffusion-reveal.yaml b/content/ui/ar/diffusion-reveal.yaml index 96d2acc2..c7f93beb 100644 --- a/content/ui/ar/diffusion-reveal.yaml +++ b/content/ui/ar/diffusion-reveal.yaml @@ -1,4 +1,4 @@ -dfu.hint: ▶ اسحب «الخطوة» لتخرج من التشويش — غيّر البذرة فتجد المشية نفسها صورةً مختلفة +dfu.hint: ▶ اسحب «الخطوة» لتخرج من التشويش — غيّر البذرة فتصل الرحلة نفسها إلى صورة مختلفة dfu.step: أُزيل من الضجيج dfu.noise: الضجيج الباقي dfu.seed: البذرة diff --git a/content/ui/ar/dns-chain.yaml b/content/ui/ar/dns-chain.yaml index 0fc7be91..c1ff8d92 100644 --- a/content/ui/ar/dns-chain.yaml +++ b/content/ui/ar/dns-chain.yaml @@ -1,4 +1,4 @@ -dns.hint: ▶ اسحب «الخطوة» لتمشي البحث — اقلب «الذاكرة» وشاهد السلسلة تنهار إلى قفزة واحدة +dns.hint: ▶ اسحب «step» لتتابع البحث خطوة خطوة — ثم اجعل «cache» يساوي 1 وشاهد السلسلة تقصر إلى رحلة واحدة dns.you: متصفحك dns.resolver: المحلِّل dns.root: الجذر @@ -8,7 +8,7 @@ dns.ask: '«ما عنوان visualize-it.example؟»' dns.rootSays: 'الجذر: «لا أدري — لكن ‎.example تسكن هناك»' dns.tldSays: 'السجلّ: «اسأل خادم أسماء الموقع نفسه»' dns.authSays: 'خادم الموقع: «أنا هو — إليك العنوان»' -dns.answer: الجواب يعود إلى البيت +dns.answer: الجواب يعود إليك dns.cached: '«أجبت عن هذا قبل دقيقة — خذه من الذاكرة»' dns.skipped: تم تجاوزها — المحلِّل تذكّر dns.name: نبحث عن diff --git a/content/ui/ar/dose.yaml b/content/ui/ar/dose.yaml index 62f864b1..069cb87a 100644 --- a/content/ui/ar/dose.yaml +++ b/content/ui/ar/dose.yaml @@ -5,7 +5,7 @@ dose.dental: أشعة سينية للأسنان dose.flight: رحلة طيران طويلة dose.ct: أشعة مقطعية للصدر dose.background: سنة من الإشعاع الخلفي -dose.hint: ▶ مقياس لوغاريتمي بالميلي‌سيفرت · حرّك «عدد المرات» لتراكم المصدر الذي اخترته +dose.hint: ▶ مقياس لوغاريتمي بالمليسيفرت · حرّك «عدد المرات» لتراكم المصدر الذي اخترته dose.threshold: 100 مليسيفرت — حيث يصبح الخطر قابلًا للقياس dose.perEvent: الجرعة في المرة الواحدة dose.repeatsLabel: عدد المرات diff --git a/content/ui/ar/echo.yaml b/content/ui/ar/echo.yaml index 96a8d03c..2616c06d 100644 --- a/content/ui/ar/echo.yaml +++ b/content/ui/ar/echo.yaml @@ -6,4 +6,4 @@ echo.free: طرف حر echo.fixed: طرف ثابت echo.hintOut: تنتقل النبضة نحو الجدار echo.hintBack: تعود النبضة كصدى -echo.tip: الطرف الثابت يقلب النبضة العائدة؛ الطرف الحر لا يفعل — والتوقيت واحد في الحالتين +echo.tip: 'لإزاحة الحبل: الطرف الثابت يقلب النبضة، والطرف الحر لا يقلبها. زمن الانتقال واحد.' diff --git a/content/ui/ar/eclipses.yaml b/content/ui/ar/eclipses.yaml index 111d0e42..28267e00 100644 --- a/content/ui/ar/eclipses.yaml +++ b/content/ui/ar/eclipses.yaml @@ -7,8 +7,8 @@ eclipses.type: الكسوف eclipses.total: كلي eclipses.annular: حلقي eclipses.partial: جزئي -eclipses.none: لا كسوف — الظل يخطئ الأرض +eclipses.none: لا كسوف — الظل لا يصيب الأرض eclipses.umbra: الظل المظلم eclipses.penumbra: شبه الظل -eclipses.antumbra: شبه الظل الأمامي +eclipses.antumbra: امتداد الظل eclipses.node: العقدة diff --git a/content/ui/ar/electric-motors.yaml b/content/ui/ar/electric-motors.yaml index e8a9bc4d..0172b3e4 100644 --- a/content/ui/ar/electric-motors.yaml +++ b/content/ui/ar/electric-motors.yaml @@ -1,3 +1,3 @@ em.hint: اسحب حول الملف لتديره، أو حرّك المنزلق -em.torque: عزم الالتواء τ = NIAB sinθ +em.torque: عزم الدوران τ = NIAB sinθ em.commutatorCaption: يعكس المبدّل ذو الحلقة المشقوقة التيار كل نصف دورة، فيبقى الملف مدفوعًا في الاتجاه نفسه دائمًا diff --git a/content/ui/ar/electromagnetic-induction-in-daily-life.yaml b/content/ui/ar/electromagnetic-induction-in-daily-life.yaml index a123126b..0c464dea 100644 --- a/content/ui/ar/electromagnetic-induction-in-daily-life.yaml +++ b/content/ui/ar/electromagnetic-induction-in-daily-life.yaml @@ -1,4 +1,4 @@ eid.hint: اسحب مقياس القدرة لتغيير التردد f (مقياس لوغاريتمي) eid.coil: ملف الإرسال eid.target: الموصّل القريب -eid.meterLabel: القدرة المسلَّمة، P = ε²/R (مقياس لوغاريتمي) +eid.meterLabel: القدرة الواصلة، P = ε²/R (مقياس لوغاريتمي) diff --git a/content/ui/ar/energy-hill.yaml b/content/ui/ar/energy-hill.yaml index 5778b4f1..2fd075b0 100644 --- a/content/ui/ar/energy-hill.yaml +++ b/content/ui/ar/energy-hill.yaml @@ -1,6 +1,6 @@ -nrg.hint: اضبط سرعة الإطلاق — تصعد الكرة بالضبط إلى حيث تكفي طاقتها الحركية -nrg.launch: 'أُطلقت بسرعة {v} م/ث' -nrg.top: 'تصل إلى h = {h} م' -nrg.bars: الطاقة نفسها، بصورتين -nrg.swap: كل جول من الحركة يشتري جولًا واحدًا بالضبط من الارتفاع — والعكس في طريق النزول -nrg.caption: ضاعف السرعة فتتسلق الكرة أربعة أمثال الارتفاع — v² هي القصة كلها +nrg.hint: 'إطلاق رأسي مثالي: قارن الطاقة الحركية الابتدائية بزيادة طاقة الوضع' +nrg.launch: 'سرعة الإطلاق {v} م/ث' +nrg.top: 'أقصى ارتفاع إضافي h = {h} م' +nrg.bars: 'حركية عند الإطلاق · وضع عند القمة' +nrg.swap: 'دون مقاومة هواء، تساوي الطاقة الحركية الابتدائية الزيادة في طاقة الوضع.' +nrg.caption: 'عند ثبات الكتلة، تعطي مضاعفة السرعة أربعة أمثال الطاقة والارتفاع المثالي.' diff --git a/content/ui/ar/filter-box.yaml b/content/ui/ar/filter-box.yaml index f973fc25..4466094c 100644 --- a/content/ui/ar/filter-box.yaml +++ b/content/ui/ar/filter-box.yaml @@ -1,7 +1,7 @@ -lpf.hint: ارفع تردد الدخل فوق القطع — تنعصر الموجة في عبورها أصغر فأصغر +lpf.hint: ارفع تردد الدخل فوق تردد القطع — تخرج الموجة أصغر فأصغر lpf.in: 'الدخل: تأرجح كامل عند {f} هرتز' lpf.out: 'الخرج: {h}% من التأرجح' -lpf.box: مرشّح ترددات منخفضة -lpf.corner: f = f_c — ركن الـ−3 ديسيبل، ينجو 71% من التأرجح +lpf.box: مرشّح تمرير منخفض +lpf.corner: f = f_c — ركن الـ−3 ديسيبل، يبقى 71% من التأرجح lpf.note: المرشّح لا يقطع أبدًا — بل يخفت، 20 ديسيبل لكل ×10 في التردد lpf.caption: الجهير يعبر الجدار والحاد يضيع — كل جدار ومفتاح نغمة ودارة تنعيم هي هذا الصندوق diff --git a/content/ui/ar/firewall-doors.yaml b/content/ui/ar/firewall-doors.yaml index 64fb6502..1ca629d4 100644 --- a/content/ui/ar/firewall-doors.yaml +++ b/content/ui/ar/firewall-doors.yaml @@ -11,11 +11,11 @@ fw.webOn: الويب — مفتوح عمدًا fw.webOff: الويب — مغلق، الموقع مظلم fw.sshOn: الدخول البعيد — نُسي مفتوحًا fw.sshOff: الدخول البعيد — مسدود -fw.visitors: زوّار شرفاء، وجهتهم 443 +fw.visitors: زوّار عاديون، وجهتهم 443 fw.bot: 'بوت ماسح · {r} محاولة/دقيقة' fw.webServer: موقعك -fw.serving: يخدم بسعادة عبر 443 -fw.unreachable: لا يُوصَل إليه — لا شيء مفتوح +fw.serving: يعمل ويستقبل الزوّار عبر 443 +fw.unreachable: لا يمكن الوصول إليه — لا شيء مفتوح fw.sshServer: الدخول البعيد (SSH) fw.guessing: غريب يخمّن كلمات السر… fw.safe: خلف الطوب — الماسحات ترتد 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/ar/gears-and-gear-ratios.yaml b/content/ui/ar/gears-and-gear-ratios.yaml index daaa4f89..5630f657 100644 --- a/content/ui/ar/gears-and-gear-ratios.yaml +++ b/content/ui/ar/gears-and-gear-ratios.yaml @@ -1,4 +1,4 @@ -gears.hint: حرّك المزلاجات — تتشابك التروس وتدور بالنسبة الحقيقية +gears.hint: حرّك المنزلقات — تتشابك التروس وتدور بالنسبة الحقيقية gears.ratio: نسبة التروس gears.w2: سرعة الترس المُقاد gears.tau2: عزم الترس المُقاد diff --git a/content/ui/ar/generators-and-ac.yaml b/content/ui/ar/generators-and-ac.yaml index d78ced37..90143357 100644 --- a/content/ui/ar/generators-and-ac.yaml +++ b/content/ui/ar/generators-and-ac.yaml @@ -1,2 +1,2 @@ gac.hint: اسحب على طول الموجة للتنقل عبر الزمن t -gac.schematicCaption: الملف والحلقتان الانزلاقيتان والفرشاتان التي تصنع الموجة على اليمين +gac.schematicCaption: الملف والحلقتان الانزلاقيتان والفرشاتان التي تصنع الموجة في الأسفل diff --git a/content/ui/ar/gliding-and-glide-ratio.yaml b/content/ui/ar/gliding-and-glide-ratio.yaml index bd07999d..dce27688 100644 --- a/content/ui/ar/gliding-and-glide-ratio.yaml +++ b/content/ui/ar/gliding-and-glide-ratio.yaml @@ -1,4 +1,4 @@ -ggr.hint: ▶ ارفع L/D لانزلاق أطول · الارتفاع h يحدد كم «وقودًا» متبقيًا لتنفقه +ggr.hint: ▶ ارفع L/D لانزلاق أطول · الارتفاع h هو «الوقود» الذي تنفقه الطائرة ggr.distance: مسافة الانزلاق ggr.touchdown: نقطة الهبوط -ggr.caption: ميل تخطيطي، غير مرسوم بزاويته الحقيقية — القراءات دقيقة تمامًا. +ggr.caption: الميل في الرسم للتوضيح وليس بالزاوية الحقيقية، أما القراءات فدقيقة. diff --git a/content/ui/ar/hardy-weinberg.yaml b/content/ui/ar/hardy-weinberg.yaml index bc34e57d..d3364e94 100644 --- a/content/ui/ar/hardy-weinberg.yaml +++ b/content/ui/ar/hardy-weinberg.yaml @@ -1,6 +1,6 @@ hw.hint: اسحب عبر المربع لضبط p، حصة الأليل A في مجمّع الجينات hw.square: مولود عشوائي واحد · بويضة × نطفة -hw.areas: 'المساحات هي حصص الطرز الوراثية: p² و2pq وq²' -hw.village: الحصص نفسها بوصفها 100 قروي +hw.areas: 'المساحات هي حصص الأنماط الجينية: p² و2pq وq²' +hw.village: الحصص نفسها ممثَّلة بـ100 قروي hw.legend: AA {aa} · Aa {ab} · aa {bb} hw.equilibrium: لا انتقاء ولا هجرة والتزاوج عشوائي — فتتكرر هذه الحصص جيلًا بعد جيل diff --git a/content/ui/ar/heat-transfer.yaml b/content/ui/ar/heat-transfer.yaml index a707c135..c7190d7e 100644 --- a/content/ui/ar/heat-transfer.yaml +++ b/content/ui/ar/heat-transfer.yaml @@ -1,8 +1,8 @@ -heat.hint: ارفع ΔT وراقب اللوحات الثلاث تشتد معًا — ثم جرّب k وT كلًا على حدة. +heat.hint: 'ΔT يغيّر التوصيل والحمل، وT تغيّر الإشعاع.' heat.condTitle: التوصيل heat.convTitle: الحمل heat.radTitle: الإشعاع heat.cond: معدل التوصيل heat.conv: معدل الحمل -heat.rad: القدرة المُشَعّة +heat.rad: 'قدرة الإشعاع الذي يصدره السطح' heat.rising: الهواء الساخن يرتفع diff --git a/content/ui/ar/helicopters-and-rotors.yaml b/content/ui/ar/helicopters-and-rotors.yaml index 9d60657c..62c29e02 100644 --- a/content/ui/ar/helicopters-and-rotors.yaml +++ b/content/ui/ar/helicopters-and-rotors.yaml @@ -1,5 +1,5 @@ heli.hint: ▶ اسحب R والميل · تُميل الصفيحة المتأرجحة القرص كله، لا جسم الطائرة -heli.downwashLabel: الغسل الهابط +heli.downwashLabel: تيار الهواء الهابط heli.thrustLabel: الدفع (عمودي على القرص) heli.dl: حمل القرص -heli.caption: منظر جانبي مفاهيمي — ليس بمقياس رسم حقيقي. +heli.caption: منظر جانبي للتوضيح — ليس بمقياس رسم حقيقي. diff --git a/content/ui/ar/how-wings-really-lift.yaml b/content/ui/ar/how-wings-really-lift.yaml index d44c0eae..d2685eb3 100644 --- a/content/ui/ar/how-wings-really-lift.yaml +++ b/content/ui/ar/how-wings-really-lift.yaml @@ -1,6 +1,6 @@ hwl.hint: ▶ اسحب رأسيًا لتغيير α · راقب النقطتين تتسابقان فوق الجناح وتحته hwl.topLabel: السطح العلوي (أسرع، ضغط أقل) hwl.bottomLabel: السطح السفلي (أبطأ، ضغط أعلى) -hwl.caption: خريطة ضغط مفاهيمية — ليست حلًا بديناميكا الموائع الحاسوبية. +hwl.caption: رسم توضيحي للضغط حول الجناح، وليس محاكاة دقيقة. hwl.tTop: زمن العبور العلوي hwl.tBottom: زمن العبور السفلي diff --git a/content/ui/ar/incline.yaml b/content/ui/ar/incline.yaml new file mode 100644 index 00000000..0ad605e1 --- /dev/null +++ b/content/ui/ar/incline.yaml @@ -0,0 +1 @@ +incline.held: ساكن diff --git a/content/ui/ar/insulation.yaml b/content/ui/ar/insulation.yaml index e455714d..a450ca3b 100644 --- a/content/ui/ar/insulation.yaml +++ b/content/ui/ar/insulation.yaml @@ -1,3 +1,3 @@ -ins.hint: ارفع k أو اخفض d — راقب الجدار يغمق والأسهم تتزاحم. +ins.hint: 'اللون الأغمق يعني k أكبر، وكثرة الأسهم تعني تسربًا أكبر للحرارة.' ins.inside: الداخل ins.outside: الخارج diff --git a/content/ui/ar/kinematics-road.yaml b/content/ui/ar/kinematics-road.yaml index bda8390c..5495c7f2 100644 --- a/content/ui/ar/kinematics-road.yaml +++ b/content/ui/ar/kinematics-road.yaml @@ -1,5 +1,5 @@ -road.hint: مرّر الزمن على الطريق — الفجوات المتسعة بين فتات الخبز هي التسارع -road.crumbs: فتتة خبز عند كل ثانية كاملة -road.turning: v = 0 — نقطة الانعطاف -road.readEq: الرحلة نفسها، مكتوبة معادلةً -road.caption: الموضع ينحني، والسرعة تميل، والتسارع هو السهم الثابت الوحيد +road.hint: 'غيّر الزمن لمقارنة الموضع والسرعة والتسارع' +road.crumbs: 'علامة للموضع عند كل ثانية صحيحة' +road.turning: 'v ≈ 0 في هذه اللحظة' +road.readEq: 'تعطي المعادلة الموضع عند الزمن المختار.' +road.caption: 'التسارع الثابت يغيّر السرعة بمقادير متساوية في أزمنة متساوية' diff --git a/content/ui/ar/levers-pulleys-and-mechanical-advantage.yaml b/content/ui/ar/levers-pulleys-and-mechanical-advantage.yaml index 5d67fcdd..71a4a35a 100644 --- a/content/ui/ar/levers-pulleys-and-mechanical-advantage.yaml +++ b/content/ui/ar/levers-pulleys-and-mechanical-advantage.yaml @@ -1,5 +1,5 @@ levers.hint: حرّك بُعد نقطة الارتكاز عن كلّ طرف — القوة تُبادَل بالمسافة -levers.M: القدرة الميكانيكية +levers.M: الفائدة الآلية levers.Feff: قوة الجهد اللازمة levers.travel: يجب أن يقطعه الجهد levers.Fload: وزن الحمل diff --git a/content/ui/ar/life-of-a-star.yaml b/content/ui/ar/life-of-a-star.yaml index aa203302..76d56c01 100644 --- a/content/ui/ar/life-of-a-star.yaml +++ b/content/ui/ar/life-of-a-star.yaml @@ -1,4 +1,4 @@ -stlife.hint: ▶ اسحب «كتلة النجم» و«العمر» لتقديم حياة النجم كاملة سريعًا +stlife.hint: ▶ اسحب «كتلة النجم» و«العمر» لتشاهد حياة النجم كاملة بسرعة stlife.stageMain: الاحتراق الرئيسي stlife.stageExpanding: يتمدد stlife.stageGiant: عملاق أحمر diff --git a/content/ui/ar/loan-bars.yaml b/content/ui/ar/loan-bars.yaml index 8fdd47ff..6063d493 100644 --- a/content/ui/ar/loan-bars.yaml +++ b/content/ui/ar/loan-bars.yaml @@ -5,9 +5,9 @@ loan.interestNow: الفائدة في الشهر {m} loan.principalNow: أصل الدين ذلك الشهر loan.balance: الرصيد المتبقي loan.totalInterest: مجموع الفوائد على مدى القرض -loan.tipping: 'الشهر {m}: أصل الدين يبدأ بالفوز' +loan.tipping: 'الشهر {m}: أصل الدين يتجاوز الفائدة' loan.month: الشهر {m} loan.legendInterest: الفائدة (حصة البنك) loan.legendPrincipal: أصل الدين (يسدّد القرض) loan.legendBalance: الرصيد المتبقي -loan.caption: تقترض {loan} وتسلّم البنك {total} فوائد فوقها — هذا الإسفين الأحمر هو سرّ قوة الدفعات الإضافية المبكرة +loan.caption: تقترض {loan} وتدفع للبنك فوقها {total} فوائد — الجزء الأحمر الكبير في البداية هو سبب نفع الدفعات الإضافية المبكرةة diff --git a/content/ui/ar/loudness-ladder.yaml b/content/ui/ar/loudness-ladder.yaml index ee614683..433840a4 100644 --- a/content/ui/ar/loudness-ladder.yaml +++ b/content/ui/ar/loudness-ladder.yaml @@ -1,4 +1,4 @@ -db.hint: حرّك نسبة القدرة — عاجزة على الشريط الخطي، ودرجة أنيقة لكل ×10 على السلّم +db.hint: حرّك نسبة القدرة — لا تكاد تظهر على الشريط الخطي، لكنها تصعد درجة لكل ×10 على السلّم db.linear: النسبة الخام، خطيًّا db.linearNote: صوت ×1000 غير مرئي هنا في الأسفل — المقاييس الخطية تهدر الشريط كله على أعلى الأصوات db.ladder: سلّم الديسيبل diff --git a/content/ui/ar/market-stall.yaml b/content/ui/ar/market-stall.yaml index d440e8c5..8edb3eec 100644 --- a/content/ui/ar/market-stall.yaml +++ b/content/ui/ar/market-stall.yaml @@ -5,9 +5,9 @@ mkt.tag: 'سعرك: {x}' mkt.queue: 'الطابور: Q = {q} مشتريًا' mkt.empty: السعر طرد الجميع mkt.best: يبلغ الإيراد ذروته عند سعر -mkt.atPeak: '|E| = 1 — هذه قمة تل الإيراد' -mkt.raise: الطلب بالكاد يرمش هنا — رفع السعر يكبّر الإيراد -mkt.lower: المشترون يفرّون — خفض السعر يكبّر الإيراد +mkt.atPeak: '|E| = 1 — هنا أعلى إيراد ممكن' +mkt.raise: الطلب لا يكاد يتأثر هنا — رفع السعر يزيد الإيراد +mkt.lower: المشترون ينصرفون — خفض السعر يزيد الإيراد mkt.inelastic: غير مرن — البدائل قليلة والناس يدفعون mkt.elastic: مرن — الانصراف سهل -mkt.caption: مقايضة المستطيل نفسها تضبط أسعار الوقود واشتراكات البث وتذاكر الحافلات +mkt.caption: بالطريقة نفسها تُحدَّد أسعار الوقود واشتراكات البث وتذاكر الحافلات diff --git a/content/ui/ar/mmi-dialer.yaml b/content/ui/ar/mmi-dialer.yaml index 31f8bca7..92cf7d76 100644 --- a/content/ui/ar/mmi-dialer.yaml +++ b/content/ui/ar/mmi-dialer.yaml @@ -4,7 +4,7 @@ mmi.c.mmi: 'رمز MMI (*#SC#)' mmi.c.ss: رمز MMI ← إلى الشبكة mmi.c.ussd: سلسلة USSD mmi.c.secret: رمز أندرويد خفي -mmi.a.call: يرنّ الهاتف الآخر +mmi.a.call: يرنّ هاتف الطرف الآخر mmi.a.imei: يعرض رقم IMEI لهذا الهاتف mmi.a.cf: 'الرد: تحويل المكالمات مُطفأ' mmi.a.ussd: 'الرد: قائمة رصيد' @@ -22,7 +22,7 @@ mmi.verb.dial: ← يُجري مكالمة mmi.verb.route: ← ليس مكالمة mmi.key.wrap: 'غلاف * و#' mmi.key.sc: رمز الخدمة -mmi.foot.call: يرى المُتَّصِل أرقامًا فقط، فيرنّ الرقم؛ لا رمز هنا +mmi.foot.call: ترى لوحة الاتصال أرقامًا فقط، فتتصل بالرقم؛ لا رمز هنا mmi.foot.local: يُجاب على الهاتف نفسه؛ لا يُرسل شيء إلى المشغّل، فالرد فوري mmi.foot.net: 'يُرسَل إلى المشغّل طلبًا؛ ذهاب وإياب واحد، نحو {ms} ms، ثم تظهر الرسالة' mmi.caption: 'اللوحة نفسها تؤدي ثلاث وظائف: تُجري مكالمة، أو تسأل المشغّل سؤالًا، أو تنبّه تطبيقًا على الهاتف؛ وشكل ما تكتبه هو ما يقرّر' diff --git a/content/ui/ar/molecular-speed.yaml b/content/ui/ar/molecular-speed.yaml index e3b722cc..a26ac81c 100644 --- a/content/ui/ar/molecular-speed.yaml +++ b/content/ui/ar/molecular-speed.yaml @@ -1,7 +1,7 @@ -kin.hint: اسحب منزلق درجة الحرارة — راقب الجزيئات والميزان معًا. -kin.vrms: السرعة النموذجية للجزيء -kin.ke: متوسط الطاقة الحركية لكل جزيء +kin.hint: 'ارفع درجة الحرارة وراقب سرعة الجزيئات وطاقة حركتها.' +kin.vrms: 'السرعة النموذجية للجزيئات v_rms' +kin.ke: 'متوسط طاقة حركة الجزيء' kin.absZero: الصفر المطلق -kin.ice: ذوبان الجليد +kin.ice: 'ينصهر الجليد' kin.room: حرارة الغرفة -kin.boil: غليان الماء +kin.boil: 'يغلي الماء' diff --git a/content/ui/ar/packet-switch.yaml b/content/ui/ar/packet-switch.yaml index 46e29472..dd47f918 100644 --- a/content/ui/ar/packet-switch.yaml +++ b/content/ui/ar/packet-switch.yaml @@ -8,4 +8,4 @@ pkt.linkDown: الوصلة مقطوعة pkt.sender: المرسِل pkt.receiver: المستقبِل pkt.shelf: 'رفّ التجميع: تعود الرزم إلى ترتيبها مهما كان ترتيب وصولها' -pkt.caption: اقطع كبلًا فتهزّ الرزم أكتافها وتلتفّ حوله — صُمِّمت الشبكة لتنجو من هذا بالذات +pkt.caption: اقطع كبلًا فتلتفّ الرزم حوله ببساطة — صُمِّمت الشبكة لتنجو من هذا بالذات diff --git a/content/ui/ar/photosynthesis.yaml b/content/ui/ar/photosynthesis.yaml index 2d4d1032..e32fd088 100644 --- a/content/ui/ar/photosynthesis.yaml +++ b/content/ui/ar/photosynthesis.yaml @@ -7,4 +7,4 @@ ph.c: ثاني أكسيد الكربون C ph.p: المعدل الصافي P ph.pmax: الهضبة عند هذا التركيز، Pmax ph.comp: نقطة التعادل -ph.caption: ينحني المنحنى بمجرد أن يتوقف الضوء عن كونه العامل المقيِّد — فيتولى CO₂ القيد +ph.caption: ينحني المنحنى بمجرد أن يتوقف الضوء عن كونه العامل المقيِّد — ويصير CO₂ هو ما يحدّ المعدل 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/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/ar/propellers-and-jets.yaml b/content/ui/ar/propellers-and-jets.yaml index 845372f7..cc7e0b07 100644 --- a/content/ui/ar/propellers-and-jets.yaml +++ b/content/ui/ar/propellers-and-jets.yaml @@ -1,7 +1,7 @@ -pj.hint: ▶ اسحب A وv وΔv · مروحة كبيرة لطيفة ونفاث صغير عنيف قد يصنعان الدفع نفسه +pj.hint: ▶ غيّر A و v و Δv · مروحة كبيرة هادئة ونفاث صغير عنيف قد يصنعان الدفع نفسه pj.discLabel: القرص pj.inLabel: الهواء الداخل pj.outLabel: العادم pj.mdot: معدل التدفق الكتلي pj.eta: كفاءة الدفع -pj.caption: أنبوب انسياب مفاهيمي، ليس بمقياس رسم حقيقي. +pj.caption: رسم توضيحي لمجرى الهواء، ليس بمقياس رسم حقيقي. diff --git a/content/ui/ar/reynolds-number.yaml b/content/ui/ar/reynolds-number.yaml index a9d8feb2..3ecb4834 100644 --- a/content/ui/ar/reynolds-number.yaml +++ b/content/ui/ar/reynolds-number.yaml @@ -1,7 +1,7 @@ -re.hint: ▶ اسحب L وv معًا — يبقى الجسم بالحجم نفسه، ويتغيّر فقط طابع الأثر خلفه -re.regime: النظام -re.laminar: انسياب طبقي، أثر ناعم +re.hint: ▶ غيّر L و v معًا — يبقى الجسم في الرسم بالحجم نفسه، ويتغيّر شكل الأثر خلفه فقط +re.regime: نوع الانسياب +re.laminar: انسياب طبقي، أثر منتظم re.transitional: انتقالي re.turbulent: انسياب مضطرب، أثر فوضوي re.axisHint: موضع النقطة على المقياس أدناه — النحلة والكرة والطائرة كلها على المقياس نفسه -re.caption: أثر مفاهيمي — ليس حلًا بديناميكا الموائع الحاسوبية. +re.caption: رسم توضيحي للأثر خلف الجسم، وليس محاكاة دقيقة. diff --git a/content/ui/ar/risk-and-diversification.yaml b/content/ui/ar/risk-and-diversification.yaml index 24acbece..7b122110 100644 --- a/content/ui/ar/risk-and-diversification.yaml +++ b/content/ui/ar/risk-and-diversification.yaml @@ -1,4 +1,4 @@ risk.hint: اسحب المنزلقات أدناه لتغيير التذبذب وعدد الأسهم وارتباطها risk.singleTitle: سهم واحد — العوائد المحتملة نهاية السنة risk.portfolioTitle: محفظتك — العوائد المحتملة نهاية السنة -risk.caption: نفس الـ13 نتيجة عيّنة في الصفين، بمقياس مخاطرة كل صف الخاصة؛ لاحظ كيف تنجذب نحو المنتصف +risk.caption: النتائج الـ13 نفسها في الصفين، وكل صف مرسوم بحسب مخاطرته؛ لاحظ كيف تقترب من المنتصف diff --git a/content/ui/ar/shrinking-note.yaml b/content/ui/ar/shrinking-note.yaml index aa97d30f..92462274 100644 --- a/content/ui/ar/shrinking-note.yaml +++ b/content/ui/ar/shrinking-note.yaml @@ -1,8 +1,8 @@ -inf.hint: اضبط المعدل السنوي وحرّك السنين — تنكمش الورقة ويتسلق سعر السلة +inf.hint: اضبط المعدل السنوي وحرّك السنين — تصغر الورقة ويرتفع سعر السلة inf.note: ورقة المئة، بقوتها الشرائية الحقيقية inf.yearZero: السنة 0 inf.worth: 'تشتري الآن ما كان يشتريه {v}' -inf.buys: ماذا ما تزال تشتري +inf.buys: ما تشتريه الآن inf.buysNote: '{n} من أرغفة السنة صفر العشرة' inf.basket: السلة نفسها تكلّف الآن inf.wasHundred: كانت تكلّف 100 في السنة 0 @@ -11,6 +11,6 @@ inf.zero: عند 0% لا تنكمش الورقة أبدًا inf.years: السنوات inf.power: القوة الشرائية للمئة inf.index: مؤشر الأسعار -inf.halve: تنصف القوة خلال +inf.halve: تنخفض إلى النصف خلال inf.halveYears: '≈{n} سنة' -inf.caption: الورقة في درجك تحتفظ برقمها وتفقد معناها بصمت +inf.caption: الورقة في درجك تحتفظ برقمها، لكن ما تشتريه يقلّ سنة بعد سنة diff --git a/content/ui/ar/signals-and-noise.yaml b/content/ui/ar/signals-and-noise.yaml index c0284501..c170954f 100644 --- a/content/ui/ar/signals-and-noise.yaml +++ b/content/ui/ar/signals-and-noise.yaml @@ -1,9 +1,9 @@ -snr.hint: ارفع N — يخرج متوسط الآثار الغليظ بوضوح من الضجيج -snr.single: نسبة الإشارة إلى الضجيج (أثر واحد) +snr.hint: ارفع N — يخرج خط المتوسط الغليظ بوضوح من الضجيج +snr.single: نسبة الإشارة إلى الضجيج (تسجيل واحد) snr.averaged: نسبة الإشارة إلى الضجيج (بعد المتوسط) snr.noiseAvg: الضجيج بعد حساب المتوسط -snr.n: عدد الآثار المتوسَّطة +snr.n: عدد التسجيلات في المتوسط snr.true: الإشارة الحقيقية -snr.singleTrace: أثر واحد -snr.avgTrace: متوسط N أثرًا +snr.singleTrace: تسجيل واحد +snr.avgTrace: متوسط N تسجيلًا snr.xlabel: العيّنة diff --git a/content/ui/ar/speedsound.yaml b/content/ui/ar/speedsound.yaml index 65510e14..c51cafa1 100644 --- a/content/ui/ar/speedsound.yaml +++ b/content/ui/ar/speedsound.yaml @@ -4,7 +4,7 @@ speedsound.air: الهواء speedsound.water: الماء speedsound.steel: الفولاذ speedsound.speed: سرعة الصوت -speedsound.distance: بُعد العاصفة -speedsound.flash: ومضة البرق -speedsound.count: 'عددتَ {t} ث' -speedsound.away: 'العاصفة على بُعد ≈ {d} كم' +speedsound.distance: 'المسافة المقطوعة' +speedsound.flash: 'مصدر النبضة' +speedsound.count: 'الزمن: {t} ث' +speedsound.away: 'المسافة ≈ {d} كم' diff --git a/content/ui/ar/taxes-and-brackets.yaml b/content/ui/ar/taxes-and-brackets.yaml index 0c93a656..ef2a5542 100644 --- a/content/ui/ar/taxes-and-brackets.yaml +++ b/content/ui/ar/taxes-and-brackets.yaml @@ -1,7 +1,7 @@ tax.hint: اسحب المنزلقات أدناه لتغيير الدخل ومكان بداية الشريحة الأعلى tax.scaleTitle: الدخل، مقسّمًا إلى الشريحتين الخاضعتين للضريبة tax.gaugeTitle: المعدل الحدي مقابل المعدل المتوسط -tax.marginalLabel: المعدل الحدي (ضريبة الدولار التالي) +tax.marginalLabel: المعدل الحدي (ضريبة الريال التالي) tax.averageLabel: المعدل المتوسط (الضريبة المستحقة ÷ الدخل) tax.marginalShort: حدي tax.averageShort: متوسط diff --git a/content/ui/ar/tcp-talk.yaml b/content/ui/ar/tcp-talk.yaml index dacc3c0d..06f2e88b 100644 --- a/content/ui/ar/tcp-talk.yaml +++ b/content/ui/ar/tcp-talk.yaml @@ -1,4 +1,4 @@ -tcp.hint: ▶ عشر شرائح من صورة تعبر خطًّا عاصفًا — اسحب الفقد وقلّب الإشعارات +tcp.hint: ▶ عشر شرائح من صورة تعبر خطًّا عاصفًا — غيّر loss ثم شغّل الإيصالات أو أطفئها بـ ack tcp.mode: البروتوكول tcp.loss: الخط يُسقط tcp.delivered: وصل من الصورة @@ -6,9 +6,9 @@ tcp.resends: إعادات الإرسال tcp.storm: 'العاصفة: تُسقط {p}% من كل شيء' tcp.sender: المرسِل tcp.receiver: المستقبِل -tcp.again: أُرسلت ثانية — لم تعد ورقة الشكر +tcp.again: أُرسلت ثانية — لم يرجع إيصالها tcp.complete: وصلت كل الشرائح — الصورة كاملة tcp.holes: '{n} شرائح لم تصل قط، ولن يعيد إرسالها أحد' -tcp.tcpNote: TCP ينتظر ورقة شكر صغيرة (ACK) عن كل رزمة؛ لا ورقة → يرسلها من جديد -tcp.udpNote: UDP لا يلتفت وراءه أبدًا — مقبول لمكالمة فيديو، قاتل لتحويل مصرفي +tcp.tcpNote: TCP ينتظر إيصالًا صغيرًا (ACK) عن كل رزمة؛ لا إيصال → يرسلها من جديد +tcp.udpNote: UDP لا يلتفت وراءه أبدًا — مقبول في مكالمة فيديو، وكارثة في تحويل مصرفي tcp.caption: يُسمح للخط أن يكون رديئًا — عناد البروتوكول في مسك الدفاتر هو ما يجعله موثوقًا diff --git a/content/ui/ar/the-nucleus.yaml b/content/ui/ar/the-nucleus.yaml index 6287f018..572834bc 100644 --- a/content/ui/ar/the-nucleus.yaml +++ b/content/ui/ar/the-nucleus.yaml @@ -10,5 +10,5 @@ nucleus.unstable: ليس نظيرًا مستقرًا معروفًا nucleus.legendP: بروتون nucleus.legendN: نيوترون nucleus.isotopeOf: النظير {a}{sym} -nucleus.radiusHint: تتراصّ النكليونات كحبات رخام، فيتناسب الحجم (وR³) مع A -nucleus.ballHint: النواة نفسها في بعد ثالث — كرة مرصوصة بـA نكليون، ونصف قطرها يتناسب مع جذر A التكعيبي +nucleus.radiusHint: تتراصّ النكليونات كالكرات الزجاجية في كيس،فيتناسب الحجم (وR³) مع A +nucleus.ballHint: النواة نفسها بشكل ثلاثي الأبعاد — كرة مرصوصة بـA نكليون، ونصف قطرها يتناسب مع جذر A التكعيبي diff --git a/content/ui/ar/thermal-expansion.yaml b/content/ui/ar/thermal-expansion.yaml index 829b26ad..d9489bda 100644 --- a/content/ui/ar/thermal-expansion.yaml +++ b/content/ui/ar/thermal-expansion.yaml @@ -1,8 +1,8 @@ texp.hint: اسحب ΔT — راقب فجوة السكة تُغلق وشريط الثرموستات ينحني معًا. texp.railTitle: فجوة تمدد السكة الحديدية texp.thermoTitle: شريط الثرموستات ثنائي المعدن -texp.gap: عرض الفجوة +texp.gap: 'الفجوة مكبّرة للتوضيح؛ التغير الحقيقي في الأسفل' texp.of: من -texp.bend: زاوية الانحناء +texp.bend: 'انحناء للتوضيح فقط' texp.steel: فولاذ texp.brass: نحاس أصفر diff --git a/content/ui/ar/two-gas-mix.yaml b/content/ui/ar/two-gas-mix.yaml index 6883d64b..697068e5 100644 --- a/content/ui/ar/two-gas-mix.yaml +++ b/content/ui/ar/two-gas-mix.yaml @@ -1,4 +1,4 @@ -mix.hint: افتح الحاجز وراقب الإنتروبيا ترتفع نحو أقصاها — لا تنخفض من تلقاء نفسها أبدًا. +mix.hint: 'الشريط يقارن إنتروبيا هذا التوزيع بأكبر قيمة ممكنة.' mix.perm: انفتاح الحاجز mix.s: الإنتروبيا S -mix.smax: أقصى إنتروبيا +mix.smax: 'أكبر إنتروبيا' diff --git a/content/ui/ar/vpn-tunnel.yaml b/content/ui/ar/vpn-tunnel.yaml index 9c15f22f..fa41c9cc 100644 --- a/content/ui/ar/vpn-tunnel.yaml +++ b/content/ui/ar/vpn-tunnel.yaml @@ -1,4 +1,4 @@ -vpn.hint: اقلب مفتاح vpn وراقب ما تستطيع عين مزوّد الإنترنت قراءته بعدُ +vpn.hint: شغّل مفتاح vpn أو أوقفه وراقب ما تستطيع عين مزوّد الإنترنت قراءته بعدُ vpn.you: حاسوبك vpn.pipe: النفق المشفّر vpn.server: خادم VPN @@ -14,4 +14,4 @@ vpn.siteSees: الموقع يرى vpn.vpnAddr: عنوان خادم VPN vpn.homeAddr: عنوان بيتك vpn.goodput: 'بياناتك: G = {g} ميغابت/ث' -vpn.caption: يخفي VPN وجهتك عن مزوّد الإنترنت، ومكانك عن الموقع — وبايتات الغلاف هي أجرة الرحلة +vpn.caption: يخفي VPN وجهتك عن مزوّد الإنترنت، ومكانك عن الموقع — وبايتات الغلاف هي ثمن ذلك diff --git a/content/ui/ar/wifi-signal.yaml b/content/ui/ar/wifi-signal.yaml index d2ffd58b..1de304f1 100644 --- a/content/ui/ar/wifi-signal.yaml +++ b/content/ui/ar/wifi-signal.yaml @@ -1,7 +1,7 @@ -wifi.hint: اسحب الهاتف عبر مخطط البيت — المسافة والجدران كلاهما يلتهم الإشارة +wifi.hint: اسحب الهاتف عبر مخطط البيت — المسافة والجدران كلاهما يُضعف الإشارة wifi.router: موجّه واي فاي wifi.bars: أعمدة الإشارة wifi.speed: السرعة الفعلية wifi.budget: قدرة الإرسال، ناقص كلفة المتر الأول، ناقص المسافة، ناقص الجدران wifi.dead: منطقة ميتة — غرقت الإشارة تحت الضجيج -wifi.caption: يخفت الراديو مع مربع المسافة، وكل جدار يقتطع قضمته الثابتة +wifi.caption: يخفت الراديو مع مربع المسافة، وكل جدار يأخذ حصته الثابتة diff --git a/content/ui/ar/wingtip-vortices-and-induced-drag.yaml b/content/ui/ar/wingtip-vortices-and-induced-drag.yaml index bea9f1be..41e483c6 100644 --- a/content/ui/ar/wingtip-vortices-and-induced-drag.yaml +++ b/content/ui/ar/wingtip-vortices-and-induced-drag.yaml @@ -1,5 +1,5 @@ -wtv.hint: ▶ اسحب AR وα · فعّل الوينجلتس وراقب دوامات الطرف تصغر -wtv.vortexLabel: الدوامة المتتالية -wtv.wingletsOn: الوينجلتس مركّبة +wtv.hint: ▶ غيّر AR و α · شغّل الجنيحات وراقب دوامات الطرف تصغر +wtv.vortexLabel: دوامة طرف الجناح +wtv.wingletsOn: الجنيحات مركّبة wtv.di: السحب الحثي -wtv.caption: منظر علوي مفاهيمي، الباع مرسوم بمقياس AR — ليس حلًا بديناميكا الموائع الحاسوبية. +wtv.caption: منظر علوي للتوضيح، وطول الجناح مرسوم بحسب AR — ليس محاكاة دقيقة. diff --git a/content/ui/en.yaml b/content/ui/en.yaml index 9d094976..9287ec17 100644 --- a/content/ui/en.yaml +++ b/content/ui/en.yaml @@ -220,18 +220,18 @@ coin.successes: successes coin.proportion: proportion so far coin.gap: distance from p coin.again: ↻ again -coin.band: 'shaded: where 95% of runs stay' -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 +coin.band: 'shaded: approximate 95% range at each fixed trial count' +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 @@ -391,6 +391,7 @@ buoy.hint: drag up or down to change the object’s density buoy.weight: weight buoy.buoyancy: buoyant force buoy.submerged: submerged +buoy.neutral: neutrally buoyant buoy.state: result buoy.sinks: sinks buoy.floats: floats @@ -731,7 +732,7 @@ rot.speedVisible: speed at {r} kpc from visible matter rot.speedModel: speed with the dark halo rot.miss: distance from the measurements rot.darkShare: invisible share of the mass -rot.hint: add invisible mass until the curve goes through the black measured points +rot.hint: add invisible mass until the curve goes through the large measured points rot.distance: distance from the centre (kpc) rot.speed: orbit speed (km/s) rot.measured: measured 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/content/ui/en/buoyancy3d.yaml b/content/ui/en/buoyancy3d.yaml index 5c7d721b..f869f6ef 100644 --- a/content/ui/en/buoyancy3d.yaml +++ b/content/ui/en/buoyancy3d.yaml @@ -1,2 +1,3 @@ viz3d.buoyancy.floats: floats viz3d.buoyancy.sinks: sinks +viz3d.buoyancy.neutral: neutrally buoyant 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%' 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/content/ui/en/diffraction.yaml b/content/ui/en/diffraction.yaml index af5a9a11..51534380 100644 --- a/content/ui/en/diffraction.yaml +++ b/content/ui/en/diffraction.yaml @@ -1,5 +1,6 @@ diffraction.hint: plane waves arrive from the left and spread out past the gap diffraction.a: gap width a diffraction.lambda: wavelength λ -diffraction.theta: spreading angle θ +diffraction.theta: 'first-minimum angle θ' diffraction.gap: gap +diffraction.noMinimum: 'no first minimum' diff --git a/content/ui/en/echo.yaml b/content/ui/en/echo.yaml index 937f0ec6..9e856d6e 100644 --- a/content/ui/en/echo.yaml +++ b/content/ui/en/echo.yaml @@ -6,4 +6,4 @@ echo.free: free end echo.fixed: fixed end echo.hintOut: the pulse travels out toward the wall echo.hintBack: the pulse returns as an echo -echo.tip: fixed ends flip the returning pulse; free ends do not — the timing is the same either way +echo.tip: 'For rope displacement, a fixed end inverts the pulse; a free end does not. Travel time stays the same.' diff --git a/content/ui/en/energy-hill.yaml b/content/ui/en/energy-hill.yaml index df0d37f9..abe1d149 100644 --- a/content/ui/en/energy-hill.yaml +++ b/content/ui/en/energy-hill.yaml @@ -1,6 +1,6 @@ -nrg.hint: set the launch speed — the ball coasts exactly as high as its kinetic energy can pay for -nrg.launch: 'launched at {v} m/s' -nrg.top: 'coasts to h = {h} m' -nrg.bars: same energy, two forms -nrg.swap: every joule of motion buys exactly one joule of height — and back again on the way down -nrg.caption: double the speed and the ball climbs four times as high — the v² is the whole story +nrg.hint: 'Ideal vertical launch: compare initial kinetic energy with potential-energy gain' +nrg.launch: 'launch speed {v} m/s' +nrg.top: 'maximum rise h = {h} m' +nrg.bars: 'launch KE · top PE' +nrg.swap: 'With no air resistance, initial kinetic energy equals the potential-energy gain.' +nrg.caption: 'At fixed mass, doubling launch speed quadruples energy and ideal height.' 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' diff --git a/content/ui/en/generators-and-ac.yaml b/content/ui/en/generators-and-ac.yaml index ea303fa7..fe582173 100644 --- a/content/ui/en/generators-and-ac.yaml +++ b/content/ui/en/generators-and-ac.yaml @@ -1,2 +1,2 @@ gac.hint: drag along the wave to move through time t -gac.schematicCaption: the coil, slip rings and brushes that make the wave on the right +gac.schematicCaption: the coil, slip rings and brushes that make the wave below diff --git a/content/ui/en/heat-transfer.yaml b/content/ui/en/heat-transfer.yaml index ab346ae2..bdffb0ac 100644 --- a/content/ui/en/heat-transfer.yaml +++ b/content/ui/en/heat-transfer.yaml @@ -1,8 +1,8 @@ -heat.hint: Raise ΔT and watch all three panels intensify — then try k and T on their own. +heat.hint: 'ΔT changes conduction and convection; T changes emitted radiation.' heat.condTitle: Conduction heat.convTitle: Convection heat.radTitle: Radiation heat.cond: conduction rate heat.conv: convection rate -heat.rad: radiated power +heat.rad: 'emitted radiative power' heat.rising: warm air rises diff --git a/content/ui/en/incline.yaml b/content/ui/en/incline.yaml new file mode 100644 index 00000000..03ec28d8 --- /dev/null +++ b/content/ui/en/incline.yaml @@ -0,0 +1 @@ +incline.held: at rest diff --git a/content/ui/en/insulation.yaml b/content/ui/en/insulation.yaml index 5307cab8..3cb5888c 100644 --- a/content/ui/en/insulation.yaml +++ b/content/ui/en/insulation.yaml @@ -1,3 +1,3 @@ -ins.hint: Raise k or lower d — watch the wall darken and the arrows crowd together. +ins.hint: 'A darker wall has a larger k; more arrows mean a larger heat-flow rate.' ins.inside: inside ins.outside: outside diff --git a/content/ui/en/kinematics-road.yaml b/content/ui/en/kinematics-road.yaml index 880abefa..2b5e271d 100644 --- a/content/ui/en/kinematics-road.yaml +++ b/content/ui/en/kinematics-road.yaml @@ -1,5 +1,5 @@ -road.hint: scrub time along the road — the growing gaps between breadcrumbs are the acceleration -road.crumbs: a breadcrumb every whole second -road.turning: v = 0 — the turning point -road.readEq: the same journey, written as the equation -road.caption: position curves, velocity tilts, acceleration is the one constant arrow +road.hint: 'Move time to compare position, velocity and acceleration' +road.crumbs: 'position marked at each whole second' +road.turning: 'v ≈ 0 at this instant' +road.readEq: 'The equation gives the position at the selected time.' +road.caption: 'Constant acceleration changes velocity by equal amounts in equal times' diff --git a/content/ui/en/molecular-speed.yaml b/content/ui/en/molecular-speed.yaml index 529999db..eb515a0d 100644 --- a/content/ui/en/molecular-speed.yaml +++ b/content/ui/en/molecular-speed.yaml @@ -1,7 +1,7 @@ -kin.hint: Drag the temperature slider — watch the molecules and the thermometer together. -kin.vrms: typical molecule speed -kin.ke: average kinetic energy per molecule +kin.hint: 'Compare temperature, average translational energy and root-mean-square speed.' +kin.vrms: 'root-mean-square speed' +kin.ke: 'mean translational kinetic energy per particle' kin.absZero: absolute zero -kin.ice: ice melts +kin.ice: 'ice melts at 1 atm' kin.room: room temp -kin.boil: water boils +kin.boil: 'water boils at 1 atm' 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 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' diff --git a/content/ui/en/speedsound.yaml b/content/ui/en/speedsound.yaml index 2e2c770b..5219d71c 100644 --- a/content/ui/en/speedsound.yaml +++ b/content/ui/en/speedsound.yaml @@ -4,7 +4,7 @@ speedsound.air: air speedsound.water: water speedsound.steel: steel speedsound.speed: speed of sound -speedsound.distance: storm distance -speedsound.flash: lightning flash -speedsound.count: 'you counted {t} s' -speedsound.away: 'storm ≈ {d} km away' +speedsound.distance: 'distance travelled' +speedsound.flash: 'pulse source' +speedsound.count: 'elapsed time: {t} s' +speedsound.away: 'distance ≈ {d} km' diff --git a/content/ui/en/thermal-expansion.yaml b/content/ui/en/thermal-expansion.yaml index 83501091..2b35d3f9 100644 --- a/content/ui/en/thermal-expansion.yaml +++ b/content/ui/en/thermal-expansion.yaml @@ -1,8 +1,8 @@ texp.hint: Drag ΔT — watch the rail gap close and the thermostat strip bend together. texp.railTitle: Railway expansion gap texp.thermoTitle: Bimetallic thermostat strip -texp.gap: gap width +texp.gap: 'schematic gap; length change shown below' texp.of: of -texp.bend: bend angle +texp.bend: 'illustrative bending; fixed layer properties' texp.steel: steel texp.brass: brass diff --git a/content/ui/en/two-gas-mix.yaml b/content/ui/en/two-gas-mix.yaml index c5e6e830..95801e20 100644 --- a/content/ui/en/two-gas-mix.yaml +++ b/content/ui/en/two-gas-mix.yaml @@ -1,4 +1,4 @@ -mix.hint: Open the partition and watch entropy climb toward its maximum — never back down on its own. +mix.hint: 'The bar compares the entropy of this split with the maximum for the same total.' mix.perm: partition open mix.s: entropy S mix.smax: max entropy 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 @@ diff --git a/src/viz/waves/RayOptics.vue b/src/viz/waves/RayOptics.vue index 0ae41621..8994d198 100644 --- a/src/viz/waves/RayOptics.vue +++ b/src/viz/waves/RayOptics.vue @@ -88,7 +88,7 @@ function pick(e: PointerEvent) { n₁ = {{ fmt(n1, 2) }} n₂ = {{ fmt(n2, 2) }} - + θ₁ @@ -117,7 +117,12 @@ function pick(e: PointerEvent) { - {{ t('optics.none') }} + 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') }} diff --git a/src/viz/waves/SpeedOfSound.vue b/src/viz/waves/SpeedOfSound.vue index 597a7c6a..2b1926a0 100644 --- a/src/viz/waves/SpeedOfSound.vue +++ b/src/viz/waves/SpeedOfSound.vue @@ -5,7 +5,7 @@ import { t } from '../../i18n' import Readouts from '../../components/Readouts.vue' // content/lessons/waves/speed-of-sound. v depends on medium (bar chart, left) and on air -// temperature (v = 331 + 0.6T); the right side times how far a storm is, d = v*t. +// temperature (v = 331 + 0.6T); the right side shows a pulse’s one-way travel distance, d = v*t. const props = defineProps<{ params: Record; options: Record }>() const emit = defineEmits<{ set: [name: string, value: number] }>() const W = 800 @@ -52,7 +52,7 @@ const readouts = computed(() => [ {{ t('speedsound.clickHint') }} - ⚡ + ◉ {{ t('speedsound.flash') }} {{ t('speedsound.count', { t: fmt(tCount, 1) }) }} diff --git a/src/viz/waves/WaveBasics.vue b/src/viz/waves/WaveBasics.vue index 710f2a20..0d311a4c 100644 --- a/src/viz/waves/WaveBasics.vue +++ b/src/viz/waves/WaveBasics.vue @@ -56,7 +56,9 @@ const partX = 4 const partPy = computed(() => BASE - yAt(partX) * AMPPX) // crest tracker: a fixed point of constant phase (a crest), so it visibly rides along at speed v const crestPx = computed(() => { - const x = (lambda.value / 4 + v.value * clock.value) % LEN + // Wrap by whole wavelengths so the marker remains on a crest after each reset. + const span = Math.floor(LEN / lambda.value) * lambda.value + const x = (lambda.value / 4 + v.value * clock.value) % span return PX0 + x * PXPM }) diff --git a/src/viz3d/physics/BlockForce3D.vue b/src/viz3d/physics/BlockForce3D.vue index c764a961..25ddafa0 100644 --- a/src/viz3d/physics/BlockForce3D.vue +++ b/src/viz3d/physics/BlockForce3D.vue @@ -3,6 +3,7 @@ import { ref, watch } from 'vue' import * as THREE from 'three' import { useThree, ground, arrow, label, type ThreeCtx } from '../useThree' import { loadModel, fit } from '../models' +import { t as translate } from '../../i18n' // Five modes, chosen once by options.mode (fixed per lesson, so each mode builds only what it needs): // default (physics/newtons-second-law): a crate pushed by F = ma. params F, m. @@ -122,7 +123,7 @@ function setupIncline({ scene, theme }: ThreeCtx) { fArrow.setLength(Math.max(0.15, (held ? gComp : fMax) * 1.3), 0.25, 0.15) block.getWorldPosition(tmp) tag.position.set(tmp.x, tmp.y + 1.1, tmp.z) - setLabel(tag, `a = ${a.toFixed(2)} m/s²${held ? ' (held)' : ''}`, held ? theme.pos : theme.accent2) + setLabel(tag, `a = ${(held ? 0 : a).toFixed(2)} m/s²${held ? ` (${translate('incline.held')})` : ''}`, held ? theme.pos : theme.accent2) } } diff --git a/src/viz3d/physics/Buoyancy3D.vue b/src/viz3d/physics/Buoyancy3D.vue index 9293f2c7..f0031b38 100644 --- a/src/viz3d/physics/Buoyancy3D.vue +++ b/src/viz3d/physics/Buoyancy3D.vue @@ -73,7 +73,7 @@ useThree( bArrow.setLength(bLen, 0.3, 0.18) tag.position.set(0, TANK_H + 0.4, 0) - paint(tag, sinks ? t('viz3d.buoyancy.sinks') : t('viz3d.buoyancy.floats'), sinks ? theme.neg : theme.pos) + paint(tag, sinks ? t('viz3d.buoyancy.sinks') : rhoObj === rhoFluid ? t('viz3d.buoyancy.neutral') : t('viz3d.buoyancy.floats'), sinks ? theme.neg : theme.pos) } }, { camera: [5.5, 4.3, 7.5], target: [0, 1.3, 0] }, diff --git a/src/viz3d/shared/GasBox3D.vue b/src/viz3d/shared/GasBox3D.vue index 67134d24..62c40962 100644 --- a/src/viz3d/shared/GasBox3D.vue +++ b/src/viz3d/shared/GasBox3D.vue @@ -111,7 +111,8 @@ function setupIdealGas(scene: THREE.Scene, theme: Theme) { setW(Wd) const count = Math.min(MAX, Math.round(n * 40)) inst.count = count - bounce(pts, count, [0, Wd, 0, H, -D / 2, D / 2], 2.2 * Math.sqrt(T / 300), dt, inst, m4) + const massScale = props.options?.molarMass ? Math.sqrt(0.029 / Math.max(0.001, opt('M', 0.029))) : 1 + bounce(pts, count, [0, Wd, 0, H, -D / 2, D / 2], 2.2 * Math.sqrt(T / 300) * massScale, dt, inst, m4) } } diff --git a/src/viz3d/thermodynamics/Room3D.vue b/src/viz3d/thermodynamics/Room3D.vue index c9977c48..b72bfae7 100644 --- a/src/viz3d/thermodynamics/Room3D.vue +++ b/src/viz3d/thermodynamics/Room3D.vue @@ -102,7 +102,7 @@ useThree( inst.instanceMatrix.needsUpdate = true if (inst.instanceColor) inst.instanceColor.needsUpdate = true paint(tsTag, `${Math.round(Tsurf)} K`, theme.accent2) - paint(vTag, `≈ ${speed.toFixed(2)} m/s`, theme.fg) + paint(vTag, `ΔT = ${Math.round(dTemp)} °C`, theme.fg) } }, { camera: [8, 5, 9], target: [W / 2, 1.4, 0] }, diff --git a/src/viz3d/waves/Lens3D.vue b/src/viz3d/waves/Lens3D.vue index f89b429e..cadc0e57 100644 --- a/src/viz3d/waves/Lens3D.vue +++ b/src/viz3d/waves/Lens3D.vue @@ -89,7 +89,7 @@ useThree( object.setLength(Math.max(0.05, ho), Math.min(0.3, ho * 0.3 + 0.02), Math.min(0.18, ho * 0.2 + 0.01)) const P0 = new THREE.Vector3(-doo, ho, 0) - const Pi = new THREE.Vector3(diClamped, finite ? hi : 0, 0) + const Pi = new THREE.Vector3(finite ? di : 50, finite ? hi : 0, 0) const chief = finite ? Pi.clone().normalize() : new THREE.Vector3(doo, -ho, 0).normalize() if (finite) { diff --git a/src/viz3d/waves/Refraction3D.vue b/src/viz3d/waves/Refraction3D.vue index 5337822c..b59f3af4 100644 --- a/src/viz3d/waves/Refraction3D.vue +++ b/src/viz3d/waves/Refraction3D.vue @@ -88,6 +88,7 @@ useThree( const dIn = new THREE.Vector3().addScaledVector(HORIZ, Math.sin(th1)).addScaledVector(UP, -Math.cos(th1)) const dRefl = new THREE.Vector3().addScaledVector(HORIZ, Math.sin(th1)).addScaledVector(UP, Math.cos(th1)) aim(inc, dIn.clone().multiplyScalar(-5), new THREE.Vector3()) + refl.visible = n1 !== n2 aim(refl, new THREE.Vector3(), dRefl.multiplyScalar(4)) ;(refl.material as THREE.LineBasicMaterial).opacity = tir ? 1 : 0.5 diff --git a/src/viz3d/waves/Rope3D.vue b/src/viz3d/waves/Rope3D.vue index 5b623324..ef5d95ad 100644 --- a/src/viz3d/waves/Rope3D.vue +++ b/src/viz3d/waves/Rope3D.vue @@ -83,7 +83,8 @@ useThree( hand.position.set(0, yAt(0), 0) bead.position.set(partX, yAt(partX), 0) const v = f * lambda - const cx = (lambda / 4 + v * clock) % LEN + const crestSpan = Math.floor(LEN / lambda) * lambda + const cx = (lambda / 4 + v * clock) % crestSpan crest.position.set(cx, yAt(cx) + 0.05, 0) setLabel(t('viz3d.rope.speed', { v: fmt(v, 2) }), theme.fg)