Question: How to better translate initial conditions of ODE to Latex.

When translating initial conditions, for derivatives, to Latex, the output is not easy to read, and was wondering how to make it more standard.

For example, let say initial conditions for second order ODE are [y(0)=0,D(y)(0)=3] in Maple syntax.  I convert these to Latex using

restart;
ic:=[y(0)=0,D(y)(0)=3];
Physics:-Latex(ic)

which gives

               [y \left(0\right) = 0, D\left(y \right)\left(0\right) = 3]

The problem is with derivatives. They are hard to read, unless someone knows Maple. The above renders are

I'd like to get the above to standard form 

Which more easily understood and is the standard in textbooks and papers.

This issue does not show up in Mathematica, because in Mathematica initial conditions can be entered as  {y[0]==0,y'[0]==3} and this translates directly as is

Which renders a

I know in Maple document mode, 2D math input, one can also enter the IC the same as with Mathematica, which is easier, but the Latex translation still the same as with the worksheet 1-D math.

Going back to Maple, I could enter the initial conditions instead as follows

restart;
ic:=[y(0)=0,eval(diff(y(x),x)=3,x=0)];
Physics:-Latex(ic)

And now the latex generated renders as

Which might be more understandble but too heavy weight compared to the simpler form y'(0)=3 and I remember reading that use eval() as above is not as safe as using the D(y)()... notation for initial conditions.

Are there any other tricks that would allow the latex of derivative to show in the standard form to make it easier to read?

Is it possible for Physics:-Latex to automatically detect the form D(y)(x0)=y0 and generate y'(x0)=y0 for its Latex? This will be the ideal solution. This will apply to higher derivatives as well. For example 

Physics:-Latex( (D@@2)(y)(0)=3)

Now gives

         D^{\left(2\right)}\left(y \right)\left(0\right) = 3

which renders as

While a much better output would be the standard

This will go a long way towards improving the Latex generated by Maple.

Any suggestions?

 

 

Please Wait...