Questions tagged [functional]

Questions related to functional methods, e.g. functional differentiation and integration.

Filter by
Sorted by
Tagged with
2 votes
1 answer
72 views

How to reproduce Asymptotic Bounds of Recurrences in Wolframalpha

In Wolframalpha's Examples for Recurrences, there are bunch of Asymptotic Bounds of Recurrences examples, like this It can get perfect result: ...
user avatar
1 vote
1 answer
48 views

Why each iteration takes longer than previous one when using VariationalD in this loop?

I have a function $f$, and I would like to modify it iteratively to approach another one called $a$ (not because I think this is the best way to do anything, but for experimentation). For this, I use <...
user avatar
  • 137
2 votes
1 answer
87 views

How to get numerical value of functional derivative at specific point

I have a functional in the form: $$F[s(x)]=\int_0^1(s(x)-a(x))^2\mathrm{d}x$$ where $a(x)$ is a parameter function, and I would like to find the functional derivative of $F$ with respect to $s$. ...
user avatar
  • 137
0 votes
2 answers
66 views

How to declare that a function is arbitrary then specify them later? [duplicate]

I need to evaluate an expression, sum in this case, involving an arbitrary function. Below is a simplified version of what I wanted to do: ...
user avatar
0 votes
0 answers
67 views

Recursively rewrite function

Let's imagine I already have a function like myfac[0] :=1 myfac[n_ /; n>=0] := n myfac[n-1] this home grown factorial. Now I want to equip it with tracing (and ...
user avatar
0 votes
1 answer
47 views

How to compose an algorithm to create new array (based on array data), if I need a reference to an array being created, no for loop, in mathematica?

I have an array with either 1 or 0. From this, I am trying to create a new array with intervals. I have some base interval, one step, we can say 1 second here. If there is 0, I skip, if there is 1 I ...
user avatar
0 votes
1 answer
135 views

Implementing an optimization algorithm in WL

I am trying to implement the Jaya optimization algorithm (Jaya). This is a flowchart from the Author 's webpage showing the details of the Algorithm. Note that there is a typo in the equation in the ...
user avatar
0 votes
0 answers
36 views

Solving constraint optimization problem for different intervals using VariationalD

