## Finding the integral of a piecewise function...

The interval [0,T] is divided into n subintervals [i*h, (i + 1)*h], i = 0,1,2, . . . ,n -1, of equal lengths h where h=T/N.

The first (n + 1) hat functions   is defined as follows:

Question:

How to find g_ij ( the value of the following integral)

=

where

i = 0,1,2, . . . ,n -1,

alpha>0,

0<=t<h.

In fact,

by using the Maple, I want to check whether it is equal to the following expression or not:

## CUDA support in Maple?...

I just got a "new" graphics card, NVIDIA GT630, and was wondering whether the CUDA capabilities are accessible. But no luck:

CUDA:-Enable();

Error, (in CUDA:-Enable) CUDA not supported on the current system (see CUDA,supported_hardware for more information)

The CUDA help page with the example, when run, just shows a host of error messages.

I have OS X 10.11.6, the above mentioned GT630 card with claimed 384 CUDA cores and 2 GB of VRAM; NVIDIA WebDriver 346.03.15f16 for the card (i.e. latest for this OS) and NVIDIA CUDA driver 8.0.90 (again, latest for this OS as far as I can tell). My Maple is 2015.2. All this running on a MacPro 4,1.

I am not having great illusions about the performance I should get (this is not a state-of-the-art card today), but it seems to me this combination should be working with Maple 2015 and not throw an error, shouldn't it? Checking the system extensions: CUDA.kext is loaded and its dependencies are satisfied, so I don't see any problem there.

Am I missing something?

M.D.

## Slow interface -- large latency between keystroke ...

I'm having an issue with Maple 2020.2 classic interface being *very* slow on a new MacBook pro with Big Sur. It takes about 1 second between each keystroke and it appearing on the screen.

Is this a known bug?

I want to read file dates (for data files) from inside Maple.  Specifically, I want to automate the comparison of access dates.

I thought I'd done this in the past, but my attempt to recreate it has led me to think that I am remembering incorrectly.

Is there a way of doing this?

I don't deeply care about portability (I'm working on Windows 10 and that would be good enough), but since I'm asking the question please comment on the easiest way to make this portable.

I am aware that by default Windows 10 doesn't update the access date.  On the machines I care about, I have changed the configuration so Windows is updating the access date (often enough for my purposes).  I have PowerShell scripts that work correctly.

## Grid toolbox and distributed computing....

I have several questions about Grid Toolbox. I am getting into distributed computing for a very large problem I have been working on for a long time; I am working on the simple examples that come with the Grid package, and I am not having much success. I am fairly experienced in Maple but I need help with this. My e-mail is harrisjtster@gmail.com.

## How do I solve the attached problem in maple?...

Hi,

I would be really grateful if someone can help me in solving the below attached problem in maple.

## Latex Latex generates command not in Maple style f...

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 do i plot a wedge cut 3D graph in maple?...

Plot the wedge cut from the cylinder x²+y²=1 by the planes z=-y and z=0.

## How do I solve numerically a set of non-linear int...

Hey everyone,

f_1 and f_2  are satisfying the set of non-linear integral equations I have attached to this message.
I know that I need to solve them numerically by iterations. Probably, the first guest of the function f_1 and f_2  is the driving term. a is just a parameter which can be fixed (I guess smaller than \pi/4). * is the convolution product and k is the momentum space parameter. I learnt that in order to solve them I should solve them in the Fourier space. I know also that I need to discretize these function in the “real ” space between {-L,+L} before applying the FFT or one of its relatives. Thank you for any suggestions or leads.

## Simple interface question about default zoom level...

Hi,

I noticed that, in Maple 2020.2, the caracters seem smaller. As if the zoom had somewhat been reduced (a bit).

However, in the preferences, the default zoom level I would like is between 100 and 125% (something like 110%) (since the default zoom level is adjusted by steps of +/- 25%). I wondered if there was a way to set the default zoom level to an arbitrary value. In fact I thought it would be great to have a field instead of a list of choices, so we can choose a custom value.

Thank you

## How to eval integration under loop...

Here is my try to integrate the expression L with trapozoid or simpson

numerical_int.mw

## Why Latex() fail to convert solution of ODE when i...

I found small problem in Latex(). When putting solution of ODE inside a Vector, Latex() fails to convert and returns empty vector.

restart;
sol:=[dsolve(diff(diff(y(x),x),x)*y(x) = 1,y(x))];
sol:=convert(sol,Vector);


And now

Latex(sol)

\left[\begin{array}{c} \\ \end{array}\right]

Empty array. But if not in a Vector, it works

restart;
sol:=[dsolve(diff(diff(y(x),x),x)*y(x) = 1,y(x))];
Latex(sol)

# no problem here ====>

\left[
{\textcolor{gray}{\int}}_{}^{y \! \left(x \right)}\frac{1}{\sqrt{2 \ln \! \left(\mathit{\_a} \right)-2 \mathit{\_C1}}}\textcolor{gray}{d}\mathit{\_a} -x -\mathit{\_C2}
= 0,
{\textcolor{gray}{\int}}_{}^{y \! \left(x \right)}-\frac{1}{\sqrt{2 \ln \! \left(\mathit{\_a} \right)-2 \mathit{\_C1}}}\textcolor{gray}{d}\mathit{\_a} -x -\mathit{\_C2}
= 0\right]


