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
1
vote
1answer
42 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}] ...
0
votes
0answers
55 views

Is it possible to generate a random vector space in Mathematica?

The idea is that I’d like to try to use Mathematica to work through proofs. So if a proof says, “Let there be a vector space V…”, I would like to see a concrete representation of that vector space in ...
1
vote
3answers
62 views

Drawing circles on top of a vector field drawn using VectorPlot

I am using the command VectorPlot[{{y, -x}}, {x, -4, 4}, {y, -4, 4}] to plot the vector field $\vec{V}=y\hat{i}-x\hat{j}$. On top of this, I need to draw circles of radii $1,2,3...$, etc. I am no ...
1
vote
1answer
72 views

Symbolic Vector calculus

Can mathematica perform symbolic vector calculus? Say I want to find $$\mathbf{v} = \mathbf{a} \exp(\mathbf{b}\cdot\mathbf{x})$$ $$\nabla \cdot \mathbf{v} = \mathbf{b}\cdot \mathbf{v}$$ If I try ...
2
votes
0answers
66 views

Using Curl and Grad in cylindrical coordinates gives different result than in Cartesian

I am doing a quite elementary calculation to verify $$ \vec \nabla\cdot V = \vec\nabla \times \vec A $$ Where $V$ is just some scalar function in $\rho$, $\phi$ and $z$ and $A$ is defined as $$ ...
0
votes
1answer
73 views

How to stack several vector plots using StreamPlot?

I would like to plot several stream plots as is in ref/StreamPlot (Mathematica 12). As is reported in the section: Generate a list of stream plots of varying [Lambda]: I did not change but it does not ...
0
votes
0answers
40 views

High-dimensional second-order differential matrix equations