I have been trying to solve for a constraint optimization problem (which eventually yields to a Laplace distribution). Consider the following equation (1) \begin{equation*} J=\int^{\infty}_{-\infty} p(...
user avatar
7 votes
3 answers
320 views

How to Solve Functional Differential Equation

I tried to solve this equation numerically. eqnEx = x''[t] + x[2 t] == 0; NDSolve[{eqnEx, x[1] == 10, x'[1] == 0}, x[t], {t, 1, 10}] Two important character of the ...
user avatar
1 vote
2 answers
79 views

Power series expansion in terms of a function

I have a two variable function z[x,y] = f[x,y] + g[x,y], such that I know the functional form of f[x,y] but not of ...
user avatar
  • 13
4 votes
2 answers
148 views

How can I solve a functional equation with domain restrictions?

I have three properties for a function: ...
user avatar
4 votes
4 answers
671 views

How do I define functionals in Mathematica?

When I write W[f_] := Integrate[f[x], {x, 0, π}] I may rightly conclude that W[Sin] = 2, ...
user avatar
1 vote
1 answer
74 views

Is it possible to solve a PDE in NDSolve for a simple functional PDE where the dependent variable is evaluated at a point?

Is it possible to configure NDSolve to approximate solutions of a PDE where the state variable is evaluated at a point? Mathematica detects such a PDE as a delay equation, but clearly all that is ...
user avatar
0 votes
1 answer
86 views

Could not able to set up a differential equations using EulerEquations command

I have a constructed the Lagrangian of a mechanical system by finding the kinetic and potential energy of the system. Then I tried using EulerEquations to set up a differential equation by taking the ...
user avatar
  • 1,649
0 votes
1 answer
314 views

How do I compute the infinity-norm of a function? [closed]

I have a technical question on Mathematica 11. I have to compute the $\infty$ norm of q function, $f(x,y)$, on a rectangular domain $[a, b] \times [c,d]$. How can I do this with Mathematica?
user avatar
  • 33
3 votes
1 answer
1k views

Symbolic Legendre transform

Is it possible to compute symbolically the Legendre transform of a function in Mathematica? I find no LegendreTransform function.
user avatar
  • 10.7k
9 votes
1 answer
436 views

Non-trivial functional derivatives

Looking for ways to calculate functional derivatives in Mathematica, I found this question. The answer by Jens points to a documented application of DiracDelta ...
user avatar
  • 1,271
1 vote
2 answers
130 views

Define a functional and nest it with its arguments

I'm looking for a definition of a functional f which works correctly with varying arguments t while it will be nested. For ...
user avatar
1 vote
1 answer
105 views

How to call a function with an arbitrary list as its arguments inside a functional? [duplicate]

I have the following functional defined (i.e. a function of another function) where variableList contains the variable (arguments if you wish) of the ...
user avatar
  • 197
2 votes
2 answers
176 views

Select Only Positive Values and Prepend a Title

I have the following list: ...
user avatar
3 votes
1 answer
130 views

Using functionals in Mathematica [duplicate]

I recently installed Mathematica and I wanted to define a functional in it. This is what I did: ...
user avatar
  • 135
1 vote
1 answer
1k views

Using NDSolve initial conditions as parameters for a function and then a replacement rule

I am trying to make a function based on two initial conditions of a set of differential equations: ...
user avatar
0 votes
1 answer
178 views

Transpose four lists of data into two lists for use in List Plot [closed]

I have four lists of data x1 = {1,3,5,7} y1 = {0,2,4,6} x2 = {10,12,14,16} y2 = {8,10,12,14} In one line is it possible to use transpose to get two lists which ...
user avatar
  • 2,164
2 votes
0 answers
120 views

How to implement time dependence in the DoFun package?

DoFun is a very usefull mathematica package that helps to write Dyson-Schwinger and FRG flow equations when these are to complex to write down by hand. You can download it here and read it's manual ...
user avatar
0 votes
1 answer
81 views

Folding 3-variate function with 2 iterator

I have a function say $f$ and some initial point $x$ and pairs of iterators $\{\{a_1,b_1\},\{a_2,b_2\},...\}$ I want to foldlist as follows: $\{x,f[x,a_1,b_1],f[f[x,a_1,b_1],a_2,b_2],...\}$ can ...
user avatar
  • 8,105
5 votes
1 answer
107 views

Computing list elements that refer to earlier elements and two other lists without iteration

I am attempting to compute the elements of a list, $\{a_i\}$ given lists $\{b_i\}$ and $\{c_i\}$ using the following formula: $a_i = \frac{1}{c_1}(b_i - \sum_{j = 2}^{i}c_{j}a_{i-j+1})$ for $1\leq i \...
user avatar
0 votes
0 answers
534 views

Boundary value problem: complicated functionals

I am trying to solve a non-linear boundary value problem where the differential equation is a convoluted function of the variable I am trying to solve for. The equation below presents the final form ...
user avatar
1 vote
0 answers
283 views

Optimizing a functional using variational calculus

Here I am, trying to get the trajectory $(x(t),y(t))$ that will minimize the following Lagrangian (i.e. the integrand of the functional) between $(-1,-1)$ and $(-1,y_{eff})$ where $x_{eff}$ is defined ...
user avatar
1 vote
1 answer
173 views

Apply function to output of previous function

I am trying to write a function that takes 3 tuples. Each tuple contains two lists which are first divided. This results in 3 lists. Then I want to take the Mean of all the columns. I can do this ...
user avatar
  • 2,164
0 votes
1 answer
122 views

Solve equation with two different sets of replacement rules

I want to solve eqn for c0 in the following code. I want to do it with both replacement rules. I realize I could just use solve ...
user avatar
  • 2,164
2 votes
1 answer
926 views

MapThread multiple functions onto multiple lists

I'm trying to learn the functional style which seems to prevail in Mathematica. I'm having trouble accomplishing the following: Let's say I have multiple lists of arbitrary data (using two lists ...
user avatar
  • 400
2 votes
0 answers
85 views

Different delays in notebook and command-line?

I was surprised by the following sequence of expressions: Remove[foo$, bar$]; foo$ = Function[Set[bar$, 42]]; At this point, I expected ...
user avatar
  • 8,561
6 votes
1 answer
732 views

Functional programming Style & Performance

Hello i have been spending time to convert my R tools into Mathematica Packages mainly because i like the functional programming style in Mathematica. In doing so it seems that i run into one ...
user avatar
  • 161
23 votes
6 answers
4k views

Looking for a way to insert multiple elements into multiple positions simultaneously in a list

I would like to take the following data: insertValues = {r, x}; insertPositions = {{1}, {5}}; originalList = {a, b, c, d, e, f, g}; and generate output that ...
user avatar
  • 2,024