Serving the Quantitative Finance Community

• 1
• 2

snufkin
Topic Author
Posts: 64
Joined: January 25th, 2017, 9:05 am
Location: Cambridge

### Inline math

It's more of a question; how do I enter an inline math? I can indeed enter $\frac{\partial V}{\partial t} + \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 S}{\partial S^2} + r S \frac{\partial V}{\partial S} - r V = 0,$ but I cannot (or don't know how) to use a lousy $\varepsilon$ inline!

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Inline math

like this $\varepsilon$ perhaps?

you put a dollar sign inside square brackets either side of the expression

[ $] \varepsilon [$ ]
but with no spaces (and note there is no \  )

snufkin
Topic Author
Posts: 64
Joined: January 25th, 2017, 9:05 am
Location: Cambridge

### Re: Inline math

Thanks ppauper, it's great!

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

$\frac{\partial^3 u}{\partial x \partial y \partial z} = f$

Anyone know if this PDE has a name?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Inline math

I've never come across $\frac{\partial^3 u}{\partial x \partial y \partial z} = f$, which doesn't mean that it doesn't have a name
if it helps (it probably doesn't) the 2D version is a version of the poisson equation
$\nabla^{2}u=f$ becomes $4\frac{\partial^2 u}{\partial z\partial\bar{z}} = f$ with $z=x+iy$ and $\bar{z}=x-iy$

katastrofa
Posts: 10082
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: Inline math

That's something I would expect to find in the description of a fractal growth patterns in 3D, fluid mixing, amorphous or organic body surface formation, etc.

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

In all cases it is some kind of hyperbolic PDE. In the case of two independent variables we can transform

$\frac{\partial^2 u}{\partial x^2} - \frac{\partial^2 u}{\partial y^2}$

to

$\frac{\partial^2 u}{\partial \xi \partial \eta }$

by the change of coordinates

$x = (\xi + \eta), y = (\xi - \eta)$

Now the open question is if this works in 3 independent variables. Not sure if an uneven number of independent variables carries over.

$\frac{\partial^2 u}{\partial x^2}$ $- \frac{\partial^2 u}{\partial y^2}$ $- \frac{\partial^2 u}{\partial z^2}$

This PDE looks more benign for some reason

$\frac{\partial^2 u}{\partial x^2}$ $- \frac{\partial^2 u}{\partial y^2} - \frac{\partial^2 u}{\partial z^2} - \frac{\partial^2 u}{\partial p^2}$

I think applications can be found in anisotropic waves.

// BTW the second derivatives are a bit shifted. It that the way it works here or am I missing a bracket etc?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Inline math

where I've come across the 2D version is Liouville's equation

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

where I've come across the 2D version is Liouville's equation
This is similar; in this case it is a concatenation of 1st order operators
$\frac{\partial }{\partial z} - i\frac{\partial }{\partial \overline{z}}$ and $\frac{\partial u}{\partial z} + i\frac{\partial u}{\partial \overline{z}}$. This is is the elliptic case.

The hyperbolic case is similar but in real space.

$\frac{\partial^2 u}{\partial x^2} - \frac{\partial^2 u}{\partial y^2}$ = $(\frac{\partial }{\partial x} - \frac{\partial }{\partial {y}})$  $(\frac{\partial u}{\partial x} + \frac{\partial u}{\partial {y}})$.

Then $x = (\xi + \eta), y = (\xi - \eta)$ leads to $\frac{\partial^2 u}{\partial \xi \partial \eta }$ .

Putting in a convection/drift term seems to cause meltdown fubar.

//
used \overline for complex conjugation, better than \bar?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

test

$\displaystyle\lim_{n\to\infty} (1 + r/n)^{nt}$
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

A good friend is trying to create _general_ bidiagobnal matrix in LATEX

https://en.wikipedia.org/wiki/Bidiagonal_matrix

(with difficulty). Any templates for this?

Tridiagonal matrices are OK
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Inline math

what exactly do you want, a lot of the entries replaced by $\cdots$ or $\vdots$ or $\ddots$?

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

what exactly do you want, a lot of the entries replaced by $\cdots$ or $\vdots$ or $\ddots$?
The prototypical example is the upper bidiagonal matrix here.
https://www.quantstart.com/articles/Tri ... -Algorithm
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Inline math

what exactly do you want, a lot of the entries replaced by $\cdots$ or $\vdots$ or $\ddots$?
The prototypical example is the upper bidiagonal matrix here.
https://www.quantstart.com/articles/Tri ... -Algorithm
in firefox, when you right click on a picture, you can copy the URL
when I right click on the equation on that site, it gives me the tex
$\begin{bmatrix} 1 & c^{*}_1 & 0 & 0 & ... & 0 \\ 0 & 1 & c^{*}_2 & 0 & ... & 0 \\ 0 & 0 & 1 & c^{*}_3 & 0 & 0 \\ . & . & & & & . \\ . & . & & & & . \\ . & . & & & & c^{*}_{k-1} \\ 0 & 0 & 0 & 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} f_1 \\ f_2 \\ f_3 \\ .\\ .\\ .\\ f_k \\ \end{bmatrix} = \begin{bmatrix} d^{*}_1 \\ d^{*}_2 \\ d^{*}_3 \\ .\\ .\\ .\\ d^{*}_k \\ \end{bmatrix}$

Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Inline math

That works great. Thanks.
We added some icing by printing the ellipsis .. . along the diagonals.
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl