Questions tagged [operators]
Questions about using or composing operators--functional mappings from one state or vector space to another.
262
questions
3
votes
3
answers
240
views
Apply central difference formula to a variable twice
I am working with finite difference methods analytically and I would like to be able to perform operations on subscripted variables.
I would like to generate the following expression by applying a ...
4
votes
3
answers
264
views
How can I construct a determinant-type differential operator?
How can I construct a determinant-type differential operator, where the multiplication of elements in the determinant represents the composition of multiple differential operators?
\begin{align*}
\...
0
votes
1
answer
40
views
Nested RowBox in MakeExpression reports error when I define my own curl operator, but the single RowBox in MakeExpression works well
I want to define my own vector notation so that the input \[Del] \[Cross] a outputs curl[a] while the ...
1
vote
1
answer
89
views
Doing algebra with differential operators
I'm doing some work on stochastic processes, where I use random functions which are defined by their properties over averages, i.e $$\langle f(t) \rangle =0 \\ \langle f(t) f(t')\rangle = \alpha(x,y) ...
0
votes
1
answer
83
views
Could Mathematica analytically work with operators (such as $\nabla$) and vectors?
I have the following expression: $$(\nabla+\vec{P})^2$$
where $P=(r\cos\theta sin\phi,r^4\sin\theta,r\cos^3\phi)$
I would like to open the brackets and simplify the expression.
Are there in ...
1
vote
3
answers
115
views
Is it possible to prevent two functions from commuting?
I have an expression of the following type:
x f[a] g[b]
where x is a number but f[a] and <...
7
votes
7
answers
2k
views
Can I use == to compare two list element wise?
I have the following lists Y and EY with actual and estimated outcomes.
...
2
votes
1
answer
102
views
How to define an operator like ⊕?
For example, I define the circle plus as
a_\[CirclePlus]b_ := a + b^2;
a__\[CirclePlus]b_ := (a[[1 ;;-2]]\[CirclePlus]a[[-1]])\[CirclePlus]b;
But when I try
...
1
vote
1
answer
47
views
How can I define an operator and plot its iterates?
I am trying to define a function (an operator) that "integrates then translates" a function. More specifically, for an input f[x], I want to integrate it as \int_0^x f[t] dt, then translate ...
1
vote
0
answers
215
views
How to define momentum operator for use with creation and annihilation operators in quantum mechanics
I am having trouble writing the momentum operator in the differential form to complete a piece of code shown here so that I can show a commutator [P,Q] = I .
Here is what I have done so far, and I ...
1
vote
2
answers
137
views
Replace with non-commutative product
I'm trying to evaluate some scattering amplitudes terms in Mathematica using the spinor helicity formalism. For that, I need to turn products like $\epsilon_i\cdot k_j$ into spinor product which can ...
11
votes
2
answers
206
views
How to make a function with two patterns listable?
Suppose that I have a function that has two patterns:
disksConstantRadius[radius_][points_] := Disk[#, radius] & /@ points
(noting that this would be better---...
1
vote
0
answers
87
views
How to define a vector operator?
I know how to define a single-variable differential operator like
Clear[Op]
Op[x_] := a D[#, {x, 1}] &
and I can do operations like
...
7
votes
1
answer
276
views
What does the operation Map[({...}=#;{...})&, ] do?
With reference to the answer by @Bill to the question posted here, I am trying to understand the following three lines
...
2
votes
1
answer
293
views
What's wrong with or? [closed]
Consider
Clear[x];
x = 2;
x < 2.9 || x > 3.1
This yields
True
So, everything is o. k. (interesting)
But when you replace ...
1
vote
1
answer
97
views
How do I make an operator that acts on a function with the function's argument explicitly given?
I am trying to make a finite difference operator such that it would behave similar to the partial derivative $\partial_{x}f[x]$.
$\delta_n[f[n],m] := \frac{f[n+m]-f[n]}{m}\ .$
I couldn't find a way to ...
1
vote
1
answer
58
views
Using Through function with vectors
I have the vectors defined as follows:
v1={x1,y1,z1};
v2={x2,y2,z2};
v12=v2-v1;
v21=v1-v2;
I am passing an integer function for iteration purpose as follows:
...
2
votes
1
answer
124
views
How to give a property to a list of functions?
For example, I have defined a bunch of binary functions Sum1, Sum2, Prod1, ...
2
votes
1
answer
82
views
Visualizing order of operations
TreeForm[HoldForm[ (9-2^2+10 8)/9]]
produces this:
Is there a way to use Divide instead of ...
2
votes
2
answers
99
views
Product of different differential operators
I need to define a multivariable differential equation of the type
$$
\mathcal{D}=\Theta_1^2-z_1(-\Theta_1+\Theta_2+\Theta_3+\Theta_4)(1+\Theta_1+\Theta_2+\Theta_3+\Theta_4)\\
\;\;\;\;\;\;\;\;\;\;\;\;\...
0
votes
1
answer
30
views
Confusing abnormalities observed when counting a specific operator in an expression [duplicate]
Recently I have met with some confusing abnormalities when trying to determine if there is a specific operator (usually Plus[] ) in an expression by programming. ...
2
votes
1
answer
84
views
How to convert an expression of several variables into an operator
Given the expression
How can I define the following operator like
g[u_, v_] := eq1
The correct definition is
3
votes
2
answers
161
views
How to subtract a list from certain sublists of a list? [closed]
I have a problem in doing an operation on this vector
{{2,3},{3,4},{5,6}}-{1,1}
I want to minus this to get the result
...
0
votes
1
answer
132
views
Second order differential operator in Mathematica
I am trying to write the code for the following expression in Mathematica:
$$\partial_{x} e^{-g x}=-g e^{-g x}+e^{-g x} \partial_{x}\,.$$
I was able to do so with the help of the following links with ...
0
votes
0
answers
54
views
How to write the expression for first order differential operator in Mathematica?
How to write the expression for first order differential operator in Mathematica?
What I mean to say that I want to evaluate
$$\frac{\partial}{\partial x}f(x)=f'(x)+f(x)\frac{\partial}{\partial x}.$$
...
3
votes
1
answer
92
views
Define an operator for long equations
I'm trying to workout a long expression with derivations, the thing is I can't seem to transfer this problem to code.
What I need is a operator $D = l^\mu \frac{\partial}{\partial x^\mu} $ where $l^\...
7
votes
1
answer
460
views
What operator is this?
I was looking at some sample code in a YouTube video and saw an "operator" (not sure this is the right term) consisting of a horizontal bar with circles on the ends. I searched through the ...
0
votes
2
answers
68
views
How to define specify parameter functions of a Sturm-Liouville operator & plot its effect on specific functions?
I have a Sturm-Liouville operator:
$$\mathcal{Ly(x)}=-\frac{\mathrm{d}}{\mathrm{d}x}\left(p(x)\frac{\mathrm{d}}{\mathrm{d}x}y(x)\right)-q(x)y(x)$$
but I do not yet know the parameter functions $p(x)$ ...
0
votes
0
answers
60
views
Is there a concise way to generate a continuous less-than relationship?
Actually, I have a ton of variables, Let me simplify it to 4 in this post.
vars = {a, b, c, d};
0 < Less @@ vars < 10
0 < (a < b < c < d) < ...
0
votes
2
answers
120
views
How can I remove the attributes "Orderless" from function Times stably and reliably?
Recently I have been doing some algebra of partitioned matrices, where product like below is common:
where $A_{11}, A_{12}, X, Y$ are all partitioned matrix blocks thus all are matrices in essence.
...
3
votes
1
answer
90
views
A possible issue in combination of the Infix operator ~ with Sequence [closed]
There are other similar questions on this site about using the Infix operator for more than two arguments, which I have read. But there is one thing that I wasn't able to understand and couldn't ...
1
vote
0
answers
111
views
Use self-defined operator symbol simplify formula
Mathematica is very useful and powerful in symbol compute, but some output isn’t concise if we didn’t simplify.
Can i predefined some operator? eg. Lie bracket. Here is a minimum example.
Suppose ...
0
votes
1
answer
56
views
Defining Numerical Integral Functional [closed]
In some sense the question is a combination of defining an operator and defining numerical integration with parameters. For example, I want to define $I[f] = \int_0^1 f(x)dx$. and tried
...
1
vote
2
answers
64
views
System of rules transformingn a multivariate polynomial onto corresponding partial derivative operator
I take a complex multivariate polynomial, and I want to transform it into the corresponding differential operator. I.e., I am looking for the set of rules transforming variables to derivation, ...
1
vote
1
answer
546
views
Simplifying quantum operators (ladder operators with multiple modes)
Similar to this question, I am interested in working with an implementation of quantum ladder operators.
I've been trying to use this "Quantum Mathematica Package" to solve some lengthy ...
3
votes
0
answers
191
views
Commutator of QFT Operators $[\hat{a}_p, \hat{a}^\dagger_k]$ and 4-Momentum Integrals
I just recently started looking into CAS (i.e. i have very little experience in Mathematica), specifically for doing basic calculations in Quantum Field Theory.
For that i would like to define $\hat{a}...
0
votes
2
answers
165
views
How to create an operator which is a composition of a sequence of operators?
Suppose I have a sequence of operators $\partial_x$, $\partial_x^2$,..., $\partial_x^n$. I want to define an operator which is a composition of these $D_x^{(n)}=\partial_x\circ\partial_x^2\circ\cdot\...
7
votes
1
answer
175
views
Applying Operators inside complex expressions to argument with Through
I am developing some functions to help me work with Quantum Mechanics Momentum Operators. Here, for simplicity, I represent them with these simple functions because the actions of the operators ...
1
vote
2
answers
160
views
How to make a change of variable $y=x^2$ in the differential operator $\frac{d^2}{d y^2}$?
I have this differential operator
$$\frac{d^2}{d y^2}\qquad (1)$$
I want to make a change of variable $y=x^2$ in $(1)$ so that I get this differential operator
$$ \frac{1}{4 x^2} \frac{d^2 }{d x^...
0
votes
1
answer
59
views
Evaluating a scalar product of a vector and a differential operator vector
I created a scalar product of a vector $\in \mathbb{R}^2$ and of a vector consisting of a differential operators
...
2
votes
4
answers
334
views
Coordinate transformation can this be done with AffineTransform?
Looking for alternatives or improvements for accomplishing the following:
Given the position of points A, B, and C in both the x-y and u-v planes, determine transformation functions to map values ...
1
vote
0
answers
47
views
Performing operator expression on a function
What I want. I write an operator expression, and Mathematica performs it on a function.
Examples:
E^(b D): f[x] -> f[x+b]
...
5
votes
2
answers
399
views
Dealing with infinite matrices in Mathematica?
Is there a mechanism of dealing with infinite matrices in Mathematica, and in particular, with linear operators, corresponding to those matrices?
For instance, automatic simplification of operator ...
1
vote
0
answers
80
views
Whole 2 line code, producing a bug (infix operator)
Copy the following code, and create new 0 byte file, and paste the code and save it to TEST.nb
...
1
vote
1
answer
25
views
Generating composed operators using Table
Given an operator with two argumentsf[#1,#2]& and some positive (evaluated) integer n, I want to generate the operator ...
1
vote
0
answers
83
views
Composition of functions and operator forms of built-in functions
I am trying to replicate the behaviour of some of the built-in operator forms (for Map, Apply etc) but struggling to understand ...
1
vote
0
answers
57
views
Differential operator in Mathematica
I am fairly new to Mathematica and I wanted to know if I can define the following operator
$E:=(x^2\sqrt{1-K(x^2+y^2+z^2}+y^2+z^2)\gamma^{1}\partial_{1}+(y^2\sqrt{1-K(x^2+y^2+z^2}+x^2+z^2)\gamma^{2}\...
0
votes
0
answers
86
views
How to implement this operator in Mathematica?
I am interested to implement this operator:
$$(\ln D)[f] =\left(\frac{i \pi}{2}-\gamma\right) f(x)+\frac{1}{2}\,\text{P.V.}\int_{-\infty}^\infty \left(\frac{1}{x-x'}-\frac{1}{| x-x'| }\right)\,f(x')\,...
0
votes
0
answers
69
views
Can I apply functions to infinite matrices or linear operators in Mathematica?
I do not know how can I apply functions to infinite matrices or linear operators.
For instance, having the derivative operator, what is its sine?
For instance, for finite derivative operator we have
$$...
5
votes
1
answer
324
views
How can I direct sum matrices into the middle of one another another?
I would like to execute the mathematical operation of the direct sum of matrices in the case where the matrices are not appended one after the other along the diagonal, but instead mixed among one ...