How to write mathematical equations in LaTeX for VTU BCSL456D

This guide walks you through building a LaTeX document with two sets of mathematical equations, the quadratic formula and some advanced notation, for VTU lab program BCSL456D. It suits students writing up LaTeX lab experiments. You need Overleaf or a LaTeX install, plus a free account if you use the browser.

YouTube video: BCSL456D Program 7 | Mathematical Equations in LaTeX | Technical Writing Using LaTeX Lab | bcs456d

Caption availability is unknown. Check the CC control in the YouTube player.

8 chapters. Tap a step to jump to it.Chapters from the creator
Choose a chapter (8)
Video length
5 min 3 s
Time to do it
20 minutes
Difficulty
Easy
Steps
8

What you need

Steps

  1. Open Overleaf or your LaTeX editor and start a new blank project for Program 7. Name it so you can find it later.

  2. In the preamble, write \documentclass{article} and add \usepackage{amsmath} so the maths environments and commands are available.

  3. Start the body with \begin{document} and add a short heading that names the program and your details.

  4. Write the first equation, the quadratic formula, inside an equation environment: x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

  5. For the second set, use align, cases or matrix environments for the longer notation, and end each row with a double backslash.

  6. Compile with pdfLaTeX and look at the preview to check every symbol rendered as intended.

  7. Fix any errors shown in the log, then finish typing the remaining lines of equation set 2.

  8. Compile one last time and download or save the PDF for your lab record.

Tips and common mistakes

Use \pm for the plus-minus sign and \sqrt{} for square roots, or the symbols will not render.

Escape % and & with a backslash when they are meant as text, since LaTeX treats them as special.

Add a star to the environment name, like equation*, if you do not want the equation numbered.

Check the log for a missing $ error, which usually means maths was typed outside a maths environment.

Questions

Do I need to install LaTeX to do this program?

No. Overleaf runs LaTeX in the browser, so you only need a free account. A local install of TeX Live or MiKTeX works too if your lab requires it.

What is the difference between the equation and align environments?

The equation environment centres one line and numbers it. Use align when you have several lines you want lined up on an equals sign, and end each row with a double backslash.

Why does my PDF show raw code instead of equations?

Maths must sit inside a maths environment such as equation or between dollar signs. A missing \end{document} or a broken bracket will also stop the document from compiling.

The notes are drafted automatically from video details and general task knowledge. How the guide was prepared

Report a correction

More in School & Learning

See all