Generalvertical lines - evaluating derivatives....

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
newlou
Posts: 7
Joined: Tue Feb 19, 2008 10:49 pm

vertical lines - evaluating derivatives....

Post by newlou »

Hi there,

This may be a little hard to explain, but I am basically trying to write down a couple of derivatives that are evaluated at certain points, and to denote this I want to use vertical lines and underscores. Here is my code:

\bar{\sigma}\left(\frac{d^2 \bar{h}}{d \bar{x}^2}\left|_{\bar{x}=0} - \frac{d^2 \bar{h}}{d \bar{x}^2}\right|_{\bar{x}=1}\right)

As you can see I have tried to use \left| and \right| followed by _{}. The rhs prints fine, but the x = 0 on the lhs prints half way up the derivative instead of at the bottom where I want it....

Can anyone help?

Thanks,

L

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

vertical lines - evaluating derivatives....

Post by Stefan Kottwitz »

Hi newlou,

use \left and \right in correct pairs. You can use \right| together with \left. etc. With your example:

Code: Select all

\bar{\sigma}\left(\left.\frac{d^2 \bar{h}}{d \bar{x}^2}\right|_{\bar{x}=0} -
\left.\frac{d^2 \bar{h}}{d \bar{x}^2}\right|_{\bar{x}=1}\right)
Stefan
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

vertical lines - evaluating derivatives....

Post by localghost »

There is a more convenient way to adapt such delimiters in their size. Modify your code as follows.

Code: Select all

\[
  \bar{\sigma}\left(\frac{d^2 \bar{h}}{d \bar{x}^2}\,\bigg|_{\bar{x}=0} - \frac{d^2 \bar{h}}{d \bar{x}^2}\,\bigg|_{\bar{x}=1}\right)
\]
These are TeX primitives, but they also work with the (preferably to use) amsmath package.


Best regards
Thorsten¹
newlou
Posts: 7
Joined: Tue Feb 19, 2008 10:49 pm

Re: vertical lines - evaluating derivatives....

Post by newlou »

Thanks, that's very helpful :)
Post Reply