I am starting to use Mathematica and I would like to compute
\nabla F*\phi(x),\;x\in\mathbb{R^2}
where F(x)=\ln\|x\| and \phi(x)=\chi_{B(0,2)}(x).
I am a new user of this software, so I don’t know advanced commands yet. The code that I have used is:
F[x_, y_] = 1/2*Log[x^2 + y^2];
g[x_, y_] = Piecewise[{{1, x^2 + y^2 <= r}, {0, True}}]
C[z1_, z2_] = Convolve[Grad[F[x, y], {x, y}], g[x, y]
The problem is that this doesn’t return any value after two hours of computation. Could someone tell me how can I solve this?
After that I will need to compute the integral of the product of C and certain function. Concretely, I want to compute the following line integral over the border of the disk D(0,2)
\int_{C(0,2)}F*w(x)\nabla F *w(x)\cdot n(x).
The only way that I know to compute this is:
F[x_, y_] = 1/2*Log[x^2 + y^2];
g[x_, y_] = Piecewise[{{1, x^2 + y^2 <= r}, {0, True}}]
C[z1_, z2_] = Convolve[Grad[F[x, y], {x, y}], g[x, y]
C1[z1_, z2_] = Convolve[F[x, y], w[x, y], {x, y}, {z1, z2}]
NIntegrate[ C1[r*Cos[s], r*Sin[s]]* Dot[C[r*Cos[s], r*Sin[s]], {r*Cos[s], r*Sin[s]}] , {s, 0, 2*Pi}]