I am working on Lagrangian derived high-dimensional motion equations for a robot in matrix form. The structure of such an equation is known: $M(q)\ddot{q}+C(q,\dot{q})\dot{q}+G(q)=0$ where $q=[\dot{\...
0
votes
1answer
84 views

Derivative matrix by vector in Mathematica

This is an excerpt from the article https://www.sciencedirect.com/science/article/abs/pii/S0094114X10000418. How do I write this using vector-matrix operations (...
0
votes
1answer
47 views

Derivative of Kronecker product by vector in Mathematica

I'm struggling with the following problem. It is necessary to find the derivative expression with respect to the vector $u$: $r(u,v)=[(u-v)(u-v)^T]\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix}=[(u-v)\otimes ...
1
vote
1answer
79 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}= ??? $ ...
2
votes
2answers
255 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 ...
1
vote
0answers
51 views

StreamPlot works slow with analitical functions

I'm day to day user in Mathematica, that's I will be happy to any kind of help in code optimisation. So, I try to plot gradient for beatings between two laser modes and plot intensity, phase and phase ...
3
votes
0answers
65 views

Excess lines in the solution plot of vector ODE [closed]

I've got an ODE system, which I attempt to solve by two ways: solving the system itself, and using vector ODE. Here is code of first way: ...
1
vote
1answer
145 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 $\...
0
votes
1answer
55 views

Vector function projection raises an error

Working on ODE systems solution with NDSolve[] I decided to try to replace system of equations like: ...
3
votes
0answers
108 views

Summation variables aren't recognised as dummy variables

I'm trying to write this expression in Mathematica, and calculate the following quantity However, when I tried the following ...
0
votes
0answers
35 views

Scaling vectors by their norm in VectorPlot3D

I'm trying to generate a 3D vector plot in which the length of the vector is really it's norm. This is my code: ...
3
votes
1answer
134 views

Derivative of a norm

I learned not use the Norm[] function when computing vector derivative, so I use the dot product instead: In: D[x.x, x] Out: 1.x + x.1 What does the result mean? ...
5
votes
1answer
160 views

Finding unit tangent, normal, and binormal vectors for interpolated function

As an extension of this question, is it possible to find the unit tangent, normal, and binormal vectors for an interpolated function? eg ...
1
vote
1answer
95 views

Problems With StreamPlot

I have the following vector functions: $$E=\left\langle \cos\left[\frac{\pi x}{5}\right]\sin\left[\frac{\pi y}{4}\right], \sin\left[\frac{\pi x}{5}\right]\cos\left[\frac{\pi y}{4}\right], \sin\left[\...
2
votes
0answers
51 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 ...
0
votes
0answers
39 views

Picking elements from separate lists and multiplying them

So I'm doing some instruction items about surface integrals. I've written the following code. it calculates curl and partial derivatives of the surface. I now want to create the following function, ...
1
vote
1answer
59 views

Help with code on integration

I'm trying to do a surface integral through a vector field of a disc. The problem says there is a vector field $\langle 0, y, -z\rangle$ and the disc is $x^2 + z^2 \le 1, y = 1$. The answer is $\pi$ ...
3
votes
1answer
128 views

Parametric Surface Integral Boundary Code?

I am having trouble using MMA to calculate 2 parametrized surface integrals. I'd be grateful for any fixes people can offer. I usually calculate surface integrals with the following code, which works, ...
2
votes
3answers
173 views

Parametric equations and eq. of tangent plane

I have written the following code to determine the equation of a plane tangent to a surface at a given point: ...
4
votes
1answer
128 views

Help on center of mass code

I have reviewed questions on MMMA Stack Exchange and found no help. Here's my problem and my code, which only partially works. I can't figure out my mistake. Help? Find the mass and COM of a wire in ...
1
vote
1answer
90 views

Exploring curl of a gradient of a scalar function

Suppose I want to explore $\nabla \times \nabla V$ where $V$ is some scalar function. It basically results in a zero. But I would only know why if I solve it on paper. I wanted to use Mathematica for ...
1
vote
0answers
91 views

How to plot integral of a gradient function

For $f : \mathbb{R} \longrightarrow \mathbb{R}$ continously differentiable and $\phi \in [0,\pi/2]$ let $$F(x) = \int \frac{f'(x)-\cot \phi}{1+ f'(x) \cot \phi} d x$$ be a clockwise 'rotation' of $f$. ...
3
votes
2answers
121 views

Issue with the Laplacian in Cylindrical Coordinates

I am using Mathematica 12.1.1 and am unable to get the correct result for a simple laplacian in 3D Cylindrical Coordinates. I want to reproduce the following result on Mathematica: But, I am only ...
1
vote
0answers
73 views

How to write a program on gradients and the path for steepest ascent?

I'm given two functions f[x ,y ]=Cos[x]*Cos[y]/(6+x^2+y^2) and df[x ,y ]=Grad[F[x,y],{x,y}] I was given a note that ...
1
vote
1answer
91 views

Understanding and visualizing Bessel function with complex argument

I have a vector field in polar coordinates $(r,\phi)$, which I wish to visualize and better understand. It represents the Electric field vectors for a given field distribution inside a circular ...
2
votes
1answer
87 views

Plotting list data of cross product of field vectors

I have some experimental data points of electric Ey(t, value) and magnetic field Hz(t, value). I am trying to calculate the ...
1
vote
2answers
212 views

Triple Integral boundaries and solution

So I'm working on triple integrals, specifically on those where I have a region bounded by various surfaces. (In other words, the ranges for each integrals are not given, but must be calculated.) I ...
1
vote
2answers
182 views

Scalar potential function from 3D vectorial field [duplicate]

I am new at this forum and a beginner with Mathematica. Today I was studying multivariable calculus and I came with this problem. For example, in 2D case I have this code: ...
0
votes
1answer
39 views

A mistery in the documentation of the StreamDensityPlot command, and Is Abs' the same as Sign?

I was trying to decipher the documentation example ...
0
votes
2answers
37 views

JacobianMatrix Command Not Working Properly [duplicate]

This is what I get when using the command: ...
3
votes
1answer
142 views

Plotting a corrugated ribbon on a 3D Plot

I was assigned to write the following code: ...
1
vote
0answers
78 views

How can I make NDSolve aware of vectorial nature of an ODE?

I am trying to solve the equilibrium equation $\text{DIV } \mathbf P(\textbf{u}(x,y)) = \mathbf{f}$, where $\mathbf P$ is the stress tensor defined by $$ \mathbf P = \mathbf F + (1-\det\mathbf F)^...
0
votes
1answer
160 views

How to calculate the gradient in cylindrical coordinates in more efficient way?

I would like to obtain the gradient for the following function in cylindrical Coordinates ...
1
vote
3answers
139 views

Cannot derive `Norm` or `Normalize` when recreating Frenet Serret equations

I'm trying to calculate the torsion of a curve at a point using the following code: ...
0
votes
0answers
51 views

Eliminate doesn't work

I tried to define r by the polynomials a,b,c only. The result which I want is r=4/3 a. But this eliminate doesn't work! It is continue running without stop and without any output. Eliminate[{a == x[1] ...
0
votes
2answers
76 views

Why is ParametricPlot3D not producing a graph

I have the vector V = {2, y z^2, 3 y + z} I wanted to get a 3d parametric plot of V using: x[t] = Sin[t^2]; y[t] = t^2 - Cos[t]; z[t] = Sinh[t] - Cos[t]. So I did: <...
0
votes
0answers
71 views

Functions of several variables composition

If we have two functions $G,F:\mathbb R^2\to\mathbb R^2$ then the mechanism $F\circ G(x,y)=F(G(x,y))$ gives us a new map $F\circ G:\mathbb R^2\to\mathbb R^2$ called its composition. In a "...
8
votes
3answers
366 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 ...
1
vote
1answer
76 views

Find Solution to Exact ODE with 4 Variables?

OK, I give up. I was trying to use the solution in this post to solve an exact ODE with 4 independent variables. This works ...
0
votes
1answer
53 views

Aesthetic Constant Vectorial Field 3D-Plot

I am trying to 3D-Plot a constant Vectorial Field: ...
1
vote
1answer
78 views

Referencing the Component of a vector

If I were to define a vector r = {2, 0} + t*({5, 4} - {2, 0}) >>{2 + 3 t, 4 t} Sqrt[(D[r[1]])^2 + (D[r[2]])^2] How do I properly reference a single ...
-1
votes
2answers
236 views

Line Integral with Vector Plot Parametric Plot and Show

How can I make different plottings of this line integral where $C$ is the square bounded by lines $x = \pm 1$ and $y = \pm 1$. $$ \begin{equation} \int_C 4y^3dx-2x^2dy \end{equation} $...
1
vote
0answers
82 views

How to reproduce `JacobianMatrix` function

I want to use the JacobianMatrix function in package VectorAnalysis, but I get the following warning message after running the ...
0
votes
1answer
127 views

Help with simplification

Could anyone please help me simply the following expression ...

1
2 3 4 5 6