New answers tagged

2

If you change the variables: y1=x1+x2; y2=x2 you get to another expression: where all the integration limits are +/- infinities. The first integral is just equal to infinity, while the second is Integrate[Exp[-(y1 - 2 b)^2/(4 a)], {y1, -\[Infinity], \[Infinity]}, Assumptions -> {a > 0, b > 0}] (* 2 Sqrt[a] Sqrt[\[Pi]] *) I hope this ...


5

What about computing a general $t$-bound integral: expr = Integrate[Exp[-2 ((x + y)/2 - b)^2/(2*a)], {x, -t, t}, {y, -t, t}]; And then expanding in series around $t=\infty$: Series[expr, {t, Infinity, 3}] // Normal // PowerExpand // FullSimplify $\frac{a^2 \left(e^{-\frac{(b-t)^2}{a}}+e^{-\frac{(b+t)^2}{a}}\right)}{t^2}-4 a e^{-\frac{b^2}{a}}-4 ...


0

This may be of some use to you: HornerForm[-1 - x + 3 x^3 - x^4 + x^5 - 3 x^6 + 2 x^7 + x^9] -1 + x (-1 + x^2 (3 + x (-1 + x (1 + x (-3 + x (2 + x^2))))))


6

The solution is a straightforward application of Integrate. Integrate[Exp[-((x - x0)^2 + (y - y0)^2)/(2 c) - I (kx x + ky y)], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, Assumptions -> c > 0] (* 2 c E^(-(1/2) c (kx^2 + ky^2) - I (kx x0 + ky y0)) π *)


0

In the documentation of KroneckerDelta says: Use in sums to pick out elements: Sum[KroneckerDelta[a, 3] f[a], {a, Infinity}] (*f[3]*) Just do the sum in l with {l,Infinity} Assuming[m > 1 && m \[Element] Integers, Sum[ KroneckerDelta[l, m] f[m], {l, Infinity}]] (* f[m] *) f is your other sums.


2

Starting in version 10 you can use Inactivate and Activate. w = Inactivate[D[f[x, y], {x, 2}], D] wh = w /. f[x, y] -> x^2 h[x, y] Activate@wh Hope this helps.


4

A standard way to do this is to Hold it, and Release when needed: r = Hold[D[f[x, y], {x, 2}]] Release[r] Release[r /. f[x, y] -> x h[x, y]] Compare the above to D[x h[x, y], {x, 2}] it is the same.


3

Some of these could be implemented differently, of course, but I've gone the way of making all of them pure functions (in the Mathematica sense). Every single one takes a Sequence of arguments as the inputs, but some of them accept function names as inputs first, and the projection function accepts an integer for which argument is chosen (I have chosen to ...


3

I'm a little bit late to this party, but I had written this function for another question that turned out not to need it, so I'll put this here. My strategy is to straightforwardly calculate the integral via $$ \begin{align} \int f(\vec x) &\, \exp\left( - \frac 1 2 \sum_{i,j=1}^{n}A_{ij} x_i x_j \right) d^nx = \\ & \sqrt{(2\pi)^n\over \det A} \, ...


6

Since Mathematica 10, there is the TypeSystem` Context, that is nearly what you might be looking for. It is just a wrapper around patterns. TypeSystem`ConformsQ[ {1, 2, 3}, TypeSystem`Vector[TypeSystem`IntegerT, 3] ] (* --> True *) It is the thing being used internally by Dataset-related functions. (Maybe one should say something like Dataset[{}] ...


2

As suggested already in the comments it is easier to work in a concrete basis e.g. as follows: x = {1, 0} ; y = {0, 1}; bv[a_, b_] := Flatten[KroneckerProduct[a, b]]; Then you can calculate your particular examples easily: (a*bv[x, x] + c bv[y, x]).(b bv[x, y]) (* 0 *) (a*bv[x, x] + c bv[x, y]).(b bv[x, x]) (* a*b *) Using the symbolic tensors in ...



Top 50 recent answers are included