ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are answers submitted by ecterrab

Good catch; it is adjusted and the adjustment distributed to everybody using Maple 2020 in the Maplesoft Physics Updates v.892 and newer.

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

Hi Melvin

No, what you see in Maple 2020 is the best you can get at this moment.

Yes: although still experimental, I've been working on a new File -> Export -> LaTeX together with a new latex command supporting the translation. The latter is distributed as the Latex command within the Maplesoft Physics Updates.

So here is my suggestion: could you please post the worksheet, or if it contains material you do not want to present in public at this point, then send it to me in private through Mapleprimes or to the email address you see under my name in the Maplesoft Physics Updates webpage. I will translate your worksheet using this new File -> Export -> LaTeX experimental code and return you the resulting .tex file.

Important: in case you send me the worksheet, 

  • This new File -> Export -> LaTeX handles equation labels that can appear in the output and also referred to within the text and the input lines. So feel free to use and refer to equation labels all-around in your worksheet.
  • In the worksheet, before exporting, if you prefer, please remove all, or selectively some, of Maple's input (the Maple output and corresponding equation labels will remain there), by respectively using the menus "View -> Show/Hide Contents -> Input," or "Edit -> Delete Element". This is particularly useful to produce LaTeX mathematical documents that entirely or partially hide their computer algebra origin.
  • In the worksheet, mark with the mouse any mathematical expression written within the text using Maple syntax (e.g. Int(f(x), x)), or that appears in the Maple input and, through right-click, use "Convert To -> 2-D Math" to produce a textbook mathematical display of that expression, that will then appear as such in the LaTeX exported document.

  • Not necessary, but if you install the Maplesoft Physics Updates you can also set several preferences regarding how to perform the LaTeX translation using the Latex:-Settings command (distributed to everybody using Maple 2020 within the Maplesoft Physics Updates). To see the different settings and their current value, enter Latex:-Settings(). That will be of use for you to get the translation using your preferences.

In summary, besides some of the settings shown by Latex:-Settings(), the design of this experimental code is to export the worksheet to LaTeX reproducing what you see on the screen. CAVEAT: Translation of "Tables" is not yet implemented.

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

