Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am not that new in Mathematica, but I do not remember I have ever used it for programming (like we may do in Java).

I have an important result given here by this integral: $$ \int_0^{+\infty} x^{\alpha-1} G^{st}_{uv} \left[ \sigma x \left| \begin{array}{c} (c_u) \\ (d_v) \end{array} \right. \right] G^{mn}_{pq} \left[ \omega x^{l/k} \left| \begin{array}{c} (a_p) \\ (b_q) \end{array} \right. \right] dx = \frac{k^\mu l^{\rho + \alpha(v-u)-1} \sigma^{-\alpha}}{(2\pi)^{b^*(l-1) + c^*(k-1)}} \\ G^{mn}_{pq} \left[ \frac{\omega^k k^{k(p-q)}}{\sigma^l l^{l(u-v)}} \left| \begin{array}{c} \Delta(k,a_1),\ldots,\Delta(k,a_n),\Delta(k,1-\alpha-d_1),\ldots,\Delta(k,1-\alpha-d_v), \\ \Delta(k,b_1),\ldots,\Delta(k,b_m),\Delta(k,1-\alpha-c_1),\ldots,\Delta(k,1-\alpha-c_u), \end{array} \right. \right. \\ \left. \begin{array}{c} \Delta(k,a_{n+1}),\ldots,\Delta(k,a_p) \\ \Delta(k,b_{m+1}),\ldots,\Delta(k,b_q) \end{array} \right] $$ where

$G$ is the Meijer G function, $(s,t,u,v,m,n,p,q)$ are integers, $\alpha$ is real, $\Delta(k,a) = \frac{a}{k},\frac{a+1}{k},\ldots,\frac{a+k-1}{k}$, $b^* = s+t - \frac{v+u}{2}$, $c^* = m+n - \frac{p+q}{2}$, $\mu = \sum_{j=1}^{q} b_j - \sum_{j=1}^{p} a_j + \frac{p-q}{2} + 1$, $\rho = \sum_{j=1}^{v} d_j - \sum_{j=1}^{u} c_j + \frac{u-v}{2} + 1.

I tried to create a module that gives me the result in a Traditional Form

\[CapitalDelta][k_, a_] := Range[a/k, (a + k - 1)/k, 1/k]


Res[\[Alpha]_, s_, t_, u_, v_, \[Sigma]_, c_, d_, m_, n_, p_, 
q_, \[Omega]_, l_, k_, a_, b_] := 
Module[{a1, b1, arg1, arg2, arg3, arg4, expr},
Print["km+lt = ", k m + l t] 
a1 := {Table[\[CapitalDelta][k, a[[i]]], {i, 1, n, 1}], 
Table[\[CapitalDelta][l, 1 - \[Alpha] - d[[i]]], {i, 1, v, 1}], 
Table[\[CapitalDelta][k, a[[i]]], {i, n + 1, p, 1}]};
Print["a1 = ", a1]
b1 := {Table[\[CapitalDelta][k, b[[i]]], {i, 1, m, 1}], 
Table[\[CapitalDelta][l, 1 - \[Alpha] - c[[i]]], {i, 1, u, 1}], 
Table[\[CapitalDelta][k, b[[i]]], {i, m + 1, q, 1}]};
Print["b1 = ", b1]
If [Length[a1] > 0, arg1 := Table[a1[[i]], {i, 1, k m + l t}]]
arg2 := Table[a1[[i]], {i, k m + l t + 1, k q + l u}];
If [Length[b1] > 0, arg3 := Table[b1[[j]], {j, 1, k n + l s}]]
arg4 := Table[b1[[j]], {j, k n + l s + 1, k p + l v}];
expr := 
MeijerG[{arg3, arg4}, {arg1, arg2}, (\[Omega]^k k^(
k (p - q)))/(\[Sigma]^l l^(l (u - v)))];
Return[expr];

]

This code returns me a bunch of errors, so your help is much appreciated.

share|improve this question
1  
Maybe you could figure out which line is giving the error? –  bill s Oct 15 '13 at 15:21
    
Can you provide us with sample input? –  LCC Oct 16 '13 at 16:20
    
What are arg1 and arg3 meant to be if Length[a1] respectively Length[b1] = 0? {} I guess? –  LCC Oct 16 '13 at 16:30
    
For your second question yes, arg1 and arg3 would be an empty set. Here is an output: In[4]:= Res[1, 1, 0, 0, 1, 1, {}, 0, 2, 2, 2, 2, 1, 1, 2, {1, 1}, {2, 1}] –  قيس بن فرج Oct 23 '13 at 14:30
    
km+lt = 4 SetDelayed::write: Tag Times in a1$569 Null is Protected. >> a1 = a1$569 SetDelayed::write: Tag Times in b1$569 Null is Protected. >> b1 = b1$569 SetDelayed::write: Tag Times in arg2$569 Null Null is Protected. >> General::stop: Further output of SetDelayed::write will be suppressed during this calculation. >> MeijerG::hdiv: MeijerG[{arg3$569,arg4$569},{arg1$569,arg2$569},1] does not exist. Arguments are not consistent. >> MeijerG::hdiv: MeijerG[{arg3$569,arg4$569},{arg1$569,arg2$569},1] does not exist. Arguments are not consistent. >> –  قيس بن فرج Oct 23 '13 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.