Skip to main content
added 109 characters in body
Source Link
bmf
  • 17.2k
  • 2
  • 33
  • 69

In light of the comment by @Daniel Lichtblau the following is a workaround to the bug that is present

Edit: addressing all the comments

edit1

The code is given below:

MaTeX[TeXForm[ HoldForm@ Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}] == Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}]]] 

Original answer


I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

Edit: addressing all the comments

edit1

The code is given below:

MaTeX[TeXForm[ HoldForm@ Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}] == Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}]]] 

Original answer


I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

In light of the comment by @Daniel Lichtblau the following is a workaround to the bug that is present

Edit: addressing all the comments

edit1

The code is given below:

MaTeX[TeXForm[ HoldForm@ Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}] == Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}]]] 

Original answer


I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

added 478 characters in body
Source Link
bmf
  • 17.2k
  • 2
  • 33
  • 69

Edit: addressing all the comments

edit1

The code is given below:

MaTeX[TeXForm[ HoldForm@ Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}] == Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}]]] 

Original answer


I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

Edit: addressing all the comments

edit1

The code is given below:

MaTeX[TeXForm[ HoldForm@ Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}] == Integrate[(r^2 Cos[\[Theta]] (-1 + r (Sin[\[Theta]]))^3)/( 1 + r^2), {r, 0, 2}, {\[Theta], -Pi/2, Pi/2}]]] 

Original answer


I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2

Source Link
bmf
  • 17.2k
  • 2
  • 33
  • 69

I am not 100% sure why it happens. I checked that by copying and pasting your code in my notebook, I also had the errors. I think it has to do with the HoldForm and perhaps the RowBox. See below:

I started coding your expression afresh. It worked fine.

res

The code used

TeXForm["\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \(0\)], \ \(2\)]\)\!\(\*SuperscriptBox[SubscriptBox[\(\[Integral]\), \ \(-\*FractionBox[\(\[Pi]\), \(2\)]\)], FractionBox[\(\[Pi]\), \(2\)]]\ \) \!\(\*FractionBox[\(\((cos\\\ \[Theta])\) \*SuperscriptBox[\((\(-1\ \) + r \((sin\\\ \[Theta])\))\), \(3\)]\), \(1 + \*SuperscriptBox[\(r\ \), \(2\)]\)]\) dr d\[Theta]=-\!\(\*FractionBox[\(16 \[Pi]\), \(3\)]\ \)"] 

Note that I grabbed the code posted here and tried it in a fresh kernel and worked with no issues.

res2