Questions tagged [vector-calculus]

Questions on dealing with vector calculus functions of Mathematica such as Grad, Div, Curl, Laplacian and their representations in various coordinate systems.

Filter by
Sorted by
Tagged with
5
votes
2answers
232 views

Explicitly construct tensor quantities with given symmetries

I am trying to use mathematica to generate explicitely a tensor. I know multiple thing about it. Let's call it $C_{\mu\nu\lambda\sigma}$. This guy has to be symmetric in the two first indices ${\mu,\...
4
votes
1answer
167 views

Summation of Kronecker deltas should give the dimension

I have a really simple problem but I don't know how to solve it. Basically, I am doing vecor manipulation and I am summing a lot of Kronecker delta here and there. How can I teach Mathematica that for ...
1
vote
1answer
69 views

Recombining vectors after taking derivatives

I want to map two expansions order by order and to solve to get unknowns coefficient. We define $X_{\mu}= \frac{(x-y)_{\mu}}{(x-y)^2}$. The quantity I need to expand in the end is $t_{\mu\nu}= \frac{...
6
votes
2answers
326 views

How do I verify a vector identity using Mathematica?

I am trying to verify well known Frenet–Serret formulas in general setting using Mathematica. I need to consider a general space curve $r(s)=(x(s),y(s),z(s))$ in $\mathbb{R}^3$ and define its unit ...
4
votes
1answer
118 views

Manipulations with tensors that keep so(3,1) symmetry manifest

I am doing some manipulations with tensors in curved background. There are, however, coordinates, where Lorentz symmetry is manifest. So, on one hand, I am dealing with particular coordinates and, on ...
3
votes
2answers
695 views

Plot a level curve and its gradient

Suppose that I have the following ellipse function, $f(x,y)=4x^2+y^2-5$. The gradient of this ellipse is calculated as $\nabla f(x,y)=[8x,2y]$. I know how to plot and join them. It is easy. I do ...
1
vote
1answer
184 views

DiracDelta convergence in 3D - Cartesian vs. spherical coordinates

Integrating DiracDelta in 3D in Cartesian coordinates works just fine i.e. gives vecf[{x, y, z}] ...
1
vote
0answers
25 views

keep variables in the correct position when TensorExpand

I would like to expand a tensor expression of 3-d vectors. However, the code runs really slow, the problem is asked here: Why is TensorExpand so slow for vector operations? However, I found that by ...
3
votes
2answers
142 views

Why is TensorExpand so slow for vector operations?

I would like to expand the following tensor expression: ...
0
votes
1answer
44 views

Integrating a vector according to elements of another vector

I have two vectors, $\bar{x},\bar{v}$ and I want to produce a third vector such that:$$ u_i = \int_{x_i}^{x_i+\delta} f(v_i,t)dt \ .$$ I tried (with a simple function for example): ...
8
votes
2answers
285 views

Confused about the solution obtained from vector linearization

I am trying to linearize a vector expression $$\frac{(\mathbf{u}+d\mathbf{u})\times(\mathbf{v}+d\mathbf{v})}{\vert(\mathbf{u}+d\mathbf{u})\times(\mathbf{v}+d\mathbf{v})\vert}$$ Here is my code ...
2
votes
1answer
129 views

How to take the curl of a vector function involving hypergeometric functions?

I have a vector function involving a hypergeometric function as its inner constituent. I need to take the curl of this vector and when I do, Mathematica prompts this array of errors: ...
1
vote
0answers
43 views

Del as a Differential Operator: (Matrix times Del) cross vector [duplicate]

I tried to reply to this answer, but don't have enough reputation points yet. Basically the poster constructed Del (i.e. $\nabla = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \...
3
votes
2answers
258 views

How to solve equations combined with vector variables with unknown length

I want to solve the following equaitions combined with vector variables and scalar variables. How can I use it in MMA? \begin{aligned} \mathbf{x}+w\mathbf{a}-\mathbf{v}&=0\\ \mathbf{v}&\ge 0\\...
0
votes
0answers
44 views

How do you treat gradient as a vector? [duplicate]

I need to express $\nabla = (\partial_x,\partial_y,\partial_z)$ as a vector, so that I can compute the differential operator given by $A\cdot\nabla$ (where here $A$ is a 3x3 matrix) using Mathematica. ...
5
votes
1answer
115 views

Is there a way to add my own coordinate chart?

You all may have seen something like this: U = Laplacian[Phi, {r, theta, phi}, "Spherical"] What I want is to add my own Chart with its own coordinates, metric ...
9
votes
0answers
259 views

matrix calculus with types (similar to matrixcalculus.org) [duplicate]

Is it possible to do matrix calculus in Mathematica, like in http://www.matrixcalculus.org/ ? One of the main limitations I've found in Mathematica is that symbols are assumed to be scalars by ...
1
vote
1answer
122 views

How to program Mathematica to do the differential operator calculation

I want to create a surface Laplacian under the spheroidal coordinates, Now, I already have the surface gradient defined, but I don't know how to find the Laplacian. Since the surface gradient is too ...
0
votes
1answer
128 views

Plot the curve into the xz plane with time interval

At time t ≥ 0, a new laser rocket is at the position: ...
1
vote
1answer
92 views

Plotting cross-sections of $z=4x^2+y^2$ parallel to the $yz$-plane

I want to plot the cross-sections of $z=4x^2+y^2$ parallel to the $yz$-plane. I have tried the below code ...
0
votes
1answer
898 views

How to plot circle, with it centered at a point in 3D in a plane of xyz equation? [duplicate]

I can figure out how to plot this for calc 3. Question: a) Plot the circle of radius 3 centered at the point $\{-1, 1, 1\}$ in the plane whose xyz-equation is $2(x + 1) + 3(y - 1) + (z - 1) = 0$. ...
2
votes
1answer
158 views

