# I have not found the appropriate character that resembles a vertical bar

I'm trying to do these integration steps, but I have not found the appropriate character that resembles a vertical bar.

The bars in question are the ones I highlighted below:

This is the output that Mathematica software provides:

\documentclass{article}
\usepackage{amsmath, amssymb, graphics, setspace}

\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}[1]{{}}

\newcounter{mathematicapage}
\begin{document}

V=\int_0^H 1 \, dV\Rightarrow \left(V=\int_0^H A' \, dh\right)\Rightarrow \left(V=\int_0^H \frac{A h^2}{H^2} \, dh\right)\Rightarrow \left(V=\frac{A \int_0^H h^2 \, dh}{H^2}\right)\Rightarrow \left(V=\frac{A}{H^2}\left|\frac{h^3}{3}\right|\left(
\begin{array}{c}
H \\
0 \\
\end{array}
\right)\right)\Rightarrow V=\frac{A H^3}{3 H^2}\Rightarrow V=\frac{A H}{3}

\end{document}

• Your equation has a red box, but you talk about a vertical bar. What do you need? – Moriambar Jun 13 '17 at 17:49
• Is V=\left|\frac{A H^3}{3 H^2}\right|^{H}_{0} acceptable? Please correct your MWE (delete all what is not needed, add missing math environment). – Zarko Jun 13 '17 at 17:57
• 'V=\frac{A}{H^2}\left|\frac{h^3}{3}\right|_0^H. If you need it bigger, try \bigg or \Bigg. – Huang_d Jun 13 '17 at 17:57
• On closer inspection, you already have \left| \right| in your code. What is missing for you? The array attempt is unnecessary, you can use ^ and _. – Huang_d Jun 13 '17 at 18:05

The way to get the lines is \left| and \right|. But might I suggest replacing (4) with (7) in this derivation.

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

\begin{document}

\begin{align}
V &= \int_0^H dV\\
&= \int_0^H A'\,dh\\
&= \int_0^H \frac{Ah^2}{H^2}\,dh\\
&= \frac{A}{H^2}\left|\frac{h^3}{3}\right|_0^H\\
&= \frac{A}{H^2}\cdot\frac{H^3}{3}\\
&= \frac{1}{3}AH.
\end{align}

$$V=\frac{A}{H^2}\left[\frac{h^3}{3}\right]_0^H$$

\end{document}


Frequently, you'll want just a single, right bar. In which case \left. and \right| can be used.

• I appreciate the care in showing all the steps I needed. I've never worked with Latex. I use the Mathematica program to export the code, but I never compiled it to see the result. – LCarvalho Jun 13 '17 at 18:06
• What is the reason why you suggest replacing (4) with (7) in this derivation? – LCarvalho Jun 13 '17 at 21:11
• Because | | is an absolute value where as [ ] are just brackets. – TH. Jun 13 '17 at 22:08
• @CarLaTeX I agree with your decision to delete my answer, because at least for me the answer is visible. – LCarvalho Jun 14 '17 at 12:51

Let me extend my comment to an answer...

\documentclass{article}
\usepackage{mathtools}
\delimitershortfall-1sp
\DeclarePairedDelimiter\abs{\lvert}{\rvert}

\begin{document}
$V=\abs*{\frac{A H^3}{3 H^2}}_0^H$
\end{document}


• @LCarvalho, sorry, I don't understand you. I just down-wrote your highlighted part of your equation where no h, but replace H with h should not be big deal ... Please, consider my first comment and correct your question as I suggested (delete all not relevant stuff and define math environment). Help us to help you. – Zarko Jun 13 '17 at 18:18
• You forgive me. I did not understand you gave a generic example. I'll delete the comment. My intention was not to be rude. I'm Brazilian and I may have expressed myself wrong. – LCarvalho Jun 13 '17 at 18:30
• @LCarvalho, I only worry, that I miss something in your question. You are not rude at all :). If you like that I edit your equation like TH do, I can extend my answer. Many greetings to Brazil (huge and very beautiful country ...) – Zarko Jun 13 '17 at 18:39
• I am always grateful to everyone who helps me on these sites in general. We Brazilians are going through a political crisis and I am struggling to learn new things that make me better every day. – LCarvalho Jun 13 '17 at 18:49