10
$\begingroup$

In Version 14.1 on windows 10 I get this error calling TeXForm on solution obtained from DSolve. No error in V 14. This is known error. see how-to-catch-this-error-from-texform-texformunspt

A workaround is to use InputForm but this produces bad Latex.

The question is: What changed in V 14.1 to cause this new TeXForm error for this specific example which used to work OK in V 14.0?

ode = D[y[x], {x, 3}] + 3*D[y[x], {x, 2}] - 9*D[y[x], x] - 5*y[x] == 0;
sol = DSolve[ode, y[x], x];
TeXForm[sol]

Gives

TeXForm::unspt

error:

TeXForm of DynamicModuleBox[{Typeset`HolonomicAttached$$},FrameBox[ButtonBox[GridBox[{{FEPrivate`Switch[Root,etc...

Below is screen shot comparing the output from V 14.

Version 14.1

enter image description here

enter image description here

enter image description here

Workaround is

ode = D[y[x], {x, 3}] + 3*D[y[x], {x, 2}] - 9*D[y[x], x] - 5*y[x] == 0;
sol = DSolve[ode, y[x], x];
TeXForm[InputForm@sol]

But the Latex now is now bad.

enter image description here

Version 14.0

enter image description here

May be someone knows some setting in Frontend changed in V 14.1 to cause this? Has there been changes made by WRI in TeXForm in V 14.1 from V 14.0 ? Could the new Semantic Highlighting in V 14.1 have anything to do with this?

Update

I think now it is related to the RooT formating? I found second example giving same error and it also has same Root type expression in the solution being given to TeXForm

ode = D[y[t], {t, 4}] + 4*D[y[t], {t, 3}] + 3*y[t] == t
sol = DSolve[ode, y[t], t]

enter image description here

TeXForm[sol]

enter image description here

InputForm[sol]

gives

{{y[x] -> E^(x*Root[-5 - 9*#1 + 3*#1^2 + #1^3 & , 1, 0])*C[1] + E^(x*Root[-5 - 9*#1 + 3*#1^2 + #1^3 & , 2, 0])*
     C[2] + E^(x*Root[-5 - 9*#1 + 3*#1^2 + #1^3 & , 3, 0])*C[3]}}

And TeXForm does not like something about the above. Same for first example above.

$\endgroup$
1
  • 2
    $\begingroup$ Indeed, it seems it is connected to the new Root formatting (and the more elaborate dialog that appears when you click on it). It seems that they have not yet enabled this formatting in Wolfram Cloud, and TeXForm works normally there ... $\endgroup$
    – Domen
    Commented Aug 3 at 20:19

1 Answer 1

8
$\begingroup$

Well, it's a bug. They've changed MakeBoxes of Root objects to implement the new formatting, but they didn't make the changes for the TeXForm. As a simple workaround, you can use:

BoxForm`$UseUnifiedRootTemplateBox = False;

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Another error in TeXForm: FoxH[{{{1/2, 1}}, {{1/3, 2}}}, {{{1/4, 3}}, {{\[Pi], 4}}}, x] // TeXForm ? $\endgroup$ Commented Aug 4 at 8:43
  • $\begingroup$ @MariuszIwaniuk, hm, but did this ever even work? I get the same error in v13.3 ... $\endgroup$
    – Domen
    Commented Aug 4 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.