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
2 answers
124 views

Creating a 3D Gradient Vector Field Plot in Mathematica

I am new to Mathematica and currently learning how to visualize mathematical functions and their gradients. I am trying to reproduce a specific image that illustrates the gradient of a two-variable ...
Azermatt's user avatar
-1 votes
0 answers
52 views

How to plot a 3D vector field? [closed]

How can I plot a vector field in 3D Cartesian coordinates where the $x$ and $y$ components are both functions of $z$? For example, how do I plot the function below? $$\mathbf{F}(x,y,z) = \hat{x}\sin{z}...
jboy's user avatar
  • 181
0 votes
0 answers
41 views

Perturbing a tensorial expression

I am new to Mathematica. I am trying to simplify an expression of the some form like: $$ n_i \sigma_{ij} n_j - \gamma n_i \hat{\sigma_{ij}} n_j = 2 + v_i x_i + \kappa E_{ij} \chi_{ji} $$ There are ...
fiarast11's user avatar
0 votes
0 answers
73 views

Symbolic vector calculus rookie mistakes

I'm trying to learn how to do vector calculus in Mathematica, just seem to be missing some points along the learning curve. With assumptions ...
Daniel's user avatar
  • 115
2 votes
1 answer
86 views

Vector calculus in generalised orthogonal frame of reference

I want to write Navier-Stokes equations in generalised orthogonal frame of reference in Mathematica. I therefore want to expand gradient and other vector calculus operations using metric factors such ...
dylewiczk's user avatar
1 vote
1 answer
86 views

Recursive application of Grad in scalars

I am looking for an efficient way to apply Grad recursively to a scalar function. The code I have so far is in the structure below. I define the scalar function outside the loop, take its derivatives ...
Felipe's user avatar
  • 299
2 votes
0 answers
116 views

Cavity resonator modeling with Wolfram Mathematica

I am attempting to determine eigenfrequencies and the corresponding electric field distribution in a rectangular cavity resonator with perfectly conducting walls. In the simplest case of a rectangular ...
Ian's user avatar
  • 41
0 votes
0 answers
24 views

Simplify vector calculus based on component splitting

I am interested in verifying a few Vector Calculus expressions using Mathematica. These expressions are based on splitting a vector field into its transverse components (in the xy- plane) and ...
orlandini's user avatar
2 votes
1 answer
85 views

How to create a vector as a tensor object for different euclidean bases?

The components of a tensor are always displayed with respect to one or multiple basis vectors. For a tensor of rank 1, a vector, in 3D-euclidean space, we resort to three orthonormal basis vectors. ...
ango4's user avatar
  • 45
2 votes
0 answers
70 views

Defining my own set of orthogonal curvilinear coordinates

I want to use Vector Analysis functions (Grad, Div,Curl etc) with the following set of simple Toroidal coordinates $(r, \theta, \phi)$: $x = (R+r \cos\theta)\sin\phi$, $y = (R+r \cos\theta)\cos\phi$, $...
Javier Chico's user avatar
0 votes
0 answers
101 views

Why won't this magnetic field plot?

I have been having some longstanding trouble in getting a 2D vector plot of a magnetic field to show up. For context, I am working with Lienard-Wiechert potentials and as such trying to plot the curl ...
JDRobin's user avatar
  • 55
1 vote
1 answer
157 views

