## 5646 Reputation

8 years, 277 days

## Regression in Latex between 897 and 905....

Maple 2020

In Latex 897 correct Latex is generated for the following code. In 905, wrong Latex is generated. This is different from the other cases I posted about (links below) and new issue.

In 897, the Latex generated for this example compiles with no error

restart;
sol:=(Vector(2, [x__1(t),x__2(t)])) = (Vector(2, [2^(3/4)*3^(1/4)*(exp(2^(3/4)*3^(1/4)*t)*_C1-exp(-2^(3/4)*3^(1/4)*t)*_C2-sin(2^(3/4)*3^(1/4)*t)*_C3+cos(2^(3/4)*3^(1/4)*t)*_C4),2*6^(1/2)*(exp(2^(3/4)*3^(1/4)*t)*_C1+exp(-2^(3/4)*3^(1/4)*t)*_C2-sin(2^(3/4)*3^(1/4)*t)*_C4-cos(2^(3/4)*3^(1/4)*t)*_C3)]));
Latex(sol)

Now compiling the Latex gives

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}
$\left[\begin{array}{c}x_{1} \! \left(t \right) \\x_{2} \! \left(t \right) \end{array}\right] = \left[\begin{array}{c}2^{\frac{3}{4}} 3^{\frac{1}{4}} \left({\mathrm e}^{2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \mathit{\_C1} -{\mathrm e}^{-2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \mathit{\_C2} -\sin \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \mathit{\_C3} +\cos \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \mathit{\_C4} \right) \\2 \sqrt{6}\, \left({\mathrm e}^{2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \mathit{\_C1} +{\mathrm e}^{-2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \mathit{\_C2} -\sin \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \mathit{\_C4} -\cos \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \mathit{\_C3} \right) \end{array}\right]$
\end{document}

In 905

The Latex(sol) gives

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}
$\left[\begin{array}{c}x_{1} \! \left(t \right) \\ x_{2} \! \left(t \right) \end{array}\right] = \left[\begin{array}{c}2^{\frac{3}{4}} 3^{\frac{1}{4}} \\ \left({\mathrm e}^{2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \textit{\_C1} -{\mathrm e}^{-2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \textit{\_C2} - \\ \sin \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \textit{\_C3} +\cos \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \textit{\_C4} \right) \\ 2 \sqrt{6}\, \\ \left({\mathrm e}^{2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \textit{\_C1} +{\mathrm e}^{-2^{\frac{3}{4}} 3^{\frac{1}{4}} t} \textit{\_C2} - \\ \sin \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \textit{\_C4} -\cos \! \left(2^{\frac{3}{4}} 3^{\frac{1}{4}} t \right) \textit{\_C3} \right) \end{array}\right]$
\end{document}


Which when compiled using texlive lualatex gives error. There is a missing \right.

>lualatex foo5.tex
This is LuaHBTeX, Version 1.12.0 (TeX Live 2020)
restricted system commands enabled.
(./foo5.tex
LaTeX2e <2020-10-01> patch level 2
.....
..Defaults to "dvips" Driver
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/epsfig.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def))))
Defining Automatic Style Generation Macros
) (/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./foo5.aux) (/usr/local/texlive/2020/texmf-dist/tex/latex/base/ts1cmr.fd)
! Missing \right. inserted.
<inserted text>
\right .
l.14 \\

?



Maple 2020.2, Physics 905

Fyi, the issues I know about in Latex()  as of now are these 4

https://www.mapleprimes.com/questions/231398-Regression-In-Latex-Between-897-And?sq=231398

https://www.mapleprimes.com/questions/231397-Latex-Latex-Generates-Command-Not-In

https://www.mapleprimes.com/questions/231273-Why-Latex-Fail-To-Convert-Solution

https://www.mapleprimes.com/questions/231262-Latex-Generates-Wrong-Latex-For-This-Example

## Latex Latex generates command not in Map...

Maple 2020

FYI,

I was testing Physics 905 to see if this bug reported in https://www.mapleprimes.com/questions/231262-Latex-Generates-Wrong-Latex-For-This-Example

But I found that now Maple generates a new command called \munderset  while in 897 it used to be  \Mapleunderset

So the problem was not fixed. In addition now it uses a command called \munderset which is not in any of Maple style files and not a standard Latex macro name.

Replacing \munderset back to \Mapleunderset now the same error that was generated in the above linked to question, using the same exact code shown there.

So I think this new command should remain \Mapleunderset unless there is a new Maple syle file used which is not part of Maple 2020.2?

To reproduce this, please run the same code posted in the above link. No need to duplicate it here again, and you will see this problem.

Maple 2020.2, Physics 905

## how is this ode dAlembert?...

Maple 2020

I think Maple is wrong here. But may be someone could show me how it is correct?

Maple says this ode (below) is of type d'Alembert. But I am not able to show this. It is impossible for me to put this ode in _dAlembert. form. So I gave up.

The challenge then is to put the following first order ODE in the above form to show it is dAlembert.

I could not do it. I worked on this by hand and not possible to get the ODE in the above form. Could someone show this?

restart;
ode:=3*x^2*y(x)^3+y(x)^4+(3*x^3*y(x)^2+4*x*y(x)^3+y(x)^4)*diff(y(x),x) = 0;
DEtools:-odeadvisor(ode);

The first thing I do when I want to show this, is to solve for y(x) from the ode. Since I can't use solve on an ode, I start by replacing all the diff(y(x),x) with say p. Then now solve for y(x). If it is dAlembert, then it should give expression that be put in the form    y(x)=x*f(p) + g(p). Notice that the functions f(p) and g(p) are functions of p only and not of x. This is important.  And f(p) is multiplied by linear term and not x^(3/2) or x^(1/2), etc... The term multiplying f(p) has to be linear in x.

ode:=subs(diff(y(x),x)=p,ode):
sol:=[PDEtools:-Solve(ode,y(x))];


Looking at second and third solutions. None of them is dAlembert.  This can be shown by either simplyfing it with assumptions, where not possible to obtain the needed form, or by simply replacing p back with diff(y(x),x) and asking advisor for the type of the resulting ode

DEtools:-odeadvisor( subs(p=diff(y(x),x),sol[2]));


So none is d'Alembert.

Question is: Could someone may be proof that this ode is d'Alembert? By putting it in the form   y(x)=x*f(p)+g(p)? Or is advisor is wrong here?

ps. I tried infolevel[DEtools:-odeadvisor]:=4 to try to trace it, but it does not work.

pps. I worked this out by hand, and I get

y(x)= x^(3/2)*f(p)  where f(p) = sqrt(-12 p^2)+sqrt(12*p)

And this is not d'Alembert.

## why odeadvisor(ode) gives division by ze...

Maple 2020

I was just using odeadvisor to check type of some ode's, when I noticed it gives

Error, (in ODEtools/radnormal) numeric exception: division by zero

on ode's of form y(x)=x*diff(y(x),x)^n+x^2

for different n:

restart;
for n from -5 to 5 do
if n<>0 then
try
ode:=y(x)=x*diff(y(x),x)^(n)+x^2;
print("n=",n,"OK, no error");
catch:
print("n=",n,StringTools:-FormatMessage( lastexception[2..-1] ));
end try;
fi;
od;


Is this known issue and is expected?

Maple 2020.2 on windows 10

## improper op or subscript selector callin...

Maple 2020

I am getting this error. Is this expected or known issue?

restart;
sol:=-csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^4/((k + 1)*(_C1*a - _C1*x - 1)^2) + 4*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^3*x/((k + 1)*(_C1*a - _C1*x - 1)^2) - 6*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^2*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + 4*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a*x^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*x^4/((k + 1)*(_C1*a - _C1*x - 1)^2) + a^2/((k + 1)*(_C1*a - _C1*x - 1)^2) - 2*a*x/((k + 1)*(_C1*a - _C1*x - 1)^2) + x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + csgn(1, 1/(_C1*a - _C1*x - 1))*a^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - 3*csgn(1, 1/(_C1*a - _C1*x - 1))*a^2*x/((k + 1)*(_C1*a - _C1*x - 1)^2) + 3*csgn(1, 1/(_C1*a - _C1*x - 1))*a*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1, 1/(_C1*a - _C1*x - 1))*x^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1/(_C1*a - _C1*x - 1))*a^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + 2*csgn(1/(_C1*a - _C1*x - 1))*a*x/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1/(_C1*a - _C1*x - 1))*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2);

solve( simplify(sol)=0,x,allsolutions = true) assuming real; #also x::real, same error


Maple 2020.2 on winsows 10. Physics 897

 5 6 7 8 9 10 11 Last Page 7 of 114
﻿