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.

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
121 views

Symbolically evaluating gradients/Hessians

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 ...
7
votes
0answers
821 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$...
4
votes
0answers
104 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}] -...
4
votes
0answers
157 views

How to verify the convexity of a function?

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 $...
4
votes
0answers
336 views

Complex boundary conditions and NDEigensystem

I am having difficulties implementing a Neumann value when numerically solving the Navier equation using NDEigensystem. The Navier equation is given by $\nabla^2 \vec u + (p^2 - 1) \nabla(\nabla\...
3
votes
0answers
147 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 ...
3
votes
0answers
450 views

Is there a 3D version of ListStreamPlot[] (analogous to ListVectorPlot3D[])

Is there is straightforward way to visualize streamlines given a series of discrete samples of a 3D vector field? There is a generalization of ListVectorPlot --> <...
2
votes
0answers
88 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 ...
2
votes
0answers
135 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 ...
2
votes
0answers
209 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] ...
1
vote
0answers
53 views

Error when trying to solve elastic PDEs using FEM: “Compile::argcompten: The comparison, LessEqual, is invalid for tensor arguments.”

I'm trying to solve the following linear elastic problem: The pairs of numbers beside each node is the coordinates in meters. The loads are in Newtons. The part of codes that probably have no ...
1
vote
0answers
52 views

How to get results in terms of vector operations?

Is there a simple way to simplify an expression in terms of vector operations? For example, when I evaluate this; ...
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 ...
1
vote
0answers
357 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....
1
vote
0answers
111 views

How does this `Tagset` /: defined function work?

This came up in an assignment problem. I am tasked to use 1) ▽ /: ▽[f_] := {D[f, x], D[f, y], D[f, z]} 2) ...
1
vote
0answers
285 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 ...
1
vote
0answers
168 views

Using NMinimize to solve the Multi Commodity Flow problem

I have the following optimization problem and I was hoping to solve it with NMinimize. Unfortunately, I don't get the desired result. I would like to get an optimal vector for $d_{e}$. This is how ...
1
vote
0answers
215 views

Simple Jacobians, Gradients, etc. with arbitrary length vectors/matrices?

Is there any way (or a package built for it) can do simple operations with vectors and matricies of arbitrary size, but conforming extents? For the simplest example to test, given an arbitrary vector ...
0
votes
2answers
45 views

Summations on Variables with subscripts

One of my equations uses a set of variables which ultimately for a set of certain values gives a list of 8 numbers: c=13.9506 (31 - k) following cc(sub k) = Round[Table[13.950621339931203...
0
votes
0answers
49 views

How do you get a partial derivative of a vector to another vector?

I have a translation function between Cartesian and Polar coordinates: xi[xPrime_] := {xPrime[[1]]*Cos[xPrime[[2]]], xPrime[[1]]*Sin[xPrime[[2]]]} I now want to ...
0
votes
0answers
35 views

Implementing a generic product rule

I'd like to implement a generic rule for expanding differential forms by the product rule. For instance, I'd like to transform the following PDE: $\phi \frac{\partial \phi}{\partial t} = \phi \nabla^...
0
votes
0answers
35 views

Mathematica Scalar Field on 3D Space

Fellow Mathematicai, is there any way to create a visual plot of a Scalar Field on 3D space in Mathematica? With Gratitude, - SDH
0
votes
0answers
67 views

Vector calculus expression formatting

I have the following example vector calculus code ...
0
votes
0answers
51 views
0
votes
0answers
85 views

Curl in Polar Coordinates

I was trying to figure out Curl in other coordinates. The Curl documentation (https://reference.wolfram.com/language/ref/Curl.html ) didn't really say how Mathematica interpreted the input. Anyway, I ...
0
votes
1answer
98 views

Make Arrows Smaller

I have the following program that describes a 3D curve in space with an osculating circle and TNB vectors moving with the curve. The arrows indicating the TNB vectors are way too large making it seem ...
0
votes
0answers
191 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
0answers
66 views

ParametricRegion3D is not working well

I am trying to define a region along a space curve where I will display the vector field. My space curve is obtained by numerical integration and defined by Interpolating functions. It is hard to post ...
0
votes
0answers
288 views

Solve equations involving summation expressions in Mathematica

I am trying to solve the simple linear regression equation analytically in Mathematica (not using builtin functions). I managed to calculate the gradient as follows f is loss function using RSS and ...