Equate
convert a pair of rectangular objects into a list of equations
Calling Sequence
Parameters
Description
Examples
Equate(u, v)
u
-
list, Array, Matrix, Vector, or algebraic structure representing a vector of the Physics[Vectors] package
v
The Equate(u,v) command receives the rectangular structures u and v, typically of type list, Array, Matrix or Vector, and returns a list of equations, where the left-hand sides of the equations are taken from u and the right-hand sides from the corresponding components of v. The two input objects, u and v, must have the same shapes and sizes, and if only one is an Array then its indices must start at 1.
Equate can also receive two algebraic structures u and v representing vectors of the Vectors subpackage of the Physics package, in which case the list of equations returned is constructed equating the components of u and v. When u and v are projected into different orthonormal basis, the second one is first reprojected onto the basis of the first one; then the components are equated.
Equate⁡1,2,a,b
1=a,2=b
Equate⁡1,2|3,4|5,6,a,b,c,d,e,f
1=a,3=b,5=c,2=d,4=e,6=f
Equate⁡1,2,3,a|b|c
1=a,2=b,3=c
Equate⁡Array⁡1..2,1..2,a,b,c,d,Matrix⁡1,2,3,4
a=1,b=2,c=3,d=4
Equate⁡Vector⁡3,a,b,c,Vector⁡3,1,2,3
a=1,b=2,c=3
Equate⁡Vector⁡3,a,b,c,1,2,3
Equate⁡Matrix⁡2,2,a,b,c,d,1,2|3,4
a=1,b=3,c=2,d=4
Equate⁡Array⁡1..2,1..2,a,b,c,d,1,2|3,4
This is invalid because the dimensions do not match.
Equate⁡1,2,3,4,Array⁡1..4,a,b,c,d
Error, (in Equate) unable to equate these objects
This is invalid because the index origins do not match.
Equate⁡Array⁡−2..1,1,2,3,4,Array⁡1..4,a,b,c,d
To handle vectors of the Vectors subpackage of Physics, first load Vectors
with⁡Physics:-Vectors
&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int
Equate the components of two vectors
R≔x⁢_i+y⁢_j+z⁢_k
R≔x⁢i∧+y⁢j∧+z⁢k∧
V≔−z⁢_i+y−x⁢_k
V≔−z⁢i∧+y−x⁢k∧
Equate⁡R,V
x=−z,y=0,z=y−x
When the two vectors are not projected onto the same orthonormal basis, the second one is reprojected onto the basis of the first one. In the following examples C and S are the same vector as R but expressed in cylindrical and spherical coordinates and corresponding orthonormal bases (see Vectors)
C≔ρ⁢_ρ+z⁢_k
C≔z⁢k∧+ρ⁢ρ∧
S≔r⁢_r
S≔r⁢r∧
Equate⁡R,C
x=cos⁡φ⁢ρ,y=sin⁡φ⁢ρ,z=z
Equate⁡R,S
x=sin⁡θ⁢cos⁡φ⁢r,y=sin⁡θ⁢sin⁡φ⁢r,z=r⁢cos⁡θ
See Also
Array
convert
Matrix
Physics/Vectors
Vector
Download Help Document