LaTeX forum ⇒ Math & ScienceHow to number equations in cases. Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
keepitcool
Posts: 2
Joined: Sat Feb 13, 2016 7:42 pm

How to number equations in cases.

Postby keepitcool » Sat Feb 13, 2016 7:45 pm

Hello!

I have written the following:
  1. \[
  2. \begin{cases}
  3. \frac{1}{ T(t)} \partial_{tt} T(t) = - \lambda^2, \\
  4. \\
  5. c^2 \frac{1}{R(r)} \partial_{rr} R(r) + \frac{1}{R(r)} \frac{1}{r} \partial_{r} R(r) + \frac{1}{r^2} \partial_{\theta \theta} \frac{1}{\Theta ( \theta) } \Theta( \theta ) = - \lambda^2. \label{eq:sep_var2} \\
  6. \end{cases}
  7. \]


I wanted each equation to have a number to ref them later on, but I don't know how to number them.

Best regards

User avatar
Stefan Kottwitz
Site Admin
Posts: 9522
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Feb 13, 2016 8:43 pm

Welcome to the forum!

A cases environment is usually part of a formula structure such as an equation. Equations can be numbered.

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \begin{document}
  4. \begin{equation}
  5. \begin{cases}
  6. \frac{1}{ T(t)} \partial_{tt} T(t) = - \lambda^2, \\
  7. \\
  8. c^2 \frac{1}{R(r)} \partial_{rr} R(r) + \frac{1}{R(r)} \frac{1}{r}
  9. \partial_{r} R(r) + \frac{1}{r^2} \partial_{\theta \theta} \frac{1}{\Theta
  10. ( \theta) } \Theta( \theta ) = - \lambda^2. \label{eq:sep_var2} \\
  11. \end{cases}
  12. \end{equation}
  13. \end{document}


Stefan
Site admin

User avatar
Stefan Kottwitz
Site Admin
Posts: 9522
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Feb 13, 2016 8:45 pm

For the case that you would like to have each line within that cases environment numbered: you could use the cases package:

  1. \documentclass{article}
  2. \usepackage{cases}
  3. \begin{document}
  4. \begin{numcases}{}
  5. \frac{1}{ T(t)} \partial_{tt} T(t) = - \lambda^2, \\
  6. c^2 \frac{1}{R(r)} \partial_{rr} R(r) + \frac{1}{R(r)} \frac{1}{r}
  7. \partial_{r} R(r) + \frac{1}{r^2} \partial_{\theta \theta} \frac{1}{\Theta
  8. ( \theta) } \Theta( \theta ) = - \lambda^2. \label{eq:sep_var2}
  9. \end{numcases}
  10. \end{document}


Stefan
Site admin

keepitcool
Posts: 2
Joined: Sat Feb 13, 2016 7:42 pm

Postby keepitcool » Sat Feb 13, 2016 10:05 pm

Thank you for the reply, it was really helpful!


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 4 guests