TeXworkswhy this code for formula is wrong?

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
Post Reply
yaozhao
Posts: 57
Joined: Sat Oct 27, 2018 10:38 pm

why this code for formula is wrong?

Post by yaozhao »

Sample question:
If the long-run total cost curve for each firm is given by $TC=1000+100Q-10$Q^2$+$Q^3$$

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

yaozhao
Posts: 57
Joined: Sat Oct 27, 2018 10:38 pm

why this code for formula is wrong?

Post by yaozhao »

I want to type:

TC=1000+100Q-10Q^2+Q^3
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

why this code for formula is wrong?

Post by Stefan Kottwitz »

$ is the symbol to start or to end a math environment. In the code above, the math mode was ended and then started and ended within the same formula. Here is how it should be done:

$TC=1000+100Q-10Q^2+Q^3$

Stefan
LaTeX.org admin
Post Reply