## few issues with Latex in LinearAlgebra...

I assume the goal is to have the Latex output close to the screen output in Maple. In these examples this is the case.

Example 1

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-NullSpace(A)


But the Latex generated for the above, using the Latex() command is

\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \}

Which when compiled

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
$\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \}$
\end{document}


gives

\left\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \right\}

Which compiles to

Example 2

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-RowSpace(A)


The Latex of the above is

[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right],
\left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right],
\left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]]


Which when compiled gives

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
$[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right], \left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right], \left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]]$
\end{document}

gives

A better Latex would be

\left[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right],
\left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right],
\left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]\right]

Which compiles to

Now the size of the [[ is the same on both ends.

example 3

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-ColumnSpace(A)


The Latex given for the above is

[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right],
\left[\begin{array}{c}0 \\1 \\0 \end{array}\right],
\left[\begin{array}{c}0 \\0 \\1 \end{array}\right]]


Which when compiled

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
$[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right], \left[\begin{array}{c}0 \\1 \\0 \end{array}\right], \left[\begin{array}{c}0 \\0 \\1 \end{array}\right]]$
\end{document}

gives

A better Latex is

\left[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right],
\left[\begin{array}{c}0 \\1 \\0 \end{array}\right],
\left[\begin{array}{c}0 \\0 \\1 \end{array}\right]\right]

Which compiles to

Maple 2020.2 with Physics  891

## How to calculate the Delta Energy with "Thermophys...

I'm trying to just use "ThermophysicalData:-Chemical" function  to calculate below:

1 mol water vapor(H2O,g) condenses to liquid water  at 100C and 101.325kPa

Is there a function embeded to calculate DeltaW/H/S while switching the phases of matter.

thank you.

## how to make sort work with alias?...

Here is the problem. I am trying to use sort() to make solution to ode show up with constant of integrations _C1 at the front of the term, instead of how Maple shows it, which is after the term, which does not look good.

As recommened in  Why-Maple-Refuses-To-Change-Location

sort() works well. Except for this: I am also using alias for the constant of integrations, to get nicer Latex output, as recommended in earlier post (which I can't find now).

But once I use alias, now sort no longer produce the result I want. Here is an example

restart;
sol:=dsolve(diff(y(x),x) = x+y(x),y(x));
sort(sol)


Here sort works. It moved the term with constant of integration to the front, and _C1 at front, which is what I want as it looks more clear.

But when I do

restart;
alias(seq(c[k]=_C||k,k=0..10)):
sol:=dsolve(diff(y(x),x) = x+y(x),y(x));
sort(sol)


This is because, I am assuming, the order of _C1 is higher than c[1] and sort is using the alias of _C1 to sort on and not _C1 itself.

The only reason I am using alias, is to get nicer Latex output when converting the solution to Latex vs. when using _C1

Is there a way to tell sort to treat c[1] as _C1, and c[2] as _C2, etc...  in terms of lexicographical ordering?

I see an order option for the command sort() in help, but so far did not know how to use it for the above purpose. This only affects _C1,_C2,_C3,_C4,.. and nothing else and I only use sort() on the output of the solution of ode. May be I need to write an order function and in there tell it c[1] has same order as _C1? But _C1 has c[1] as alias? so I do not think this will not work.

Basically I want to use the alias, but also use sort() on the result as if these constants of integrations where _C1,_C2, etc..

in my code, I set the alias at the global level, before I call any function in my package.

Any ideas how to do this or workaround this?

Maple 2020.2 on windows

## Conics through 3 points with homogeous coordinates...

An exercise of 1948 commits me to form the equation of conics passing by 3 points. Let P=0, Q=0, R=0 be the equations of the sides of the triangle ABC; if we associate these sides 2 to 2 we obtain 3 conics passing through points A, B, C having for equations QR=0, RP=0, PQ=0. As a result, the general equation of conics around the triangle ABC is: aQR+bRP+cPQ=0. P, Q, R being equations of the form mx+ny+pz=0 (so-called homogeneous coordinates). Then change to refined coordinates with x+y+z=1 (formula found on the internet and surely misinterpreted). Is it necessary to change of base ? Thank you for your help.

## When is evalDG needed when creating a tetrad etc i...

Given a metric, to compute quantities in the NP formalism one needs to specify a null tetrad. In the various examples in the help pages, sometimes the tetrad is specified simply as a list of 4 vectors, e.g., NT := [...] and sometimes evalDG is applied as in NT := evalDG({...]). Using the first format, Maple accepted NT as argument in NPSpinCoefficients but  NPCurvatureScalars(SpinCoefficients,NT) complained that the second argument wasn't a list of four vectors. When I used the second format, both commands returned the expected results. Why the difference?

RobinsonTrautmanSpinDG.mw