PlotLegends` and VectorAnalysis is now obsolete on Mathematica v 12.0.0.0 Home edition [closed]

My code was working a few months ago. Now I receive the messages: ...
Brendan Darrer's user avatar
3 votes
2 answers
104 views

Eigenvalues and classification of critical points [closed]

I started with a function (x,y) and tried to write the code to work out the eigenvalues and classify the critical points. The output it all good up until I try to use Which[] to classify the critical ...
noodles's user avatar
  • 31
2 votes
1 answer
80 views

Differentiating unit tangent vector does not work

I am new to Mathematica and I want to visualize the tangent and normal vector field of a particular embedding of the circle. In my code it is [CapitalGamma][s]. When I put the unit tangent vector (uT[...
Ama's user avatar
  • 35
1 vote
1 answer
88 views

Plotting the electric field of the Lienard-Wiechert potentials

I am having a very rough time trying to properly define and then vectorplot the expression for the electric field of the Lienard-Wiechert potentials I have been trying to code. Up to this point, the ...
JDRobin's user avatar
  • 55
0 votes
0 answers
71 views

How to get $ (\vec{A} \cdot \nabla) \vec{b}) $ to evaluate in Wolfram language [duplicate]

I am quite new to Wolfram language, and I am trying to use it to prove the equality $$ \nabla (A \cdot B) = A \times (\nabla \times B) + B \times (\nabla \times A) + (A \cdot \nabla)B + (B \cdot \...
likely_fail_2202 T_T's user avatar
1 vote
2 answers
227 views

Map water runoff flows near Ellicott City, Maryland

Ellicott City, Maryland was the site of a flash flood several years ago due to the local topography. How can we use the Wolfram Language to show the direction water flows at many points near that city?...
Ted Ersek's user avatar
  • 909
4 votes
2 answers
624 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
0 votes
0 answers
33 views

How do I prevent, or get rid of the <code>Abs^\[Prime]</code> in the output of a partial of a Normalize[vector]? 12.0.0 for Microsoft Windows [duplicate]

12.0.0 for Microsoft Windows How do I prevent, or get rid of the Abs^[Prime] in the output of a partial of a Normalize[vector]? The code below shows the problematic ...
Steven Thomas Hatton's user avatar
1 vote
1 answer
77 views

'not a variable' error when applying D function [closed]

I am trying to apply differentiation, D, operator in Mathematica to a vector. Importantly, I want to carry out the operation with respect to another vector. Basically, I am computing a Jacobian matrix....
dylewiczk's user avatar
1 vote
0 answers
67 views

Vector Potential Function of Vector Field with DSolve?

(This is a redux of this.) Why doesn't this work? I have a vector field F1 whose div is 0 with a known vector potential function A2, and I try to get DSolve to solve the differential equation for A2 ...
Jeffrey Rolland's user avatar
2 votes
1 answer
118 views

Preventing Mathematica from applying product rule

I am programming viscous terms of compressible Navier-Stokes equations ...
dylewiczk's user avatar
1 vote
2 answers
126 views

Showing each component of velocity in a helix

In this animation, I want to show each component of velocity (V_x, V_y and V_z) with arrows ...
user444's user avatar
  • 2,220
2 votes
1 answer
63 views

Simplifying expressions with dot or non-commutative product (without the help of NCAlgebra)

I have two expressions (with dot and non-commutative product): $f=J^T.x+J.x$ $g=J^T**x+J**x$ I want to simplify them and get the following expressions: $f=(J^T+J).x$ $g=(J^T+J)**x$ In an attempt to ...
dtn's user avatar
  • 2,394
1 vote
2 answers
276 views

Calculating Matrix Derivatives

I'm sorry if this is an easy question, but I'm trying to refresh my memory on calculating derivatives of matrix products and have been reading the Matrix Cookbook. I'd like to rebuild my intuition by ...
HonestMath's user avatar
1 vote
0 answers
98 views

How to define a vector operator?

I know how to define a single-variable differential operator like Clear[Op] Op[x_] := a D[#, {x, 1}] & and I can do operations like ...
z.v.'s user avatar
  • 189
3 votes
5 answers
952 views

Calculating length of curve based on data points?

I had around $1000$ data points $(x,y,z)$ and when I plot them they seem to lie on a closed curve. I carefully checked the data points and the points do not repeat rather they are somewhat close to ...
BAYMAX's user avatar
  • 199
3 votes
1 answer
186 views

Why isn't the vector field being plotted over the entire torus?

I am trying to plot a vector field over a torus. Here is my code and the image it produces: ...
valcofadden's user avatar
2 votes
1 answer
66 views

Solving a vector diferential equation lead to ComplexInfinity Encountered non-numerical value for a derivative at t == 0

I'm trying to solve the following Vector PDE: I implemented the following code: ...
Joshua Salazar's user avatar
0 votes
0 answers
119 views

Implementing the 3D Radon transform

I am wondering how to implement the Radon transform, the 3D Radon transform, that is, given a 'density' function $f: \mathbb{R}^3\to \mathbb{R}$ The Radon transform of $f$ is $$Rf(s,w)= \int_{x\cdot w=...
NotaChoice's user avatar
1 vote
0 answers
47 views

Using `GradientFilter[]` and `GradientOrientationFilter[]` to reproduce Matlab's `gradient()` function

In 'gradient' function in MMA, two methods are given to reproduce Matlab's gradient() function. I thought that ...
ZachB's user avatar
  • 1,200
0 votes
0 answers
61 views

How to express elemental operations in matrix form?

I ran the following code: X = Array[x, {5, 4}]; W = Array[w, {4, 3}]; Y = Array[y, {5, 3}]; D[Norm[X.W-Y, "Frobenius"]^2, {W}]//MatrixForm However, mma ...
ADEric's user avatar
  • 1
0 votes
0 answers
54 views

How to input a specific three-variable function into this definition?

I have the following expression: ...
Dispersion's user avatar
0 votes
0 answers
48 views

Looking to compute $e^{\phi}\Delta^2 f e^{-\phi}$ in a coordinate-free way

Let $f, \phi:\mathbb{R}^n\to\mathbb{R}$ with $\phi(x)$ looking like $\phi(x)=(x+a)^2$ for some $a\in\mathbb{R}^n$. I am interested in computing $$L_\phi(f)=e^{\phi}\Delta^2 \left(e^{-\phi}\,f\right)$$ ...
Dispersion's user avatar
0 votes
0 answers
61 views

Calculation of SolidAngle not recognizing region?

Basically I'm trying to calculate the solid angle of a square seen from the origin. I defined the region (in two different ways) and tried running the function but it does not give any output. Why is ...
Claudio Mora's user avatar
3 votes
2 answers
129 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$ ...
Jorge Castaño's user avatar
0 votes
0 answers
45 views

Output of expressions unable to have operations be performed on the expression

I am currently trying to use the code linked in the catalog of spacetimes pdf to calculate chirstoffel symbols for a metric which follows as n := 4 ...
aygx's user avatar
  • 119
0 votes
0 answers
64 views

Algorithm: Permutations & Signature

Theoretical side Simple example: If I have two sets $A_1=\{1,3\} ,A_2=\{2,3\}$ and Permutations[{1, 2, 3}]= $\left( \begin{array}{ccc} 1 & 2 & 3 \\ 1 &...
Emad kareem's user avatar
1 vote
1 answer
85 views

Derivative of quadratic form in NCAlgebra

I installed the NCAlgebra package in the hope that it contains enough rules for symbolic work with most branch-matrix expressions. ...
dtn's user avatar
  • 2,394
2 votes
1 answer
149 views

Inactive form for PDE and symmetry

I would like to solve the following non-linear Poisson equation (as a toy problem for a more complicated problem) ...
Thela Hun Ginjeet's user avatar
3 votes
2 answers
169 views

Set of quadratic forms and linear algebra

I have a set of quadratic forms. $L_{1}=u_1^TJ_{1}u_1$ $L_{2}=u_2^TJ_{2}u_2$ $L_{3}=u_3^TJ_{3}u_3$ where $u_{i=1,2,3}$ - 3$\times$1 vector; where $J_{i=1,2,3}$ - 3$\times$3 matrix; I need to pack ...
dtn's user avatar
  • 2,394
0 votes
1 answer
238 views

How do I find the unit vector in the direction of the minimal rate of change?

A ball falls on the surface $x^4 z+x^9 y^2+y^2 z^3=65$ at the point (-1,-3,2). How do I find a three-dimensional unit vector in the direction that the ball will begin to roll. I know that the ball ...
Arnold's user avatar
  • 115
1 vote
1 answer
157 views

How to compute the divergence of a four-vector?

I have a quadri-vector which is given by u = {(E^(-φ0[r]))*(1 - ε δφ[t, r]), (E^(-φ0[r])) D[ε ξ[t, r], t], 0, 0} and a quantity n which is given by <...
Isabella Nunes's user avatar
0 votes
0 answers
65 views

Difference in covariant derivative and divergence?

defining polar Minkowski metric (with indecies down in polar coordinates) as gdd = {{-1, 0, 0, 0},{0, 1, 0, 0},{0, 0, r^2, 0},{0, 0, 0, r^2 Sin[\[Theta]]^2}} ...
Nitaa a's user avatar
  • 718
0 votes
1 answer
89 views

Finding the Curvature of the path of a particle

How do I find the curvature of the vector when t=5? The function is: v[t_] := {2 t^4 + 2, 6 t^3 + 1, 3 t^2 + 4}
Arnold's user avatar
  • 115
1 vote
1 answer
331 views

The square of Abs of a complex number

We all know that 4^2 + 22^2 = 500 Is there a natural way to generates 500 from the complex number ...
imida k's user avatar
  • 3,935
3 votes
1 answer
230 views

Pattern matching with two variables - derivatives on 4-vectors

I am interested in pattern matching with two variables and not just one, and more specifically implementing derivatives on 4-vectors. In the case of interest the 4-vectors have two indices; one is in ...
user avatar
2 votes
2 answers
98 views

How to deduce cosine theorem with vector?

I want to prove the cosine theorem of triangles with vectors under the following assumptions: ...
lotus2019's user avatar
  • 2,091
0 votes
0 answers
113 views

How would you write a electric field in cylindrical coordinates?

I am new to Mathematica and I am trying to automate the process of finding electric and magnetic fields for TE and TM modes in a cylindrical superconducting cavity. I could not find documentation ...
Aarav Mande's user avatar
1 vote
1 answer
85 views

find a scalar potential function f for F so that f(0,0)=1

I need to find a scalar potential function f for F so that f(0,0)=1. a force field F(x,y) = <-Sinx,-2Cosy> First prove F is conservative Curl[F[x, y], {x, y}] ...
calcNoob1's user avatar

1
2 3 4 5
7