ecterrab

13431 Reputation

24 Badges

19 years, 357 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Ambrozy Zbój 

Consider this example:

int(f(x), x) - %int(f(x), x)
simplify(%);
                                                       0?     or     int(f(x), x) - %int(f(x), x)

I prefer 0. One could argue this is not about value but about having the inert and active form at the same time. OK that is one exception where we want the inert to become active.

Still how about this other one

%diff(x^2, x) - 2*x
simplify(%);
                                                       0?

Again I prefer 0 and, more generally, if the result is a constant, I prefer it.

Opinions?

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

@Preben Alsholm 

Interesting question. I wrote simplify/inert in 2008. Revising the notes, I was not thinking of "value" but this:

# verify whether transforming inert functions into active ones diminishes the total number of them

Well, in the example you posted, indeed, that is the same as combining with value. Perhaps this other example illustrates the original idea of 12 years ago better:

exp(0);
                              exp(0)
simplify(%);
                                   1

Looking at this result today, I think I want it but can see it is debatable. We can also go with "yes but not in all cases," for example, not in the case of integrals, where the distinction between %int and int has perhaps a more special meaning: in several scenarios, we just do not want integrals computed, at all. In fact, although in computer algebra integrals are implemented as functions, before computer algebra, I never thought of an integral as a "function" to the point that when coding dsolve added `type/Function` to make this distinction clear.

Regarding the difference you noticed between simplifying %int and Int, that caught my attention too, is due to historical reasons only. There is `simplify/Int` from before the existence of inert objects, and simplify calls that routine instead of the more modern `simplify/inert.` That is to be fixed, %int and Int should go both either through simplify/Int or simplify/inert, depending on how this conversation ends.

So, opinions?

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

@Carl Love 

For me the important thing is, generally speaking, "give me the chance to reproduce it, and I will do my best to fix it, otherwise it is an impossible task". So although I realize the frustration this or that can cause, providing a way to reproduce the problem you are experiencing is the only reasonable or useful-in-practice way to go, I think. To the side, however, related: to invoke shame for a bug in code by others, or feel shame for a bug in your code, is never the way to go. And concerning 2D display of input, something I use and enjoy, I am particularly interested in collecting bugs, issues or suggestions. At every release, I see those fixed more and more.

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

Hi,

I just saw this post from 2018 ... Within the Maplesoft Physics Updates there is a new command, Latex (uppercase L), that has this issue corrected 

> Latex(sol);
-\frac{3}{2 \left(x^{3}+3 z \right)}


This command also provides more functionality than the old lowercase latex, for example: inert functions, that in the worksheet appear displayed in grey, are tex-translated with color:

> Latex(Int(f(x), x));
\textcolor{gray}{\int }f \left(x \right)\textcolor{gray}{d }x


and alias are taken into account, which allows you, for instance, to use an indexed c[n] instead of the old convention _Cn for integraion constants entering solutions of differential equations:

> alias(seq(c[n] = _C || n, n = 1 .. 3));
> Latex(dsolve(diff(y(x), x $ 3)));
y \left(x \right) = \frac{1}{2} c_{1} x^{2}+c_{2} x +c_{3}


More important, the new Maple Latex command translates everything. So if you see it on the screen, expect to see the same in the tex translation - no exceptions. The trick for that is that Latex is based on the modern Maple Typesetting package. So, as soon as new mathematical notation is implemented in the system, it is automatically available in LaTeX form.

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

@nm 

To the side, I see _C1(n) in the solution you posted. That was meant to be _F1(n), according to notational conventions in all the DE code, but I see I forgot adjusting that an year ago. It is adjusted now, in v.824 of the Maplesoft Physics Updates.

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

A workaround for installing the Maplesoft Physics Package in the Windows platform (some people experienced problems with that) or for the case other MapleCloud packages, is available. See "Workaround for the problem of installing MapleCloud packages in the Windows platform"

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

@JonMcLoone 

... hmm I wonder how is that my name ecterrab appears in your reply, Jon. In my reply to you in that Mapleprimes post of 2015, I gave my opinion that both systems have their strengths. Then elaborated about Maple's capabilities in mathematical functions (FunctionAdvisor), mentioned DifferentialAlgebra, DifferentialGeometry, Differential Equations and Physics, areas where I think Maple has better performance, or in the case of Physics, there is nothing really similar in Mathematica to compare with. I work on these projects and feel comfortable talking about them. But  I don't write Maple's advertisements - but for perhaps some sentences related to these areas just mentioned only - not the topics of this thread.

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

@rlopez 

Hi Robert,

That option exists, alias. Further below Pascal mentioned it in the context of Latex, but it is of course valid outside that context too. For example, something in your mapleini file like 

alias(seq(c[k]=_C||k,k=1..10));

would make 1) the _Cn invisible forever (you basically never use equations of order > 10, and if it where the case, make it 20) and 2) keep all the library working properly; many library routines scan for _Cn, they will all find it even when they look like c[n].

On the other hand, making an option like in LinearAlgebra:-LeastSquare has the obstacle that all the library routines that scan for _Cn will not find it anymore, because now something else would be in use (and no alias around to help to find the right object).

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

@nm 

In view of your goal being Latex related, Pascal's idea seems to me simplicity at its best. I like that. You can complement his suggestion to cover your concern about N as follows:

> N := sol -> `PDEtools/max_C`(`PDEtools/_C`(sol)) - 1:      # the answer to your question

> sol:=dsolve(diff(x(t),t$4) = x(t));
> alias(seq(c[k] = _C||k, k = 1..N(sol)));              # Pascal's suggestion
                                      c[1], c[2], c[3], c[4]