Passing a function into another function defined with Module and using it there

I'm trying to write a generic module that will take a vector-valued function of a space curve and show the animation of a unit tangent vector traversing the curve. I found a really nice example from ...
3
votes
1answer
95 views

How to get a list of 3D coordinates using point and rotation

I have one point: p1={82,80,0} I want to rotate it around the Y axis. The start time is 0 seconds ($0s$) and the end time is 5 seconds ($5s$). ...
3
votes
1answer
2k views

How does one plot a three-dimensional electric field in spherical coordinates?

I have the following three-dimensional electric field: e[r_, θ_, ϕ_, t_] := (Sin[θ]/r)*(Cos[r - t] - Sin[r - t]/r)*{0, 0, 1} where the {0,0,1} vector is the unit ...
2
votes
2answers
773 views

Does Mathematica 11 have spherical coordinate unit vectors?

I have a spherical vector wave for an electric field: e[r_, θ_, ϕ_, t_] := (Sin[θ]/r) [Cos[r - t] - Sin[r - t]/r] which points in the ϕ direction. In mathematics,...
1
vote
2answers
83 views

Create matrix from combinational arrangement of vectors

I am just trying to produce a short hand code which shall do the following: I have a function of 2 vectors $f(\vec{v_1},\vec{v_2})$ f=#1^2+#2^2-#3-#4&; and ...
0
votes
1answer
51 views

How to solve for points in a region of a plane? [closed]

I have three points in 3D Cartesian space: A = {-0.154, -0.246, -0.439}; B ={-0.0055, -0.3945, -0.3895}; C= {-0.154, -0.444, -0.241}; that all lie on the ...
1
vote
0answers
440 views

numerical gradient of an array

I have 2D arrays of numeric data and I would like to calculate the vector gradient of these arrays. I would like to achieve something like the 'gradient' function of MatLab: https://www.mathworks....
3
votes
2answers
144 views

Symbolic representation of vector function

I want to symbolically represent a function $p: \mathbb R^n \to \mathbb R^n$, where the eventual goal is to compute an exact partial derivative. The function in question is given by $$ p_i(z) = \...
1
vote
3answers
63 views

Unexpected behavior when using Cross

I'm trying to calculate the equation of the plane that is formed from the position of the Earth, Moon and Sun using precise coordinates from NASA's SPICE toolkit. I found this extremely clear ...
6
votes
3answers
568 views

Finding surface normal for 3D region at a specific point

I would like to find the surface normal for a point on a 3D filled shape in Mathematica. I know how to calculate the normal of a parametric surface using the cross product but this method will not ...
9
votes
3answers
750 views

Creating random configurations of spherocylinders or cylinders

About the setting: We have a 3D simulation box with side $l$ and our catesian coordinate system is set with its origin at the centre of the box. We have a number $N$ of spherocylinders of aspect ...
2
votes
2answers
309 views

How can I do integration with the Green theorem?

I have an integral $$\int_C xy^2dx-4x\sin y\,dy$$ where $C$ bounded with some constrains, for instance inside $x^2+y^2=1$ and below $y=x^2$. I can integrate of one variable and also with some ...
2
votes
2answers
340 views