This seems to happen on some solutions (may be those with Int because in this other example, it works with Vector):

restart;
sol:=[dsolve(diff(diff(y(x),x),x)*y(x)^2 = 0)];
sol:=convert(sol,Vector);

And now

Latex(sol)

#now it works ===>

\left[\begin{array}{c}y \! \left(x \right)=0 \\y \! \left(x \right)=\mathit{\_C1} x +\mathit{\_C2}  \end{array}\right]


I am using Maple 2020.2 with Physics 897

Edit 1/2/2021

I found another strange problem with Latex conversion related to Vector. If the first entry is y(x)=0 in the vector, then it keeps this, but throws away the rest of the entries in the Vector.

This might be related to the same bug. Not sure. Here is an example

restart;
ode:=(2*cot(x)*diff(y(x),x)*y(x)+diff(y(x),x)^2-y(x)^2 = 0,singsol=all);
sol:=convert([dsolve(ode)],Vector)



Now watch what happens when converting sol to Latex

Latex(sol)

\left[\begin{array}{c}y \! \left(x \right)=0 \\ \\ \end{array}\right]

Only reason I use Vector() is to display in Latex many solutions on top of each others, so easier to see instead of as a list() where they are all on one line, which might not fit the page.

I need to find an alternative to using Vector to do this.

## Latex generates wrong Latex for this example...

Please see this example. This Latex generated gives Latex compile error.

restart;
Latex:-Settings(UseImaginaryUnit=i,
UseColor = false,
powersoftrigonometricfunctions= mixed, ## computernotation,
leavespaceafterfunctionname = true,
cacheresults = false,
spaceaftersqrt = true
);

L:=3;
c:=4;
h:=1/10;
b:=Pi*c/L;
f:=piecewise(0<x and x<L/3,3*h/L*x,L/3<x and x<L,h);
pde := diff(u(x,t),t$2) + b*diff(u(x,t),t) = c^2*diff(u(x,t),x$2);
bc  := u(0,t)=0,D[1](u)(L,t)=0;
ic  := D[2](u)(x,0)=0,u(x,0)=f;
sol:=pdsolve([pde,bc,ic],u(x,t));


The Latex generated does not compile:

Latex(sol)

