## Maple 2023: The colorbar option for contour plots...

by: Maple 2023

Maple 2023: The colorbar option for contour plots does not work when used with the Explore command. See the example below.

## Maple 2023 - Tasks dosnt work

by: Maple 2023

Just installed Maple 2023 on Macbook Air M1.

/

## A request for the implementation of the inverse...

by: Maple 2023

The inverse problem of a mathematical question is often very interesting.

I'm glad to see that Maple 2023 has added several new graph operations. The GraphTheory[ConormalProduct], GraphTheory[LexicographicProduct], GraphTheory[ModularProduct] and GraphTheory[StrongProduct] commands were introduced in Maple 2023.

In fact, we often encounter their inverse problems in graph theory as well. Fortunately, most of them can find corresponding algorithms, but the implementation of these algorithms is almost nonexistent.

I once asked a question involving the inverse operation of the lexicographic product.

Today, I will introduce the inverse operation of line graph operations. (In fact, I am trying to approach these problems with a unified perspective.)

To obtain the line graph of a graph is easy, but what about the reverse? That is to say, to test whether the graph is a line graph. Moreover, if a graph  g is the line graph of some other graph h, can we find h? (Maybe not unique. **Whitney isomorphism theorem tells us that if the line graphs of two connected graphs are isomorphic, then the underlying graphs are isomorphic, except in the case of the triangle graph K_3 and the claw K_{1,3}, which have isomorphic line graphs but are not themselves isomorphic.)

Wikipedia tells us that there are two approaches, one of which is to check if the graph contains any of the nine forbidden induced subgraphs.

Beineke's forbidden-subgraph characterization:  A graph is a line graph if and only if it does not contain one of these nine graphs as an induced subgraph.

This approach can always be implemented, but it may not be very fast. Another approach is to use the linear time algorithms mentioned in the following article.

• Roussopoulos, N. D. (1973), "A max {m,n} algorithm for determining the graph H from its line graph G", Information Processing Letters, 2 (4): 108–112, doi:10.1016/0020-0190(73)90029-X, MR 0424435

Or:

•   Lehot, Philippe G. H. (1974), "An optimal algorithm to detect a line graph and output its root graph", Journal of the ACM, 21 (4): 569–575, doi:10.1145/321850.321853, MR 0347690, S2CID 15036484.

SageMath can do that:

`   root_graph()`

Return the root graph corresponding to the given graph.

`    is_line_graph()`

Check whether a graph is a line graph.

For example, K_{2,2,2,2} is not the line graph of any graph.

```K2222 = graphs.CompleteMultipartiteGraph([2, 2, 2, 2])
C=K2222.is_line_graph(certificate=True)[1]
C.show() # Containing the ninth forbidden induced subgraph.
```

Another Sage example for showing that the complement of the Petersen graph is the line graph of K_5.

```P = graphs.PetersenGraph()
C = P.complement()
sage.graphs.line_graph.root_graph(C, verbose=False)
```

```(Graph on 5 vertices, {0: (0, 1), 1: (2, 3), 2: (0, 4), 3: (1, 3), 4: (2, 4), 5: (3, 4), 6: (1, 4), 7: (1, 2), 8: (0, 2), 9: (0, 3)})
```

Following this line of thought, can Maple gradually implement the inverse operations of some standard graph operations?

Here are some examples:

•   CartesianProduct
•   TensorProduct
•   ConormalProduct
•   LexicographicProduct
•   ModularProduct
•   StrongProduct
•   LineGraph
•  GraphPower

## Maple 2023 is here!

by: Maple 2023

The moment we've all been waiting for has arrived: Maple 2023 is here!

With this release we continue to pursue our mission to provide powerful technology to explore, derive, capture, solve and disseminate mathematical problems and their applications, and to make math easier to learn, understand, and use. Bearing this in mind, our team of mathematicians and developers have dedicated the last year to adding new features and enhancements that not only improve the math engine but make that math engine more easily accessible within a user-friendly interface.

And if you ever wonder where our team gets inspiration, you don't need to look further than Maple Primes. Many of the improvements that went into Maple 2023 came as a direct result of feedback from users. I’ll highlight a few of those user-requested features below, and you can learn more about these, and many, many other improvements, in What’s New in Maple 2023.

• The Plot Builder in Maple 2023 now allows you to build interactive plot explorations where parameters are controlled by sliders or dials, and customize them as easily as you can other plots

