Well as most of the answers imply here, you should simply "cite" whatever that is not yours. What I mean by this is you should basically include references to snippets that you did not write and ones that you took from other sources. As long as you include proper citations, then you're on the safe side. (This basically refers to the idea of including a reasonable amount of translations to be cited, and by reasonable I'm referring to a paragraph, or two worth of translation.)
As for the translation you're asking about, you should also consider some sort of footnote at the bottom of the page where the translated text is, again to be on the safe side. The question is, are you going to literally translate the text you want or are you going to use an online translator for that because that's an important note, check the following blog post link for more info. (Note: It's an APA citation example for translated texts)
As for the math formulas you're asking about as well, again you should cite them because none of them are really yours (You're taking them from a source whether it's a research paper, or an online source, or a book for that matter). Regardless of changing the variables or not, you should always include citations to avoid falling in trouble.
I think the following link might be of help for you.