All Questions
54 questions
0
votes
3
answers
69
views
Getting symbolic sum from a[k]
My Goal is to get summation from definition a[k] as below. I tried simple arithmetic progression 1,2,3,4,5.. . Although the function Sum returns symbolic result nicely, but my code doesn't. How to fix ...
0
votes
0
answers
58
views
Return[] in Recursive Functions [duplicate]
Here is the pseudocode I am using to demonstrate the problem.
...
1
vote
1
answer
59
views
Strange errors of exceeding RecursionLimit in a function with two arguments, one set delayed and one fixed
INTRODUCTION
Hi. I feel a bit embarrased asking this question as the answer may be staring me in the face and there are at least two other stackexchange articles related to it.
MINIMAL WORKING EXAMPLE
...
4
votes
1
answer
109
views
RSolve for system of equations and matrix power [closed]
I have a matrix
a = {{3, -2}, {2, -2}};
We can easily find the n-th power, $A^n$ using
MatrixPower[a,n]
We can also find the ...
3
votes
1
answer
174
views
How is this type of piecewise function represented and calculated? [closed]
How is this type of piecewise function as follows in the picture represented and calculated?
Use:
...
1
vote
2
answers
142
views
Simulating the card game War with $m$ suits and $n$ values
I am trying to simulate the card game War to find approximations to the stopping time distribution for different types of decks, and study conditional probabilities of winning given a certain deck. (...
3
votes
2
answers
182
views
Recursive function with subscript
I am trying to define a recursive function with a subscript. Something similar would be $f_{n+1}(x) = \int 3 x f_{n}(x)dx$. I've tried lists, For function, ...
4
votes
2
answers
479
views
Recursive function in Mathematica
I need to implement the following recursive function in Mathematica.
$$F[-2*a,b,2b;2]=\left(\frac{a-1/2}{a-1/2+b}\right)F\left[-2*(a-1),b,2b;2\right]$$
The conditions of the functions are:
if $a=0$, ...
0
votes
0
answers
89
views
How to do this recursion relation in Mathematica effectively?
I have a function $h_{\Delta,l}(r,\eta)$ satisfying
\begin{equation}
h_{\Delta,l}(r,\eta)=\tilde{h}_{l}(r,\eta)+\sum_{k}\frac{c(k)}{\Delta-(1-l-k)}r^{k}h_{1-l+k,l+k}(r,\eta)
\end{equation}
where $k$ ...
0
votes
1
answer
51
views
Recursive error encountered when updating rules of assignment [closed]
I'm working on a problem which requires associating a single (complex) number with a pair of binary vectors. I'm doing this by creating a set of assignments through a function I call ...
0
votes
0
answers
104
views
Function for probability distribution approximation of a compound random variable
In the book (Klugman et al, 2019) on can see the
Example 9.12. The number of claims has a Poisson–ETNB distribution with
Poisson parameter 𝜆 = 2 and ETNB parameters 𝛽 = 3 and 𝑟 = 0.2. The
claim ...
3
votes
1
answer
120
views
How do we implement this two-valued recursive function using FunctionCompile?
I have the following recursive function that involves DivisorSigma:
...
2
votes
2
answers
259
views
Defining a function recursively
I want to construct polynomials (or just function) $f_n$ from $f_{n-1}$ using mathematica. For some kind of reason, I didn't manage to do this. So basically something like a recurrence table, but for ...
0
votes
0
answers
53
views
Silly trouble expressing recursive formulas?
I am trying to code the following formulas:
I did it in the following way:
...
0
votes
1
answer
78
views
Basics for recursive functions [duplicate]
I am new to Mathematica and try to define a simple recursive formula which is illustrated as below:
...