• In Maple 2023, 2-D contour and density plots now feature a color bar to show the values of the gradations.

• For those who write a lot of code:  You can now open your .mpl Maple code files directly in Maple’s code editor, where you can  view and edit the file from inside Maple using the editor’s syntax highlighting, command completion, and automatic indenting.

• Integration has been improved in many ways. Here’s one of them:  The definite integration method that works via MeijerG convolutions now does a better job of checking conditions on parameters so that they are only applied under proper assumptions. It also tells you the conditions under which the method could have produced an answer, so if your problem does meet those conditions, you can add the appropriate assumptions to get your result.
• Many people have asked that we make it easier for them to create more complex interactive Math Apps and applications that require programming, such as interactive clickable plots, quizzes that provide feedback, examples that provide solution steps. And I’m pleased to announce that we’ve done that in Maple 2023 with the introduction of the Quiz Builder and the Canvas Scripting Gallery.
• The new Quiz Builder comes loaded with sample quizzes and makes it easy to create your own custom quiz questions. Launch the quiz builder next time you want to author interactive quizzes with randomized questions, different response types, hints, feedback, and show the solution. It’s probably one of my favorite features in Maple 2023.

• The Scripting Gallery in Maple 2023 provides 44 templates and modifiable examples that make it easier to create more complex Math Apps and interactive applications that require programming. The Maple code used to build each application in the scripting gallery can be easily viewed, copied and modified, so you can customize specific applications or use the code as a starting point for your own work

• Finally, here’s one that is bound to make a lot of people happy: You can finally have more than one help page open at the same time!

For more information about all the new features and enhancements in Maple 2023, check out the What’s New in Maple 2023.

P.S. In case you weren’t aware - in addition to Maple, the Maplesoft Mathematics Suite includes a variety of other complementary software products, including online and mobile solutions, that help you teach and learn math and math-related courses.  Even avid Maple users may find something of interest!

## Is there an error in dsolve using method=laplace...

Maple 2021

I was looking at symbolically solving a second-order differential equation and it looks like the method=laplace method has a sign error when the coefficients are presented in a certain way.  Below is a picture of some examples with and without method=laplace that should all have the same closed form.  Note that lines (s6) and (s8) have different signs in the exponential than they should have (which is a HUGE problem):

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >
 (10)
 >
 >
 (11)
 >
 (12)
 >
 (13)
 >
 (14)
 >

## Simplifying transfer functions with units and...

by: Maple

Transfer functions are normally not used with units. Involving units when deriving transfer functions can help identify unit inconsistencies and reduce the likelihood of unit conversion errors.

Maple is already a great help in not having to do this manually. However, the final step of simplification still requires manual intervention, as shown in this example.

Given transfer function

 (1)

Desired output (derived by hand) where the transfer function is separated in a dimensionless expression and a gain that can be attributed to units with a physical meaning in the context of an application (here displacement per voltage).

 (2)

 (3)

Units to factor out in the denominator are . Quick check:

 (4)

 (5)

"Simplification" attempts with the denominator

 (6)

 (7)

is not effective because all units are wrapped in Unit commands. Example:

 (8)

Expand does not expand the argument of Unit commands.

 >
 Units:-Unit(kg^2*m^2/s^2/A^2)

C1: Expanding Unit command

An expand facility could be a solution that expands a Unit command with combined units to a product of separate Unit commands.

When all units are expanded in a separate Unit command, collect or factor can be used to collect units:

 (9)

 (10)

 (11)

C2: Using the Natural Units Environment

In this environment, no Unit commands are required and the collection of units should work with Maple commands.
However, for the expressions discussed here, this would lead to a naming conflict with the complex variable s of the transfer function and the unit symbol s for seconds.

C3: A type declaration or unit assumptions on names

A type declaration as an option of commands like in

 (12)

could help Maple in simplification tasks (in its general meaning of making expressions shorter or smaller).
Alternatively, assumptions could provide information of which "unit type" a name is

On various occasions (beyond transfer functions) I have looked for such a functionality.

C4: DynamicSystems Package with units

C4.1: The complex variable s could be attributed to the unit 1/s (i.e. Hertz) either by default or as an option. This could enable using units within the dynamic system package which is not possible in Maple 2022. An example what the package provides currently can be found here:
The phase plot shows that the package is already implicitly assuming that the unit of s is Hertz. A logical extension would be to have magnitude plots with units (e.g. m/V, as in this example).

