Linked Questions

4 votes
4 answers
864 views

I have a function which is defined by the following recurrence relation $$h_{n}(x)=h_{n-1}(x)+\frac{\mathrm{e}^{-x^2}}{2^n n!}H_{n}(x)H_{n-1}(x)$$ with the initial condition $h_{0}(x)=0$ and where the ...
Yasar's user avatar
  • 41
0 votes
0 answers
67 views

I am using the following recursion in Mathematica to compute W[n, 1, s] for given n and s: ...
Submartingale's user avatar
0 votes
0 answers
29 views

Here is an artificial example to explain what I am up to. Define ClearAll[f] f[x_, y_] := f[x, y] = If[x == 0, g[y], g[f[x - 1, y]]] Then ...
მამუკა ჯიბლაძე's user avatar
186 votes
5 answers
20k views

What performance tuning tricks do you use to make a Mathematica application faster? MATLAB has an amazing profiler, but from what I can tell, Mathematica has no similar functionality.
John's user avatar
  • 2,663
140 votes
8 answers
9k views

... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...
Verbeia's user avatar
  • 34.5k
22 votes
3 answers
5k views

I am confused by why Mathematica uses [[3]] to get the 3rd element, or [[i,j] to get the i,j-th element of a 2D array. This ...
user avatar
9 votes
4 answers
5k views

Picard's Iteration is a way of solving the IVP $$y'(x)=f(x,y(x)), \quad y(x_0)=y_0 $$ It consists of defining the following sequence of functions recursively: $$y_0(x):=y_0 \\ y_{n}(x):=y_0+\int_{...
user1337's user avatar
  • 1,088
6 votes
3 answers
2k views

I am trying to do multiple integrations recursively. For instance, I would like to do the following equation for arbitrary integer $n$: $\displaystyle R_n(t) = \int_0^t \mathrm dt' R_0(t-t') R_{n-1}(...
BeauGeste's user avatar
  • 2,907
8 votes
2 answers
2k views

I'm writing this fairly simple function: ...
Audrey's user avatar
  • 81
7 votes
2 answers
4k views

Let $f_{0}(x):[0,1]\to[0,1]$ be defined by $$f_{0}(x):=\begin{cases} 3x, & \text{if } x\in [0,\frac{1}{3}] \\ \\ -3x+2, & \text{if } x\in (\frac{1}{3}, \frac{2}{3}] \\ \\ 3x+2, & \...
Paulo H's user avatar
  • 181
13 votes
2 answers
1k views

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
freddieknets's user avatar
  • 1,095
7 votes
4 answers
642 views

How is this recursive formula $$ f_{n+1}(z) = \int_0^1 f_{n}(z-y)\,{\rm d}y $$ implemented in Mathematica? The base case is $$ f_1(z) = \begin{cases} 1 & 0\leq z\leq 1 \\ 0 & \text{...
martin's user avatar
  • 8,858
7 votes
2 answers
577 views

Define the Airy zeta function for $n=2,3,\dots$, by $$ Z(n) := \sum_r \frac{1}{r^n}. $$ where the sum is over the zeros $r$ of the Airy function $\operatorname{Ai}$. In Mathematica the $\operatorname{...
user153012's user avatar
4 votes
3 answers
599 views

How to generate this type of sequence? $$ f(n, x) = x f'(n-1, x) \hspace{2 mm}, f(0, x) = e^x$$ How do I evaluate it for numerical values for $x = 1$ or any number?
S L's user avatar
  • 741
9 votes
1 answer
1k views

My question is related to computing what is called "invariant measure" for a particular well known fractal - the Sierpinski triangle. We have an array m of four two by two matrices, say ...
arkajad's user avatar
  • 591

15 30 50 per page