Besides, suppose you know the differential order of the equations you are handling, and you know they are all of order 5 or less. Well, then N = 5 suffices. In the _Cn, the maximum value of n is the differential order.

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

@Carl Love 

You are 100% right. Sometimes my brain does literal translations without thinking ... I fixed the pages now; not differential to non-differential in: PDEtools/ConsistencyTest, PDEtools/DeterminingPDE, PDEtools/Infinitesimals, PDEtools/InvariantSolutions, PDEtools/ReducedForm, PDEtools/SimilaritySolutions and PDEtools/SymmetryTest.

7x Thanks :)

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

@nm 

In Maple, there is type algebraic. It is not a good idea to use that word in the context of Maple help pages. Not differential is understandable but non-differential is also OK - @Carl Love, does it read better? If so I have no problem in changing it.

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

@nm 

There is a different processing of the PDE determining system for the infinitesimals (DEtools:-odepde, or PDEtools:-DeterminingPDE). The symgen routines are more oriented to getting one pair of infinitesimals - that is enough to solve an ODE - while those in PDEtools are oriented to get all existing pairs of infinitesimals - not just one to solve an DE. In doing so, they can end up facing an almost untractable problem from the point of view of differential elimination (packages DifferentialAlgebra, DEtools:-rifsimp, or DifferentialThomas). Try PDEtools:-casesplit(DEtools:-odepde(ode, [f(x), x*g(y)])) and you see the hang. There is nothing wrong with that: the underlying differential elimination problem is - in practice, for the existent differential elimination software - untractable. Perhaps adding some option with the meaning of "get something for me, not just everything" ... I'd need to think about.

PS: next answer only in a day or more - am busy with other stuff.

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

@nm 

So it wasn't \mathbf after all. OK. Regarding \boldsymbol: this Tex StackChange thread tells me it was obsolete in 2017.

Your discovery and comment, however, is always welcome and useful, don't get me wrong please. And in this case took me to discover there is \boldmath (not \mathbf) which requires no additional package and accomplishes bold & italics in the presence of \mathit.

I will do some more tests here. If everything passes to my satisfaction I will change textbf & textit by boldmath & mathit and put the change in the next version of the Maplesoft Physics Updates so that everybody can try it.

PS (I) after posting: tried. There are several problems, it is not a solution. Being that in this particular case textbf & textit works perfectly fine, this becomes a sort of irrelevant thing at this point, I will keep it as is until I see a solution that works as well, without having to load yet another package, and without having to add to the complexity of the code, in a case like this one, with no gain in functionality.

PS (II) after posting: did more experimentation, and taking everything into account \boldsymbol does look like the winner. So in the Maplesoft Physics Updates v.793 there is only \mathit and only \boldsymbol, to respectively get italicized and bold, and spaces between words are preserved.

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

 

@nm 

Please note, you are not answering my question. I said: when we need italicized and bold, none of bf, textb or mathbf combined with mathit produce it. Up to what I know, only textbf & textit does it. Do you know an alternative?

So if you have a way to produce italicized and bold at the same time, please say it. Otherwise the code remains with textbf & textit when it needs to address that particular requirement until we discover something better.

For an example, easy: open www.overleaf.com, where you can try for free, fast and with ease, and input

\begin{equation}
\textbf{\textit{This\,is\,text}}
\end{equation}


And you will see italicized and bold. Try now changing texit by mathit and feel free to change textbf for whatever you want, click on Recompile to see the output. If you get italicized and bold, please post here what combination of mathit with whatever you used, and I will think about again.

The example, anyway, is not as artificial as you may think, consider this real case scenario:

> EllipticK(z);  # with Typesetting = extended and SpecialFunctionRules ON, it is a K in bold & italics
                          EllipticK(z)

> Physics:-Latex(%);
\textbf{\textit{K}}\left(z \right)

 

For the notational conventions used to display this or other mathematical functions that also use bold and italicized, see the NIST - Digital Library of Mathematical Functions which is the main reference nowadays.

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

@Carl Love 

So I would be the crippler? What a choice of words yours. There are better words in the dictionary to describe your thoughts about things that you don't understand the rationale behind or that you differ in opinion.

This is typical output seen in Maple worksheets, wether using Physics:-CompactDisplay or PDEtools:-Declare

That is seen for instance in the translation to latex via File -> Export -> Latex of a worksheet being produced as a paper for a Journal (mind you: you don't have the javas under development to see equation labels). 

Removing the blank spaces between words in the above would not be correct, I think. Besides that, two comments:

  • In v.792 I changed from textit to mathit as much as possible, resolving the issue as mentioned in my first reply: use mathit with some extra space in place of those blanks automatically removed by mathit. So at this point you will see mathit, most of the time, and these special cases of blanks not removed.
  • There is one exception I couldn't find an alternative: when you need bold and italicized. Any combination of bf, mathbf or textbf with mathit does not render bold and italicized. Only textbf & textit does. Are there other options?

By the way, in v.792 of the Maplesoft Physics Updates, Physics:-Latex is a package and you can see the Usexxx variables that you can assign to get different kinds of output; among them there is UseImaginaryUnit, that you can assign to a name to be used instead of the value of interface(imaginaryunit) when that is what you prefer. With time, or when the package is ready (say fresh from the oven in a week from today - not meaning free of things to adjust as usually happens with new stuff), these are to be handled by a command Latex:-Settings,

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

First 13 14 15 16 17 18 19 Last Page 15 of 60