## Function providing input and integration limits for NIntegrate

I am trying to define some custom function that evaluates the numeric integral of some complicated function. The problem is that I would like to include as an input the integration limits. A MWE follows

f[x_,y_]:= Exp[-2 x^2 y^2] test[x_?NumericQ,IntL_]:= NIntegrate[f[x, y],IntL] myIntL1= {y,-4 x^2,4x^2}; myIntL2= {y,-4 x^4,4x^4}; 

Then, if I evaluate for instance test[3,myIntL1] I get a problem concerning an invalid limit of integration.

Is there a clever way to fix this without defining several functions including the integration limits, such as

    test1[x_?NumericQ,IntL_]:= NIntegrate[f[x, y],{y,-4 x^2,4x^2}]     test2[x_?NumericQ,IntL_]:= NIntegrate[f[x, y],{y,-4 x^4,4x^4}] 

etc?

Of course, here everything looks simple, but in my case all the functions are rather long; some even purely numeric ones. Since I have multiple choices for the integration limits, it would be more practical to avoid defining test1[x_], test2[x_], ..., testN[x_]

## Checkout Page Is Keep Loading After Integration Of Payment Gateway In Magento2

Checkout page is Keep loading after integration of any payment gateway. I have tested with multiple payment gateway using module when i try to checkout the product keep loading.

[Console Snap of checkoutpage] https://i.stack.imgur.com/2O4aL.png

## When to trust the result of numerical integration in mathematica?

How does one know when to trust the result of numerical integration, using NIntegrate, for higher (5 or 6) dimensional integrals in mathematica? For example, I get the following result

In[3]:= Integrate[ Exp[-a^2 – b^2 – c^2 – x^2 – y^2 – z^2], {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, {a, -2, 2}, {b, -2, 2}, {c, -2, 2}] // N

Out[3]= 30.1462

whereas if I do the same integral numerically, I get

In[2]:= NIntegrate[ Exp[-a^2 – b^2 – c^2 – x^2 – y^2 – z^2], {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, {a, -2, 2}, {b, -2, 2}, {c, -2, 2}] // N

During evaluation of In[2]:= NIntegrate::eincr: The global error of the strategy GlobalAdaptive has increased more than 2000 times. The global error is expected to decrease monotonically after a number of integrand evaluations. Suspect one of the following: the working precision is insufficient for the specified precision goal; the integrand is highly oscillatory or it is not a (piecewise) smooth function; or the true value of the integral is 0. Increasing the value of the GlobalAdaptive option MaxErrorIncreases might lead to a convergent numerical integration. NIntegrate obtained 30.14615590437465 and 0.0001823733624988688 for the integral and error estimates.

Out[2]= 30.1462′

This seems to indicate that one can trust the result of NIntegrate if the error estimate is a small percentage (~1%) of the estimated value of the integral. If that’s true then how would one understand the discrepancy in the values obtained in the following two cases when Mathematica does not report any errors.

In[102]:= NIntegrate[ Exp[-a^2 – b^2 – c^2 – x^2 + y^2], {x, -2, 2}, {y, -2, 2}, {a, -2, 2}, {b, -2, 2}, {c, -2, 2}, Method -> "AdaptiveMonteCarlo"] // N

Out[102]= 298.918

In[104]:= NIntegrate[ Exp[-a^2 – b^2 – c^2 – x^2 + y^2], {x, -2, 2}, {y, -2, 2}, {a, -2, 2}, {b, -2, 2}, {c, -2, 2}, Method -> "MonteCarloRule"] // N

Out[104]= 313.592′

In the following example, I also get a result with an error bar that is a small (~2%) percentage of the value of the integral

 In[7]:= NIntegrate[ Exp[-a^2 – b^2 – c^2 – x^2 – y^2 – z^2], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, {a, -5, 5}, {b, -5, 5}, {c, -5, 5}, Method -> "AdaptiveQuasiMonteCarlo"] // N

During evaluation of In[7]:= NIntegrate::maxp: The integral failed to converge after 1000100 integrand evaluations. NIntegrate obtained 0.29686054547957375 and 0.005304460608762476 for the integral and error estimates.

Out[7]= 0.296861′

but comparing it with the following analytic evaluation of the integral

In[8]:= Integrate[ Exp[-a^2 – b^2 – c^2 – x^2 – y^2 – z^2], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, {a, -5, 5}, {b, -5, 5}, {c, -5, 5}] // N

Out[8]= 31.0063 ‘

we see that the answer is way off. Any guidance in this regard will be greatly appreciated.

## Integration with Kontent Machine and DeepL

I have contracted DeepL and Kontent Machine. I want to integrate them into GSA so that it automatically extracts articles and translates them. How could you do it?
I also have contracted GSA Content Generator

## Probability and integration

Please see my code to do a problem in Griffith’s quantum mechanics. But I have a feel that my code is really lengthy and is not general. Is there a way to make this general? or any easy alternatives?

## Selling Video Game Key Website with Wholesale Integration

Why are you selling this site?
We build fully turn key websites, and kingloots.com is one of our new projects we want to roll out to the public. The future is selling digital products with instant delivery. The domain is ours, and this project would simply require picking a new domain, which we can help with and even logo creation.

How is it monetized?
This website comes complete with wholesale integration. So once a sale has been made, wholesaler send the key to the client….

Selling Video Game Key Website with Wholesale Integration

## Step by step integration solution that shows where substitutions occur without using Wolfram Alpha

I know there is heaps of people’s code around the forum with code that shows step by step solutions for integration. But they don’t specify where certain things happen like substitution (u sub) or recognition by integration and stuff like that. Is there a code (has to work offline) that can show you what is being made (like u sub, simplify, expand, double angle…) for each step?

## Woocommerce multisite global search premium integration

Im trying to integrate Global Search Premium plugin (link to plugin) to my site, but some errors occurs! This is the PHP Function to mod, someone can help me to integrate? PS When i contacted seller answear with this guide, no other kind of support!!!

    public function ajax_suggestions() {      if( apply_filters('basel_search_by_sku', basel_get_opt('search_by_sku') ) && basel_woocommerce_installed() ) {         add_filter('posts_search', array( $this, 'product_ajax_search_sku'), 10); }$  allowed_types = array( 'post', 'product', 'portfolio' );     $post_type = 'product';$  query_args = array(         'posts_per_page' => 5,         'post_status'    => 'publish',         'post_type'      => $post_type, 'no_found_rows' => 1, ); if ( ! empty($  _REQUEST['post_type'] ) && in_array( $_REQUEST['post_type'],$  allowed_types ) ) {         $post_type = strip_tags($  _REQUEST['post_type'] );         $query_args['post_type'] =$  post_type;     }      if ( $post_type == 'product' && basel_woocommerce_installed() ) {$  product_visibility_term_ids = wc_get_product_visibility_term_ids();         $query_args['tax_query'][] = array( 'taxonomy' => 'product_visibility', 'field' => 'term_taxonomy_id', 'terms' =>$  product_visibility_term_ids['exclude-from-search'],             'operator' => 'NOT IN',         );          if ( ! empty( $_REQUEST['product_cat'] ) ) {$  query_args['product_cat'] = strip_tags( $_REQUEST['product_cat'] ); } } if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) &&$  post_type == 'product' ) {         $query_args['meta_query'][] = array( 'key' => '_stock_status', 'value' => 'outofstock', 'compare' => 'NOT IN' ); } if ( ! empty($  _REQUEST['query'] ) ) {         $query_args['s'] = sanitize_text_field($  _REQUEST['query'] );     }      if ( ! empty( $_REQUEST['number'] ) ) {$  query_args['posts_per_page'] = (int) $_REQUEST['number']; }$  results = new WP_Query( apply_filters( 'basel_ajax_search_args', $query_args ) ); if ( basel_get_opt( 'relevanssi_search' ) && function_exists( 'relevanssi_do_query' ) ) { relevanssi_do_query($  results );     }      $suggestions = array(); if ($  results->have_posts() ) {          if ( $post_type == 'product' && basel_woocommerce_installed() ) {$  factory = new WC_Product_Factory();         }          while ( $results->have_posts() ) {$  results->the_post();              if ( $post_type == 'product' && basel_woocommerce_installed() ) {$  product = $factory->get_product( get_the_ID() );$  suggestions[] = array(                     'value' => get_the_title(),                     'permalink' => get_the_permalink(),                     'price' => $product->get_price_html(), 'thumbnail' =>$  product->get_image(),                     'sku' => $product->get_sku() ? esc_html__( 'SKU:', 'basel' ) . ' ' .$  product->get_sku() : '',                 );             } else {                 $suggestions[] = array( 'value' => get_the_title(), 'permalink' => get_the_permalink(), 'thumbnail' => get_the_post_thumbnail( null, 'medium', '' ), ); } } wp_reset_postdata(); } else {$  suggestions[] = array(             'value' => ( $post_type == 'product' ) ? esc_html__( 'No products found', 'basel' ) : esc_html__( 'No posts found', 'basel' ), 'no_found' => true, 'permalink' => '' ); } echo json_encode( array( 'suggestions' =>$  suggestions     ) );      die(); } 