Trying to define the Lie bracket of two vector fields

I am trying to define in the simplest possible way (only one coordinate system, no checking that variables are vectors, etc.) the Lie bracket of two vector fields in 3-space. What is wrong with the ...
6
votes
1answer
411 views

Why $u\cdot \operatorname{grad}(u)$ is not equal to $\operatorname{div}(u u)$?

The Navier-Stokes equation contains term $\vec{u} \cdot \nabla \vec{u}$ which should be equal to $\nabla \cdot \left(\vec{u}\vec{u} \right)$ provided $\nabla \cdot \vec{u}=0$. However this ...
1
vote
1answer
270 views

Vector analysis in curvilinear coordinates

It is known that vector calculus in 3D takes quite a simple form when one uses orthonormal curvilinear coordinates (check out, for example, here, in section "Differentiation"). Is there any ...
3
votes
1answer
826 views

How to plot a vector field on a circle?

I have two vector fields (electric fields) for inside and outside an sphere of radius $R$ (lets suppose $R=1$), expressed as: ...
0
votes
1answer
196 views

Visualizing combined Vectors

I'm trying to visualize a cross-section of a finite continuous solenoid's B-Field (cylindrical coordinate equations from Wikipedia). I believe I have calculated the radial and z-axis fields, but I'm ...
1
vote
1answer
488 views

Plotting vector field in cylindrical co-ordinates

I am trying to plot the following. Let $\Gamma^\top \Gamma=1$, and $e_3=\{0,0,1\}$ (unit vector along Z-axis). I am trying to plot $\dot \Gamma=e_3\times \Gamma$. Tried the following: $\Gamma =\{\...
0
votes
0answers
217 views

Integrating over a sphere

We are trying to integrate a vector function over a sphere. To do this we changed it to spherical coordinates and then tried to integrate it. Unfortunately we get the error message shown on the image ...
0
votes
1answer
197 views

NIntegrate integrand evaluating to non-numerical values [closed]

I am having trouble with the NIntegrate at the bottom. I've tried using NumericQ in different ways but keep getting an error ...
0
votes
2answers
111 views

How should I interpret the results I'm getting from Grad? [closed]

When I type the following in Mathematica: $Assumptions = (a | b | c | d) ∈ Vectors[3, Reals]; Grad[(b - a)\[Cross](d - c), {a}] I obtain: ...
0
votes
1answer
107 views

How to compute the derivative of the magnitude of a vector? [duplicate]

Mathematically we can say the following $$ \frac{d}{d\vec{x}}\frac{1}{|\vec{x}|} = -\frac{\vec{x}}{|\vec{x}|^3}.$$ However, in Mathematica, I perform the following ...
3
votes
1answer
341 views

SphericalPlot3D of an OblateSpheroid via coordinate transformation

This is an effort to reproduce an ellipse and a hyperbola of revolution from OblateSpheroidal coordinates with constant $\eta$ and $\theta$ . My approach consisted in getting a Coordinate ...
3
votes
0answers
169 views

Finding possible lattice planes of a crystal structure

After generating a crystal structure from a crystallographic data and duplicating it to a larger crystal system I would like to find possible lattice planes of this crystal. It is well-known that the ...
2
votes
0answers
144 views

Extracting the curl-free component of a vector field

I am trying to extract the curl-free component of a discrete vector field. My plan is to take the Fourier transform of the vector field and then extract the radial component in Fourier space. The ...
0
votes
1answer
109 views

Issues with Orthogonalize and AngleBracket

I can't quite put a finger as to why using 'AngleBracket' is so uncomfortable. For one part, one can't really assigned some arbitrary variable to any definition of an expression associated with '...
3
votes
2answers
82 views

How to invoke JacobianDeterminant in MMA >9.0?

According to the JacobianDeterminant help for my MMA 11.0 (W7, 64-bit) As of Version 9.0, vector analysis functionality is built into the Wolfram Language but the only Jacobian headwords are for ...
2
votes
2answers
363 views

Cross product of two vector functions [closed]

I have two vector functions f[x_, y_, z_] := {x, y, z} g[x_, y_, z_] := {y, 10, x} I want to take the cross product of these two vectors at every point. This ...
1
vote
2answers
1k views

How to calculate the surface integral of a vector field

Suppose the oriented surface is described as, the outside of an upper hemisphere $S:x^2+y^2+z^2=1$ inside the cylinder $x^2-x+y^2=0$ The vector field is : ${\vec F}=<x^2,y^2,z^2>$ How to ...