Previous Page Next Page Contents

linalg::vectorPotential -- vector potential of a three-dimensional vector field

Introduction

linalg::vectorPotential(j, x) returns the vector potential of the vector field j(x) with respect to x. This is a vector field v with curl(v,x) = f.

Call(s)

linalg::vectorPotential(j, [x1, x2, x3] <, Test>)

Parameters

j - a list of three arithmetical expressions, or a 3-dimensional vector (i.e., a 3 x 1 or 1 x 3 matrix of a domain of category Cat::Matrix)
x1,x2,x3 - (indexed) identifiers

Options

Test - linalg::vectorPotential only checks whether the vector field j has a vector potential and returns TRUE or FALSE, respectively.

Returns

a vector with three components, i.e., an 3 x 1 or 1 x 3 matrix of a domain of category Cat::Matrix, or a boolean value.

Related Functions

linalg::curl, linalg::divergence, linalg::grad

Details

Example 1

We check if the vector function j(x,y,z)=[x^2*y,-1/2*y^2*x,-x*y*z] has a vector potential:

>> delete x, y, z:
   linalg::vectorPotential(
     [x^2*y, -1/2*y^2*x, -x*y*z], [x, y, z], Test
   )
                                   TRUE

The answer is yes, so let us compute the vector potential of j:

>> linalg::vectorPotential(
     [x^2*y, -1/2*y^2*x, -x*y*z], [x, y, z]
   )
                              +-          -+
                              |       2    |
                              |    x y  z  |
                              |  - ------  |
                              |      2     |
                              |            |
                              |     2      |
                              |  - x  y z  |
                              |            |
                              |      0     |
                              +-          -+

We check the result:

>> linalg::curl(%, [x, y, z])
                               +-        -+
                               |    2     |
                               |   x  y   |
                               |          |
                               |       2  |
                               |    x y   |
                               |  - ----  |
                               |     2    |
                               |          |
                               |  -x y z  |
                               +-        -+

Example 2

The vector function j=[x^2,2*y,z] does not have a vector potential:

>> linalg::vectorPotential([x^2, 2*y, z], [x, y, z])
                                   FALSE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000