{"id":23749431,"url":"https://github.com/sigma-py/ndim","last_synced_at":"2026-03-17T22:05:24.384Z","repository":{"id":44703059,"uuid":"261538910","full_name":"sigma-py/ndim","owner":"sigma-py","description":":books: Compute multidimensional volumes and monomial integrals.","archived":false,"fork":false,"pushed_at":"2024-01-21T13:33:47.000Z","size":447,"stargazers_count":22,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T00:14:11.827Z","etag":null,"topics":["mathematics","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigma-py.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-05T17:26:39.000Z","updated_at":"2025-03-10T02:36:36.000Z","dependencies_parsed_at":"2024-06-18T18:52:14.301Z","dependency_job_id":null,"html_url":"https://github.com/sigma-py/ndim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sigma-py/ndim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fndim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fndim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fndim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fndim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigma-py","download_url":"https://codeload.github.com/sigma-py/ndim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fndim/sbom","scorecard":{"id":822935,"data":{"date":"2025-08-11","repo":{"name":"github.com/sigma-py/ndim","commit":"53a1bd5c5ebde99069713677112d16251aa67d02"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-23T16:02:41.605Z","repository_id":44703059,"created_at":"2025-08-23T16:02:41.605Z","updated_at":"2025-08-23T16:02:41.605Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathematics","python"],"created_at":"2024-12-31T15:18:52.971Z","updated_at":"2026-03-17T22:05:24.362Z","avatar_url":"https://github.com/sigma-py.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sigma-py/ndim\"\u003e\u003cimg alt=\"ndim\" src=\"https://raw.githubusercontent.com/sigma-py/ndim/main/logo/ndim-logo.svg\" width=\"50%\"\u003e\u003c/a\u003e\n  \u003cp align=\"center\"\u003eMultidimensional volumes and monomial integrals.\u003c/p\u003e\n\u003c/p\u003e\n\n[![PyPi Version](https://img.shields.io/pypi/v/ndim.svg?style=flat-square)](https://pypi.org/project/ndim)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ndim.svg?style=flat-square)](https://pypi.org/pypi/ndim/)\n[![GitHub stars](https://img.shields.io/github/stars/sigma-py/ndim.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/sigma-py/ndim)\n[![Downloads](https://pepy.tech/badge/ndim/month?style=flat-square)](https://pepy.tech/project/ndim)\n\n[![Discord](https://img.shields.io/static/v1?logo=discord\u0026logoColor=white\u0026label=chat\u0026message=on%20discord\u0026color=7289da\u0026style=flat-square)](https://discord.gg/hnTJ5MRX2Y)\n\nndim computes all kinds of volumes and integrals of monomials over such volumes in a\nfast, numerically stable way, using recurrence relations.\n\n### Installation\n\nInstall ndim [from PyPI](https://pypi.org/project/ndim/) with\n\n```\npip install ndim\n```\n\n### How to get a license\n\nLicenses for personal and academic use can be purchased\n[here](https://buy.stripe.com/aEUg1H38OgDw5qMfZ3).\nYou'll receive a confirmation email with a license key.\nInstall the key with\n\n```\nslim install \u003cyour-license-key\u003e\n```\n\non your machine and you're good to go.\n\nFor commercial use, please contact support@mondaytech.com.\n\n### Use ndim\n\n```python\nimport ndim\n\nval = ndim.nball.volume(17)\nprint(val)\n\nval = ndim.nball.integrate_monomial((4, 10, 6, 0, 2), lmbda=-0.5)\nprint(val)\n\n# or nsphere, enr, enr2, ncube, nsimplex\n```\n\n\u003c!--pytest-codeblocks:expected-output--\u003e\n\n```\n0.14098110691713894\n1.0339122278806983e-07\n```\n\nAll functions have the `symbolic` argument; if set to `True`, computations are performed\nsymbolically.\n\n```python\nimport ndim\n\nvol = ndim.nball.volume(17, symbolic=True)\nprint(vol)\n```\n\n\u003c!--pytest-codeblocks:expected-output--\u003e\n\n```\n512*pi**8/34459425\n```\n\n### The formulas\n\nA PDF version of the text can be found\n[here](https://raw.githubusercontent.com/sigma-py/ndim/assets/useful-recurrence-relations.pdf).\n\nThis note gives closed formulas and recurrence expressions for many $n$-dimensional\nvolumes and monomial integrals. The recurrence expressions are often much simpler, more\ninstructive, and better suited for numerical computation.\n\n#### _n_-dimensional unit cube\n\n```math\nC_n = \\left\\{(x_1,\\dots,x_n): -1 \\le x_i \\le 1\\right\\}\n```\n\n- Volume.\n\n```math\n|C_n| = 2^n = \\begin{cases}\n  1\u0026\\text{if $n=0$}\\\\\n  |C_{n-1}| \\times 2\u0026\\text{otherwise}\n\\end{cases}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n  \u0026= \\int_{C_n} x_1^{k_1}\\cdots x_n^{k_n}\\\\\n    \u0026= \\prod_i \\frac{1 + (-1)^{k_i}}{k_i+1}\n  =\\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    |C_n|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0}-1}{k_{i_0}+1}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional unit simplex\n\n```math\n T_n = \\left\\{(x_1,\\dots,x_n):x_i \\geq 0, \\sum_{i=1}^n x_i \\leq 1\\right\\}\n```\n\n- Volume.\n\n```math\n|T_n| = \\frac{1}{n!} = \\begin{cases}\n  1\u0026\\text{if $n=0$}\\\\\n  |T_{n-1}| \\times \\frac{1}{n}\u0026\\text{otherwise}\n\\end{cases}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n  \u0026= \\int_{T_n} x_1^{k_1}\\cdots x_n^{k_n}\\\\\n  \u0026= \\frac{\\prod_i\\Gamma(k_i + 1)}{\\Gamma\\left(n + 1 + \\sum_i k_i\\right)}\\\\\n  \u0026=\\begin{cases}\n    |T_n|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-1,\\dots,k_n} \\times \\frac{k_{i_0}}{n + \\sum_i k_i}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\n#### Remark\n\nNote that both numerator and denominator in the closed expression will assume very large\nvalues even for polynomials of moderate degree. This can lead to difficulties when\nevaluating the expression on a computer; the registers will overflow. A common\ncountermeasure is to use the log-gamma function,\n\n```math\n\\frac{\\prod_i\\Gamma(k_i)}{\\Gamma\\left(\\sum_i k_i\\right)}\n= \\exp\\left(\\sum_i \\ln\\Gamma(k_i) - \\ln\\Gamma\\left(\\sum_i k_i\\right)\\right),\n```\n\nbut a simpler and arguably more elegant solution is to use the recurrence. This holds\ntrue for all such expressions in this note.\n\n#### _n_-dimensional unit sphere (surface)\n\n```math\nU_n = \\left\\{(x_1,\\dots,x_n): \\sum_{i=1}^n x_i^2 = 1\\right\\}\n```\n\n- Volume.\n\n```math\n |U_n|\n = \\frac{n \\sqrt{\\pi}^n}{\\Gamma(\\frac{n}{2}+1)}\n = \\begin{cases}\n   2\u0026\\text{if $n = 1$}\\\\\n   2\\pi\u0026\\text{if $n = 2$}\\\\\n   |U_{n-2}| \\times \\frac{2\\pi}{n - 2}\u0026\\text{otherwise}\n \\end{cases}\n```\n\n- Monomial integral.\n\n```math\n\\begin{align*}\n  I_{k_1,\\dots,k_n}\n  \u0026= \\int_{U_n} x_1^{k_1}\\cdots x_n^{k_n}\\\\\n  \u0026= \\frac{2\\prod_i\n    \\Gamma\\left(\\frac{k_i+1}{2}\\right)}{\\Gamma\\left(\\sum_i \\frac{k_i+1}{2}\\right)}\\\\\\\\\n  \u0026=\\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    |U_n|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0} - 1}{n - 2 + \\sum_i k_i}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align*}\n```\n\n#### _n_-dimensional unit ball\n\n```math\nS_n = \\left\\{(x_1,\\dots,x_n): \\sum_{i=1}^n x_i^2 \\le 1\\right\\}\n```\n\n- Volume.\n\n  ```math\n  |S_n|\n  = \\frac{\\sqrt{\\pi}^n}{\\Gamma(\\frac{n}{2}+1)}\n  = \\begin{cases}\n     1\u0026\\text{if $n = 0$}\\\\\n     2\u0026\\text{if $n = 1$}\\\\\n     |S_{n-2}| \\times \\frac{2\\pi}{n}\u0026\\text{otherwise}\n  \\end{cases}\n  ```\n\n- Monomial integral.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n  \u0026= \\int_{S_n} x_1^{k_1}\\cdots x_n^{k_n}\\\\\n  \u0026= \\frac{2^{n + p}}{n + p} |S_n|\n  =\\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    |S_n|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0} - 1}{n + p}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\nwith $p=\\sum_i k_i$.\n\n#### _n_-dimensional unit ball with Gegenbauer weight\n\n$\\lambda \u003e -1$.\n\n- Volume.\n\n```math\n    \\begin{align}\n    |G_n^{\\lambda}|\n      \u0026= \\int_{S^n} \\left(1 - \\sum_i x_i^2\\right)^\\lambda\\\\\n      \u0026= \\frac{%\n        \\Gamma(1+\\lambda)\\sqrt{\\pi}^n\n      }{%\n        \\Gamma\\left(1+\\lambda + \\frac{n}{2}\\right)\n      }\n      = \\begin{cases}\n        1\u0026\\text{for $n=0$}\\\\\n        B\\left(\\lambda + 1, \\frac{1}{2}\\right)\u0026\\text{for $n=1$}\\\\\n        |G_{n-2}^{\\lambda}|\\times \\frac{2\\pi}{2\\lambda + n}\u0026\\text{otherwise}\n      \\end{cases}\n  \\end{align}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n    \u0026= \\int_{S^n} x_1^{k_1}\\cdots x_n^{k_n} \\left(1 - \\sum_i x_i^2\\right)^\\lambda\\\\\n    \u0026= \\frac{%\n      \\Gamma(1+\\lambda)\\prod_i \\Gamma\\left(\\frac{k_i+1}{2}\\right)\n    }{%\n      \\Gamma\\left(1+\\lambda + \\sum_i \\frac{k_i+1}{2}\\right)\n    }\\\\\n    \u0026= \\begin{cases}\n      0\u0026\\text{if any $k_i$ is odd}\\\\\n      |G_n^{\\lambda}|\u0026\\text{if all $k_i=0$}\\\\\n      I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0}-1}{2\\lambda + n + \\sum_i k_i}\u0026\\text{if $k_{i_0} \u003e 0$}\n    \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional unit ball with Chebyshev-1 weight\n\nGegenbauer with $\\lambda=-\\frac{1}{2}$.\n\n- Volume.\n\n```math\n\\begin{align}\n|G_n^{-1/2}|\n  \u0026= \\int_{S^n} \\frac{1}{\\sqrt{1 - \\sum_i x_i^2}}\\\\\n  \u0026= \\frac{%\n    \\sqrt{\\pi}^{n+1}\n  }{%\n    \\Gamma\\left(\\frac{n+1}{2}\\right)\n  }\n  =\\begin{cases}\n    1\u0026\\text{if $n=0$}\\\\\n    \\pi\u0026\\text{if $n=1$}\\\\\n    |G_{n-2}^{-1/2}| \\times \\frac{2\\pi}{n-1}\u0026\\text{otherwise}\n  \\end{cases}\n\\end{align}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\nI_{k_1,\\dots,k_n}\n  \u0026= \\int_{S^n} \\frac{x_1^{k_1}\\cdots x_n^{k_n}}{\\sqrt{1 - \\sum_i x_i^2}}\\\\\n  \u0026= \\frac{%\n    \\sqrt{\\pi} \\prod_i \\Gamma\\left(\\frac{k_i+1}{2}\\right)\n  }{%\n    \\Gamma\\left(\\frac{1}{2} + \\sum_i \\frac{k_i+1}{2}\\right)\n  }\\\\\n  \u0026= \\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    |G_n^{-1/2}|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0}-1}{n-1 + \\sum_i k_i}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional unit ball with Chebyshev-2 weight\n\nGegenbauer with $\\lambda = +\\frac{1}{2}$.\n\n- Volume.\n\n```math\n\\begin{align}\n|G_n^{+1/2}|\n  \u0026= \\int_{S^n} \\sqrt{1 - \\sum_i x_i^2}\\\\\n  \u0026= \\frac{%\n    \\sqrt{\\pi}^{n+1}\n  }{%\n    2\\Gamma\\left(\\frac{n+3}{2}\\right)\n  }\n  = \\begin{cases}\n    1\u0026\\text{if $n=0$}\\\\\n    \\frac{\\pi}{2}\u0026\\text{if $n=1$}\\\\\n    |G_{n-2}^{+1/2}| \\times \\frac{2\\pi}{n+1}\u0026\\text{otherwise}\n  \\end{cases}\n\\end{align}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\nI_{k_1,\\dots,k_n}\n  \u0026= \\int_{S^n} x_1^{k_1}\\cdots x_n^{k_n} \\sqrt{1 - \\sum_i x_i^2}\\\\\n  \u0026= \\frac{%\n    \\sqrt{\\pi}\\prod_i \\Gamma\\left(\\frac{k_i+1}{2}\\right)\n  }{%\n    2\\Gamma\\left(\\frac{3}{2} + \\sum_i \\frac{k_i+1}{2}\\right)\n  }\\\\\n  \u0026= \\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    |G_n^{+1/2}|\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0}-1}{n + 1 + \\sum_i k_i}\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional generalized Cauchy volume\n\nAs appearing in the [Cauchy\ndistribution](https://en.wikipedia.org/wiki/Cauchy_distribution) and [Student's\n_t_-distribution](https://en.wikipedia.org/wiki/Student%27s_t-distribution).\n\n- Volume. $2 \\lambda \u003e n$.\n\n```math\n    \\begin{align}\n    |Y_n^{\\lambda}|\n      \u0026= \\int_{\\mathbb{R}^n} \\left(1 + \\sum_i x_i^2\\right)^{-\\lambda}\\\\\n      \u0026= |U_{n-1}| \\frac{1}{2} B(\\lambda - \\frac{n}{2}, \\frac{n}{2})\\\\\n      \u0026= \\begin{cases}\n        1\u0026\\text{for $n=0$}\\\\\n        B\\left(\\lambda - \\frac{1}{2}, \\frac{1}{2}\\right)\u0026\\text{for $n=1$}\\\\\n        |Y_{n-2}^{\\lambda}|\\times \\frac{2\\pi}{2\\lambda - n}\u0026\\text{otherwise}\n      \\end{cases}\n  \\end{align}\n```\n\n- Monomial integration. $2 \\lambda \u003e n + \\sum_i k_i$.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n    \u0026= \\int_{\\mathbb{R}^n} x_1^{k_1}\\cdots x_n^{k_n} \\left(1 + \\sum_i x_i^2\\right)^{-\\lambda}\\\\\n    \u0026= \\frac{\\Gamma(\\frac{n+\\sum k_i}{2}) \\Gamma(\\lambda - \\frac{n - \\sum k_i}{2})}{2 \\Gamma(\\lambda)}\n       \\times \\frac{2\\prod_i \\Gamma(\\tfrac{k_i+1}{2})}{\\Gamma(\\sum_i \\tfrac{k_i+1}{2})}\\\\\n    \u0026= \\begin{cases}\n      0\u0026\\text{if any $k_i$ is odd}\\\\\n      |Y_n^{\\lambda}|\u0026\\text{if all $k_i=0$}\\\\\n      I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0}-1}{2\\lambda - \\left(n + \\sum_i k_i\\right)}\u0026\\text{if $k_{i_0} \u003e 0$}\n    \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional generalized Laguerre volume\n\n$\\alpha \u003e -1$.\n\n- Volume\n\n```math\n\\begin{align}\n  V_n\n    \u0026= \\int_{\\mathbb{R}^n} \\left(\\sqrt{x_1^2+\\cdots+x_n^2}\\right)^\\alpha \\exp\\left(-\\sqrt{x_1^2+\\dots+x_n^2}\\right)\\\\\n    \u0026= \\frac{2 \\sqrt{\\pi}^n \\Gamma(n+\\alpha)}{\\Gamma(\\frac{n}{2})}\n  = \\begin{cases}\n    2\\Gamma(1+\\alpha)\u0026\\text{if $n=1$}\\\\\n    2\\pi\\Gamma(2 + \\alpha)\u0026\\text{if $n=2$}\\\\\n    V_{n-2} \\times \\frac{2\\pi(n+\\alpha-1) (n+\\alpha-2)}{n-2}\u0026\\text{otherwise}\n  \\end{cases}\n\\end{align}\n```\n\n- Monomial integration.\n\n```math\n  \\begin{align}\n  I_{k_1,\\dots,k_n}\n  \u0026= \\int_{\\mathbb{R}^n} x_1^{k_1}\\cdots x_n^{k_n}\n    \\left(\\sqrt{x_1^2+\\dots+x_n^2}\\right)^\\alpha \\exp\\left(-\\sqrt{x_1^2+\\dots+x_n^2}\\right)\\\\\n  \u0026= \\frac{%\n    2 \\Gamma\\left(\\alpha + n + \\sum_i k_i\\right)\n    \\left(\\prod_i \\Gamma\\left(\\frac{k_i + 1}{2}\\right)\\right)\n  }{%\n    \\Gamma\\left(\\sum_i \\frac{k_i + 1}{2}\\right)\n  }\\\\\n  \u0026=\\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    V_n\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\ldots,k_n} \\times \\frac{%\n      (\\alpha + n + p - 1) (\\alpha + n + p - 2) (k_{i_0} - 1)\n    }{%\n        n + p - 2\n    }\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n\nwith $p=\\sum_i k_i$.\n\n#### _n_-dimensional Hermite (physicists')\n\n- Volume.\n\n```math\n\\begin{align}\n  V_n\n  \u0026= \\int_{\\mathbb{R}^n} \\exp\\left(-(x_1^2+\\cdots+x_n^2)\\right)\\\\\n  \u0026= \\sqrt{\\pi}^n\n   = \\begin{cases}\n     1\u0026\\text{if $n=0$}\\\\\n     \\sqrt{\\pi}\u0026\\text{if $n=1$}\\\\\n     V_{n-2} \\times \\pi\u0026\\text{otherwise}\n   \\end{cases}\n\\end{align}\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\n    I_{k_1,\\dots,k_n}\n    \u0026= \\int_{\\mathbb{R}^n} x_1^{k_1}\\cdots x_n^{k_n} \\exp(-(x_1^2+\\cdots+x_n^2))\\\\\n    \u0026= \\prod_i \\frac{(-1)^{k_i} + 1}{2} \\times \\Gamma\\left(\\frac{k_i+1}{2}\\right)\\\\\n    \u0026=\\begin{cases}\n      0\u0026\\text{if any $k_i$ is odd}\\\\\n      V_n\u0026\\text{if all $k_i=0$}\\\\\n      I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times \\frac{k_{i_0} - 1}{2}\u0026\\text{if $k_{i_0} \u003e 0$}\n    \\end{cases}\n\\end{align}\n```\n\n#### _n_-dimensional Hermite (probabilists')\n\n- Volume.\n\n```math\nV_n = \\frac{1}{\\sqrt{2\\pi}^n} \\int_{\\mathbb{R}^n}\n\\exp\\left(-\\frac{1}{2}(x_1^2+\\cdots+x_n^2)\\right) = 1\n```\n\n- Monomial integration.\n\n```math\n\\begin{align}\n  I_{k_1,\\dots,k_n}\n    \u0026= \\frac{1}{\\sqrt{2\\pi}^n} \\int_{\\mathbb{R}^n} x_1^{k_1}\\cdots x_n^{k_n}\n    \\exp\\left(-\\frac{1}{2}(x_1^2+\\cdots+x_n^2)\\right)\\\\\n  \u0026= \\prod_i \\frac{(-1)^{k_i} + 1}{2} \\times\n    \\frac{2^{\\frac{k_i+1}{2}}}{\\sqrt{2\\pi}} \\Gamma\\left(\\frac{k_i+1}{2}\\right)\\\\\n  \u0026=\\begin{cases}\n    0\u0026\\text{if any $k_i$ is odd}\\\\\n    V_n\u0026\\text{if all $k_i=0$}\\\\\n    I_{k_1,\\dots,k_{i_0}-2,\\dots,k_n} \\times (k_{i_0} - 1)\u0026\\text{if $k_{i_0} \u003e 0$}\n  \\end{cases}\n\\end{align}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-py%2Fndim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigma-py%2Fndim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-py%2Fndim/lists"}