Hi
Interesting observation ... Since version 1, the approach in (Physics:-)Latex has been to translate Typesetting structures, which for abs(x) uses "|", in turn, automatically transformed by some internal routines to \mid, instead of \vert (a synonym of |). It should have been |, in agreement with what you observed (I don't see lack of spacing symmetry when using \mid, but do see too much space to the left and right of it).

An adjustment for this, so using | instead of \mid, not just for translating abs(x) but in most cases, e.g. Ket(A) in Physics, is there within the Maplesoft Physics Updates v.891 and newer. On the way this called my attention to the translation of MeijerG and eval structures: the vertical bar was too short, now it is tall enough, as in \Bigr | instead of the previous \mid or just |.

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

This is your worksheet reviewed.

NULL

restart

PDE := diff(u(x, y), `$`(x, 4))+diff(u(x, y), `$`(y, 2)) = 0

diff(diff(diff(diff(u(x, y), x), x), x), x)+diff(diff(u(x, y), y), y) = 0

(1)

cond1 := u(x, 0) = f(x)

u(x, 0) = f(x)

(2)

cond2 := (D[2](u))(x, 0) = 0

(D[2](u))(x, 0) = 0

(3)

If you allow the following two limits to be conditions on f(x), not u(x, y)

limit(u(x, y), x = infinity) = 0

limit(u(x, y), x = infinity) = 0

(4)

 

limit(u(x, y), x = -infinity) = 0

limit(u(x, y), x = -infinity) = 0

(5)

This is How can we apply fourier transform to get the solution of this problem

pdsolve([PDE, cond1, cond2], method = Fourier)

u(x, y) = invfourier(fourier(f(x), x, s)*cos(s^2*y), s, x)

(6)

``

``


 

Download Fourier_transform_(reviewed).mw

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

As per the Title, you can set the invisibletimes (the spacing or symbol used to represent a product); its default value is " " (to reproduce, please update to v.883 of the Maplesoft Physics Updates). In your example:

Note, however, that this affects every product, not just after \sqrt{}.

Regarding yours and @itsme comments, I basically think the same: the latex typesetting system is already excellent. Trying to tweak it is something to be done with extra care and only in exceptional situations. For example, \sin (x) is not typeset with a space before (x), but in an automatic mode, we go with \sin \left(x \right), which is typeset with a space after sin, so I see no harm in translating this as \sin\! \left(x \right). And as @itsme says, providing an option to undo this tweak (you can input Latex:-Settings(leavespaceafterfunctionname = true) and won't see that \! anymore).

Altogether, I will think about the specific case of \sqrt{xxx}. There is a point in that, in the worksheet, I see a space before the a that I don't see in the tex-compiled translation. On the other hand, it is also true that for latex typesetting, that space shouldn't be there.

And I want to take the opportunity, following @itsme, to thank you for all the feedback you are giving. It is a very fruitful exchange for all Maple users. As it is the case of all the DE, Physics and Mathematical Functions, code; this kind of feedback and exchange (through the Maplesoft Physics Updates) is the best possible approach I imagine to develop software.

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

If you quote your input, it is echoed on the screen with an equation label that you can refer to all around. If besides, you place the cursor on the input line and press the combo Ctrl + Delete (or Command + Delete on a Mac), that input line disappears, but the output and its equation label remain. It is an easy way to produce equation labels for math correctly displayed, and that is not executed. Using the "Context Bar" (see the View menu), you can also change this output by centring Y/N or make parts of it italic or bold, underline, change colours etc. 

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

Nicely spotted; there was a typo in a list of math functions for which latex has a special command. The fix is distributed as usual, within the Maplesoft Physics Updates, v.780 or newer.

Additionally, I don't like the lack of space between 4 and the exponential, due to using \mathrm. In v.781 and newer, that is resolved, so that the tex-translation is now this one:

and upon latex compilation -> PDF, we get this look

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

Hi

This was asked before. If, after having used Latex, you change the way things are Typeset on the screen, say by direct calls to the Typesetting package, remember to clear Latex's caches so that the new look is taken into account. In brief, to have things working the way you want, in v.879 and before, after Typesetting:-Settings(prime=x,typesetprime=true), enter Latex:-Forget(). Alternatively, just use Latex(...., forget); and that will make Latex not remember previous results.

In v.780, you can also use the new Latex:-Settings(cacheresults = false), the default value is cacheresults = true; setting cacheresults to false makes Latex not to cache results, so you don't need to enter Forget after changing the way things are typeset on the screen, nor to pass the keyword forget to ignore previous results.

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

Hi

I understand there was a glitch in the MapleCloud server, versions 875 and 877 didn't get stored. The problem got resolved. Current is v.878.

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

This is development, things are moving ahead. At this point you have Latex:-Settings. Use that instead of assigning the variables yourself. This is your worksheet using Settings:

Among other things, using Settings you don't need to use Latex:-Forget after changing any setting.

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

Hi
Indeed, this is an issue introduced recently when adding the new Latex:-Settings(powersoftrigonometricfunctions = textbooknotation), see this Mapleprimes reply. It is adjusted in the Maplesoft Physics Updates v.870 and newer.

To the side: with v.869, you can still work OK if you input Latex:-Settings(powersoftrigonometricfunctions = computernotation), which is the standard notation used by Maple to display trig and arctrig functions. I am experimenting with having textbooknotation as default, say that is option 1. There is option 2: textbook notation only for trig (so cos(x)^2 is tex-translated as cos^2(x), but arccos(x) remains arccos, not cos^(-1)). Then option 3 is to have computernotation by default. Some people already expressed that for students this textbooknotation is a bit confusing. I remember that too from the time I was teaching at university.

So most probably textbooknotation will be optional, not the default as you see in this moment.

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

It is the first time I see someone complaining about \rm ....(wow!). Learning. If some packages don't handle \rm, we need a replacement. By the way, \rm is being used within the whole Latex in only one place, to represent the e of 'exponential'. Where else is that you saw it popping up? And for a single letter, \mathrm or \textrm work as well. Any indication that  one is better than the other one?

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

As everybody guessed, there was a place in the code where an expansion of exp(x + y) was not happening, that place was PDEtools:-Library:-IsNotSeparable, a quick shortcut to avoid wasting time with unsolvable problems. Without that expansion, for some arbitrary F(x + y),  deq1 := diff(u(x, y), x) - diff(u(x, y), y$2) = F(x + y); is of course not separable.

This issue is resolved and the adjustment distributed for everybody within the Maplesoft Physics Updates v.865 and higher; thanks for posting the example.

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

One condition, with denominator different from zero, for the existence of a solution using the S-function method was missing. A fix for this is distributed within the Maplesoft Physics Updates v.864 or newer.

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

@nm 

Good point, although there is always the issue of who is the prime variable.. I'll add something for this in the next version of the Maplesoft Physics Updates. And what do you expect for PDE boundary conditions? Jet notation as you see in the help page for PDEtools:-ToJet?

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

First 17 18 19 20 21 22 23 Last Page 19 of 59