I am trying to calculate n-fold convolution of a function as $G^{*n}(x)$ where $G(x)=1-a*exp(-b)+b*ln(b)$.

I tried this function, Convolve[G[x], G[x]^{n - 1}, x, x] but it didn't give any answer. Could you please help me on this matter? Is there any way to calculate n-fold convolution of a function in mathematica?

  • have a look at my question mathematica.stackexchange.com/questions/32505/… may be others can know. What I khow is either taking the fourier transform, multiply and transform back, or, calcuate it iteratively as in my question above. – Seyhmus Güngören Feb 23 '15 at 14:46
  • thanks @seyhmusGüngören, I'm trying it. – jenny Feb 23 '15 at 15:04
  • Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. – bbgodfrey Feb 23 '15 at 15:09
  • What are a and b in G[x]? Also, please display literal Mathematica code in questions whenever possible, like G[x_] := 1 - a Exp[-b] + b Log[b]. Doing so will attract more answers. I suggest you edit your question now. – bbgodfrey Feb 23 '15 at 15:17
  • Not hearing back from you, I tried G[x_] := 1 - x Exp[-x] + x Log[x] and got no answer too. This was because Mathematica just kept running, burning more and more memory. I aborted it to avoid crashing. The problem probably is the x Log[x] term, which is singular at x = 0. x Exp[-x] probably has a similar problem at negative infinity. – bbgodfrey Feb 23 '15 at 16:50

First, Convolve only works when the output variable is different:

Convolve[Exp[x], Exp[-x^2/2], x, x]

won't work, but

Convolve[Exp[x], Exp[-x^2/2], x, y]

does, resulting in

E^(1/2 + y) Sqrt[2 Pi]

Your second problem is that $G(x)$ is not actually dependant on $x$, it is merely a constant. The convolution of two constant functions is infinite or undefined, so it makes sense that Mathematica won't return any output.

A third problem is that your syntax for derivatives is incorrect (assuming by $f^{*n}$ you mean $f^{(n)}$, the $n$-th derivative of $f$). G[x]^(n-1) raises G[x] to the n-1 power.

However, you wrote G[x]^{n-1}; in Mathematica, curly braces ({}) are used to define lists, not to group like in $\TeX$. Since Power threads over lists, the result is {G[x]^(n-1)}, a list with a single element, G[x]^(n-1).

You want to use the derivative function D:

D[G[x], {x, n-1}]

Lastly, you'll need to define G before using it, so that Mathematica knows what you're talking about. The command

G[x_] := 1 - a Exp[-b] + b Log[b]

defines G as your original expression. Note that you'll want to modify it to depend on x for the convolution to make sense!

  • Sorry for the delay and thank for all your comment. In the meantime, I have been working on the function G(x). You are right. The latest version of the G(x) function is $G(x)=1-exp(-x)+x(-a-ln(x)+Gamma[0,x]+log(x))$. I need to calculate $G^{∗n}(x)$ where $$G^{*n}(x) = \underbrace{G(x)*G(x)*G(x)* \cdots*G(x)*G(x)}_n,\quad $$ Is it possible in mathametica? – jenny Feb 25 '15 at 7:23

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.