## Double integration with a piecewise function gives wrong result

I am attempting to solve a double integral $$I(t) = \int_0^t dt’ \int_0^{t’} dt” f(t”)$$ of a piecewise function of the type $$f(t) = \begin{cases}1 & \text{for } 0 \leq t < a \ -1 & \text{for } t>a\end{cases}$$ with Mathematica. One can easily verify that for $$t>a$$ this should evaluate to $$I(t) = \frac12 t (4 a – t) – a^2$$ However, if I try to solve in Mathematica using

Simplify[Integrate[Integrate[Piecewise[{{1, 0 <= ttt < a}, {-1, a <= ttt}}], {ttt, 0, tt}], {tt,0, t}], {t > a > 0}] 

The result I get is

-(1/2) t (-4 a + t) 

I.e. it is obviously missing the $$-a^2$$.

I am puzzled why this is happening. Am I simply too stupid to use Mathematica’s Piecewise/Integrate function correctly? If instead of the variable $$a$$ I plug in a number, say 1, everything seems to evaluate correctly.

## Custom HTML, CSS Code integration

I am struggling with integrating one of my custom code in wordpress and it is not appearing as it should be. I have added the CSS properties into the theme editor and using it in my posts but it is not working properly. I am using Genesis frame work and Aspire pro as a child theme. The code that I am using is as follows. All those settings are getting distorted.

Can someone please guide me, if there is a proper way to do this because I am sure I am not doing it in right way. Please check it over here: https://quietgadgets.com/best-quiet-blender/

you can see the OUR top picks and there you can see it it is not completing the boxes that I have created.

Really looking forward to hearing it from you. Waiting for your response. Best Regards! Harry!