u \left(x , t\right) =
\Mapleoverset{\infty}{\Mapleunderset{n =0}{\sum}}\left\{\begin{array}{44}\frac{4 \,{\mathrm e}^{-\frac{2 t \pi}{3}} \left(t \pi +\frac{3}{2}\right) \sin \left(\frac{\pi  x}{6}\right)}{5 \pi^{2}} & n =0 \\\frac{3 \sin \left(\frac{\left(1+2 n \right) \pi  x}{6}\right) \left(\sqrt{3}\, \sin \left(\frac{\pi  n}{3}\right)+\cos \left(\frac{\pi  n}{3}\right)\right) \left(\left(2 \sqrt{n}\, \sqrt{n +1}+i\right) {\mathrm e}^{\frac{2 i \pi  \left(-2 \sqrt{n}\, \sqrt{n +1}+i\right) t}{3}}-{\mathrm e}^{\frac{2 i \pi  \left(2 \sqrt{n}\, \sqrt{n +1}+i\right) t}{3}} \left(-2 \sqrt{n}\, \sqrt{n +1}+i\right)\right)}{10 \sqrt{n}\, \sqrt{n +1}\, \pi^{2} \left(1+2 n \right)^{2}} & \mathit{otherwise}  \end{array}\right.


Gives

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

\begin{document}
$u \left(x , t\right) = \Mapleoverset{\infty}{\Mapleunderset{n =0}{\sum}}\left\{\begin{array}{44}\frac{4 \,{\mathrm e}^{-\frac{2 t \pi}{3}} \left(t \pi +\frac{3}{2}\right) \sin \left(\frac{\pi x}{6}\right)}{5 \pi^{2}} & n =0 \\\frac{3 \sin \left(\frac{\left(1+2 n \right) \pi x}{6}\right) \left(\sqrt{3}\, \sin \left(\frac{\pi n}{3}\right)+\cos \left(\frac{\pi n}{3}\right)\right) \left(\left(2 \sqrt{n}\, \sqrt{n +1}+i\right) {\mathrm e}^{\frac{2 i \pi \left(-2 \sqrt{n}\, \sqrt{n +1}+i\right) t}{3}}-{\mathrm e}^{\frac{2 i \pi \left(2 \sqrt{n}\, \sqrt{n +1}+i\right) t}{3}} \left(-2 \sqrt{n}\, \sqrt{n +1}+i\right)\right)}{10 \sqrt{n}\, \sqrt{n +1}\, \pi^{2} \left(1+2 n \right)^{2}} & \mathit{otherwise} \end{array}\right.$

\end{document}


This, using latest TeXLive on Linux, gives  Illegal character in array arg.

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

L3 programming layer <2020-12-07> xparse <2020-03-03> (/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size11.clo)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the ?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/mnt/g/public_html/styles/maplestd2e.sty
Package: maple2e 2005/03/17 v1.16
Defining Maple Utility Macros
(/mnt/g/public_html/styles/mapleenv.def)
Defining Maple Plot Environemnts
...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)

! LaTeX Error: Illegal character in array arg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...haracter\or Missing @-exp\or Missing p-arg\fi \space in array arg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help\@err@

l.8 \Mapleoverset{\infty}{\Mapleunderset{n =0}{\sum}}\left\{\begin{array}{44}
\frac{4 \,{\mathrm e}^{-\frac{2 t \pi}{3}}
?


fyi. No errors are generated from the old latex() command.

The following is another example, with the same Latex error.

restart;
Latex:-Settings(UseImaginaryUnit=i,
UseColor = false,
powersoftrigonometricfunctions= mixed, ## computernotation,
leavespaceafterfunctionname = true,
cacheresults = false,
spaceaftersqrt = true
);

c:=3;
f:=piecewise(4<x and x<5,1,true,0);
pde := diff(u(x, t), t$2) = c^2*(diff(u(x, t), x$2));
bc  := eval( diff(u(x,t),x),x=0)=0;
ic  := u(x,0)=f(x),eval(diff(u(x,t),t),t=0)=0;
sol:=pdsolve([pde, bc,ic],u(x,t)) assuming x>0,t>0;

Latex(sol);  #gives Latex that do not compile

Maple 2020.2, with Physics 897

## Why Latex generates non-printable characters?...

restart;
V:=x->piecewise(0<=x and x<=a,0,infinity):
ic:=f(x,0)=piecewise(0<=x and x<=a,A*x*(a-x),0):
pde :=I*h*diff(f(x,t),t)=-h^2/(2*m)*diff(f(x,t),x\$2) +V(x)*f(x,t):
sol:=pdsolve([pde,ic],f(x,t)) assuming a>0;
Latex(sol)

gives

f \! \left(x , t\right) =
\left(\left\{\begin{array}{cc}A x \left(a -x \right) & 0\le x \le a  \\0 & \mathit{otherwise}  \end{array}\right.\right)+\left(\Mapleoverset{\infty}{\Mapleunderset{n =1}{\textcolor{gray}{\sum }}}\! \frac{t^{n} \left(\textbf{proc} (U) \\
\textbf{option} \,operator,\,arrow; \\
\mapleIndent{1} r-1 st I \ast (-1/2 \ast h\hat{~}{2} \ast m\hat{~}{-1} \ast \mathit{diff} (\mathit{diff} (U,\,x),\,x) + \mathit{piecewise} (0&lex \, \textbf{and} \, x&lea,\,0,\,infinity) \ast U) \ast h\hat{~}{-1}\\
\textbf{end\ proc};\right)^{\left(n \right)}\! \left(\left\{\begin{array}{cc}A x \left(a -x \right) & 0\le x \le a  \\0 & \mathit{otherwise}  \end{array}\right.\right)}{n !}\right)


Notice, non-printable characters. I think it should have been \ast there but it gives  st

Maple 2020.2 and Physics 897.

FYI, this is what latex() command gives


latex(sol)

f \left( x,t \right) =
\begin{cases}Ax \left( a-x \right)  & 0\leq x \land x\leq a\\0 & \text{otherwise}\end{cases}
+\sum _{n=1}^{\infty }{\frac {{t}^{n} \left( U\mapsto {\frac {-i
\begin{cases}0 & 0\leq x \land x\leq a\\\infty  & \text{otherwise}\end{cases}
U}{h}}^{ \left( n \right) } \right)  \left(
\begin{cases}Ax \left( a-x \right)  & 0\leq x \land x\leq a\\0 & \text{otherwise}\end{cases}
\right) }{n!}}


Which compiles with no problem

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
$f \left( x,t \right) = \begin{cases}Ax \left( a-x \right) & 0\leq x \land x\leq a\\0 & \text{otherwise}\end{cases} +\sum _{n=1}^{\infty }{\frac {{t}^{n} \left( U\mapsto {\frac {-i \begin{cases}0 & 0\leq x \land x\leq a\\\infty & \text{otherwise}\end{cases} U}{h}}^{ \left( n \right) } \right) \left( \begin{cases}Ax \left( a-x \right) & 0\leq x \land x\leq a\\0 & \text{otherwise}\end{cases} \right) }{n!}}$
\end{document}`

Thank you

## How to find triplets in Lie algebra at which Jacob...

Dear all

I have  Lie commutations for vectors e1, e2, e3, e4, e5, e6 as follow:

[e1, e3] = e3, [e1, e4] = e4, [e1, e5] = e5, [e1, e6] = e6, [e2, e3] = -e5, [e2, e4] = e6, [e3, e5] = e6

for which the command

Query("Jacobi")

returns the false result, which means, the vectors are not closed under Jacobi's identity. How can I find vector triplets for which Jacobi's identity does not hold?