Hey Simon,
We strongly recommend against checking exact latex strings as its very easy to mark students wrong for work they’ve done correctly (even extra white space somewhere will throw it off).
Here’s an alternative using simpleFunction to find the numeric value of the expression. Here, we interpret i as a variable that we can use to evaluate the expression. There are other options as well.