Friday, July 6, 2012

General expressions for gradient, divergence, curl and laplacian in 3D



In this post I have enlisted general expressions for gradient, divergence, curl and laplacian in 3-dimensional (orthogonal) curvilinear co-ordinate system (x1, x2, x3). These operators are frequently needed in classical mechanics, electrodynamics and quantum mechanics in the form of Laplace or Poison equation, Schrodinger equation, fourier transform, wave equation, diffusion equation, etc. The following formulae are very helpful while solving problems in 3-dimensions and handy during entrance exams.

A line element in an arbitrary 3-dimensional orthogonal curvilinear coordinate system (x1, x2, x3) can be written as


 Here (h1, h2, h3) are known as scale factors and are, in general, functions of (x1, x2, x3). For example, a line element in Cartesian co-ordinate system, spherical polar co-ordinate system and cylindrical co-rdinate system can be expressed as
 

Thus, for Cartesian co-ordinate system (x1, x2, x3) = (x, y, z) and (h1, h2, h3) = (1, 1, 1), for spherical polar co-ordinate system (x1, x2, x3) = (r, θ, ϕ) and (h1, h2, h3) = (1, r, r sin θ).


The following are general expressions for gradient, divergence, curl and laplacian in 3-D curvilinear orthogonal co-ordinate system. These expressions can be readily obtained (for any number of dimensions) using tensor calculus in a more general form. A nice geometrical approach is given in appendix section in Introduction to Electrodynamics (3rd edition) by D. J. Griffiths. (In the following expressions, ϕ is a scalar function and is not to be confused with  angle.)



 
 
 






Using these results, we can obtain the expressions for gradient, divergence, curl and laplacian in the three widely used co-ordinate systems viz. Cartesian, Spherical and Cylindrical co-rdinates simply by replacing the general co-rodinates (x1, x2, x3) with the appropriate one. For instance, to obtain curl in spherical co-rdinates replace the general co-ordinates with (r, θ, ϕ) and corresponding parameters (h1, h2, h3) = (1, r, r sin θ). These formulae are very helpful while solving problems in 3 dimensions especially during entrance exams.

2 comments:

Zubair Shaikh said...

hi sir, i have a confusion about divergence.
if we find the divergence of a function and got answer =8, for another function we got it as =5x, and for another function 5x+2y.
So, what we actually get, div.=8 means that the function spreds in 8 direction or any thing els same for another functions.
plz clear my doute.
thanking you.

K. K. Sinha said...

If you look at the expression for divergence you'll see that it consists of derivatives along x, y and z direction. Suppose you differentiate a function f(x) w.r.t. x. What does this differentiation tell you? It gives you an idea about how fast that function is changing. The value of differentiation may be different at different points which means that the rate at which the values of the function is changing is different at different points. Consider the example of a line. If you differentiate the equation of a line, you end up with a constant number which you call slope. If the slope is more, we say the line is steep and its y- coordinate changes much faster than its x-co-ordinate does.On the other hand if the slope of a line is small, the rate at which its y-co-ordinate changes is small compared to its x-co-ordinate. But this rate of change remains constant throughout.

But now if you differentiate a function like f(x) = x^2, you'll get 'x'. This tells us that as we increase the value of 'x', the slope of the function increases. This means as you go higher up the x-axis the rate of change of the function increases (does not remain constant like we had in case of a line). Thus derivatives gives us an idea about how fast or at what rate a function is increasing.

We can use normal derivatives when we have functions in one dimensions like f(x). But we cannot apply the same thing if we had a function of the type f(x, y, z). Here the function varies in x, y and z- directions. In order to in order to find out how the function is varying/changing, we'll have to take derivatives along x, y as well as z- axes. If, at a point (x, y,z), the x derivative is more than the y derivative than this means that the function is changing more rapidly at that point along the x direction compared to the y direction.

For this purpose people invented the del-operator which consists of the three derivatives along the three directions. If you apply this operator on a scalar function/field (like electric potential), you'll get the information on the rate at which that function is varying along different directions (in case of electrostatic potential, this rate of change is called electric field). In the same way, if you apply it on a vector field, you get a number which simply tells you how fast the vector is changing at different particular point.

If you got the divergence of a function (vector field) as 8, this means that at every point the function is changing at the same rate which is 8. If div = 5x, this means that now the rate of change of the function at every point depends on the value of the x-coordinate at that point. The more the x is the the function will change at that point. Similarly, if the div = 5x + 2y, then the function changes with both x,y co-ordinates but the rate of change due to x is more compared to y.