## Evaluation of a double summation invovlving hypergeometric and exponential functions

I am trying to compute the following double summation over the indices, $$m$$ and $$n$$, which involves the hypergeometric function, $${}_2 F_1$$, an exponential function and, factorials as a part of a bigger calculation.

Here’s the code.

Sum[((E^(-0.6931471805599453 m - 0.6931471805599453 n -    1.0000000000000002 \[Beta]^2) \[Beta]^(2 m)   c[n,n1,p]^2 r! Hypergeometric2F1[-n, -m - n + r,    1 - n + r, -1]^2)/(n! (m + n - r)! ((-n + r)!)^2)), {m, 0, \[Infinity]}, {n, 0, \[Infinity]}] 

where c[n_, n1_, p_] := n1!/(n! (n1 - n)!) p^n (1 - p)^(n1 - n) is the binomial distribution.

Any guidance on how to go proceed with this summation (either numerically or analytically) would be really appreciated.

## NArgMin with Root functions

I’m trying to minimize an error function sumt to find some parameters S, s0, si :

Ris[S_?NumericQ, s0_?NumericQ, si_?NumericQ, so_?NumericQ, R_?NumericQ] =   RR /. Solve[((8 RR*S ((2 RR^2)/R^3 - s0))/R^3 +         8 \[Pi] RR si + (8 \[Pi] RR^2 so)/(R^3 + RR^3)^(        1/3)) == 0, RR][[4]] ri = {54, 55, 62, 66, 62, 66, 71, 75, 77, 79, 94, 89, 99, 113, 124,    123, 140, 157, 163, 176} re = {72, 74, 82, 83, 90, 97, 104, 113, 115, 126, 136, 143, 158, 171,    185, 192, 218, 226, 246, 270} Rdata = (re^3 - ri^3)^(1/3); tableerror =    Table[(Ris[10^S, s0, si, 1, Rdata[[i]]] -        rayoninterne[[i]])^2, {i, 1, Length[rayoninterne]}]; sumt[S_?NumericQ, s0_?NumericQ, si_?NumericQ] =    Total[tableerror]; NArgMin[{sumt[S, s0, si],    8 < S < 11 && 0.001 < s0 < 0.1 && 0.001 < si < 10}, {S, s0, si}] 

But this doesn’t work and I suspect that it is because the Root function in my Ris function. Is it the issue ? And how could I fix this ?

## Modifying a CoBlocks Filter in Functions

I’m trying to modify slidestoshow parameter in CoBlocks Carousel block via my theme’s functions. Everything in the Codex implies modifying/passing the variable but looking at the code, it appears it’s an [anonymous function?] Forgive me if this term is incorrect.

I’ve tried both apply_filters() and add_filters() to replace the entire array rather than the individual key/value. I’ve tried removing the existing filter and adding it again but I’m not sure if the way it’s coded is preventing me from making my modification.

Do I need to call the plugin Class CoBlocks_Settings?

Here is the original plugin code:

$block_content = sprintf( '<div class="%1$  s"><div class="coblocks-slick pb-8" data-slick="%2$s">', esc_attr($  class ),     esc_attr(         wp_json_encode(             /**              * Filter the slick slider carousel settings              *              * @var array Slick slider settings.             */             (array) apply_filters(                 'coblocks_post_carousel_settings',                     array(                     'slidesToScroll' => 1,                     'arrow'          => true,                     'slidesToShow'   => $attributes['columns'], 'infinite' => true, 'adaptiveHeight' => false, 'draggable' => true, 'responsive' => array( array( 'breakpoint' => 1024, 'settings' => array( 'slidesToShow' => 3, ), ), array( 'breakpoint' => 600, 'settings' => array( 'slidesToShow' => 2, ), ), array( 'breakpoint' => 480, 'settings' => array( 'slidesToShow' => 1, ), ), ), ) ) ) ) );  First, I tried just overriding it with: apply_filters( 'coblocks_post_carousel_settings', array( ... ));  Second, here’s where I’m at in Functions: apply_filters( 'coblocks_post_carousel_settings', 'my_filter_coblocks_carousel' ); function my_filter_coblocks_carousel() {$  carousel = array(         'slidesToScroll' => 1,         'arrow'          => true,         'slidesToShow'   => $attributes['columns'], 'infinite' => true, 'adaptiveHeight' => false, 'draggable' => true, 'responsive' => array( array( 'breakpoint' => 1024, 'settings' => array( 'slidesToShow' => 4, ), ), array( 'breakpoint' => 600, 'settings' => array( 'slidesToShow' => 4, ), ), array( 'breakpoint' => 480, 'settings' => array( 'slidesToShow' => 4, ), ), ), ); return$  carousel; }  

## How to code a Sum Block when working with Transfer Functions?

I am working using transfer functions models with Mathematica and i am missing a basic feature like the ability to use a Sum Block.

How could the model above be modeled?

Considering:

C = 2; P = TransferFunctionModel[1/(s + 2), s]; 

And noise being a generic signal like a sine wave or a constant noise.

## How to count in relational algebra without aggregate functions?

Find the user who has liked the most posts. Report the user’s id, name and email, and the id of the posts they have liked. If there is a tie, report them all.

The schema:

User(uid, name, website, about, email, phone, photo)  Likes(liker, pid, when)  Likes[liker]  is contained in  User[uid] 

