Questions on dealing with vector calculus functions of Mathematica such as Grad, Div, Curl, Laplacian and their representations in various coordinate systems.

learn more… | top users | synonyms

1
vote
1answer
40 views

Partial Differentiation with interpolation function

I'm trying to take the partial differential of each component of an interpolation summed together. It works fine when I do it with an algebraic expression, but I can't understand why it doesn't work ...
0
votes
0answers
57 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 ...
10
votes
2answers
3k 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, ...
3
votes
1answer
98 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/\...
1
vote
0answers
48 views

Helmholtz-Hodge Decomposition

So I was recently getting familiar with the Helmholtz-Hodge Theorem, briefly (but decently) described by https://en.wikipedia.org/wiki/Helmholtz_decomposition and I was wondering whether there exists ...
5
votes
1answer
92 views

Plotting a parametrically defined vector field

Let's say that you have a three dimensional surface defined by two parameters. E.g. $$ S(\theta,\phi) = \{\cos{\theta}\sin{\phi},\sin{\theta}\sin{\phi},\cos{\phi}\} $$ Additionally, you have some ...
1
vote
1answer
87 views

How to plot a linear vector tangent to a bezier surface?

I have a bezier surface and its parameters are u and v. The partial differentiation with u as variable gives me a vector in the direction of u. I need to plot this vector. I plugged in a particular ...
3
votes
0answers
49 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 --> <...
-1
votes
1answer
57 views

NDSolve and vectors [closed]

I think I can't find solution of equation below because I need use scalars, not vectors as I have tried. But I don't know how I can do express the problem with scalars. I have read Wolfram Language ...
1
vote
2answers
119 views

How to find the limit of a function of two variables

I was wondering if there is a method to find the limit of a function of two variables at a point. I tried the following: ...
0
votes
0answers
19 views

scaling parameters for vector-valued Non-linear optimization

I am trying to minimize a non-linear vector-valued function in Mathematica. As a test case, I try to minimize a function whose solution I know apriori. The problem is that one of the solutions is ...
3
votes
1answer
57 views

Integrating a gradient and matching terms automatically

I am trying to integrate a function $\nabla w(x,y)$ indefinitely knowing both components of $\nabla w(x,y)$. I have a function dw[x_,y_] that I have defined. I then ...
0
votes
1answer
92 views

Manipulating curl and div of a vector in spherical coordinates

I'm trying to show that an E field satisfies the two Maxwell equations: $\mathsf{Curl}[E]=-dB/dt$ and $\mathsf{Curl}[B]=(w/k)^2 dE/dt$ I define $\qquad e_o(\text{t$\_$})\;\mathsf{:=}\;\left\{0,0,\...
3
votes
1answer
157 views

Errors Solving Elliptic PDES with FEM

I am trying to solve the equation below governing transversely isotropic plane strain in cartesian coordinates with the given boundary conditions based on code found here using Mathematica 10.1 on OSX ...
1
vote
1answer
71 views

Cross product of three vectors

I am following the answer of Jens from following post: How do I simplify a vector expression? vec /: Cross[vec[x_], HoldPattern[Cross[y__]]] := I want to create ...
3
votes
1answer
98 views

Angle between two vectors in spherical coordinates [closed]

I have two vectors: H = {1, 0, π/4}; EA = {1, 0, 0}; Which I want to be in {r, Phi, Theta} - which would should give an angle between the two vectors as ...
11
votes
2answers
3k 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 ...
2
votes
4answers
142 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: ...
22
votes
2answers
15k 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}{...
4
votes
2answers
132 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....
0
votes
2answers
144 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*} \...
3
votes
0answers
144 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\...
2
votes
1answer
1k views

Inverse gradient operator

I found a nice paper about inverse vector operators here. I have successfully implemented a Mathematica function for most of them, however I can't figure out how to do inverse gradient (page 7 in the ...
8
votes
1answer
103 views

Line Integral Difficulty

I am having difficulty with the following question: Compute the line integral of $$f(x,y)=\frac{xy}{1+x+2y},$$ along the unit quarter-circle in the first quadrant from (1,0) to (0,1). My problem ...
7
votes
2answers
182 views

How to expand dot product by applying properties

