Math & Scienceadding tabular in equation/math enviroment

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
afa0011
Posts: 8
Joined: Mon Sep 24, 2018 6:18 pm

adding tabular in equation/math enviroment

Post by afa0011 »

can you help me fith the following expression please ?

\begin{equation}
F=\left\lbrace
\begin{tabular}{ll}
$F_{app}\mu_{k}\sin (v) $ & $if \quad v>0$, \\
$ F_{app}$ & if$ \quad v=0 \quad and \quad F_{app}\leq F_{app} \mu_{s}$,
\end{tabular}
\right
%\label{RRRR}
\end{equation}

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

adding tabular in equation/math enviroment

Post by Stefan Kottwitz »

Hi!

There's a math equivalent to tabular, it's array. Here is how I would do it:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator\app{app}
\begin{document}
\begin{equation}
  F = \left\lbrace
        \begin{array}{ll}
           F_{\app} \, \mu_{k} \sin(v) & \text{ if } v > 0, \\
           F_{\app} & \text{ if } v = 0
                          \text{ and } F_{\app}\leq F_{\app} \, \mu_{s}
        \end{array}
      \right.
%\label{RRRR}
\end{equation}
\end{document}
I defined an operator, since it that index looks like an operator (that's usually written in upright shape) and not like a product of a, p, and p. Furthermore, I treated text (if, and) as text. What do you think?
equation.png
equation.png (9.99 KiB) Viewed 2590 times
Stefan
LaTeX.org admin
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

adding tabular in equation/math enviroment

Post by mas »

Just a small change to Stefan's answer. I suggest the use of {cases} for typesetting the equation. Here is the code:

Code: Select all

\documentclass{article}                                                                                                                                                                       
\usepackage{amsmath}                                                                                                                                                                          
\DeclareMathOperator\app{app}                                                                                                                                                                 
\begin{document}                                                                                                                                                                              
\begin{equation}                                                                                                                                                                              
  F =                                                                                                                                                                                         
    \begin{cases}                                                                                                                                                                             
       F_{\app} \, \mu_{k} \sin(v) & \text{ if } v > 0, \\                                                                                                                                    
       F_{\app} & \text{ if } v = 0                                                                                                                                                           
                      \text{ and } F_{\app}\leq F_{\app} \, \mu_{s}                                                                                                                           
    \end{cases}                                                                                                                                                                               
%\label{RRRR}                                                                                                                                                                                 
\end{equation}                                                                                                                                                                                
\end{document}

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Post Reply