3

I want to write this equation from the image.enter image description here

This is what I tried but I am getting an error about math mode only

\begin{equation}
 v_\pi(s) = \mathbb{E}(G\textsubscript{t}\mid S\textsubscript{t} = s) = 
  \mathbb{E}\textsubscript{\pi} (\sum_{n=0}^{+\infty} \gamma^k R\textsubscript{t+k+1} \mid S\textsubscript{t} = s)
  \end{equation}
  
3
  • Why \textsubscript? It should be R_{t+k+1} and similarly in the other cases.
    – egreg
    Commented Jul 11, 2022 at 13:30
  • You can play with Mathpix FREELY.
    – projetmbc
    Commented Jul 11, 2022 at 13:39
  • Find Mathpix here: mathpix.com
    – MS-SPO
    Commented Jul 11, 2022 at 13:41

1 Answer 1

4

As any beginner's guide to LaTeX will tell you, math subscripts are entered prefixing them with _. As the name says, \textsubscript is for subscripts in text mode (the command itself was added rather recently).

Exactly like in v_{\pi}: why should the other cases be different?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{equation}
v_{\pi}(s)
= \mathbb{E}_{\pi}[G_{t}\mid S_{t} = s]
= \mathbb{E}_{\pi} \biggl[\,\sum_{n=0}^{+\infty} \gamma^k R_{t+k+1} \biggm| S_{t} = s\biggr]
\end{equation}

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .