1
$\begingroup$

I am trying to enter the following mathematical expression in code:

Subscript[Q, n, 2][
  n] = (1/2\[InvisibleComma]\[Mu][
       n]^2 Sqrt[\[Lambda]] (Cos[\[Mu][n] Sqrt[\[Lambda]]]^2 + 
        Cosh[\[Mu][n] Sqrt[\[Lambda]]]^2) + 
     3/2 \[Mu][
       n] Cos[\[Mu][n] Sqrt[\[Lambda]]] Cosh[\[Mu][
         n] Sqrt[\[Lambda]]] (Cos[\[Mu][
            n] Sqrt[\[Lambda]]] Sinh[\[Mu][n] Sqrt[\[Lambda]]] + 
        Cosh[\[Mu][n] Sqrt[\[Lambda]]] Sin[\[Mu][
            n] Sqrt[\[Lambda]]])) Cosh[\[Mu][n]^2/Sqrt[\[Lambda]]]

However, I get a syntax error in Mathematica: enter image description here

Can anybody spot a reason why this might be happening?

$\endgroup$
6
  • $\begingroup$ Where did this expression come from? Do you have a reference where this formula is given? $\endgroup$ Jul 14, 2022 at 19:55
  • 6
    $\begingroup$ It's tricky : You have a InvisibleComma just after the 1/2 ! $\endgroup$
    – andre314
    Jul 14, 2022 at 20:04
  • $\begingroup$ Copy/patse your expression into an editor, then you can see the invisible comma. $\endgroup$ Jul 15, 2022 at 8:01
  • $\begingroup$ @J.M. It arose as a coefficient in the solution to a PDE I am trying to solve. $\endgroup$
    – OGBond
    Jul 15, 2022 at 14:20
  • $\begingroup$ @andre314 what is the point of an InvisibleComma? $\endgroup$
    – OGBond
    Jul 15, 2022 at 14:20

0

Browse other questions tagged or ask your own question.