Page 1 of 1
[Solved] Cannot house my formula in brackets
Posted: Sat Apr 23, 2016 4:59 pm
by jasonaoo
I am trying to write a pretty complex formula. Part of it is in brackets so I use left[ and right]. But the result is a multiline wrong output which some question marks. I tweaked it a lot but didn't make sense where it went wrong. The screen shot is attached for clarity.
To my surprise, first part of the formula comes last in the document. Any ideas?
Re: Cannot house my formula in brackets
Posted: Sat Apr 23, 2016 5:26 pm
by RoryOF
Nearly what you want
Code: Select all
%psi_h = A_h Left[ cos(q_h x) cos((q_h y) over sqrt(3)) + 1 over 2 cos((2 q_h y) over sqrt(3)) right ] +bar%psi
Re: Cannot house my formula in brackets
Posted: Sat Apr 23, 2016 5:33 pm
by acknak
Something like this?
Can't have too many curly brackets.
Re: Cannot house my formula in brackets
Posted: Sat Apr 23, 2016 6:21 pm
by jasonaoo
Too many curly braces! works fine. Are they really necessary? What are curly braces for in Math formulas like this? Is it used only for grouping? Were they necessary after the first plus sign?
Re: Cannot house my formula in brackets
Posted: Sat Apr 23, 2016 7:33 pm
by acknak
Yes, only for grouping.
Necessary? Maybe not, but so what? OO Math often seems to make surprising decisions about what things go together. I just accept it and put all terms inside curlies to start with. It also helps to build up term by term, with braces around each one to make sure they don't interact weirdly.
I find the Math editor awkward, especially with more complex formulas. I work around that by using a good, brace-matching text editor and copy/paste into OO Math.
Re: [Solved] Cannot house my formula in brackets
Posted: Thu Apr 27, 2017 11:36 pm
by Andrew123
i have the same problem!