ecterrab

14605 Reputation

24 Badges

20 years, 98 days

MaplePrimes Activity


These are answers submitted by ecterrab


Both the equation and sol are translated properly ... this is what I see:

 

 

restart; sol := dsolve(t*(t-2)^2*(diff(diff(y(t), t), t))+t*(diff(y(t), t))+y(t) = 0, y(t))

y(t) = _C1*HeunC(1/2, 1, -1, -1/2, 3/2, -2/(t-2))+_C2*HeunC(1/2, 1, -1, -1/2, 3/2, -2/(t-2))*(Int(exp(1/(t-2))/HeunC(1/2, 1, -1, -1/2, 3/2, -2/(t-2))^2, t))

(2)

ode := t*(t-2)^2*(diff(diff(y(t), t), t))+t*(diff(y(t), t))+y(t) = 0

t*(t-2)^2*(diff(diff(y(t), t), t))+t*(diff(y(t), t))+y(t) = 0

(3)

with(Physics)

Latex(ode, output = string)

"t \left(t -2\right)^{2} \Mapleoverset{\ldots}{y}\left(t \right)+t \Mapleoverset{.}{y}\left(t \right)+y \left(t \right) = 0"

(4)

Latex(sol, output = string)

"y \left(t \right) = \textit{\_C1} \textit{HC}\left({\frac{1}{2}, 1, -1, -\frac{1}{2}, \frac{3}{2}, -\frac{2}{t -2}}\right)+\textit{\_C2} \textit{HC}\left({\frac{1}{2}, 1, -1, -\frac{1}{2}, \frac{3}{2}, -\frac{2}{t -2}}\right) \left(\int \frac{{\rm e}^{\frac{1}{t -2}}}{\textit{HC}\left({\frac{1}{2}, 1, -1, -\frac{1}{2}, \frac{3}{2}, -\frac{2}{t -2}}\right)^{2}}d t \right)"

(5)

``


Note anyway that the package is not finished.

About \Mapleoverset and other stuff: among the core elements of this new Physics:-Latex there are: to take full advantage of everything already implemented in the Maple Typesetting package, don't be shy in using CTAN official LaTeX packages, and naturally use the Maple own .sty file, maplestd2e.sty. This is how the equation looks when latex processed:

Because all the translation to latex is done taking advantage of the Maple Typesetting package, you can also control some of this translation using Typesetting settings, for example to not use the dot to represent time derivative (see the Typesetting help pages). The same applies to translating mathematical functions.

Regarding using CTAN official LaTeX packages, it is since 1997 that I am Editor at Computer Physics Communications. I have seen enough papers taking advantage of existing advanced typesetting. Perhaps for that reason, in Physics:-Latex, the idea is to really get the most, not just cover gaps in the old latex.

Download xyz.mw

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

Hi
Indeed, the three numbers refer to chapter, equation and case. I am correcting that in the help page. Regarding your other question, I cannot reproduce your problem. This is what I get:

You see the Coordinates there. To understand what could be the problem at your end, It is better if you upload a worksheet showing the input and output; for that purpose you can use the green arrow you see when you post a question or Edit your previous post.

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

Hi

Input ?Physics,Updates and you will see links to most of the pages and posts produced every year, several are related to general relativity. Under Physics Maple 2017 updates, the first link (itemized as "x.") is General Relativity: classification of solutions to Einstein's equations and the Tetrads package. Click it and you will see a couple of paragrams followed by Examples, the second reads "Equivalence for Schwarzschild metric (spherical and Kruskal coordinates)". The contents of that example answer your question. See also the toolbar: you can click the icon that opents that help page in a worksheet, then reproduce the computation pressing enter or running the whole worksheet (that `!!!` icon), and change the metrics of the example by the metrics you have in mind, the adjust things here and there to make this sort-of-template serve your purpose.

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

A PDEAdvisor command, although part of the design of PDEtools, never took off: besides "linear PDEs" or those that admit travelling wave solutions, the classification is scarce. There is, however, the infolevel: set it as in infolevel[pdsolve] := 3 (or 2) and you will see significant and relevant information regarding the type of problem and the methods used to tackle - eventually solve - it.

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

The claim that one can write the solution for any (all) Abel equation is 100% false. As explained in ?odeadvisor,Abel, only when the invariants are constant (see eq (2)) is that the solution is always possible. 

For reference, these 3 papers present the problem, collected all the solutions available scattered in the literature (many by Abel and Liouville themselves), represented a change in the status of things for Abel equations (the discovery of the AIA class, and its connection with hypergeometric equations using non-point symmetry transformations that involve derivatives, then the development of the AIR algorithm, implemented in Maple), and are relatively easy to understand

  • Cheb-Terrab, E.S., and Roche, A.D. "Abel ODEs: Equivalence and  integrable classes." Computer Physics Communications. Vol. 130. (2000): 204-231.
  • Cheb-Terrab, E.S., and Roche, A.D. "An Abel ordinary differential equation class generalizing known integrable classes." European Journal of Applied Mathematics. Vol. 14. (2003): 217-229.
  • Cheb-Terrab, E.S. "A connection between Abel and pFq hypergeometric differential equations." European Journal of Applied Mathematics. Vol. 15. (2004): 1-11.

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

 

