Linked Questions

2
votes
1answer
54 views

Functions that remember some arguments while not remembering other arguments

I would like to some programming that is very generic. Particularly I am interested in the following: Let's say I want to write a function ...
0
votes
1answer
61 views

Memoization (or otherwise) for a recurrent definition of a (double) sequence of functions

Beside I've found answers to similar questions (e.g. this), I can't adapt them to my case. I am interested in the following sequence of functions $p_{m,n}(t)$, where $m$ and $n$ are integer: $$ \...
0
votes
1answer
76 views

Create recursive sequence of functions with memoization

I am trying to create a sequence of functions and have it properly memoize the results. The recursive operation is simply convolution, so it possible there is a better way to do this (obviously, if I ...
3
votes
1answer
209 views

Recursion with substitution mathematica

When writing out some mathematical equation like we see on the picture here I got the problem of writing out all terms. I know what recursion means and have done recursion for example for the ...
0
votes
0answers
75 views

Dummy variable in nested integral operator

I am trying to make a nested integral operator where the output function of one step must be applied to the dummy variable to be integrated in the next step. Here my code: ...
0
votes
1answer
108 views

Nested integration

I wish to perform the following nested integral: \begin{align} I_n=\int_{-\infty}^\infty dx_n~f(x_n,x_{n+1})\int_{-\infty}^\infty dx_{n-1}~f(x_{n-1},x_n)...\int_{-\infty}^\infty dx_1~f(x_1,x_2)\int_{-\...
0
votes
2answers
215 views

Super recursive function

I have read about how to define a recursive function using RecurrenceTable but for $u(100)$ you need all 99 previous terms. The posts doesn't help me. I want to ...
4
votes
4answers
481 views

Memoization of a function defined by a recurrence relation [duplicate]

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 ...
0
votes
0answers
70 views

Reuse symbolic polynomial

Suppose I have a function that returns a polynomial in x, GetPoly[params_,x_]:=GetPoly[params,x]... but it is quite slow, so ...
7
votes
4answers
401 views

Recursive piecewise integral relation with piecewise base case?

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{...
6
votes
2answers
371 views

How to implement a numerically efficient Airy Zeta Function

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{...
9
votes
4answers
3k views

Implementing Picard's Iteration for solving ODEs

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_{...
1
vote
2answers
232 views

Function to Represent Recursive Integral

I'd like to represent the following recursive integral equation to evaluate/graph (for $n\leq3$): $$K_{i,n}\left(x\right)=\int_{x}^{\infty}K_{i,n-1}\left(y\right)dy$$ where $$K_{i,0}\left(x\right)=...
9
votes
2answers
262 views

using memoization with conditional statement

I would like some advice about the use of memoization in conjunction with conditional statements. Let me try to explain my problem: I am constructing a function depending on a number of parameters. ...
2
votes
1answer
149 views

Numerical evaluation of ChebyshevT

When I evaluate the following Chebyshev series of the first kind in two different ways, I get two very different results: ...

15 30 50 per page