You need to load the amsmath package or at least amstext. Load the latter because it offers many math functionality such as aligned multi line formulas and much more. Undefined control sequence chapter missing begin document.