Tag Info

New answers tagged

0

You guessed right that one problem in your code is the missing definition of V. In the snippet you posted above, you defined a function V[X_, Y_, Z_, Len_, Br_, Dep_]. Later, you try to call it by writing D[V, x]. This does not work, because Mathematica distinguishes between V and V[X_, Y_, Z_, Len_, Br_, Dep_]. You can see this by looking into the down ...


1

Assuming $G=\rho=1$, move the gradient operator into the integral: $$ \begin{align} - \mathbf{g} = \nabla V(X,Y,Z) &= \nabla \int_{-D}^{D} \int_{-B}^{B} \int_{-L}^{L} \frac{{dx}'{dy}'{dz}'}{\sqrt{(X-{x}')^2+(Y-{y}')^2+(Z-{z}')^2)}} \\ &= \int_{-D}^{D} \int_{-B}^{B} \int_{-L}^{L} \nabla ...


4

Let's try to simplify your question. I don't have the definitions for c1, j and v, so I'll just use: K2[s_] := s^3 and h[s_] := D[D[K2[s], s], s] (you could also write D[k2[s], {s, 2}], to get the second derivative, but that's probably a matter of taste.) Now if you evaluate: h[2.] you get the strange result: D[D[8., 2.], 2.] and the error ...


7

There are different ways to do this. The easiest, I think, is to use DerivativeFilter: data = Table[Sin[x]*Cos[y], {x, 0, 2 Pi, 0.2}, {y, 0, 2 Pi, 0.2}]; gradFilter[data_] := Module[{n = ArrayDepth[data]}, MapThread[List, Table[DerivativeFilter[data, UnitVector[n, i]], {i, n}], n]] ListVectorPlot[gradFilter[data]] I made this independent of ...


3

I think this is what you're seeking: $\int _0^{60}\int _0^{60}\int _0^{60}\int _0^{60}\left(-1+\sqrt{2 \sqrt{(\text{ax}-\text{bx})^2+(\text{ay}-\text{by})^2}+1}\right) d\text{by}\ d\text{bx}\ d\text{ay}\ d\text{ax}$ NIntegrate[ -1 + Sqrt[2 Sqrt[(ax - bx)^2 + (ay - by)^2] + 1], {ax, 0, 60}, {ay, 0, 60}, {bx, 0, 60}, {by, 0, 60}] // Quiet (* ...



Top 50 recent answers are included