multiple-integrate 2.1.0__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- multiple_integrate-2.2.0/CHANGELOG.md +126 -0
- multiple_integrate-2.2.0/MANIFEST.in +9 -0
- multiple_integrate-2.2.0/PKG-INFO +283 -0
- multiple_integrate-2.2.0/README.md +211 -0
- multiple_integrate-2.2.0/docs/_static/cusp-contact.svg +1 -0
- multiple_integrate-2.2.0/docs/_static/graph-contact.svg +1 -0
- multiple_integrate-2.2.0/docs/_static/polygon-cutoff.svg +1 -0
- multiple_integrate-2.2.0/docs/api/core.rst +25 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/api/index.rst +2 -0
- multiple_integrate-2.2.0/docs/api/regions.rst +58 -0
- multiple_integrate-2.2.0/docs/api/selected.rst +8 -0
- multiple_integrate-2.2.0/docs/api/series.rst +9 -0
- multiple_integrate-2.2.0/docs/api.md +81 -0
- multiple_integrate-2.2.0/docs/architecture/semialg-integration.md +65 -0
- multiple_integrate-2.2.0/docs/boundary-reduction.md +111 -0
- multiple_integrate-2.2.0/docs/capabilities.md +49 -0
- multiple_integrate-2.2.0/docs/certification.md +151 -0
- multiple_integrate-2.2.0/docs/coarea.md +198 -0
- multiple_integrate-2.2.0/docs/concepts/measure-and-dimension.rst +82 -0
- multiple_integrate-2.2.0/docs/concepts/ranges-and-regions.rst +112 -0
- multiple_integrate-2.2.0/docs/concepts/sampling.rst +71 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/conf.py +6 -0
- multiple_integrate-2.2.0/docs/contributing.md +184 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/decomposition.md +3 -0
- multiple_integrate-2.2.0/docs/examples/regions.rst +106 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/examples.md +91 -87
- multiple_integrate-2.2.0/docs/geometry/clipped-cutoffs.md +29 -0
- multiple_integrate-2.2.0/docs/geometry/cusp-proofs.md +29 -0
- multiple_integrate-2.2.0/docs/geometry/parameter-geometry.md +33 -0
- multiple_integrate-2.2.0/docs/geometry/radial-series.md +31 -0
- multiple_integrate-2.2.0/docs/geometry-casebook.md +30 -0
- multiple_integrate-2.2.0/docs/geometry-extensions.md +13 -0
- multiple_integrate-2.2.0/docs/index.rst +94 -0
- multiple_integrate-2.2.0/docs/integration-extensions.md +51 -0
- multiple_integrate-2.2.0/docs/laurent-clips-and-tangencies.md +71 -0
- multiple_integrate-2.2.0/docs/limitations.md +49 -0
- multiple_integrate-2.2.0/docs/method-example-coverage.json +36 -0
- multiple_integrate-2.2.0/docs/method-examples.md +46 -0
- multiple_integrate-2.2.0/docs/method-reference-coverage.json +344 -0
- multiple_integrate-2.2.0/docs/method-references.md +102 -0
- multiple_integrate-2.2.0/docs/nonlinear-moments-and-singularities.md +113 -0
- multiple_integrate-2.2.0/docs/nonseparable-improper.md +57 -0
- multiple_integrate-2.2.0/docs/parameterized-integration.md +162 -0
- multiple_integrate-2.2.0/docs/performance-methods.md +104 -0
- multiple_integrate-2.2.0/docs/proved-families.md +80 -0
- multiple_integrate-2.2.0/docs/quickstart.rst +135 -0
- multiple_integrate-2.2.0/docs/regularization.md +225 -0
- multiple_integrate-2.2.0/docs/scoped-convergence.md +93 -0
- multiple_integrate-2.2.0/docs/sectors-and-contact-charts.md +81 -0
- multiple_integrate-2.2.0/docs/selected-symbolic-families.md +156 -0
- multiple_integrate-2.2.0/docs/series-evaluation.md +37 -0
- multiple_integrate-2.2.0/docs/strategies.md +33 -0
- multiple_integrate-2.2.0/docs/structured-results.md +63 -0
- multiple_integrate-2.2.0/docs/supported-regions.md +63 -0
- multiple_integrate-2.2.0/docs/testing.md +209 -0
- multiple_integrate-2.2.0/docs/theory.md +153 -0
- multiple_integrate-2.2.0/docs/worked-failures.md +114 -0
- multiple_integrate-2.2.0/examples/geometry_casebook.py +138 -0
- multiple_integrate-2.2.0/examples/method_catalogue.py +356 -0
- multiple_integrate-2.2.0/examples/performance_methods.py +17 -0
- multiple_integrate-2.2.0/examples/proof_portfolio.py +41 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/notebooks/multiple_integration.ipynb +504 -948
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/pyproject.toml +36 -29
- multiple_integrate-2.2.0/setup.cfg +4 -0
- multiple_integrate-2.2.0/src/multiple_integrate/__init__.py +70 -0
- multiple_integrate-2.2.0/src/multiple_integrate/adapters/__init__.py +43 -0
- multiple_integrate-2.2.0/src/multiple_integrate/adapters/asymptotic.py +89 -0
- multiple_integrate-2.2.0/src/multiple_integrate/adapters/funcprops.py +165 -0
- multiple_integrate-2.2.0/src/multiple_integrate/adapters/semialg.py +760 -0
- multiple_integrate-2.2.0/src/multiple_integrate/affine_cell_geometry.py +91 -0
- multiple_integrate-2.2.0/src/multiple_integrate/analytic_region_formulas.py +127 -0
- multiple_integrate-2.2.0/src/multiple_integrate/analytic_strategies.py +29 -0
- multiple_integrate-2.2.0/src/multiple_integrate/anisotropic.py +142 -0
- multiple_integrate-2.2.0/src/multiple_integrate/api/__init__.py +22 -0
- multiple_integrate-2.2.0/src/multiple_integrate/api/integration.py +625 -0
- multiple_integrate-2.2.0/src/multiple_integrate/assumptions.py +220 -0
- multiple_integrate-2.2.0/src/multiple_integrate/boundary_reduction.py +435 -0
- multiple_integrate-2.2.0/src/multiple_integrate/cauchy_principal_value.py +121 -0
- multiple_integrate-2.2.0/src/multiple_integrate/cell_graphs.py +354 -0
- multiple_integrate-2.2.0/src/multiple_integrate/cell_proofs.py +423 -0
- multiple_integrate-2.2.0/src/multiple_integrate/clipped_quadratic.py +230 -0
- multiple_integrate-2.2.0/src/multiple_integrate/coarea.py +1463 -0
- multiple_integrate-2.2.0/src/multiple_integrate/conditional.py +121 -0
- multiple_integrate-2.2.0/src/multiple_integrate/contact_charts.py +108 -0
- multiple_integrate-2.2.0/src/multiple_integrate/convergence.py +245 -0
- multiple_integrate-2.2.0/src/multiple_integrate/convergence_comparison.py +338 -0
- multiple_integrate-2.2.0/src/multiple_integrate/convergence_evidence.py +379 -0
- multiple_integrate-2.2.0/src/multiple_integrate/core.py +1277 -0
- multiple_integrate-2.2.0/src/multiple_integrate/cusp_horns.py +207 -0
- multiple_integrate-2.2.0/src/multiple_integrate/entire_box_series.py +107 -0
- multiple_integrate-2.2.0/src/multiple_integrate/fast_rules.py +525 -0
- multiple_integrate-2.2.0/src/multiple_integrate/geometric_principal_value.py +485 -0
- multiple_integrate-2.2.0/src/multiple_integrate/hadamard.py +169 -0
- multiple_integrate-2.2.0/src/multiple_integrate/hypersurface_atlas.py +199 -0
- multiple_integrate-2.2.0/src/multiple_integrate/hypersurface_principal_value.py +574 -0
- multiple_integrate-2.2.0/src/multiple_integrate/isolated_queries.py +77 -0
- multiple_integrate-2.2.0/src/multiple_integrate/layer_cake_strategies.py +221 -0
- multiple_integrate-2.2.0/src/multiple_integrate/nonseparable_improper.py +234 -0
- multiple_integrate-2.2.0/src/multiple_integrate/numerical_verification.py +119 -0
- multiple_integrate-2.2.0/src/multiple_integrate/ownership.py +89 -0
- multiple_integrate-2.2.0/src/multiple_integrate/parameter_cells.py +428 -0
- multiple_integrate-2.2.0/src/multiple_integrate/planner.py +200 -0
- multiple_integrate-2.2.0/src/multiple_integrate/policy.py +168 -0
- multiple_integrate-2.2.0/src/multiple_integrate/polygon_moments.py +211 -0
- multiple_integrate-2.2.0/src/multiple_integrate/principal_value.py +21 -0
- multiple_integrate-2.2.0/src/multiple_integrate/principal_value_prescriptions.py +133 -0
- multiple_integrate-2.2.0/src/multiple_integrate/pushforward_strategies.py +246 -0
- multiple_integrate-2.2.0/src/multiple_integrate/quadratic_cell_geometry.py +102 -0
- multiple_integrate-2.2.0/src/multiple_integrate/quadratic_gaussian.py +169 -0
- multiple_integrate-2.2.0/src/multiple_integrate/quadratic_radial.py +574 -0
- multiple_integrate-2.2.0/src/multiple_integrate/quadratic_sectors.py +178 -0
- multiple_integrate-2.2.0/src/multiple_integrate/radial_parametrization.py +108 -0
- multiple_integrate-2.2.0/src/multiple_integrate/rational_cutoff.py +151 -0
- multiple_integrate-2.2.0/src/multiple_integrate/recognition.py +655 -0
- multiple_integrate-2.2.0/src/multiple_integrate/region_formulas.py +306 -0
- multiple_integrate-2.2.0/src/multiple_integrate/region_recognition.py +373 -0
- multiple_integrate-2.2.0/src/multiple_integrate/region_strategies.py +198 -0
- multiple_integrate-2.1.0/src/multiple_integrate/regions.py → multiple_integrate-2.2.0/src/multiple_integrate/region_types.py +97 -827
- multiple_integrate-2.2.0/src/multiple_integrate/regions.py +25 -0
- multiple_integrate-2.2.0/src/multiple_integrate/regular_density.py +84 -0
- multiple_integrate-2.2.0/src/multiple_integrate/regularization.py +487 -0
- multiple_integrate-2.2.0/src/multiple_integrate/results.py +347 -0
- multiple_integrate-2.2.0/src/multiple_integrate/selected_families.py +326 -0
- multiple_integrate-2.2.0/src/multiple_integrate/semialg_geometry.py +123 -0
- multiple_integrate-2.2.0/src/multiple_integrate/separable_strategies.py +237 -0
- multiple_integrate-2.2.0/src/multiple_integrate/series_evaluation.py +166 -0
- multiple_integrate-2.2.0/src/multiple_integrate/singular_geometry.py +350 -0
- multiple_integrate-2.2.0/src/multiple_integrate/singular_maps.py +292 -0
- multiple_integrate-2.2.0/src/multiple_integrate/singularities.py +365 -0
- multiple_integrate-2.2.0/src/multiple_integrate/sphere_integrals.py +148 -0
- multiple_integrate-2.2.0/src/multiple_integrate/strategy_common.py +236 -0
- multiple_integrate-2.2.0/src/multiple_integrate/symbolic_geometry.py +563 -0
- multiple_integrate-2.2.0/src/multiple_integrate/tangent_cutoff.py +221 -0
- multiple_integrate-2.2.0/src/multiple_integrate/transforms.py +198 -0
- multiple_integrate-2.2.0/src/multiple_integrate/transition_cells.py +271 -0
- multiple_integrate-2.2.0/src/multiple_integrate/triangular_intersections.py +138 -0
- multiple_integrate-2.2.0/src/multiple_integrate.egg-info/PKG-INFO +283 -0
- multiple_integrate-2.2.0/src/multiple_integrate.egg-info/SOURCES.txt +264 -0
- multiple_integrate-2.2.0/src/multiple_integrate.egg-info/dependency_links.txt +1 -0
- multiple_integrate-2.2.0/src/multiple_integrate.egg-info/requires.txt +53 -0
- multiple_integrate-2.2.0/src/multiple_integrate.egg-info/top_level.txt +1 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/helpers.py +1 -1
- multiple_integrate-2.2.0/tests/test_algebraic_pv_and_singular_geometry.py +225 -0
- multiple_integrate-2.2.0/tests/test_api_audit_fixes.py +212 -0
- multiple_integrate-2.2.0/tests/test_architecture_contract.py +312 -0
- multiple_integrate-2.2.0/tests/test_assumption_pairs.py +57 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_assumptions_api.py +13 -15
- multiple_integrate-2.2.0/tests/test_asymmetric_affine_cutoffs.py +151 -0
- multiple_integrate-2.2.0/tests/test_asymptotic_log_radical_cutoff.py +105 -0
- multiple_integrate-2.2.0/tests/test_asymptotic_order_adapter.py +154 -0
- multiple_integrate-2.2.0/tests/test_backend_delegation.py +172 -0
- multiple_integrate-2.2.0/tests/test_boole_piecewise.py +75 -0
- multiple_integrate-2.2.0/tests/test_boundary_extensions.py +244 -0
- multiple_integrate-2.2.0/tests/test_boundary_reduction.py +116 -0
- multiple_integrate-2.2.0/tests/test_bounded_dispatch_contracts.py +133 -0
- multiple_integrate-2.2.0/tests/test_casebook_and_docs.py +90 -0
- multiple_integrate-2.2.0/tests/test_certificate_replay_and_singular_order.py +121 -0
- multiple_integrate-2.2.0/tests/test_coarea.py +272 -0
- multiple_integrate-2.2.0/tests/test_coarea_extensions.py +298 -0
- multiple_integrate-2.2.0/tests/test_coarea_portfolio.py +465 -0
- multiple_integrate-2.2.0/tests/test_constant_orientation.py +53 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_constants_and_caching.py +7 -7
- multiple_integrate-2.2.0/tests/test_convergence_documentation.py +36 -0
- multiple_integrate-2.2.0/tests/test_convergence_registry.py +32 -0
- multiple_integrate-2.2.0/tests/test_convergence_semantic_corpus.py +131 -0
- multiple_integrate-2.2.0/tests/test_convergence_summaries.py +123 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_coordinate_changes.py +5 -5
- multiple_integrate-2.2.0/tests/test_coordinate_hygiene.py +92 -0
- multiple_integrate-2.2.0/tests/test_cross_strategy_oracles.py +67 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_dispatch_safety.py +42 -26
- multiple_integrate-2.2.0/tests/test_divergence_parameter_domains.py +97 -0
- multiple_integrate-2.2.0/tests/test_documentation_examples.py +48 -0
- multiple_integrate-2.2.0/tests/test_exact_graph_reversal.py +49 -0
- multiple_integrate-2.2.0/tests/test_exceptional_fiber_matrix.py +107 -0
- multiple_integrate-2.2.0/tests/test_extended_convergence.py +119 -0
- multiple_integrate-2.2.0/tests/test_gap_improvements.py +394 -0
- multiple_integrate-2.2.0/tests/test_gaussian_branches_and_parameter_domains.py +217 -0
- multiple_integrate-2.2.0/tests/test_generated_mathematical_families.py +84 -0
- multiple_integrate-2.2.0/tests/test_geometry_casebook_properties.py +270 -0
- multiple_integrate-2.2.0/tests/test_geometry_extensions.py +323 -0
- multiple_integrate-2.2.0/tests/test_geometry_properties.py +16 -0
- multiple_integrate-2.2.0/tests/test_geometry_reference_corpus.py +248 -0
- multiple_integrate-2.2.0/tests/test_heuristic_alarm_ownership.py +171 -0
- multiple_integrate-2.2.0/tests/test_independent_improper_oracles.py +90 -0
- multiple_integrate-2.2.0/tests/test_installed_contract_source.py +11 -0
- multiple_integrate-2.1.0/tests/test_multiple_integrate.py → multiple_integrate-2.2.0/tests/test_integrate.py +152 -256
- multiple_integrate-2.2.0/tests/test_intrinsic_semialgebraic.py +161 -0
- multiple_integrate-2.2.0/tests/test_laurent_clips_and_tangencies.py +291 -0
- multiple_integrate-2.2.0/tests/test_lower_dimensional_contracts.py +90 -0
- multiple_integrate-2.2.0/tests/test_mathematical_oracles.py +53 -0
- multiple_integrate-2.2.0/tests/test_measure_and_parameter_proof_scope.py +186 -0
- multiple_integrate-2.2.0/tests/test_metamorphic_regularization.py +72 -0
- multiple_integrate-2.2.0/tests/test_method_catalogue.py +44 -0
- multiple_integrate-2.2.0/tests/test_method_references.py +43 -0
- multiple_integrate-2.2.0/tests/test_moment_extensions.py +138 -0
- multiple_integrate-2.2.0/tests/test_nonseparable_improper.py +183 -0
- multiple_integrate-2.2.0/tests/test_parameter_cells.py +182 -0
- multiple_integrate-2.2.0/tests/test_parameter_geometry_extensions.py +164 -0
- multiple_integrate-2.2.0/tests/test_parameter_specialization_safety.py +69 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_performance_guards.py +7 -6
- multiple_integrate-2.2.0/tests/test_performance_methods.py +310 -0
- multiple_integrate-2.2.0/tests/test_principal_value_multiple.py +313 -0
- multiple_integrate-2.2.0/tests/test_public_contracts.py +192 -0
- multiple_integrate-2.2.0/tests/test_quadratic_real_geometry.py +83 -0
- multiple_integrate-2.2.0/tests/test_quartic_moments.py +55 -0
- multiple_integrate-2.2.0/tests/test_radial_parametrization.py +52 -0
- multiple_integrate-2.2.0/tests/test_rational_infinity_finite_parts.py +71 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_reference_examples.py +29 -26
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_reference_examples_notebook.py +6 -5
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_region_classification_boundaries.py +3 -1
- multiple_integrate-2.2.0/tests/test_region_contracts.py +129 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_region_invariants_and_matrix.py +5 -6
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_region_order_sympy_convention.py +1 -4
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_advanced_shapes.py +11 -12
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_boxes_and_simplex.py +2 -1
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_classification_priority.py +5 -8
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_disk_and_ball.py +6 -5
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_graph_and_simplex.py +7 -8
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_graph_reversal.py +9 -8
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_interactions.py +6 -8
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_moments_box_simplex.py +10 -15
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_moments_disk_ball.py +10 -9
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_parse.py +3 -1
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_radial.py +4 -4
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_regions_symmetry.py +4 -7
- multiple_integrate-2.2.0/tests/test_regular_density_cutoff.py +62 -0
- multiple_integrate-2.2.0/tests/test_regularization.py +177 -0
- multiple_integrate-2.2.0/tests/test_requested_bounds.py +69 -0
- multiple_integrate-2.2.0/tests/test_result_and_geometry_domains.py +196 -0
- multiple_integrate-2.2.0/tests/test_robustness_evidence.py +145 -0
- multiple_integrate-2.2.0/tests/test_scoped_convergence.py +143 -0
- multiple_integrate-2.2.0/tests/test_sectors_and_contact_charts.py +206 -0
- multiple_integrate-2.2.0/tests/test_selected_families.py +171 -0
- multiple_integrate-2.2.0/tests/test_semialg_documentation_traceability.py +71 -0
- multiple_integrate-2.2.0/tests/test_semialgebraic_domains.py +157 -0
- multiple_integrate-2.2.0/tests/test_series_evaluation.py +102 -0
- multiple_integrate-2.2.0/tests/test_serious_boundary_regressions.py +109 -0
- multiple_integrate-2.2.0/tests/test_serious_shortcut_regressions.py +61 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_simplex_dirichlet_engine.py +4 -4
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_singular_and_divergent_cases.py +16 -16
- multiple_integrate-2.2.0/tests/test_singularity_splitting.py +44 -0
- multiple_integrate-2.2.0/tests/test_strategy_budget_boundaries.py +132 -0
- multiple_integrate-2.2.0/tests/test_strategy_safety.py +132 -0
- multiple_integrate-2.2.0/tests/test_structured_results.py +90 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_supported_families.py +15 -15
- multiple_integrate-2.2.0/tests/test_symbolic_cell_geometry.py +182 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_symbolic_conditional_convergence.py +9 -9
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_symmetry_and_inner_integrals.py +5 -5
- multiple_integrate-2.2.0/tests/test_tangency_finite_part_dispatch.py +135 -0
- multiple_integrate-2.2.0/tests/test_transformed_evidence_contracts.py +86 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_translated_regions.py +6 -8
- multiple_integrate-2.2.0/tests/test_truncated_nonlinear_horns.py +302 -0
- multiple_integrate-2.2.0/tests/test_uniform_protocol.py +342 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_validation_and_timeouts.py +30 -24
- multiple_integrate-2.2.0/tests/test_weighted_quadratic_radial.py +115 -0
- multiple_integrate-2.2.0/tools/benchmark_coarea_certificates.py +45 -0
- multiple_integrate-2.2.0/tools/check_release.py +58 -0
- multiple_integrate-2.2.0/tools/installed_wheel_contract.py +67 -0
- multiple_integrate-2.2.0/tools/run_notebook.py +160 -0
- multiple_integrate-2.2.0/tools/sync_geometry_examples.py +116 -0
- multiple_integrate-2.1.0/.gitignore +0 -218
- multiple_integrate-2.1.0/PKG-INFO +0 -422
- multiple_integrate-2.1.0/README.md +0 -362
- multiple_integrate-2.1.0/docs/api/core.rst +0 -12
- multiple_integrate-2.1.0/docs/api/regions.rst +0 -7
- multiple_integrate-2.1.0/docs/api.md +0 -172
- multiple_integrate-2.1.0/docs/concepts/ranges-and-regions.rst +0 -136
- multiple_integrate-2.1.0/docs/contributing.md +0 -135
- multiple_integrate-2.1.0/docs/examples/regions.rst +0 -204
- multiple_integrate-2.1.0/docs/index.rst +0 -53
- multiple_integrate-2.1.0/docs/quickstart.rst +0 -89
- multiple_integrate-2.1.0/docs/strategies.md +0 -37
- multiple_integrate-2.1.0/docs/testing.md +0 -33
- multiple_integrate-2.1.0/docs/theory.md +0 -198
- multiple_integrate-2.1.0/src/multiple_integrate/__init__.py +0 -45
- multiple_integrate-2.1.0/src/multiple_integrate/core.py +0 -2449
- multiple_integrate-2.1.0/tests/test_boole_piecewise.py +0 -47
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/LICENSE +0 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/Makefile +0 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/api/public.rst +0 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/docs/installation.rst +0 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/__init__.py +0 -0
- {multiple_integrate-2.1.0 → multiple_integrate-2.2.0}/tests/test_disk_radial_classification.py +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 2.2.0
|
|
4
|
+
|
|
5
|
+
Version 2.2 adds geometry-driven symbolic integration methods, including generalized co-area reductions, polygonal and polyhedral boundary integration, and polynomial coordinate transformations, alongwith parameter-dependent regions and expanded handling of improper integrals.
|
|
6
|
+
|
|
7
|
+
### New and Expanded Integration Capabilities
|
|
8
|
+
|
|
9
|
+
#### More Geometric Regions
|
|
10
|
+
|
|
11
|
+
- Added integration of polynomial functions over convex and nonconvex polygons, including polygons with holes and disconnected regions, and over some three-dimensional convex polyhedra.
|
|
12
|
+
- Added boundary-based integration methods that reduce integrals over polygons and polyhedra to integrals over their edges or faces.
|
|
13
|
+
- Expanded support for regions defined by polynomial inequalities, including some curved boundaries, cusps, and clipped ellipsoids.
|
|
14
|
+
|
|
15
|
+
#### More Powerful Coordinate Transformations
|
|
16
|
+
|
|
17
|
+
- Added transformations that simplify certain nonseparable integrals into products of standard one-dimensional integrals.
|
|
18
|
+
- Added support for some polynomial coordinate transformations including nonlinear shear transformations.
|
|
19
|
+
- Extended coarea integration, which evaluates multidimensional integrals by integrating over the level sets of a function.
|
|
20
|
+
- Added coarea reductions for scalar and vector-valued functions, including some affine, radial, rational, algebraic, and polar transformations.
|
|
21
|
+
- Improved handling of coordinate singularities, exceptional level sets, and variable-changes that are valid except on measure-zero sets.
|
|
22
|
+
|
|
23
|
+
For example, MultipleIntegrate can now recognize some integrals involving expressions such as `x**4 + (y - x**2)**2`, where a nonlinear coordinate transformation makes exact integration possible.
|
|
24
|
+
|
|
25
|
+
#### More Integrand Families
|
|
26
|
+
|
|
27
|
+
- Expanded support for polynomial-weighted Gaussian, exponential, rational, and inverse-power integrals.
|
|
28
|
+
- Added new radial and angular integration formulas, including polynomial angular factors, Fourier terms, and some rational trigonometric expressions.
|
|
29
|
+
- Added weighted moments involving higher even powers such as `x**4 + y**6`
|
|
30
|
+
- Improved integration of certain functions with endpoint singularities, logarithmic behavior, or integrable point singularities.
|
|
31
|
+
- Expanded exact series methods (no truncation) for some non-separable integrals that do not have convenient elementary closed forms.
|
|
32
|
+
|
|
33
|
+
### Better Parameters Handling
|
|
34
|
+
|
|
35
|
+
MultipleIntegrate can now handle a wider variety of integrals whose values or integration regions depend on symbolic parameters.
|
|
36
|
+
|
|
37
|
+
- Added auto-analysis of certain parameter-dependent regions, including cases where a region changes shape, becomes empty, or changes dimension.
|
|
38
|
+
- Added `integrate_cells()` function for evaluating integrals separately on different parameter ranges.
|
|
39
|
+
- Improved handling of exceptional parameter values where an integration formula changes or becomes invalid.
|
|
40
|
+
- Extended exact integration over parameter-dependent polygons, graph regions, and quadratic regions.
|
|
41
|
+
- Improved reporting of assumptions/conditions under which a symbolic result is valid.
|
|
42
|
+
|
|
43
|
+
These make it possible to obtain piecewise results for more parametrized integrals instead of you having to evaluate each parameter case manually.
|
|
44
|
+
|
|
45
|
+
### Improved Convergence and Singular-Integral Handling
|
|
46
|
+
|
|
47
|
+
MultipleIntegrate now has stronger mathematical checks for improper and singular integrals.
|
|
48
|
+
|
|
49
|
+
- Expanded convergence tests for integrals over infinite domains and near singularities.
|
|
50
|
+
- Improved recognition of integrable singularities that may initially appear divergent.
|
|
51
|
+
- Added stronger checks for absolute vs conditional convergence, particularly when symmetry or cancellation is involved.
|
|
52
|
+
|
|
53
|
+
### More Informative Results
|
|
54
|
+
|
|
55
|
+
The expanded result API makes it easier to understand how and under which conditions MultipleIntegrate calculated the result.
|
|
56
|
+
|
|
57
|
+
- `integrate()` has the usual symbolic integration interface and gives the mathematical result without extra information.
|
|
58
|
+
- `integrate_result()` gives detailed results, including convergence info, assumptions, and diagnostic info.
|
|
59
|
+
- `integrate_cells()` handles some parameter-dependent integrals.
|
|
60
|
+
- `regularized_result()` gives results and supporting information for explicitly regularized integrals.
|
|
61
|
+
- Added `Boole()` for constructing indicator functions used in region-restricted integration.
|
|
62
|
+
|
|
63
|
+
Results can now distinguish more clearly between successful exact evaluation, conditional results, proved divergence, unsupported methods, and unresolved problems.
|
|
64
|
+
|
|
65
|
+
### Performance Improvements
|
|
66
|
+
|
|
67
|
+
- Improved strategy selection to avoid unnecessarily expensive symbolic calculations, added computational budgets to limit excessive symbolic expansion.
|
|
68
|
+
- Added early-rejection of unsupported expressions before attempting costly geometric or algebraic analysis.
|
|
69
|
+
|
|
70
|
+
### Testing & Documentation
|
|
71
|
+
|
|
72
|
+
- Expanded mathematical tests: integration formulas, coordinate transformations, singularities, convergence, parameter-dependent regions.
|
|
73
|
+
- Expanded regression tests: invalid assumptions, exceptional cases, numerical consistency, caching, computational budgets.
|
|
74
|
+
- Expanded performance regression tests for potentially expensive integration families
|
|
75
|
+
- Added executable examples representing all 34 documented method families.
|
|
76
|
+
|
|
77
|
+
### Requirements
|
|
78
|
+
|
|
79
|
+
- **Python version:** 3.11+.
|
|
80
|
+
- **Required dependencies:** SymPy 1.12+, mpmath 1.3+, semialg 1.3.2+, and funcprops 0.3.0+.
|
|
81
|
+
- **Optional:** asymptotic 0.2.1+ for additional supported regularization calculations.
|
|
82
|
+
|
|
83
|
+
### Current Limitations
|
|
84
|
+
|
|
85
|
+
Arbitrary nonlinear geometric decompositions, general singularity resolution and general multidimensional oscillatory improper integration are outside the current scope. See the [capability guide](docs/capabilities.md) and [limitations](docs/limitations.md) for details.
|
|
86
|
+
|
|
87
|
+
## Version 2.1.0
|
|
88
|
+
|
|
89
|
+
Version 2.1 expands support for geometric integration, improves handling of assumptions and improper integrals, and includes several bugfixes.
|
|
90
|
+
|
|
91
|
+
### Improved Geometric Integration
|
|
92
|
+
|
|
93
|
+
- Added recognition and exact integration of translated disks, balls, and axis-aligned ellipsoids.
|
|
94
|
+
- Extended polynomial moments, radial integration, symmetry detection, and coordinate transformations to account for the centers of translated regions.
|
|
95
|
+
- Improved integration over annulii, spherical shells, ellipsoids, and unions of supported regions.
|
|
96
|
+
- Added stricter validation of region dimensions, radii, coordinate centers, and integration bounds.
|
|
97
|
+
- Improved detection of overlapping regions to prevent double-counting when integrating over unions.
|
|
98
|
+
- Strengthened recognition of nested integration bounds to avoid incorrectly identifying the integration region.
|
|
99
|
+
|
|
100
|
+
### Bugfixes
|
|
101
|
+
|
|
102
|
+
- Fixed incorrect treatment of constant integrands over regions with dependent bounds.
|
|
103
|
+
- Prevented symmetry arguments from incorrectly assigning zero to divergent singular integrals.
|
|
104
|
+
- Made sure that an integrand is genuinely radial before applying radial integration formulas.
|
|
105
|
+
|
|
106
|
+
### Better Assumptions Handling
|
|
107
|
+
|
|
108
|
+
- Expanded the `assumptions` argument to accept SymPy relational conditions and predicates, such as `a > 0` and `Q.positive(a)`.
|
|
109
|
+
- Added consistency checks that reject contradictory assumptions.
|
|
110
|
+
- Improved integration of parameter-dependent Gaussian, exponential, power-law, and simplex integrals.
|
|
111
|
+
- Improved convergence checks for integrals where validity depends on parameters.
|
|
112
|
+
|
|
113
|
+
### Performance & Reliability
|
|
114
|
+
|
|
115
|
+
- Improved selection and ordering of specialized integration methods.
|
|
116
|
+
- Added bounded caching of integration results and intermediate expression decompositions.
|
|
117
|
+
- Expanded regression tests for correctness, region classification, assumptions, and performance.
|
|
118
|
+
|
|
119
|
+
### Documentation
|
|
120
|
+
|
|
121
|
+
- Updated README and example notebook.
|
|
122
|
+
- Added a new quick-start guide
|
|
123
|
+
- Reorganized API reference.
|
|
124
|
+
- Added a detailed guide to integration ranges, region classification, and geometric integration methods.
|
|
125
|
+
- Expanded examples demonstrating supported integration regions.
|
|
126
|
+
- Clarified the required ordering of nested integration bounds, which follows the same inner-first convention as SymPy.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
include README.md CHANGELOG.md LICENSE pyproject.toml
|
|
2
|
+
recursive-include src/multiple_integrate *.py
|
|
3
|
+
recursive-include tests *.py
|
|
4
|
+
recursive-include docs *
|
|
5
|
+
recursive-include notebooks *.ipynb
|
|
6
|
+
|
|
7
|
+
recursive-include tools *.py
|
|
8
|
+
|
|
9
|
+
recursive-include examples *.py
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: multiple-integrate
|
|
3
|
+
Version: 2.2.0
|
|
4
|
+
Summary: Symbolic definite integration with geometric reductions, coordinate transformations, and convergence analysis.
|
|
5
|
+
Author-email: Bhuvanesh Bhatt <bhuvaneshbhatt@gmail.com>
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/BhuvaneshBhatt/multiple_integrate
|
|
8
|
+
Project-URL: Documentation, https://multiple-integrate.readthedocs.io/
|
|
9
|
+
Project-URL: Source, https://github.com/BhuvaneshBhatt/multiple_integrate
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/BhuvaneshBhatt/multiple_integrate/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: symbolic mathematics,symbolic computation,integration,definite integration,multiple integrals,multivariate integrals,calculus,sympy,computer algebra,layer-cake formula,co-area formula
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Intended Audience :: Education
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: sympy>=1.12
|
|
27
|
+
Requires-Dist: mpmath>=1.3
|
|
28
|
+
Requires-Dist: semialg>=1.3.2
|
|
29
|
+
Requires-Dist: funcprops>=0.3.0
|
|
30
|
+
Provides-Extra: asymptotic
|
|
31
|
+
Requires-Dist: asymptotic>=0.2.1; extra == "asymptotic"
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
34
|
+
Requires-Dist: hypothesis>=6; extra == "test"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
37
|
+
Requires-Dist: hypothesis>=6; extra == "dev"
|
|
38
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
39
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
40
|
+
Provides-Extra: release
|
|
41
|
+
Requires-Dist: build>=1.2; extra == "release"
|
|
42
|
+
Requires-Dist: twine>=6; extra == "release"
|
|
43
|
+
Provides-Extra: notebook-test
|
|
44
|
+
Requires-Dist: nbclient>=0.10; extra == "notebook-test"
|
|
45
|
+
Requires-Dist: nbformat>=5.10; extra == "notebook-test"
|
|
46
|
+
Requires-Dist: ipykernel>=6; extra == "notebook-test"
|
|
47
|
+
Provides-Extra: notebook
|
|
48
|
+
Requires-Dist: jupyter>=1.0; extra == "notebook"
|
|
49
|
+
Requires-Dist: notebook>=7.0; extra == "notebook"
|
|
50
|
+
Requires-Dist: ipykernel>=6.0; extra == "notebook"
|
|
51
|
+
Requires-Dist: matplotlib>=3.7; extra == "notebook"
|
|
52
|
+
Provides-Extra: docs
|
|
53
|
+
Requires-Dist: sphinx<9,>=8; extra == "docs"
|
|
54
|
+
Requires-Dist: sphinx-rtd-theme<4,>=3; extra == "docs"
|
|
55
|
+
Requires-Dist: myst-parser<5,>=4; extra == "docs"
|
|
56
|
+
Provides-Extra: all
|
|
57
|
+
Requires-Dist: asymptotic>=0.2.1; extra == "all"
|
|
58
|
+
Requires-Dist: funcprops>=0.3.0; extra == "all"
|
|
59
|
+
Requires-Dist: semialg>=1.3.2; extra == "all"
|
|
60
|
+
Requires-Dist: pytest>=8; extra == "all"
|
|
61
|
+
Requires-Dist: hypothesis>=6; extra == "all"
|
|
62
|
+
Requires-Dist: ruff>=0.4; extra == "all"
|
|
63
|
+
Requires-Dist: mypy>=1.10; extra == "all"
|
|
64
|
+
Requires-Dist: jupyter>=1.0; extra == "all"
|
|
65
|
+
Requires-Dist: notebook>=7.0; extra == "all"
|
|
66
|
+
Requires-Dist: ipykernel>=6.0; extra == "all"
|
|
67
|
+
Requires-Dist: matplotlib>=3.7; extra == "all"
|
|
68
|
+
Requires-Dist: sphinx<9,>=8; extra == "all"
|
|
69
|
+
Requires-Dist: sphinx-rtd-theme<4,>=3; extra == "all"
|
|
70
|
+
Requires-Dist: myst-parser<5,>=4; extra == "all"
|
|
71
|
+
Dynamic: license-file
|
|
72
|
+
|
|
73
|
+
# MultipleIntegrate
|
|
74
|
+
|
|
75
|
+
MultipleIntegrate evaluates definite multiple/multivariate integrals by combining SymPy-based evaluation with geometric reductions, moment rules, coordinate changes and some selected regularization prescriptions. It is useful when the structure of a density or domain supplies more information than a generic antiderivative search.
|
|
76
|
+
|
|
77
|
+
## Installation and dependencies
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
pip install multiple-integrate
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Python 3.11 or newer is required. SymPy supplies symbolic expressions and fallback integration, `funcprops` supplies function-property queries, `semialg` supplies canonical region geometry and decompositions, and `mpmath` is used for numerical consistency checks. The package requires `semialg>=1.3.2`, `funcprops>=0.3.0`. The optional package `asymptotic>=0.2.1` handles supported asymptotic regularization work.
|
|
84
|
+
|
|
85
|
+
## Quick start
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import sympy as sp
|
|
89
|
+
from multiple_integrate import integrate, integrate_result
|
|
90
|
+
x, y, a = sp.symbols("x y a", real=True)
|
|
91
|
+
assert integrate(x**2 * y, (x, 0, 1), (y, 0, 2)) == sp.Rational(2, 3)
|
|
92
|
+
result = integrate_result(sp.sin(1/x)/x, (x, 0, 1))
|
|
93
|
+
assert result.value == sp.pi/2-sp.Si(1)
|
|
94
|
+
assert result.ordinary_convergent is True
|
|
95
|
+
assert result.absolute_convergent is False
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Boolean formulas use the same `region=` argument:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
triangle = sp.And(x >= 0, y >= 0, x+y <= 1)
|
|
102
|
+
assert integrate(sp.exp(x + y), region=triangle, variables=(x, y)) == 1
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Integration ranges are listed from innermost to outermost, not with the outer-to-inner ordering used, for example, by Mathematica. Dependent bounds use explicit triples; reversed independent ranges preserve orientation. Canonical `semialg` objects use `region=` and explicit `variables=`. Select `measure_dimension` for points, curves or surfaces, because ambient volume and intrinsic measure are distinct.
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
import semialg
|
|
109
|
+
from multiple_integrate import integrate_cells
|
|
110
|
+
assert integrate(1, region=semialg.Box(((0, 1), (0, 2))), variables=(x, y)) == 2
|
|
111
|
+
family = integrate_cells(1, region=x**2 <= a, variables=(x,),
|
|
112
|
+
bounds={x: (-1, 1)}, parameters=(a,))
|
|
113
|
+
assert family.complete and family.value.subs(a, sp.Rational(1, 4)) == 1
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Extensions include finite Laurent–Laplace moments on proved positive cutoffs, polynomial ellipsoid moments clipped by parallel affine planes, and weighted tangent-graph cutoffs that preserve the requested regulator. See [the formulas and prerequisites](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/laurent-clips-and-tangencies.md).
|
|
117
|
+
|
|
118
|
+
## Capabilities and prerequisites
|
|
119
|
+
|
|
120
|
+
| Family | Exact strategy and required proofs |
|
|
121
|
+
|---|---|
|
|
122
|
+
| Boxes and product densities | Cached geometry, bounded sparse polynomial moments, separability; independent bounds and finite coefficients |
|
|
123
|
+
| Polynomial times exponential/trigonometric functions | Affine-frequency recurrences with explicit zero-frequency branches |
|
|
124
|
+
| Polynomial Gaussian moments | Shifted erf recurrence on finite intervals and, with proved positive decay, half-lines/full lines |
|
|
125
|
+
| Endpoint and stretched-exponential moments | Exact endpoint factor orders; shifted/truncated gamma moments with proved decay and branch prerequisites |
|
|
126
|
+
| Rational densities | Pole-free linear/quadratic interval formulas and positive shifted-biquadratic full-line moments |
|
|
127
|
+
| Oscillatory improper densities | A few narrow Si/Ci and Dirichlet rules; conditional convergence is recorded separately from absolute convergence |
|
|
128
|
+
| Nonseparable improper profiles | Global triangular polynomial shear charts and weighted moments with proved origin and tail thresholds |
|
|
129
|
+
| Nonseparable polynomial phases on finite boxes | Exact uniformly convergent series; specialized bounded Taylor evaluation with analytic remainder |
|
|
130
|
+
| Parametrized geometry | Budgeted polynomial event cells, proved quadratic ellipsoid moments, coupled affine/graph reductions |
|
|
131
|
+
| Simplex, balls, shells and quadratic forms | Dirichlet, radial and Gaussian moments under sign, rank and dimension prerequisites |
|
|
132
|
+
| Polygonal domains and convex 3D polytopes | Boundary flux, cached polynomial moments; affine exponentials on polygons and fixed-normal polygons on proved cells |
|
|
133
|
+
| Graph domains, cusps and clipped polygons | Geometric reductions and proved contact/vanishing thresholds |
|
|
134
|
+
| Singular product intersections | Affine or polynomial graph charts with proved inverses, Jacobians and the original shared cutoff |
|
|
135
|
+
|
|
136
|
+
Use assumptions to express the prerequisites for the entire requested parameter cell. Sample points cannot certify a generic cell. There are complexity budgets that will decline expensive routes.
|
|
137
|
+
|
|
138
|
+
## Results, evidence and regularization
|
|
139
|
+
|
|
140
|
+
`integrate` returns the mathematical result without extra information. `integrate_result` adds outcomes, parameter cases, coverage, convergence evidence, diagnostics and limitations. Outcomes include finite, divergent, conditional, unsupported and unknown. An exact convergent series representation is finite; an unresolved arbitrary series is unknown. Coverage, ordinary convergence, absolute convergence and numerical consistency are separate claims.
|
|
141
|
+
|
|
142
|
+
Assumptions can be provided via the option `assumptions=` or via symbol-attached assumptions. Temporary SymPy `assuming(...)` facts are excluded from package proof queries and refinement, so cached evidence cannot escape its parameter scope.
|
|
143
|
+
|
|
144
|
+
Consistent convergence evidence is summarized across conditions only when they provably cover the requested parameter domain. Missing equality fibers, conflicting facts and unknown cells would prevent a global conclusion.
|
|
145
|
+
|
|
146
|
+
If you need the principal value or Hadamard finite part for a divergent integral, ask for them specifically. Obviously a regularized value does not establish ordinary convergence.
|
|
147
|
+
|
|
148
|
+
Selected affine/radial co-area dispatch, vector-valued maps, polynomial/Fourier and bounded rational angular amplitudes, caller-supplied parameter cells, and supplied rational, algebraic or polar charts use `multiple_integrate.coarea`; see [verified coarea reductions](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/coarea.md).
|
|
149
|
+
|
|
150
|
+
`Boole(condition)` creates a SymPy indicator `Piecewise((1, condition), (0, True))`. Both forms are accepted by `integrate` within the supported geometry and convergence rules.
|
|
151
|
+
|
|
152
|
+
## Reading guide
|
|
153
|
+
|
|
154
|
+
The [executable method example catalog](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/method-examples.md) has a representative example for every documented method.
|
|
155
|
+
|
|
156
|
+
The [method reference guide](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/method-references.md) maps mathematical methods to sources and implementation modules.
|
|
157
|
+
|
|
158
|
+
- [Supported regions and measures](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/supported-regions.md)
|
|
159
|
+
- [Bounded series evaluation](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/series-evaluation.md)
|
|
160
|
+
- [Selected symbolic families](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/selected-symbolic-families.md)
|
|
161
|
+
- [Exact fast methods and budgets](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/performance-methods.md)
|
|
162
|
+
- [Parameterized integration](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/parameterized-integration.md)
|
|
163
|
+
- [Result semantics and certfication](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/certification.md)
|
|
164
|
+
- [Regularization](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/regularization.md)
|
|
165
|
+
- [Polygon and polytope boundary reduction](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/boundary-reduction.md)
|
|
166
|
+
- [Nonseparable improper integration](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/nonseparable-improper.md)
|
|
167
|
+
- [Laurent moments, clips and tangencies](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/laurent-clips-and-tangencies.md)
|
|
168
|
+
- [Nonlinear moments and singularities](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/nonlinear-moments-and-singularities.md)
|
|
169
|
+
- [Sectors and contact charts](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/sectors-and-contact-charts.md)
|
|
170
|
+
- [Limitations and known issues](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/limitations.md)
|
|
171
|
+
|
|
172
|
+
Executable examples live in `examples/`, and `notebooks/multiple_integration.ipynb` is a demo notebook.
|
|
173
|
+
|
|
174
|
+
## Worked examples
|
|
175
|
+
|
|
176
|
+
### Layer-cake identity
|
|
177
|
+
|
|
178
|
+
For a nonnegative density `f`, the layer-cake identity is
|
|
179
|
+
`integral(f) = integral_0^infinity volume({f > t}) dt`, with infinite values
|
|
180
|
+
allowed by Tonelli's theorem. For `f=exp(-g)` and `g>=0`, an equivalent form is
|
|
181
|
+
`integral(exp(-g)) = integral_0^infinity exp(-t)*volume({g < t}) dt`.
|
|
182
|
+
For the positive-quadrant superellipse `g=x**4+y**4`, the sublevel area is
|
|
183
|
+
`Gamma(1/4)**2*sqrt(t)/(8*sqrt(pi))`:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
import sympy as sp
|
|
187
|
+
from multiple_integrate import integrate_result
|
|
188
|
+
x, y = sp.symbols("x y", real=True)
|
|
189
|
+
t = sp.Symbol("t", positive=True)
|
|
190
|
+
area = sp.gamma(sp.Rational(1, 4))**2 * sp.sqrt(t)/(8*sp.sqrt(sp.pi))
|
|
191
|
+
layer_value = sp.integrate(sp.exp(-t)*area, (t, 0, sp.oo))
|
|
192
|
+
result = integrate_result(sp.exp(-(x**4+y**4)), (x, 0, sp.oo), (y, 0, sp.oo))
|
|
193
|
+
assert sp.simplify(result.value-layer_value) == 0
|
|
194
|
+
assert sp.simplify(layer_value-sp.gamma(sp.Rational(1,4))**2/16) == 0
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
This demonstrates the identity and its value; the automatic planner may choose
|
|
198
|
+
another proved route for the same density. See the selected-symbolic-family
|
|
199
|
+
guide for endpoint factors and shifted or truncated gamma moments.
|
|
200
|
+
|
|
201
|
+
<!-- geometry-casebook-start -->
|
|
202
|
+
## Geometry casebook
|
|
203
|
+
|
|
204
|
+
The examples share these imports:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
from dataclasses import replace
|
|
208
|
+
import mpmath as mp
|
|
209
|
+
import semialg
|
|
210
|
+
import sympy as sp
|
|
211
|
+
from multiple_integrate import (HadamardFinitePart, IntegrationOutcome, ParameterCell,
|
|
212
|
+
integrate_cells, integrate_result, regularized_result, verify_regularization_result)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameter cells and graph contact
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
x, y, a, b = sp.symbols("x y a b", real=True)
|
|
219
|
+
result = integrate_cells(
|
|
220
|
+
1,
|
|
221
|
+
region=sp.And(x >= 0, x <= a, y >= 0, y <= b - x**2),
|
|
222
|
+
variables=(x, y),
|
|
223
|
+
parameters=(a, b),
|
|
224
|
+
assumptions=sp.And(a > 0, b >= a**2),
|
|
225
|
+
cells=(ParameterCell(b > a**2), ParameterCell(sp.Eq(b, a**2), {b: a**2})),
|
|
226
|
+
)
|
|
227
|
+
assert sp.simplify(result.cases[0].value - (a * b - a**3 / 3)) == 0
|
|
228
|
+
assert sp.simplify(result.cases[1].value - 2 * a**3 / 3) == 0
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Cusp contact and divergence
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
x, y = sp.symbols("x y", real=True)
|
|
235
|
+
base = x**3 - y**2
|
|
236
|
+
horn = sp.And(x > 0, x < 1, y**2 <= x**3)
|
|
237
|
+
result = integrate_result(base ** -sp.Rational(1, 2), region=horn, variables=(x, y))
|
|
238
|
+
divergent = integrate_result(x**2 / base, region=horn, variables=(x, y))
|
|
239
|
+
assert sp.simplify(sp.expand_func(result.value) - sp.pi) == 0
|
|
240
|
+
assert result.absolute_convergent is True
|
|
241
|
+
assert divergent.outcome is IntegrationOutcome.DIVERGENT
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Exact finite radial series
|
|
245
|
+
|
|
246
|
+
```python
|
|
247
|
+
x, y, z = sp.symbols("x y z", real=True)
|
|
248
|
+
rho = x**2 + y**2 + z**2
|
|
249
|
+
result = integrate_result(
|
|
250
|
+
sp.exp(-rho) / (2 + rho), region=semialg.Ball((0, 0, 0), 1), variables=(x, y, z)
|
|
251
|
+
)
|
|
252
|
+
assert result.value.has(sp.Sum) and result.absolute_convergent is True
|
|
253
|
+
with mp.workdps(35):
|
|
254
|
+
reference = 4 * mp.pi * mp.quad(lambda r: r**2 * mp.exp(-r * r) / (2 + r * r), [0, 1])
|
|
255
|
+
assert abs(mp.mpf(str(result.value.evalf(30))) - reference) < mp.mpf("1e-25")
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Clipped polygon finite part
|
|
259
|
+
|
|
260
|
+
```python
|
|
261
|
+
x, y = sp.symbols("x y", real=True)
|
|
262
|
+
polygon = sp.And(x >= 0, y >= 0, x <= sp.Rational(1, 2), x + y <= 1)
|
|
263
|
+
result = regularized_result(
|
|
264
|
+
1 / (x * y),
|
|
265
|
+
region=polygon,
|
|
266
|
+
variables=(x, y),
|
|
267
|
+
regularization=HadamardFinitePart(hypersurface=x * y),
|
|
268
|
+
)
|
|
269
|
+
assert sp.simplify(result.value + sp.pi**2 / 12 - sp.log(2) ** 2) == 0
|
|
270
|
+
assert verify_regularization_result(result).valid
|
|
271
|
+
assert not verify_regularization_result(replace(result, value=result.value + 1)).valid
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
For an ordinary result inspect `result.outcome`, `result.complete`, `result.coverage`, and `result.convergence_evidence`; for a family inspect each child in `result.diagnostics['cell_results']`. A finite-part answer describes its specified cutoff and does not prove ordinary convergence.
|
|
275
|
+
<!-- geometry-casebook-end -->
|
|
276
|
+
|
|
277
|
+
## Contributing and project information
|
|
278
|
+
|
|
279
|
+
Contributions – whether they are bug reports, suggestions, or code for bugfixes or improvements – are welcome!
|
|
280
|
+
|
|
281
|
+
For development setup, architecture and extension guidance, see [Contributing](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/contributing.md). The [testing guide](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/testing.md) describes the mathematical, property, slow and packaging checks.
|
|
282
|
+
|
|
283
|
+
See the [release notes](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/CHANGELOG.md) for changes and the [limitations and known issues](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/limitations.md) for unresolved cases. MultipleIntegrate is licensed under the GNU General Public License version 3 only (GPL-3.0-only). See [LICENSE](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/LICENSE).
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# MultipleIntegrate
|
|
2
|
+
|
|
3
|
+
MultipleIntegrate evaluates definite multiple/multivariate integrals by combining SymPy-based evaluation with geometric reductions, moment rules, coordinate changes and some selected regularization prescriptions. It is useful when the structure of a density or domain supplies more information than a generic antiderivative search.
|
|
4
|
+
|
|
5
|
+
## Installation and dependencies
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install multiple-integrate
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Python 3.11 or newer is required. SymPy supplies symbolic expressions and fallback integration, `funcprops` supplies function-property queries, `semialg` supplies canonical region geometry and decompositions, and `mpmath` is used for numerical consistency checks. The package requires `semialg>=1.3.2`, `funcprops>=0.3.0`. The optional package `asymptotic>=0.2.1` handles supported asymptotic regularization work.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
import sympy as sp
|
|
17
|
+
from multiple_integrate import integrate, integrate_result
|
|
18
|
+
x, y, a = sp.symbols("x y a", real=True)
|
|
19
|
+
assert integrate(x**2 * y, (x, 0, 1), (y, 0, 2)) == sp.Rational(2, 3)
|
|
20
|
+
result = integrate_result(sp.sin(1/x)/x, (x, 0, 1))
|
|
21
|
+
assert result.value == sp.pi/2-sp.Si(1)
|
|
22
|
+
assert result.ordinary_convergent is True
|
|
23
|
+
assert result.absolute_convergent is False
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Boolean formulas use the same `region=` argument:
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
triangle = sp.And(x >= 0, y >= 0, x+y <= 1)
|
|
30
|
+
assert integrate(sp.exp(x + y), region=triangle, variables=(x, y)) == 1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Integration ranges are listed from innermost to outermost, not with the outer-to-inner ordering used, for example, by Mathematica. Dependent bounds use explicit triples; reversed independent ranges preserve orientation. Canonical `semialg` objects use `region=` and explicit `variables=`. Select `measure_dimension` for points, curves or surfaces, because ambient volume and intrinsic measure are distinct.
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import semialg
|
|
37
|
+
from multiple_integrate import integrate_cells
|
|
38
|
+
assert integrate(1, region=semialg.Box(((0, 1), (0, 2))), variables=(x, y)) == 2
|
|
39
|
+
family = integrate_cells(1, region=x**2 <= a, variables=(x,),
|
|
40
|
+
bounds={x: (-1, 1)}, parameters=(a,))
|
|
41
|
+
assert family.complete and family.value.subs(a, sp.Rational(1, 4)) == 1
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Extensions include finite Laurent–Laplace moments on proved positive cutoffs, polynomial ellipsoid moments clipped by parallel affine planes, and weighted tangent-graph cutoffs that preserve the requested regulator. See [the formulas and prerequisites](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/laurent-clips-and-tangencies.md).
|
|
45
|
+
|
|
46
|
+
## Capabilities and prerequisites
|
|
47
|
+
|
|
48
|
+
| Family | Exact strategy and required proofs |
|
|
49
|
+
|---|---|
|
|
50
|
+
| Boxes and product densities | Cached geometry, bounded sparse polynomial moments, separability; independent bounds and finite coefficients |
|
|
51
|
+
| Polynomial times exponential/trigonometric functions | Affine-frequency recurrences with explicit zero-frequency branches |
|
|
52
|
+
| Polynomial Gaussian moments | Shifted erf recurrence on finite intervals and, with proved positive decay, half-lines/full lines |
|
|
53
|
+
| Endpoint and stretched-exponential moments | Exact endpoint factor orders; shifted/truncated gamma moments with proved decay and branch prerequisites |
|
|
54
|
+
| Rational densities | Pole-free linear/quadratic interval formulas and positive shifted-biquadratic full-line moments |
|
|
55
|
+
| Oscillatory improper densities | A few narrow Si/Ci and Dirichlet rules; conditional convergence is recorded separately from absolute convergence |
|
|
56
|
+
| Nonseparable improper profiles | Global triangular polynomial shear charts and weighted moments with proved origin and tail thresholds |
|
|
57
|
+
| Nonseparable polynomial phases on finite boxes | Exact uniformly convergent series; specialized bounded Taylor evaluation with analytic remainder |
|
|
58
|
+
| Parametrized geometry | Budgeted polynomial event cells, proved quadratic ellipsoid moments, coupled affine/graph reductions |
|
|
59
|
+
| Simplex, balls, shells and quadratic forms | Dirichlet, radial and Gaussian moments under sign, rank and dimension prerequisites |
|
|
60
|
+
| Polygonal domains and convex 3D polytopes | Boundary flux, cached polynomial moments; affine exponentials on polygons and fixed-normal polygons on proved cells |
|
|
61
|
+
| Graph domains, cusps and clipped polygons | Geometric reductions and proved contact/vanishing thresholds |
|
|
62
|
+
| Singular product intersections | Affine or polynomial graph charts with proved inverses, Jacobians and the original shared cutoff |
|
|
63
|
+
|
|
64
|
+
Use assumptions to express the prerequisites for the entire requested parameter cell. Sample points cannot certify a generic cell. There are complexity budgets that will decline expensive routes.
|
|
65
|
+
|
|
66
|
+
## Results, evidence and regularization
|
|
67
|
+
|
|
68
|
+
`integrate` returns the mathematical result without extra information. `integrate_result` adds outcomes, parameter cases, coverage, convergence evidence, diagnostics and limitations. Outcomes include finite, divergent, conditional, unsupported and unknown. An exact convergent series representation is finite; an unresolved arbitrary series is unknown. Coverage, ordinary convergence, absolute convergence and numerical consistency are separate claims.
|
|
69
|
+
|
|
70
|
+
Assumptions can be provided via the option `assumptions=` or via symbol-attached assumptions. Temporary SymPy `assuming(...)` facts are excluded from package proof queries and refinement, so cached evidence cannot escape its parameter scope.
|
|
71
|
+
|
|
72
|
+
Consistent convergence evidence is summarized across conditions only when they provably cover the requested parameter domain. Missing equality fibers, conflicting facts and unknown cells would prevent a global conclusion.
|
|
73
|
+
|
|
74
|
+
If you need the principal value or Hadamard finite part for a divergent integral, ask for them specifically. Obviously a regularized value does not establish ordinary convergence.
|
|
75
|
+
|
|
76
|
+
Selected affine/radial co-area dispatch, vector-valued maps, polynomial/Fourier and bounded rational angular amplitudes, caller-supplied parameter cells, and supplied rational, algebraic or polar charts use `multiple_integrate.coarea`; see [verified coarea reductions](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/coarea.md).
|
|
77
|
+
|
|
78
|
+
`Boole(condition)` creates a SymPy indicator `Piecewise((1, condition), (0, True))`. Both forms are accepted by `integrate` within the supported geometry and convergence rules.
|
|
79
|
+
|
|
80
|
+
## Reading guide
|
|
81
|
+
|
|
82
|
+
The [executable method example catalog](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/method-examples.md) has a representative example for every documented method.
|
|
83
|
+
|
|
84
|
+
The [method reference guide](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/method-references.md) maps mathematical methods to sources and implementation modules.
|
|
85
|
+
|
|
86
|
+
- [Supported regions and measures](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/supported-regions.md)
|
|
87
|
+
- [Bounded series evaluation](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/series-evaluation.md)
|
|
88
|
+
- [Selected symbolic families](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/selected-symbolic-families.md)
|
|
89
|
+
- [Exact fast methods and budgets](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/performance-methods.md)
|
|
90
|
+
- [Parameterized integration](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/parameterized-integration.md)
|
|
91
|
+
- [Result semantics and certfication](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/certification.md)
|
|
92
|
+
- [Regularization](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/regularization.md)
|
|
93
|
+
- [Polygon and polytope boundary reduction](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/boundary-reduction.md)
|
|
94
|
+
- [Nonseparable improper integration](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/nonseparable-improper.md)
|
|
95
|
+
- [Laurent moments, clips and tangencies](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/laurent-clips-and-tangencies.md)
|
|
96
|
+
- [Nonlinear moments and singularities](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/nonlinear-moments-and-singularities.md)
|
|
97
|
+
- [Sectors and contact charts](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/sectors-and-contact-charts.md)
|
|
98
|
+
- [Limitations and known issues](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/limitations.md)
|
|
99
|
+
|
|
100
|
+
Executable examples live in `examples/`, and `notebooks/multiple_integration.ipynb` is a demo notebook.
|
|
101
|
+
|
|
102
|
+
## Worked examples
|
|
103
|
+
|
|
104
|
+
### Layer-cake identity
|
|
105
|
+
|
|
106
|
+
For a nonnegative density `f`, the layer-cake identity is
|
|
107
|
+
`integral(f) = integral_0^infinity volume({f > t}) dt`, with infinite values
|
|
108
|
+
allowed by Tonelli's theorem. For `f=exp(-g)` and `g>=0`, an equivalent form is
|
|
109
|
+
`integral(exp(-g)) = integral_0^infinity exp(-t)*volume({g < t}) dt`.
|
|
110
|
+
For the positive-quadrant superellipse `g=x**4+y**4`, the sublevel area is
|
|
111
|
+
`Gamma(1/4)**2*sqrt(t)/(8*sqrt(pi))`:
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
import sympy as sp
|
|
115
|
+
from multiple_integrate import integrate_result
|
|
116
|
+
x, y = sp.symbols("x y", real=True)
|
|
117
|
+
t = sp.Symbol("t", positive=True)
|
|
118
|
+
area = sp.gamma(sp.Rational(1, 4))**2 * sp.sqrt(t)/(8*sp.sqrt(sp.pi))
|
|
119
|
+
layer_value = sp.integrate(sp.exp(-t)*area, (t, 0, sp.oo))
|
|
120
|
+
result = integrate_result(sp.exp(-(x**4+y**4)), (x, 0, sp.oo), (y, 0, sp.oo))
|
|
121
|
+
assert sp.simplify(result.value-layer_value) == 0
|
|
122
|
+
assert sp.simplify(layer_value-sp.gamma(sp.Rational(1,4))**2/16) == 0
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This demonstrates the identity and its value; the automatic planner may choose
|
|
126
|
+
another proved route for the same density. See the selected-symbolic-family
|
|
127
|
+
guide for endpoint factors and shifted or truncated gamma moments.
|
|
128
|
+
|
|
129
|
+
<!-- geometry-casebook-start -->
|
|
130
|
+
## Geometry casebook
|
|
131
|
+
|
|
132
|
+
The examples share these imports:
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from dataclasses import replace
|
|
136
|
+
import mpmath as mp
|
|
137
|
+
import semialg
|
|
138
|
+
import sympy as sp
|
|
139
|
+
from multiple_integrate import (HadamardFinitePart, IntegrationOutcome, ParameterCell,
|
|
140
|
+
integrate_cells, integrate_result, regularized_result, verify_regularization_result)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Parameter cells and graph contact
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
x, y, a, b = sp.symbols("x y a b", real=True)
|
|
147
|
+
result = integrate_cells(
|
|
148
|
+
1,
|
|
149
|
+
region=sp.And(x >= 0, x <= a, y >= 0, y <= b - x**2),
|
|
150
|
+
variables=(x, y),
|
|
151
|
+
parameters=(a, b),
|
|
152
|
+
assumptions=sp.And(a > 0, b >= a**2),
|
|
153
|
+
cells=(ParameterCell(b > a**2), ParameterCell(sp.Eq(b, a**2), {b: a**2})),
|
|
154
|
+
)
|
|
155
|
+
assert sp.simplify(result.cases[0].value - (a * b - a**3 / 3)) == 0
|
|
156
|
+
assert sp.simplify(result.cases[1].value - 2 * a**3 / 3) == 0
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Cusp contact and divergence
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
x, y = sp.symbols("x y", real=True)
|
|
163
|
+
base = x**3 - y**2
|
|
164
|
+
horn = sp.And(x > 0, x < 1, y**2 <= x**3)
|
|
165
|
+
result = integrate_result(base ** -sp.Rational(1, 2), region=horn, variables=(x, y))
|
|
166
|
+
divergent = integrate_result(x**2 / base, region=horn, variables=(x, y))
|
|
167
|
+
assert sp.simplify(sp.expand_func(result.value) - sp.pi) == 0
|
|
168
|
+
assert result.absolute_convergent is True
|
|
169
|
+
assert divergent.outcome is IntegrationOutcome.DIVERGENT
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Exact finite radial series
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
x, y, z = sp.symbols("x y z", real=True)
|
|
176
|
+
rho = x**2 + y**2 + z**2
|
|
177
|
+
result = integrate_result(
|
|
178
|
+
sp.exp(-rho) / (2 + rho), region=semialg.Ball((0, 0, 0), 1), variables=(x, y, z)
|
|
179
|
+
)
|
|
180
|
+
assert result.value.has(sp.Sum) and result.absolute_convergent is True
|
|
181
|
+
with mp.workdps(35):
|
|
182
|
+
reference = 4 * mp.pi * mp.quad(lambda r: r**2 * mp.exp(-r * r) / (2 + r * r), [0, 1])
|
|
183
|
+
assert abs(mp.mpf(str(result.value.evalf(30))) - reference) < mp.mpf("1e-25")
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Clipped polygon finite part
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
x, y = sp.symbols("x y", real=True)
|
|
190
|
+
polygon = sp.And(x >= 0, y >= 0, x <= sp.Rational(1, 2), x + y <= 1)
|
|
191
|
+
result = regularized_result(
|
|
192
|
+
1 / (x * y),
|
|
193
|
+
region=polygon,
|
|
194
|
+
variables=(x, y),
|
|
195
|
+
regularization=HadamardFinitePart(hypersurface=x * y),
|
|
196
|
+
)
|
|
197
|
+
assert sp.simplify(result.value + sp.pi**2 / 12 - sp.log(2) ** 2) == 0
|
|
198
|
+
assert verify_regularization_result(result).valid
|
|
199
|
+
assert not verify_regularization_result(replace(result, value=result.value + 1)).valid
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
For an ordinary result inspect `result.outcome`, `result.complete`, `result.coverage`, and `result.convergence_evidence`; for a family inspect each child in `result.diagnostics['cell_results']`. A finite-part answer describes its specified cutoff and does not prove ordinary convergence.
|
|
203
|
+
<!-- geometry-casebook-end -->
|
|
204
|
+
|
|
205
|
+
## Contributing and project information
|
|
206
|
+
|
|
207
|
+
Contributions – whether they are bug reports, suggestions, or code for bugfixes or improvements – are welcome!
|
|
208
|
+
|
|
209
|
+
For development setup, architecture and extension guidance, see [Contributing](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/contributing.md). The [testing guide](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/testing.md) describes the mathematical, property, slow and packaging checks.
|
|
210
|
+
|
|
211
|
+
See the [release notes](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/CHANGELOG.md) for changes and the [limitations and known issues](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/docs/limitations.md) for unresolved cases. MultipleIntegrate is licensed under the GNU General Public License version 3 only (GPL-3.0-only). See [LICENSE](https://github.com/BhuvaneshBhatt/multiple_integrate/blob/main/LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 280" role="img" aria-label="Cusp vertex and curved boundary"><rect width="360" height="280" fill="white"/><text x="15" y="20" font-family="sans-serif" font-size="15">Cusp vertex and curved boundary</text><path d="M 40 130 H 320 M 50 250 V 30" stroke="#777" fill="none"/><polygon points="50.00,130.00 57.00,129.44 64.00,128.42 71.00,127.10 78.00,125.53 85.00,123.75 92.00,121.78 99.00,119.65 106.00,117.35 113.00,114.91 120.00,112.32 127.00,109.61 134.00,106.76 141.00,103.80 148.00,100.72 155.00,97.52 162.00,94.22 169.00,90.82 176.00,87.31 183.00,83.70 190.00,80.00 197.00,76.20 204.00,72.32 211.00,68.34 218.00,64.27 225.00,60.12 232.00,55.89 239.00,51.57 246.00,47.17 253.00,42.70 260.00,38.14 260.00,221.86 253.00,217.30 246.00,212.83 239.00,208.43 232.00,204.11 225.00,199.88 218.00,195.73 211.00,191.66 204.00,187.68 197.00,183.80 190.00,180.00 183.00,176.30 176.00,172.69 169.00,169.18 162.00,165.78 155.00,162.48 148.00,159.28 141.00,156.20 134.00,153.24 127.00,150.39 120.00,147.68 113.00,145.09 106.00,142.65 99.00,140.35 92.00,138.22 85.00,136.25 78.00,134.47 71.00,132.90 64.00,131.58 57.00,130.56 50.00,130.00" fill="#dfeefa" stroke="#2469a0" stroke-width="2"/><circle cx="50" cy="130" r="4" fill="#bb3333"/><text x="65" y="155" font-family="sans-serif" font-size="13">vertex</text><text x="190" y="50" font-family="sans-serif" font-size="13">boundary pole</text><text x="305" y="150" font-family="sans-serif" font-size="14">x/u</text><text x="25" y="40" font-family="sans-serif" font-size="14">y/v</text></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 280" role="img" aria-label="Graph strip at boundary contact"><rect width="360" height="280" fill="white"/><text x="15" y="20" font-family="sans-serif" font-size="15">Graph strip at boundary contact</text><path d="M 40 230 H 320 M 50 250 V 30" stroke="#777" fill="none"/><path d="M50 230 V50 Q150 50 250 230 Z" fill="#dfeefa" stroke="#2469a0" stroke-width="2"/><path d="M50 35 Q150 35 250 215" fill="none" stroke="#2469a0" stroke-dasharray="5 4"/><circle cx="250" cy="230" r="4" fill="#bb3333"/><text x="210" y="260" font-family="sans-serif" font-size="13">contact</text><text x="305" y="250" font-family="sans-serif" font-size="14">x/u</text><text x="25" y="40" font-family="sans-serif" font-size="14">y/v</text></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 280" role="img" aria-label="Trapezoid and shared product cutoff"><rect width="360" height="280" fill="white"/><text x="15" y="20" font-family="sans-serif" font-size="15">Trapezoid and shared product cutoff</text><path d="M 40 230 H 320 M 50 250 V 30" stroke="#777" fill="none"/><path d="M50 230 V50 L200 140 V230 Z" fill="#dfeefa" stroke="#2469a0" stroke-width="2"/><polyline points="65.84,59.50 68.52,84.21 71.20,102.66 73.89,116.96 76.57,128.38 79.25,137.70 81.94,145.45 84.62,152.01 87.30,157.62 89.99,162.48 92.67,166.72 95.35,170.47 98.04,173.79 100.72,176.77 103.40,179.44 106.09,181.86 108.77,184.06 111.45,186.06 114.13,187.90 116.82,189.59 119.50,191.15 122.18,192.60 124.87,193.94 127.55,195.18 130.23,196.35 132.92,197.44 135.60,198.46 138.28,199.42 140.97,200.32 143.65,201.17 146.33,201.97 149.02,202.73 151.70,203.45 154.38,204.13 157.07,204.78 159.75,205.40 162.43,205.99 165.12,206.55 167.80,207.08 170.48,207.59 173.17,208.08 175.85,208.55 178.53,208.99 181.22,209.42 183.90,209.84 186.58,210.23 189.27,210.61 191.95,210.98 194.63,211.33 197.32,211.67 200.00,212.00" fill="none" stroke="#bb3333" stroke-width="2"/><text x="100" y="110" font-family="sans-serif" font-size="13">uv > epsilon</text><text x="305" y="250" font-family="sans-serif" font-size="14">x/u</text><text x="25" y="40" font-family="sans-serif" font-size="14">y/v</text></svg>
|