# 2-dimensional formatting for integration

So I am trying to integrate the function x^2 * Sin^2[n Pi x / a], {x,0,a}. The code I am using is in the "two-dimensional formatting" of mathematica: I am using Esc [] Esc to use the actual integral sign and differential. For example, Esc int Esc gives the integral sign and Esc dd Esc gives the differential. However, whenever I press Shift+Enter, it gives an error. Here is the code when copying the formatting shown in the photo: Subscript[\[Integral], 0]^a[x^2* Sin[n Pi x/a]^2] \[DifferentialD]x

How am I supposed to integrate this way?

• Esc int Esc x^2 * Sin[n * Pi * x/a]^2 Esc dd Esc x Shift Enter (I think your use of [ and ] around your whole expression was the problem, those mean completely different things to Mathematica than ( and ) mean. – Bill Aug 31 '16 at 5:34
• i.e. the square brackets are causing the issue. Your code will run correctly if you delete them. – JungHwan Min Aug 31 '16 at 6:05
• The use of Superscript and Subscript described under "Details and Options" of the Integrate documentation appears to be wrong. Instead, follow the fourth example under "Basic Examples" to insert limits on the integral, which works fine (with the outer square brackets removed, of course). – bbgodfrey Aug 31 '16 at 6:06
• That isn't the problem. I take them off and error still occurs. I will try that @bbgodfrey, thanks – CrypticParadigm Aug 31 '16 at 6:09
• Try to use Esc+dintt+Esc  which will give you the sign of the integral with the slots for the limits. In addition the code x^2 * Sin^2[n Pi x / a] is a syntax error. You need to give it as follows: x^2 * Sin[n Pi x / a]^2. Have fun! – Alexei Boulbitch Aug 31 '16 at 7:13