I think I need a "function" NumberOfLikes or similar where I can do something like:

We aren’t allowed to use aggregate functions in this exercise. I assume the way to count in RA is by performing some sort of cross product black magic, but I don’t know how.

Help?

## Numerical issues in Fourier transform of Mathieu functions

I’m trying to calculate the Fourier transform of the Mathieu $$\text{me}$$ functions using NIntegrate but keep on getting NIntegrate::inumr (the integrand has evaluated to non-numerical values) and NIntegrate:ncvb (failed to converge to prescribed accuracy) errors. Here is how I’m defining the Mathieu functions

ce[r_, z_, q_] := MathieuC[MathieuCharacteristicA[r, q], q, z] se[r_, z_, q_] := MathieuS[MathieuCharacteristicB[r, q], q, z] me[r_, z_, q_] := (ce[r, z, q] + I se[r, z, q]) / Sqrt[2 Pi] 

and I’m evaluating the integral

NIntegrate[Exp[-I n z] / Sqrt[2 Pi] me[r, z, q], {z, 0, 2 Pi}] 

where r is very close to an integer (I avoid exact integers because MathieuCharaceristicA and MathieuCharaceteristicB are not continuous at integers) and q for example varies continuously from -70 to 0.

Does anyone know how I can get around the numerical issues? Or is there a more efficient way to numerically Fourier transform Mathieu functions?

## Simplify trigonometric functions to take the Laplace transfrom

I have one trigonometric function which is simplified as

f[t_,RV_,H_]:=0.000308148 H Cos[    0.0523599 - 0.0862193 RV - 0.172439 RV Sin[4.71239 - 6.28319 t]] +   0.032 Sin[2 \[Pi] (-0.1 + t)] +   H (-0.129421 -      0.0153853 Sin[       0.0523599 - 0.0862193 RV -         0.172439 RV Sin[4.71239 - 6.28319 t]]) 

This function acts as input to one simple ODE which I want to solve with Laplace transform where RV and H are just two arbitrary parameters.

My question is how to find the Laplace transform of this function. One idea I am trying to do is using the following rules to transform the identities.

Rules = {Cos[ p1_*Sin[p2_*u_]] ->     Sum[((-1)^k (p1 Sin[p2 u])^(2 k))/(2 k)!, {k, 0, Num}],    Sin[ p1_*Sin[p2_*u_]] ->     Sum[((-1)^k (p1 Sin[p2 u])^(2 k + 1))/(2 k + 1)!, {k, 0, Num}],    Sin[ p1_*Cos[p2_*u_]] ->     Sum[((-1)^k (p1 Cos[p2 u])^(2 k + 1))/(2 k + 1)!, {k, 0, Num}],    Cos[ p1_*Cos[p2_*u_]] ->     Sum[((-1)^k (p1 Cos[p2 u])^(2 k))/(2 k)!, {k, 0, Num}]} 

Then apply the Laplace transform. Is there any other way, since I have several of these functions and I do not know exactly how to apply these rules repeatedly to functions like sin(sin(sin…))) and write them such that I can take the Laplace transform.

## Can built-in functions deal with stochastic delay differential equations (SDDE)?

I know that functions like NDSolve can deal with delay differential equations and in the meanwhile, functions like ItoProcess and RandomFunction handle stochastic differential equations. So I wonder whether any built-in functions can handle it when the above two cases are combined together. For example, I naively tried the below codes by just slightly modifying the first example of ItoProcess (x[t] -> x[t - 1] in the square root)

proc = ItoProcess[\[DifferentialD]x[t] == -x[t] \[DifferentialD]t + Sqrt[1 + x[t - 1]^2]         \[DifferentialD]w[t], x[t], {x, 1}, t, w \[Distributed] WienerProcess[]] RandomFunction[proc, {0., 5., 0.01}] 

The first row of codes runs seemly well, but the second one just returns a RandomFunction::unsproc error, specifically RandomFunction::unsproc: The specification <Ito process> is not a random process recognized by the system..

Or do I have to implement a version myself with Euler method alike?

## Access GLFW functions from DLL

My game uses DLLs as mods. Players can write DLLs which can render, play audio, print to console, etc. This works fine, however when I try to access GLFW functions, they don’t seem to work properly.

CustomMod.cpp (compiled to DLL)

void runDLLCode() {     std::cout << glfwGetKey(Game::getWindow(), GLFW_KEY_A); } 

Game.cpp (compiled to EXE)

void run() {     //Load DLL....       std::cout << glfwGetKey(Game::getWindow(), GLFW_KEY_A); // Prints 1     runDLLCode();                                           // Prints 0 (should print 1 since key is still down)     std::cout << glfwGetKey(Game::getWindow(), GLFW_KEY_A); // Prints 1 } 

Running std::this_thread::get_id() provides the same thread ID across both the DLL and exe.

The address of both Game::getWindow() is the same as well.

Is it possible to have all print 1 when the application is run? Or is it not possible to use GLFW functions across the DLL "wall"?

## Normalized functions

I’m looking for a smart way to define normalized functions. I usually write

f[x_] := f[x] = A Sin[x]/x; 

Then I integrate the function

Integrate[f[x], {x, -\[Infinity], \[Infinity]}, Assumptions -> A > 0], 

take the output and divide f by it

g[x_] :=g[x] = f[x]/(A \[Pi]). `

Is there a better way than this? Thanks