PDEtools:-Solve is a unified command for solving equations: symbolically, numerically, in series, differential (ODES and PDES) or not,  solutions freeof(variables), etc. Besides providing more functionality than all those commands together, a single interface, and a unified form of the output, this output is also free of that (annoying for me) nuance that you are pointing at: "x =" is missing in the output of solve or otherwise it puts curly brackets, or undesired square brackets around each solution, etc. So you get

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

In Maple, perhaps more than in other systems, known-function calls are normalized. This really makes life easier regarding simplification and zero recognition in general. In brief, in the case of known-function calls, to normalize means writing things always the same way (as much as possible, e.g. what you show). So for example, sin(p - a) + sin(a - p) automatically returns 0. It makes sense to me. What you are asking, although possible and also reasonable design (make normalizations only within the simplilfier), it is against Maple's design. So the answer is no, in Maple you cannot avoid normalization of known-function calls. You can still use inert functions, as mentioned in Kitonum's reply.

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

I couldn't reproduce your "The solution I obtained is", that appears after eval(sol[2]). But about your question, in situations like this one, using the odeadvisor frequently helps:

For a description of "dAlembert ode" input odeadvisor(ode, help). For the use of methods see ?dsolve,details (under Options); for the methods available ?dsolve,setup. Most of these methods will be indicated by the odeadvisor. The idea: once you know the types the ode matches, you can ask for the use of just one or any sequence of those types in the order you prefer. Using infolevel[dsolve] := 3 also tells which method dsolve used to solve a problem. In this case, the equation is also "missing x" so it can be solved in terms of an integral right away, but as you show, the internal heuristics, although extremely tunned over the years, not always get the simplest solution.

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

Nm,

For your ode example, ode2 := denom(rhs(ode))*diff(y(x) ,x) - numer(rhs(ode)) = 0 is indeed exact, but by chance only. In the general case of a rational ode, an ode2 constructed as you are showing is not exact. The determination of a multiplicative factor (in this example of yours: denom(rhs(ode)) that makes the ODE exact is 100% equivalent to solving the problem entirely. You realize that solving an ODE is not just about taking the denominator of the right-hand side. This unknown multiplicative factor is actually the solution to a system of partial differential equations - see details in the help page of DEtools[intfactor].

In summary, and especially when discussing exact equations, the multiplicative factors you are using to multiply all the equation are extremely relevant, as in "you know the solution already" (when the equation is exact, generally speaking, it means the ODE is just an integral in disguise).

By the way: you have this same information if instead of odeadvisor(ode2) you input odeadvisor(ode2, help), in which case it will automatically open the help page for exact equations where you see the same information written here.

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

Good catch, nm, thanks, the fix for everybody is distributed as usual within the Maplesoft Physics Updates v.723 or newer. After installing this version of the Updates, you get:

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

Computer algebra systems (CAS) have conventions. It is not correct to expect a CAS to work "the same way" if you don't follow the conventions. In Maple, integration constants returned by dsolve are of the form _Cn where n is an integer. Not _C[n]. Not _C. The algorithms in odetest scan for these integration constants: if you isolate one of them to the left, the right-hand side must be a constant with respect to the independent variable - say x; i.e. differentiating it with respect to x must result in zero (modulo the DE itself) upon simplification. But if you change the integration constant to whatever-else, naturally the routines inside odetest will not detect them anymore (they have no way to know what convention you have invented). I already answered the same or very similar question (probably by you?) here in Mapleprimes.

So there is no bug here. If you expect the computer algebra system to work as it says in its help pages, you must follow its conventions to represent mathematical objects.

Two additional remarks. First, you mentioned "conflicts if using _Cn", but there is no conflict at all in you using _Cn within the ODE or PDE. Maple's commands detect that and will not use those that were found in the DE when constructing or testing a solution. Second, Maple has a programming language, so you can program a wrapper to odetest if you prefer: replacing your convention (_C or _C[n] or whatever else) by _Cn. See the ?PDEtools,Library help page were you can find Library subroutines that can help you in programming anything you want about DEs; they are the same internal routines used in dsolve, pdsolve and PDEtools.

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

Vectors expressed using each of these two packages can be rewritten using the format of the other package using convert. So, if the VectorCalculus version of a Physics F_ is plottable, then you can convert(F_, VectorCalculus) and plot it. This could actually be done automatically within fieldplot/fieldplot3d (not implemented yet).

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

Hi, could you please close Maple, entirely, then open Maple, and enter Physics:-Version() again. If it still tells you that the installed Updates is not active, then please enter libname; press enter and post here the output.

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

Hi Tom,
Could you please open Maple and, clicking the MapleCloud icons, install the Physics package. Then close, then reopen Maple (not just 'restart'), and input 'Physics:-Version()', everything should work. If not, then also input 'libname', and reply here showing a picture with the output of Version and libname. With that info we can figure out what is going on at your end.

Generally speaking, 'is installed but not active' means another version of Physics is active, as shown by the ordering in libname (found in the directory mentioned in the message) - that would mean either you need to close and reopen Maple or that there may be something wrong in your libname (unlikely, I'd need to see it to tell what could that be). 

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

Good catch, though I only noticed this one today. It is fixed and the fix distributed for everybody using Maple 2020 within the Maplesoft Physics Updates v.692 or newer. With the fix, all the Normal, Expand and Simplify Physics commands, also the lowercase expand and simplify commands, return the same and correct.

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

First 20 21 22 23 24 25 26 Last Page 22 of 60