# 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.

221 questions
Filter by
Sorted by
Tagged with
31k views

4k views

### Singularities using VectorPlot

I am trying to plot a vector function of a fluid flow given by $\vec{V} = (\frac{-\cos(\theta)}{r^2},-\frac{\sin(\theta)}{r^2})$ I am trying to plot it in Mathematica using the command below, I ...
43k views

### Why I get the “Set::write: ”Tag Times in is Protected." error?

Why I get the error below with this code: ...
770 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 ...
1k views

### Dipolar magnetic field lines inside a cylinder

I'm drawing the magnetic field lines of a rotating dipole (magnetic field distorded by emission of radiation). Currently, my Mathematica 7.0 code is fully working, but I'm having a constraint which I ...
278 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 ...
132 views

I'm taking a machine learning course, which involves taking a lot of analytical gradients and Hessians. It would be ideal if I could perform these calculations in Mathematica. However, I am only aware ...
286 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 ...
303 views

### Line Integral Difficulty

I am having difficulty with the following question: Compute the line integral of $$f(x,y)=\frac{xy}{1+x+2y},$$ along the unit quarter-circle in the first quadrant from (1,0) to (0,1). My problem ...
425 views

### Einstein summation convention for symbolic vector calculus

I am trying to do some vector calculus in Mathematica in index notation form because it gives a clear result that can be compared to pen and paper calculations. Since there is no built in Einstein ...
3k views

### Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
237 views

### How is Grad defined for array particularly in non-Cartesian coordinates?

This question can be viewed as a follow-up of What is the definition of Curl in Mathematica? First argument of Grad can be an array, but what definition does ...
896 views

### Visualizing the Lagrange Multiplier Solution

This question is based on work in Susan Colley's Vector Calculus, 4th ed. The question is to find and classify critical points of $f(x,y,z)=3xy-4yz+5xz$ subject to the constraint $g(x,y,z)=3x+y+2z=13$...
2k views

### How to change coordinates of a differential operator?

I'm doing a basic quantum mechanics problem and am trying to learn how to do it in Mathematica. Any help would be much appreciated. $\vec{L} = \vec{x} \times \vec{p}$ where $\vec{x}$ has components:...
421 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 ...
338 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 ...
853 views

### Plotting a parametrically defined vector field

Let's say that you have a three dimensional surface defined by two parameters. E.g. $$S(\theta,\phi) = \{\cos{\theta}\sin{\phi},\sin{\theta}\sin{\phi},\cos{\phi}\}$$ Additionally, you have some ...
611 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 ...
163 views

### Comparing unit normal definition in calculus with FrenetSerretSystem

I'm trying to compare the unit normal definition in calculus texts (i.e., $\vec N=\vec T'/||\vec T'||$) where $\vec T$ is the unit tangent vector, with the unit normal vector returned by the ...
759 views

### Working with abstract vectors

I often need to compute derivatives or integrals involving N-dimensional vectors (where the dimension could be equal to 2 or 3 but is not particularly relevant for the sake of the derivation). The ...
2k views

### Extrema of a function of three variables

To identify and classify the critical points of the function $f(x,y,z)=x^3+xz^2-3x^2+y^2+2z^2$, I used the Hessian matrix method. ...
2k views

250 views

112 views

### How to extend a root finding method from 1D to multi dimensions

The number (0.25 Pi) is a third order root of f[x] below. Clear[f]; f[x_] := Sin[x] - Cos[x] - Sqrt[2] (x - 0.25 Pi); Chop@Normal@Series[f[x], {x, 0.25 Pi, 4}] -...
I have an optimization problem with the following objective function in $(x,y)$ $$A\log \left(\sum_{i=1}^n x_i\right)+\log\left(1-\frac{f}{n}\left(\sum_{i=1}^n\frac{x_i}{y_i}\right)\right)$$ where \$...