C4.2: A dedicated "gain" command that takes units into account and that could potentially simplify the transfer function to an expression like (2) in SI units. In such a way the transfer function is separated into a dimensionless (but frequency depended) term and a gain term with units.
This would make the transfer of transfer functions to MapleSim easy and avoid unit conversion errors.

## One of the basics of the Draghilev method

by: Maple

Does everyone have a good idea of â€‹â€‹the work of the Draghilev method? For example, in this answer https://www.mapleprimes.com/questions/235407-The-Second-Example-Of-Finding-All-Solutions#answer291268
( https://www.mapleprimes.com/questions/235407-The-Second-Example-Of-Finding-All-Solutions )
there was a very successful attempt by Rouben Rostamian to calculate the line of intersection of surfaces without applying the Draghilev method.
Let now not 3d, but 8d. And how will the solve command work in this case? Imagine that aij ((i=1..7,j=1..8)) are partial derivatives, and xj (,j=1..8) are derivatives, as in the above example. f8 is responsible for the parametrization condition.

```restart;
f1 := a11*x1+a12*x2+a13*x3+a14*x4+a15*x5+a16*x6+a17*x7+a18*x8;
f2 := a21*x1+a22*x2+a23*x3+a24*x4+a25*x5+a26*x6+a27*x7+a28*x8;
f3 := a31*x1+a32*x2+a33*x3+a34*x4+a35*x5+a36*x6+a37*x7+a38*x8;
f4 := a41*x1+a42*x2+a43*x3+a44*x4+a45*x5+a46*x6+a47*x7+a48*x8;
f5 := a51*x1+a52*x2+a53*x3+a54*x4+a55*x5+a56*x6+a57*x7+a58*x8;
f6 := a61*x1+a62*x2+a63*x3+a64*x4+a65*x5+a66*x6+a67*x7+a68*x8;
f7 := a71*x1+a72*x2+a73*x3+a74*x4+a75*x5+a76*x6+a77*x7+a78*x8;
f8 := x1^2+x2^2+x3^2+x4^2+x5^2+x6^2+x7^2+x8^2-1;
allvalues(solve({f1, f2, f3, f4, f5, f6, f7, f8}, {x1, x2, x3, x4, x5, x6, x7, x8}))```

And this is how the Draghilev method works in this case.

```restart; with(LinearAlgebra):
f1 := a11*x1+a12*x2+a13*x3+a14*x4+a15*x5+a16*x6+a17*x7+a18*x8;
f2 := a21*x1+a22*x2+a23*x3+a24*x4+a25*x5+a26*x6+a27*x7+a28*x8;
f3 := a31*x1+a32*x2+a33*x3+a34*x4+a35*x5+a36*x6+a37*x7+a38*x8;
f4 := a41*x1+a42*x2+a43*x3+a44*x4+a45*x5+a46*x6+a47*x7+a48*x8;
f5 := a51*x1+a52*x2+a53*x3+a54*x4+a55*x5+a56*x6+a57*x7+a58*x8;
f6 := a61*x1+a62*x2+a63*x3+a64*x4+a65*x5+a66*x6+a67*x7+a68*x8;
f7 := a71*x1+a72*x2+a73*x3+a74*x4+a75*x5+a76*x6+a77*x7+a78*x8;

n := 7;
x := seq(eval(cat('x', i)), i = 1 .. n+1):
F := [seq(eval(cat('f', i)), i = 1 .. n)]:
A := Matrix(nops(F), nops(F)+1):
for j to nops(F) do for i to nops(F)+1 do A[j, i] := op(1, op(i, op(j, F)))
end do:
end do:

# b[i] and b[n+1] are solutions of a linear homogeneous system and at the
# same time they serve as the right-hand sides of an autonomous ODE.
for i to n do

b[i] := Determinant(DeleteColumn(ColumnOperation(A, [i, n+1]), n+1))
end do:
b[n+1] := -Determinant(DeleteColumn(A, n+1)):
```

Only the original seven linear homogeneous equations with eight variables are needed. We solve them according to Cramer's rule, and in order to have uniqueness when solving the ODE, we use a point on the curve (according to the theory). (This point is sought in any convenient way.)
If we want to get a parameterization, then additionally, directly in dsolve, we can add the following:

```for i to n do
b[i] := simplify(Determinant(DeleteColumn(ColumnOperation(A, [i, n+1]), n+1)))
end do:
b[n+1] := simplify(-Determinant(DeleteColumn(A, n+1)));
deqs := seq(diff(x[i](s), s) = b[i]/(b[1]^2+b[2]^2+b[3]^2+b[4]^2+b[5]^2+b[6]^2+b[7]^2+b[8]^2)^.5, i = 1 .. n+1):```

## Maple should still try harder

by: Maple 2022

In an old post, vv reported a bug in simpl/max, which has been "fixed" in Maple 2018. However, it seem that such repairs are not complete enough.
For example, suppose it is required to find the (squared) distance between the origin and a point on x3 - x + y2 = â…“ which is closest to the origin. In other words, one needs to minimize x²ï¼‹y² among the points on this curve, i.e.,

`extrema(x^2 + y^2, {x^3 + y^2 - x = 1/3}, {x, y}, 's'); # in exact form`

Unfortunately, an identical error message appears again:

 > restart;
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 (4)

How about changing the values of parameter ?

```for a from -3 by 3/27 to 3 do
try
extrema(x^2 + y^2, {x^3 + y^2 - x = a}, {x, y});
catch:
print(a);
end;
od;
-1
--
3

-2
--
9

-1
--
9

1
-
9

2
-
9

1
-
3
```

By the way, like extrema, Student[MultivariateCalculus]:-LagrangeMultipliers also executes the Lagrange Multiplier method, but strangely,

`Student[MultivariateCalculus][LagrangeMultipliers](y^2 + x^2, [x^3 + y^2 - x - 1/3], [x, y], output = plot):`

does not cause any errors.

## Integral Vector Calculus and parametrization of...

by: Maple

This is about functionality introduced in Maple 2022, which however is still not well known: Integral Vector Calculus and parametrization using symbolic (algebraic) vector notation. Four new commands were added to the Physics:-Vectors package, implementing the parametrization of curves, surfaces and volumes, as well as the computation of path, surface and volume vector integrals. Those are integrals where the integrand is a scalar or vector function. The computation is done from any description (algebraic, parametric, vectorial) of the region of integration - a path, surface or volume.

There are three kinds of line or path integrals:

NOTE Jan 1: Updated the worksheet linked below; it runs in Maple 2022.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

## New Maple application center search doesn't work

The search query in the new Maple Application center is broken.  There is no advanced search options and a search for mapleflow or maple flow brings up 0 results.  There should at least be one found, for example the search should have at least brought up The Liquid Volume in a Partially-Filled Horizontal Tank".

## New coordinate-system labels in Physics

by: Maple

Notation is one of the most important things to communicate with others in science. It is remarkable how many people use or do not use a computer algebra package just because of its notation. For those reasons, in the context of the Physics package, strong emphasis is put on using textbook notation as much as possible regarding input and output, including, for that purpose, as people here know, significant developments in Maple typesetting.

Still, for historical reasons, when using the Physics package, the labels used to refer to a coordinate system had been a single Capital Letter, as in X, Y, ...It was not possible to use, e.g. X', or x.

That has changed. Starting with the Maplesoft Physics Updates v.1308, any symbol can be used as a coordinate system label. The lines below demo this change.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

## Deriving 4D relativistic Lorentz transformations

by: Maple

Following the previous post on The Electromagnetic Field of Moving Charges, this is another non-trivial exercise, the derivation of 4-dimensional relativistic Lorentz transformations,  a problem of a 3rd-year undergraduate course on Special Relativity whose solution requires "tensor & matrix" manipulation techniques. At the end, there is a link to the Maple document, so that the computation below can be reproduced, and a link to a corresponding PDF file with all the sections open.

Deriving 4D relativistic Lorentz transformations

Freddy Baudine(1), Edgardo S. Cheb-Terrab(2)

(1) Retired, passionate about Mathematics and Physics

(2) Physics, Differential Equations and Mathematical Functions, Maplesoft

Lorentz transformations are a six-parameter family of linear transformations  that relate the values of the coordinates  of an event in one inertial reference system to the coordinates  of the same event in another inertial system that moves at a constant velocity relative to the former. An explicit form of  can be derived from physics principles, or in a purely algebraic mathematical manner. A derivation from physics principles is done in an upcoming post about relativistic dynamics, while in this post we derive the form of  mathematically, as rotations in a (pseudo) Euclidean 4 dimensional space. Most of the presentation below follows the one found in Jackson's book on Classical Electrodynamics [1].

The computations below in Maple 2022 make use of the Maplesoft Physics Updates v.1283 or newer.

 Formulation of the problem and ansatz The problem is to find a group of linear transformations,     that represent rotations in a 4D (pseudo) Euclidean spacetime, and so they leave invariant the norm of the 4D position vector ; that is, For the purpose of deriving the form of , a relevant property for it can be inferred by rewriting the invariance of the norm in terms of . In steps, from the above,     from where, or in matrix (4 x 4) form, , where  is the transpose of . Taking the determinant of both sides of this equation, and recalling that , we get     The determination of  is analogous to the determination of the matrix  (3D tensor ) representing rotations in the 3D space, where the same line of reasoning leads to . To exclude reflection transformations, that have  and cannot be obtained through any sequence of rotations, because they do not preserve the relative orientation of the axes, the sign that represents our problem is +. To explicitly construct the transformation matrix , Jackson proposes the ansatz       Summarizing: the determination of  consists of determining  entering  such that followed by computing the exponential of the matrix .

Determination of

In order to compare results with Jackson's book, we use the same signature he uses, , and lowercase Latin letters to represent space tensor indices, while spacetime indices are represented using Greek letters, which is already Physics' default.

 (1)

Start by defining the tensor  whose components are to be determined. For practical purposes, define a macro  to represent the tensor and use  to represent its components

 (2)

 (3)

Next, from  (see above in Formulation of the problem) one can derive the form of . To work algebraically with  representing matrices, set these symbols as noncommutative

 (4)

From

 (5)

it follows that

 (6)

 (7)

Expanding the exponential using , and taking into account that the matrix product  can be rewritten as, the left-hand side of (7) can be written as

 (8)

Multiplying by

 (9)

Recalling that  ,  and that for any matrix , ,

 (10)

 (11)

To allow for the combination of the exponentials, now that everything is in tensor notation, remove the noncommutative character of

 (12)

 (13)

Since every tensor component of this expression is real, taking the logarithm at both sides and simplifying tensor indices

 (14)

 (15)

So the components of

 (16)

satisfy (15). Using TensorArray  the components of that tensorial equation are

 (17)

Simplifying taking these equations into account results in the form of  we were looking for

 (18)

This is equation (11.90) in Jackson's book [1]. By eye we see there are only six independent parameters in , or via

 (19)

 (20)

This number is expected: a rotation in 3D space can always be represented as the composition of three rotations, and so, characterized by 3 parameters: the rotation angles measured on each of the space planes . Likewise, a rotation in 4D space is characterized by 6 parameters: rotations on each of the three space planes, parameters  and ,  and rotations on the spacetime planes, parameters . Define now  using (18) for further computing with it in the next section

 (21)

Determination of

From the components of  in (18), the components of  can be computed directly using the  command. Then, following Jackson's book, in what follows we also derive a general formula for in terms of  and  shown in [1] as equation (11.98), finally showing the form of  as a function of the relative velocity of the two inertial systems of references.

An explicit form of  in the case of a rotation on the plane can be computed by taking equal to zero all the parameters in (19) but for  and substituting in

 (22)

 (23)

Computing the matrix exponential,

 (24)

 (25)

This is formula (4.2) in Landau & Lifshitz book [2]. An explicit form of  in the case of a rotation on the plane can be computed by taking equal to zero all the parameters in (19) but for

 (26)

 (27)

 (28)

Rewriting

Following Jackson's notation, for readability, redefine the 6 parameters entering  as

 (29)

(Note in the above the surrounding backquotes '...' to prevent a premature evaluation of the left-hand sides; that is necessary when using the  command.) With this redefinition,  becomes

 (30)

where each parameter is related to a rotation angle on one plane. Any Lorentz transformation (rotation in 4D pseudo-Euclidean space) can be represented as the composition of these six rotations, and to each rotation, corresponds the matrix that results from taking equal to zero all of the six parameters but one.

The set of six parameters can be split into two sets of three parameters each, one representing rotations on the  planes, parameters , and the other representing rotations on the  planes, parameters . With that, following [1], (30) can be rewritten in terms of four 3D tensors, two of them with the parameters as components, the other two with matrix as components, as follows:

 (31)

 (32)

The 3D tensors  and  satisfy the commutation relations

 (33)

 (34)

 (35)

 (36)

The matrix components of the 3D tensor , related to rotations on the  planes, are

 (37)

 (38)

 (39)

The matrix components of the 3D tensor , related to rotations on the  3D space planes, are

 (40)

 (41)

 (42)

 Verifying the commutation relations between  and

The  tensor is now expressed in terms of these objects as

 (50)

where the right-hand side, without free indices, represents the matrix form of . This notation makes explicit the fact that any Lorentz transformation can always be written as the composition of six rotations

 (51)

 (52)

 (53)

which is the same as the starting point (30)

The transformation , where  , as a function of the relative velocity of two inertial systems

As seen in the previous subsection, in , the second term, , corresponds to 3D rotations embedded in the general form of 4D Lorentz transformations, and  is the term that relates the coordinates of two inertial systems of reference that move with respect to each other at constant velocity .  In this section,  is rewritten in terms of that velocity, arriving at equation (11.98)  of Jackson's book [1]. The key observation is that the 3D vector , can be rewritten in terms of , where  and c is the velocity of light (for the rationale of that relation, see [2], sec 4, discussion before formula (4.3)).

Use a macro - say ub - to represent the atomic variable  (this variable can be entered as `#mover(mi("&beta;"),mo("&circ;")`. In general, to create atomic variables, see the section on Atomic Variables of the page 2DMathDetails ).

 (54)

 (55)

With these two definitions, and excluding the rotation term  we have

 (56)

 (57)

 (58)

From this expression, the form of  can be obtained as in (24) using  and simplifying the result taking into account that  is a unit vector

 (59)

 (60)

It is useful at this point to analyze the dependency on the components of  of this matrix

 (61)

We see that the diagonal element  depends on two instead of only one component of  . That is due to the simplification with respect to side relations , performed in (60), that constructs an elimination Groebner Basis that cannot reduce at once, using the single equation (59), the dependency of all of the elements  and  to a single component of  . So, to reduce further the dependency of the  element, this component of (60) requires one more simplification step, using a different elimination strategy, explicitly requesting the elimination of

 (62)

 (63)

This result involves only , and with it the form of  becomes

 (64)

Replacing now the components of the unit vector  by the components of the vector  divided by its modulus

 (65)

and recalling that

 (66)

to get equation (11.98) in Jackson's book it suffices to introduce (the customary notation)

 (67)

 (68)

This is equation (11.98) in Jackson's book.

Finally, to get the form of this general Lorentz transformation excluding 3D rotations, directly expressed in terms of the relative velocity  of the two inertial systems of references, introduce

 (69)

At this point it suffices to Define (69) as tensors

 (70)

and remove  and  from the formulation using

 (71)

 (72)

 References [1] J.D. Jackson, "Classical Electrodynamics", third edition, 1999. [2] L.D. Landau, E.M. Lifshitz, "The Classical Theory of Fields", Course of Theoretical Physics V.2, 4th revised English edition, 1975.

Deriving_the_mathematical_form_of_Lorentz_transformations.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

## Should there be a Maple language reference manual?...

by: Maple

According to Wikipedia

"In computing, a programming language reference or language reference manual is
part of the documentation associated with most mainstream programming languages. It is
written for users and developers, and describes the basic elements of the language and how
to use them in a program. For a command-based language, for example, this will include details
of every available command and of the syntax for using it.

The reference manual is usually separate and distinct from a more detailed
programming language specification meant for implementors of the language rather than those who simply use it to accomplish some processing task."

And no, Maple's Programming guide is not a Language reference manual. This is a guide to how to program in Maple. But it is not reference manual for the language itself. i.e. description of the Language itself.

Examples of Language reference manuals are

C

Original C++

Python

Fortran 77

and so on.

Why is there no LRM for Maple? Should there be one? I find Maple semantics sometime confusing, and many times I find how things work by trial and error. Having a reference to look at will be good.

I know for a language as large as Maple, this is not easy to do. But it will good for Maplesoft to invest into making one.

## The Electromagnetic Field of Moving Charges

by: Maple

This is an interesting exercise, the computation of the Liénard–Wiechert potentials describing the classical electromagnetic field of a moving electric point charge, a problem of a 3rd year undergrad course in Electrodynamics. The calculation is nontrivial and is performed below using the Physics  package, following the presentation in [1] (Landau & Lifshitz "The classical theory of fields"). I have not seen this calculation performed on a computer algebra worksheet before. Thus, this also showcases the more advanced level of symbolic problems that can currently be tackled on a Maple worksheet. At the end, the corresponding document is linked  and with it the computation below can be reproduced. There is also a link to a corresponding PDF file with all the sections open.

Moving charges:
The retarded and Liénard-Wiechert potentials, and the fields  and

Freddy Baudine(1), Edgardo S. Cheb-Terrab(2)

(1) Retired, passionate about Mathematics and Physics

(2) Physics, Differential Equations and Mathematical Functions, Maplesoft

Generally speaking, determining the electric and magnetic fields of a distribution of charges involves determining the potentials  and , followed by determining the fields  and  from

,

In turn, the formulation of the equations for  and  is simple: they follow from the 4D second pair of Maxwell equations, in tensor notation

where  is the electromagnetic field tensor and  is the 4D current. After imposing the Lorentz condition

,     i.e.

we get

which in 3D form results in

where  is the current and  is the charge density.

Following the presentation shown in [1] (Landau and Lifshitz, "The classical theory of fields", sec. 62 and 63), below we solve these equations for  and  resulting in the so-called retarded potentials, then recompute these fields as produced by a charge moving along a given trajectory  - the so-called Liénard-Wiechert potentials - finally computing an explicit form for the corresponding  and .

While the computation of the generic retarded potentials is, in principle, simple, obtaining their form for a charge moving along a given trajectory , and from there the form of the fields  and  shown in Landau's book, involves nontrivial algebraic manipulations. The presentation below thus also shows a technique to map onto the computer the manipulations typically done with paper and pencil for these problems. To reproduce the contents below, the Maplesoft Physics Updates v.1252 or newer is required.

 (1)

The retarded potentials  and

The equations which determine the scalar and vector potentials of an arbitrary electromagnetic field are input as

 (2)

 (3)

 (4)

The solutions to these inhomogeneous equations are computed as the sum of the solutions for the equations without right-hand side plus a particular solution to the equation with right-hand side.

 Computing the solution to the equations for  and

The Liénard-Wiechert potentials of a charge moving along

From (13), the potential at the point is determined by the charge , i.e. by the position of the charge e at the earlier time

The quantityis the 3D distance from the position of the charge at the time  to the 3D point of observation. In the previous section, the charge was located at the origin and at rest, so , the radial coordinate. If the charge is moving, say on a path , we have

From (13) and the definition of  above, the potential  of a moving charge can be written as

When the charge is at rest, in the Lorentz gauge we are working, the vector potential is . When the charge is moving, the form of  can be found searching for a solution to  that gives  when . Following [1], this solution can be written as

where  is the four velocity of the charge, .

Without showing the intermediate steps, [1] presents the three dimensional vectorial form of these potentials  and  as

,

 Computing the vectorial form of the Liénard-Wiechert potentials

The electric and magnetic fields  and  of a charge moving along

The electric and magnetic fields at a point  are calculated from the potentials  and  through the formulas

,

where, for the case of a charge moving on a path , these potentials were calculated in the previous section as (24) and (18)

These two expressions, however, depend on the time only through the retarded time . This dependence is within  and through the velocity of the charge . So, before performing the differentiations, this dependence on  must be taken into account.

 (29)

 (30)

The Electric field

 Computation of
 Computation of

Collecting the results of the two previous subsections, we have for the electric field

 (60)

 (61)

The book, presents this result as equation (63.8):

where  and . To rewrite (61) as in the above, introduce the two triple vector products

 (62)

 (63)

 (64)

 (65)

Split now this result into two terms, one of them involving the acceleration . For that purpose first expand the expression without expanding the cross products

 (66)

Introduce the notation used in the textbook,  and  and proceed with the splitting

 (67)

Rearrange only the first term using simplify; that can be done in different ways, perhaps the simplest is using subsop

 (68)

By eye this result is mathematically equal to equation (63.8) of the textbook, shown here above before (62) .

 Algebraic manipulation rewriting (68) as the textbook equation (63.8)

The magnetic field

The book does not show an explicit form for , it only indicates that it is related to the electric field by the formula

Thus in this section we compute the explicit form of  and show that this relationship mentioned in the book holds. To compute  we proceed as done in the previous sections, the right-hand side should be taken at the previous (retarded) time . For clarity, turn OFF the compact display of functions.

We need to calculate

 (75)