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.
313 questions
1
vote
2
answers
167
views
How do I plot the normal vector to a surface in a given point and use it in other vector operations?
Im working with a conic surface (representing an optical surface) given by:
ZagA = ((1/r)(x^2+y^2))/(1+Sqrt[1-(1+k)(1/r)^2(x^2+y^2)])
I'm making it an evaluable ...
2
votes
0
answers
95
views
Vectorizing Ray Tracing Equations for NDSolve and use of WhenEvent in Mathematica
I'm trying to solve the ray tracing equations for a sound pulse (Boone,1963). I have formulated the system of ODEs and successfully solved it for both the ray position
...
5
votes
3
answers
918
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 ...
1
vote
1
answer
240
views
How to Solve Partial Derivative with Summation (for Linear Regression)?
I'm demonstrating linear regression so I would like to calculate derivatives 1 & 2 using Mathematica, something like this
This is based on the textbook notation in Johnston's Econometric Methods ...
1
vote
1
answer
121
views
How to derive this vector analysis equation?
How to use mathematica to derive this vector equation:
\begin{equation}
\nabla \times (\mathbf{A} \times \mathbf{B}) = (\mathbf{B} \cdot \nabla) \mathbf{A} - (\mathbf{A} \cdot \nabla) \mathbf{B} + \...
3
votes
2
answers
259
views
Plotting a vector field on a cylinder
Assume a parametric equation for a cylinder
$$\mathrm{cyl} (\theta, z) = (r \cos\theta, r \sin\theta,z)$$
and a vector field given by
$$\mathrm{vecField} (\theta, z)=\frac{\sin(\alpha)}{r}\partial_\...
0
votes
1
answer
112
views
ArcTan action in more than two dimensional space [closed]
There is a four-dimensional vector, (w, x, y, z).
Can ArcTan, ArcTan[w, x, y, z] be applied? Or what is the alternative to it?
4
votes
3
answers
778
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 ...
4
votes
5
answers
1k
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 ...
1
vote
0
answers
113
views
Integration by parts for Green's first identity
How should one implement
$$\int _{\Omega }\nabla u\cdot \nabla v\,d\Omega \ =\ \int _{\Gamma }v\,\nabla u\cdot {\hat {\mathbf {n} }}\,d\Gamma -\int _{\Omega }v\,\nabla ^{2}u\,d\Omega\,,$$
Symbolically ...
2
votes
1
answer
156
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 ...
2
votes
0
answers
209
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 ...
4
votes
2
answers
1k
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 ...
2
votes
1
answer
138
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.
...
1
vote
1
answer
125
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 ...