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

20
votes
2answers
14k 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( ...
18
votes
4answers
12k views

Finding unit tangent, normal, and binormal vectors for a given r(t)

For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. I've got Mathematica, but I've never used it before and I'm not sure how to coerce ...
14
votes
4answers
3k views

How do I plot the unit normal field for a surface?

The question is pretty much in the title; I'm about to teach my multivariable calculus students about orientations on surfaces, and I would like to be able to show them pictures. Any ideas?
11
votes
2answers
691 views

Creating randomly oriented planes

I would like to create randomly oriented planes. This is how I'm attempting to do that: I create a 2 random unit vectors, $\mathbf{v}_1$, and $\mathbf{v}_2$, in the $x$-$y$ plane I assume that if I ...
11
votes
1answer
424 views

How can I define or use a new coordinate system in Mathematica?

I want to use the dipole coordinate system as defined in this paper: http://arxiv.org/abs/physics/0606044 I see that Mathematica can do all kinds of vector analysis using different kinds of ...
9
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 ...
9
votes
1answer
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, ...
8
votes
2answers
1k views

How to declare a 3D vector variable?

How can I do vector calculations without telling Mathematica the vector entries? I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on ...
7
votes
2answers
153 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 ...
7
votes
1answer
1k views

Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
6
votes
2answers
1k views

How to change coordinates of a differential operator?

I'm doing a basic quantum mechanics problem and am trying to learn how to do it in Mathematica. Any help would be much appreciated. $\vec{L} = \vec{x} \times \vec{p}$ where $\vec{x}$ has ...
6
votes
2answers
2k views

Singularities using VectorPlot

I am trying to plot a vector function of a fluid flow given by $\vec{V} = (\frac{-\cos(\theta)}{r^2},-\frac{\sin(\theta)}{r^2})$ I am trying to plot it in Mathematica using the command below, I ...
6
votes
1answer
414 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 ...
6
votes
1answer
92 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 ...
5
votes
3answers
271 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. ...
5
votes
1answer
75 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 ...
5
votes
1answer
80 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 ...
5
votes
1answer
169 views

Integration over a convex combination of a region: $\int_{\Omega} (w_1 z_1 + w_2 z_2)^{1-\sigma} d (z_1, z_2)$ where $\Omega = \{ z_1 + z_2 = 1\}$

Take $w,z\in R^{n}$. I am interested in integrating (as generically if possible) $$\int_{\Omega}(w \cdot z)^{1-\sigma} d z$$ Where the domain of $\Omega$ is $1$ dimension, and includes the convex ...
5
votes
2answers
326 views

Working with abstract vectors

I often need to compute derivatives or integrals involving N-dimensional vectors (where the dimension could be equal to 2 or 3 but is not particularly relevant for the sake of the derivation). The ...
5
votes
0answers
204 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 ...
4
votes
1answer
1k views

Plotting a complicated vector field

If we consider the vector $\left ( A \cdot \nabla \right) \: B$, we have in Cartesian coordinates $$\left ( A \cdot \nabla \right) \: B = \left ( A \cdot \nabla B_x \right ) e_x + \left ( A \cdot ...
4
votes
2answers
126 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 ...
4
votes
1answer
529 views

Checking if an expression is equal to zero

I have 6 points in $\mathbb R^3$ as follows: ...
4
votes
1answer
137 views

Bad numerical approximations

I'm trying to do some calculations here, but for some reason Mathematica starts using numerical approximations that are no good for my work. Specifically: ...
4
votes
1answer
1k views

Lie-Bracket of two vector fields

I'm new to Mathematica (installed couple of hours ago) and I need to compute a few Lie brackets between two vector fields $f$ and $g$. $$ f\left(\mathbf{x}\right) = \left( \begin{array}{c} ...
3
votes
1answer
149 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 ...
3
votes
1answer
175 views

compute the gradient in high dimension

The following code is used to compute the gradient of a given 2D data. ...
3
votes
3answers
305 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 ...
3
votes
2answers
2k views

How to substitute numeric values in a symbolic Jacobian matrix?

I have a multi-variate function from $\mathbb{R}^n\to\mathbb{R}^n$. Choosing any desired initial vector, we can produce the corresponding function value, which is a vector as follows. The main problem ...
3
votes
1answer
173 views

Extending D for four-derivatives

I'm currently trying to consistently define rules for extending D[] to four-derivatives. As 'backend' I'm using the package TRACER (http://library.wolfram.com/infocenter/MathSource/2987/), which can ...
3
votes
1answer
52 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 ...
3
votes
1answer
1k views

Plot a function based on Derivative - Gradient field

I'm trying to plot the gradient field of a function in such a way that is possible to change it easily, only editing the function. Consider the code: ...
3
votes
1answer
975 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 ...
3
votes
1answer
78 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 ...
3
votes
1answer
98 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 ...
3
votes
0answers
43 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 --> ...
3
votes
0answers
138 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) ...
2
votes
4answers
132 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: ...
2
votes
3answers
696 views

How do you show a cone inside of a sphere?

I have a sphere of radius 5 and a cone (i.e. z=√(x^2+y^2)) inside of it. I can show them separately, but I'd like to show them together. I've tried a few tricks with opacity, implicit specifications, ...
2
votes
2answers
600 views

Finding a vector field from a set of points

I have a data set of the type $\{x,y,z\}$ where $(x,y)$ is a point and $z$ is the "value" or magnitude at that point. This gives me a triangular sort of shape since $(x,y,z)$ is not defined along the ...
2
votes
1answer
155 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. ...
2
votes
2answers
599 views

Why are these flow lines cut short?

I want to plot some flow lines for a certain vector field, but Mathematica doesn't seem to plot the entire flow line, only a small piece of it. How can I fix this? ...
2
votes
1answer
474 views

Vector Analysis: Why are the Grad, Laplacian and Div being evaluated to zero

For the non linear partial differential equation below, why are the Gradient, Laplacian and Divergence being evaluated to zero despite using the VectorAnalysis ...
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 ...
2
votes
1answer
425 views

Laplacian or Grad of an InterpolatingFunction

For obtaining a Schlieren image from an equation for density, I need to calculate the first derivative of density and make a contour plot. The below code snippet calculates the first derivative w.r.t ...
2
votes
1answer
165 views

StreamPlot of a square-root - Issue

When I plot ...
2
votes
2answers
762 views

CoordinateTransform from Cartesian to Spherical

I have a set of coordinates on the sphere in terms of cartesian coordinates. I would like to convert them to spherical data points. However, when I try to convert the point {0, 0, 1} it tells me that ...
2
votes
1answer
83 views

Can I define a “total Curl” operator similar to a “total derivative (Dt)” operator? [duplicate]

I am trying to take the curl of a vector field. A={A1,A2,A3} B=Curl[A,{x,y,z}] This yields {0,0,0} because Mathematica ...
2
votes
1answer
175 views

How to simplify an expression using a differential equation as an assumption?

I have a fluid dynamics flow described by a 3D velocity field such as u = {ux[x, y, z], uy[x, y, z], uz[x, y, z]} I want to calculate ...
2
votes
1answer
404 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, ...