Skip to main content

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
33 votes
4 answers
27k views

Finding unit tangent, normal, and binormal vectors for a given r(t)

For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. I've got Mathematica, but I've never used it before and I'm not sure how to coerce ...
a98's user avatar
  • 433
45 votes
3 answers
48k views

How to make Jacobian automatically in Mathematica

If we have two vectors, $a$ and $b$, how can I make Jacobian matrix automatically in Mathematica? $$ a=\left( \begin{array}{c} x_1^3+2x_2^2 \\ 3x_1^4+7x_2 \end{array} \right);b=\left( \begin{array}{...
George Mills's user avatar
20 votes
2 answers
6k views

Is it possible to do vector calculus in Mathematica?

I am trying to rearrange and manipulate some vector differential equations in Mathematica. As far as I understand you have to tell Mathematica that a variable is a vector by specifying the components ...
Holger Schmitz's user avatar
7 votes
2 answers
3k 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:...
TaylorR137's user avatar
26 votes
4 answers
2k views

What is the definition of Curl in Mathematica?

I have a usual mathematical background in vector and tensor calculus. I was trying to use the differential operators of Mathematica, namely Grad, ...
Hosein Rahnama's user avatar
5 votes
2 answers
840 views

'gradient' function in MMA

How to calculate Numerical gradient of 2D arrays using the "gradient function" ("Matlab-like")? "[___] = gradient(F,hx,hy,...,hN) specifies N spacing parameters for the ...
ABCDEMMM's user avatar
  • 1,854
15 votes
2 answers
7k views

How to declare a 3D vector variable?

How can I do vector calculations without telling Mathematica the vector entries? I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on (...
Foo Bar's user avatar
  • 335
4 votes
4 answers
1k views

Hypergeometric function with a matrix argument

I am looking for the evaluation of a Hypergeometric function with a matrix argument as for example in Koev and Edelman or as showcased in this Wikipedia article. From what I understand from ...
Hirek's user avatar
  • 483
19 votes
4 answers
8k views

How do I plot the unit normal field for a surface?

The question is pretty much in the title; I'm about to teach my multivariable calculus students about orientations on surfaces, and I would like to be able to show them pictures. Any ideas?
Paul Siegel's user avatar
11 votes
1 answer
57k views

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

Why I get the error below with this code: ...
Aurelius's user avatar
  • 361
10 votes
3 answers
1k 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 ...
user avatar
3 votes
2 answers
114 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 ...
Julian Moore's user avatar
  • 2,560
3 votes
1 answer
657 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 ...
Jose Enrique Calderon's user avatar
0 votes
1 answer
240 views

How do you manipulate this in 2D

Use Manipulate to create an interactive plot that shows the parametrically-defined curve described by {x[t], y[t]} = {t Sin[t], t^2/15} for ...
user41325's user avatar
15 votes
2 answers
8k views

How do I plot a proper streamline plot, including spacings and line endings?

Mathematica includes two nice built-in tools to visualize vector fields, VectorPlot and StreamPlot. The latter is a useful tool, ...
Emilio Pisanty's user avatar
10 votes
2 answers
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 ...
l3win's user avatar
  • 705
8 votes
3 answers
550 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 ...
xzczd's user avatar
  • 67.1k
6 votes
1 answer
384 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 ...
tajimura's user avatar
5 votes
1 answer
324 views

Extending D for four-derivatives

I'm currently trying to consistently define rules for extending D[] to four-derivatives. As 'backend' I'm using the package TRACER (http://library.wolfram.com/infocenter/MathSource/2987/), which can ...
skalarproduktraum's user avatar
3 votes
2 answers
440 views

Reconstructing a function from its gradients

I have a list of the components of the gradients, $\partial f/\partial x_i$, of a function $f(x_1,x_2,\cdots)$. Is there some neat way to reconstruct the function $f$? One approach to doing this ...
TheTwistedSector's user avatar
3 votes
1 answer
3k views

Plot a function based on Derivative - Gradient field

I'm trying to plot the gradient field of a function in such a way that is possible to change it easily, only editing the function. Consider the code: ...
Sigur's user avatar
  • 693
3 votes
1 answer
1k views

How can I use a unit vector notation found in physic texts?

In physics (I'm thinking of Taylor's Classical Mechanics or Griffith's Classical Electrodynamics) it is common to use "hat" vectors to denote unit vectors like $\hat{x}$ or $\hat{r}$. If I wanted to ...
Tanner Legvold's user avatar
2 votes
2 answers
13k views

Finding scalar potential function [duplicate]

Consider the vector field defined by: $$\vec F(x,y)=\langle 2xy-\sin x,x^2+e^{3y}\rangle$$ We can check to see if the vector field is conservative with the following calculations: $$\begin{align*} \...
David's user avatar
  • 14.9k
2 votes
0 answers
890 views

Symbolic derivatives with vectors and matrices

I'm currently trying to solve some problems using symbolic vectors and matrices of arbitrary size. However, I have some problems with understanding and verifying the results: I defined the vectors as ...
bonanza's user avatar
  • 167
1 vote
1 answer
222 views

Quadratic form derivative in Mathematica

How to correctly differentiate quadratic form by vector in Mathematica, i.e.: $Q=\omega^T I_{p} \omega$ $\frac{dQ}{d\omega}= ??? $ ...
ayr's user avatar
  • 2,444
0 votes
1 answer
296 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 ...
Young's user avatar
  • 7,515
12 votes
2 answers
1k views

Creating randomly oriented planes

I would like to create randomly oriented planes. This is how I'm attempting to do that: I create a 2 random unit vectors, $\mathbf{v}_1$, and $\mathbf{v}_2$, in the $x$-$y$ plane I assume that if I ...
BeauGeste's user avatar
  • 2,877
8 votes
4 answers
1k 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 ...
Tomi's user avatar
  • 4,558
8 votes
1 answer
4k 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 ...
Steve's user avatar
  • 103
6 votes
3 answers
3k 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 ...
LCFactorization's user avatar
6 votes
3 answers
1k 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 ...
Wenzel Jakob's user avatar
5 votes
1 answer
1k views

Checking if an expression is equal to zero

I have 6 points in $\mathbb R^3$ as follows: ...
Helium's user avatar
  • 4,059
5 votes
1 answer
2k views

Get the vector Norm without absolute values? [duplicate]

I want to get the Norm of a vector which involves sines and cosines (So I really need to replace it by the Pythagorean theorem). Since I know that all my results are going to be real and positive I ...
Joshua Salazar's user avatar
5 votes
2 answers
368 views

Finding vector of same direction with smallest integer coordinates

To determine Miller Indices of crystal lattice planes I would need a stable algorithm which determines the smallest set of integer coordinates of a vector which has same direction as a given vector (e....
Rainer's user avatar
  • 2,931
4 votes
2 answers
2k 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 ...
KratosMath's user avatar
  • 1,309
4 votes
3 answers
1k views

How do you show a cone inside of a sphere?

I have a sphere of radius 5 and a cone (i.e. z=√(x^2+y^2)) inside of it. I can show them separately, but I'd like to show them together. I've tried a few tricks with opacity, implicit specifications, ...
BlBl's user avatar
  • 41
4 votes
1 answer
300 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 ...
Dr.Yoma's user avatar
  • 143
4 votes
1 answer
5k 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 ...
Michael B. Heaney's user avatar
4 votes
1 answer
393 views

Using Vector Operations In Mathematica

I would like to calculate $$ \mathbf T = (\mathbf B \bullet \nabla) \mathbf B$$ Where nabla (the upside down triangle) is the grad operator $(\partial/\partial x,\partial/\partial y,\partial/\...
Tomi's user avatar
  • 4,558
4 votes
2 answers
800 views

How are Symbolic Vectors Defined?

It is my understanding that undefined symbols are considered scalars, so I can't index variables that aren't defined. It is possible to define a symbol as a vector of symbols as follows, allowing ...
NullPointerException's user avatar
3 votes
2 answers
240 views

Why is TensorExpand so slow for vector operations?

I would like to expand the following tensor expression: ...
ZHANG Juenjie 's user avatar
3 votes
5 answers
2k views

How to obtain the gradient of a function as a function?

The Grad function allows me to get the gradient of a function like this: ...
user's user avatar
  • 1,897
3 votes
5 answers
865 views

Computing the intersection area of two disks in 3D

Closely related to this question about highlighting intersection of two disks, I am trying to figure out if one can do so similarly for disks embedded in $3D$ (e.g. in a bounding box). The difference ...
user avatar
3 votes
2 answers
130 views

Solving an integral vectorial equation by iterations

I'm triying to solve a problem like the following: $$ \binom{f(t)}{g(t)}=\binom{f_0(t)}{g_0(t)}+\lambda\int_0^t ds\hat{A}(s)\binom{f(s)}{g(s)}, $$ where $f_0(t),g_0(t)$ and $\hat{A}(t)$ (a $2\times2$ ...
Albus Black's user avatar
2 votes
0 answers
305 views

Draw Vector Tangent to Point on Parameterized Curve [duplicate]

I define the vector function $\vec{r}(t)$ by r[t_] = {t, Cos[t], Sin[t]} The command r'[t] gives the vector tangent to the ...
Austin Mohr's user avatar
2 votes
0 answers
87 views

12.1 VectorPlot - How to show differing magnitudes in the new implementation

I'm graphing vector fields for a class. Magnitude is important at least initially. In 12.0 and earlier VectorPlot plotted the different magnitudes as length. In 12.1 VectorPlot represents magnitude by ...
Gerald Bilodeau's user avatar
2 votes
0 answers
365 views

Derivative of vector dot product with respect to a vector

I have the expression: Transpose[gvecI, {2, 1}].x (m[1] + m[2]) gvecI and x are [3x1] ...
space_voyager's user avatar
2 votes
0 answers
289 views

Computing quadratic differential trajectories with Mathematica

There was a question about a particular case of this, Quadratic differentials; seemingly it contained too little information, so let me try again. This will be also a second take on my previous ...
მამუკა ჯიბლაძე's user avatar
1 vote
1 answer
642 views

how to define unit vectors in mathematica

I'm struggling a little bit trying to understand how to address this problem, I would like to do this in mathematica: is just that I don't know how to do the dot product between $\mathbf{J}$ and $\...
diegosanchez's user avatar
1 vote
1 answer
931 views

How to use a convective derivative

I am trying to figure out how to do a convective derivative in Mathematica in the context of the Navier-Stokes equation. The issue is, I have no clue how dot product a vector with the gradient ...
user43897's user avatar