I would like to expand a dot product which includes vectors $ \vec{v_1}, \vec{v_2}, \dots $ and constants $ c_1, c_2, \dots $ So that: $$ c_1 \vec{v_1} \cdot \left(c_2 \vec{v_2}+ c_3 \vec{v_3}+\dots ...
1
vote
1answer
99 views

Divergence of $1/r^2$: Mathematica yields 0, while the correct answer is a DiracDelta

In spherical coordinates, the divergence of a point charge is $4 \pi \delta (r)$, the three-dimensional Dirac delta function. In ...
0
votes
1answer
49 views

How can I tell mathematica that $a, \space b, \space \omega$ are constants? [closed]

I want to differentiate the following vector: $$=\frac{1}{\sqrt{a^2\omega^2\sin^2(\omega t)+b^2\omega^2\cos^2(\omega t)}}\begin{pmatrix}-a \omega \sin(\omega t)\\b \omega \cos (\omega t)\end{pmatrix}$...
5
votes
1answer
84 views

Comparing unit normal definition in calculus with FrenetSerretSystem

I'm trying to compare the unit normal definition in calculus texts (i.e., $\vec N=\vec T'/||\vec T'||$) where $\vec T$ is the unit tangent vector, with the unit normal vector returned by the ...
0
votes
1answer
97 views

How to I plot a vector and a line on the same graph?

For example I want to plot the vector <7, 20> on the same plot as the line {t, 6t+10}
3
votes
1answer
988 views

Normal and Tangent of Acceleration in 3D

I am trying to find the normal and tangent of acceleration. I know the formula for the tangent of acceleration is $((Acceleration . Velocity)/(Velocity.Velocity))*Velocity$ and the normal of ...
4
votes
1answer
116 views

Finding the attractors of the vector field constructed as the gradient of an interpolated 3D scalar field

I have a list of data existing as {{{x, y, z}, f},...} from which I construct a 3D interpolation function using Interpolation[ ]. I am able to construct a vector field from the gradient of this scalar ...
2
votes
1answer
162 views

Curl expression does not evaluate [closed]

I am using Mathematica 8 on OS X. I am trying to compute the cylindrical curl of a symbolic vector following Mathematica documentation. ...
5
votes
0answers
217 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$...
0
votes
0answers
24 views

Show[cp1,cp2, …] but PlotLabel in cp2 does not show up [duplicate]

I am visualizing the extrema of $f(x,y)=x^3+3y^2$ constrained to the level curve $g(x,y)=xy=-4$, found by using the Lagrange Multiplier Method. ...
2
votes
1answer
407 views

Derivatives of list elements

Bug introduced in 8.0.0 and fixed in 9.0.0 Could someone explain the odd behavior of the Derivative function when drawing arguments from lists? We have, ...
5
votes
3answers
291 views

Extrema of a function of three variables

To identify and classify the critical points of the function $f(x,y,z)=x^3+xz^2-3x^2+y^2+2z^2$, I used the Hessian matrix method. ...
7
votes
1answer
459 views

Dipolar magnetic field lines inside a cylinder

I'm drawing the magnetic field lines of a rotating dipole (magnetic field distorded by emission of radiation). Currently, my Mathematica 7.0 code is fully working, but I'm having a constraint which I ...
2
votes
0answers
80 views
1
vote
0answers
101 views

How to obtain the magnetic field of the following set up [closed]

This is the experimental set up: A ferromagnetic cylindrical disk (of irrelevant dimensions) has either sides set at different electric potentials (left side at 0 volts and right side at 1 volt). A ...
3
votes
3answers
374 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 ...
0
votes
0answers
49 views

vector product defined on kronecker delta [duplicate]

I have some vectors such as : a={{0}, {0}, {0}}; b={{1}, {1}, {1}}; c={{1}, {1}, {0}}; I wanted to product a by ...
1
vote
3answers
117 views
1
vote
0answers
129 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 ...
0
votes
1answer
133 views

Divergence in spherical coordinates as can be done in W|A

Is there any widget kind of thing that can work out calculations of vector analysis in not-Cartesiian coordinates, i.e spherical and cylindrical? Like the calculators found here: https://www....
1
vote
0answers
58 views

Abstract Vectors [duplicate]

Is there a way to deal with abstract vectors in the following sense: Say I have a function f[y]. Now I want to evaluate ...
0
votes
2answers
102 views

Plotting vectors using derivatives

This question stems from a previous question I asked here: Multiple Integral of equation including dx prime? An equation describing a gravitational field of a cuboid is given as: $V(X,Y,Z) = -G\rho \...
3
votes
1answer
183 views

compute the gradient in high dimension

The following code is used to compute the gradient of a given 2D data. ...
0
votes
1answer
64 views

Integrating the second derivative of a 3D curve

I have a 3D curve K2[s_] := c1[s] + 0.4*(j[s]*Sin[500*Pi*s/97.8] - v[s]*Cos [500*Pi*s/97.8]) where j and v are frame vectors. I want to find the integral of ...